diff --git a/src/const/config.ts b/src/const/config.ts index b4b8b85..b7a3362 100644 --- a/src/const/config.ts +++ b/src/const/config.ts @@ -1,3 +1,5 @@ +import { Tenant } from '@/entity'; +import { tenantStore } from '@/store/modules/tenant'; import router from '../router' import { setToken, setTenant } from '../utils/auth' @@ -41,7 +43,27 @@ const scan_method: any = { production: (qrcode: string) => { window.location.href = qrcode }, - development: () => { + development: async () => { + + const useTenantStore = tenantStore() + const tenant: Tenant = { + tenant_id: '7788', + account: '小小的测试账户' + } + let token = 'ABCDEFG' + + await useTenantStore.login(tenant, token).then(() => { + const { href } = router.resolve({ + path: '/' + }) + window.open(href, '_self') + }).catch((error) => { + const { href } = router.resolve({ + path: '/login' + }) + window.open(href, '_self') + }) + setToken("token") setTenant( { diff --git a/src/router/index.ts b/src/router/index.ts index dd865cf..afd9b6b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -34,10 +34,10 @@ const routes: Array = [ } }, { - path: '/thinking', - component: () => import('../view/thinking/index.vue'), + path: '/calendar', + component: () => import('../view/calendar/index.vue'), meta: { - name: '感悟人生' + name: '日历' } }, { diff --git a/src/view/bookmark/Typedialog.vue b/src/view/bookmark/Typedialog.vue index 98c9a03..00198c3 100644 --- a/src/view/bookmark/Typedialog.vue +++ b/src/view/bookmark/Typedialog.vue @@ -53,7 +53,7 @@