Spaces:
Sleeping
Sleeping
Download composables/useLoginCheck.ts from asemxin2000/wechat-article: direct link, hf CLI and curl.
- Browser
- Download file 380 Bytes
-
https://huggingface.co/spaces/asemxin2000/wechat-article/resolve/main/composables/useLoginCheck.ts
- Command line
-
hf download hf://spaces/asemxin2000/wechat-article/composables/useLoginCheck.ts
-
curl -L -o useLoginCheck.ts https://huggingface.co/spaces/asemxin2000/wechat-article/resolve/main/composables/useLoginCheck.ts
380 Bytes
| import LoginModal from '~/components/modal/Login.vue'; | |
| export default () => { | |
| const modal = useModal(); | |
| const loginAccount = useLoginAccount(); | |
| // 检查是否有登录信息 | |
| function checkLogin() { | |
| if (loginAccount.value === null) { | |
| modal.open(LoginModal); | |
| return false; | |
| } | |
| return true; | |
| } | |
| return { | |
| checkLogin, | |
| }; | |
| }; | |