跳转首页 注册报错
This commit is contained in:
19
src/App.vue
19
src/App.vue
@@ -16,8 +16,9 @@ import { provideI18n } from "@/utils/i18n"
|
||||
import i18ninit from "@/i18n/init"
|
||||
import enUS from 'ant-design-vue/es/locale/en_US';
|
||||
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
import dayjs from 'dayjs';
|
||||
import dayjs, { locale } from 'dayjs';
|
||||
import { getaddr } from './api';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
export default defineComponent({
|
||||
setup(){
|
||||
@@ -29,6 +30,12 @@ export default defineComponent({
|
||||
store.commit("login", true)
|
||||
store.dispatch("getcode");
|
||||
store.dispatch("setUserInfo");
|
||||
const patn = useRoute().path;
|
||||
if(patn == "/"){
|
||||
router.push("/mine/archives").then(()=>{
|
||||
location.reload()
|
||||
})
|
||||
}
|
||||
}else{
|
||||
|
||||
console.log('ip')
|
||||
@@ -38,14 +45,8 @@ export default defineComponent({
|
||||
}
|
||||
const zh = zhCN
|
||||
const en = enUS
|
||||
/* eslint-disable */
|
||||
const utc = require('dayjs/plugin/utc') // dependent on utc plugin
|
||||
/* eslint-disable */
|
||||
const timezone = require('dayjs/plugin/timezone')
|
||||
const days: any = dayjs;
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
console.log(days.tz.guess())
|
||||
|
||||
|
||||
return{
|
||||
zh,
|
||||
en,
|
||||
|
||||
Reference in New Issue
Block a user