Commit e68ec36f by liwk

commit

1 parent 47e15e16
import Vue from 'vue' import Vue from 'vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
import routes from './routes' import routes from './routes'
import { Toast } from 'vant'
Vue.use(VueRouter)
const router = new VueRouter({
routes
})
import { import {
Toast,
Notify Notify
} from 'vant' } from 'vant'
import store from '@/store' import store from '@/store'
import { common } from '../api/api' import { common } from '../api/api'
Vue.use(VueRouter)
const router = new VueRouter({
routes
})
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
let { meta: { authBase } } = to let { meta: { authBase } } = to
if (to.name != 'common.phoneLogin') store.commit('jumpPath', to.name) if (to.name != 'common.phoneLogin') store.commit('jumpPath', to.name)
if (to.matched.some(recode => recode.meta.hasAuth)) { if (to.matched.some(recode => recode.meta.wxAuth)) {
const ua = navigator.userAgent.toLowerCase() const ua = navigator.userAgent.toLowerCase()
const params = getParams(window.location.href) const params = getParams(window.location.href)
if (window.__wxjs_environment === 'miniprogram') { if (window.__wxjs_environment === 'miniprogram') {
......
const pages = { const pages = {
equity: [{ name: 'index', hasAuth: true }, { name: 'road', title: '道路救援' }], equity: [{ name: 'index', wxAuth: true }, { name: 'road', title: '道路救援' }],
common: [ common: [
{ name: 'index', hasAuth: true }, { name: 'index', wxAuth: true },
{ name: 'activate', title: '激活权益' }, { name: 'activate', title: '激活权益' },
{ name: 'explain', title: '常见疑问' }, { name: 'explain', title: '常见疑问' },
{ name: 'phoneLogin', title: '登录' }, { name: 'phoneLogin', title: '登录' },
...@@ -11,12 +11,12 @@ const pages = { ...@@ -11,12 +11,12 @@ const pages = {
title: '绑定挪车码' title: '绑定挪车码'
}, { }, {
name: 'index', name: 'index',
hasAuth: true, wxAuth: true,
title: '绑定挪车码' title: '绑定挪车码'
}], }],
device: [{ device: [{
name: 'index', name: 'index',
hasAuth: true, wxAuth: true,
authBase: true, authBase: true,
title: '设备关联' title: '设备关联'
}, },
......
...@@ -115,7 +115,8 @@ export default { ...@@ -115,7 +115,8 @@ export default {
}, },
methods: { methods: {
jump () { jump () {
window.location.href = `${window.location.href.split('#')[0]}/#/car/index` const appId = sessionStorage.getItem('GL_WX_APPID')
window.location.href = `${window.location.href.split('#')[0]}/#/car/index?appId=${appId}`
} }
} }
} }
......
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
<div class="add"> <div class="add">
<div class="sprite-icon icon-device-add"></div> <div class="sprite-icon icon-device-add"></div>
上传安装设备的车辆VIN码 上传安装设备的车辆VIN码
<div class="tips">
注:<div>VIN码是车辆车架号,通常位于<br>汽车前挡风玻璃左/右下角</div>
</div>
</div> </div>
</template> </template>
</div> </div>
...@@ -318,9 +321,21 @@ export default { ...@@ -318,9 +321,21 @@ export default {
.add { .add {
font-size: 16px; font-size: 16px;
color: #999999; color: #999999;
text-align: center;
.icon-device-add { .icon-device-add {
margin: 0 auto 10px; margin: 0 auto 10px;
} }
.tips {
margin-top: 12px;
color: #c6c6c6;
font-size: 10px;
display: flex;
align-items: flex-start;
justify-content: center;
div {
text-align: left;
}
}
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!