|
@@ -11,6 +11,7 @@ VueRouter.prototype.push = function push(location, onResolve, onReject) {
|
|
|
}
|
|
|
// @ts-ignore
|
|
|
import { getPvUv } from '@/api/public.js'
|
|
|
+import { nextTick } from 'vue/types/umd'
|
|
|
Vue.use(VueRouter)
|
|
|
|
|
|
const routes: Array<RouteConfig> = [
|
|
@@ -24,6 +25,15 @@ const routes: Array<RouteConfig> = [
|
|
|
keepAlive: true,
|
|
|
showTabbar: true,
|
|
|
},
|
|
|
+ // 进入H5页面时,如果有assetid,跳转到设备详情页面
|
|
|
+ beforeEnter(to, from, next) {
|
|
|
+ if (to.query.assetid) {
|
|
|
+ let assetid = to.query.assetid
|
|
|
+ next({ name: 'AssetDetail', query: { assetid } })
|
|
|
+ } else {
|
|
|
+ next()
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
// 项目概况
|
|
|
{
|