vue多页面demo
您最多能選擇 25 個主題 主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。
 
 

28 行
523 B

import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from '@/store'
Vue.config.productionTip = false
router.beforeEach((to, from, next) => {
if (!to.query.appId) {
if (from.query.appId) {
to.query.appId = from.query.appId
} else {
to.query.appId = window.location.href.match(/appId=(.*)/)[1]
}
}
next()
})
router.afterEach((to, from) => {
})
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')