路由修改

This commit is contained in:
na.guo
2020-08-07 17:32:21 +08:00
parent 7733f0fdfa
commit 832a39ca15
5 changed files with 38 additions and 20 deletions

View File

@@ -1,19 +1,17 @@
import config from '@/config'
export default {
refreshImg() {
if (window.WebViewJavascriptBridge) {
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: config.mainUrl + '/images/refresh.png',
route: {
flag: '',
extra: {}
}
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: config.mainUrl + '/images/refresh.png',
route: {
flag: '',
extra: {}
}
]
})
}
}
]
})
},
closeBtn(that) {
if (window.WebViewJavascriptBridge) {

View File

@@ -92,12 +92,19 @@ export default [
},
{
//活动人力
path: '/institutionalPerform/institutionalManpower',
path: '/institutionalPerform/institutionalManpower/:manageLv/:manageCode',
name: 'InstitutionalManpower',
component: InstitutionalManpower,
meta: {
title: '机构业绩',
index: 1
}
// children: [
// {
// path: '/:manageCode',
// component: InstitutionalManpower,
// name: 'InstitutionalManpower1'
// }
// ]
}
]

View File

@@ -7,6 +7,11 @@ import Ebiz from './ebiz'
Vue.use(Router)
//解决路由重复的报错
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
const constantRouterMap = [...App, ...Example, ...Ebiz] //后续可以删减模块
export default new Router({

View File

@@ -13,9 +13,10 @@ const myMixin = {
created() {
var that = this
console.log(this)
setTimeout(() => {
getApp.closeBtn(that)
window.appCallBack = that.appCallBack
}, 400)
}
}
export default myMixin

View File

@@ -138,12 +138,16 @@ export default {
toDetail(manageCode) {
this.manageLv = '0' + (Number(this.manageLv) + 1)
this.manageCode = manageCode
this.getlComPremDetil()
document.querySelector('.layer').scrollTo(0, 0);//重置滚动条
let manageLv = '0' + (Number(this.manageLv) + 1)
// this.manageCode = manageCode
console.log(`/institutionalPerform/institutionalManpower/${manageLv}/${manageCode}`)
this.$router.push(`/institutionalPerform/institutionalManpower/${manageLv}/${manageCode}`) ;
this.manageLv=this.$route.params.manageLv;
this.manageCode=this.$route.params.manageCode
console.log('this.manageLv',this.manageLv)
this.getlComPremDetil()
},
getCurrentDate() {
@@ -225,6 +229,9 @@ export default {
// setInterval(this.getCurrentDate, 1000 * 60)
this.dateVal = util.getMonthLastDay()
this.manageLv=this.$route.params.manageLv;
this.manageCode=this.$route.params.manageCode
this.getlComPremDetil()
}
}