add alias @ as path
This commit is contained in:
+23
-1
@@ -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(
|
||||
{
|
||||
|
||||
+3
-3
@@ -34,10 +34,10 @@ const routes: Array<RouteRecordRaw> = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/thinking',
|
||||
component: () => import('../view/thinking/index.vue'),
|
||||
path: '/calendar',
|
||||
component: () => import('../view/calendar/index.vue'),
|
||||
meta: {
|
||||
name: '感悟人生'
|
||||
name: '日历'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive, ref } from 'vue'
|
||||
import { delete_bookmark_type, post_bookmark_type, get_bookmark_type } from '../../api/bookmark_type'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
const formLabelWidth = '140px'
|
||||
|
||||
Reference in New Issue
Block a user