feat: add index page for mobile

This commit is contained in:
RockYang
2024-04-28 19:09:26 +08:00
parent b354b88876
commit 99df028237
28 changed files with 640 additions and 349 deletions

View File

@@ -1,6 +1,8 @@
/**
* Util lib functions
*/
import {showConfirmDialog} from "vant";
import {useRouter} from "vue-router";
// generate a random string
export function randString(length) {
@@ -224,3 +226,15 @@ export function escapeHTML(html) {
export function isIphone() {
return /iPhone/i.test(navigator.userAgent) && !/iPad/i.test(navigator.userAgent);
}
export function showLoginDialog(router) {
showConfirmDialog({
title: '登录',
message:
'当前操作需要登录才能进行,前往登录?',
}).then(() => {
router.push("/login")
}).catch(() => {
// on cancel
});
}