|
@@ -35,16 +35,16 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
permissionRoutes(){
|
|
|
- return this.routes
|
|
|
+ return this.routes.filter(route => this.isShow.includes(route.permission) || this.isShow.includes(Number(route.permission)))
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
document.title = "数据导航"
|
|
|
- // if (!getParameterByName('code')) {
|
|
|
- // this.login()
|
|
|
- // } else {
|
|
|
- // this.requestUserinfo()
|
|
|
- // }
|
|
|
+ if (!getParameterByName('code')) {
|
|
|
+ this.login()
|
|
|
+ } else {
|
|
|
+ this.requestUserinfo()
|
|
|
+ }
|
|
|
},
|
|
|
methods:{
|
|
|
goRouter(e,link){
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
login() {
|
|
|
- const redirect_url = encodeURIComponent('http://stat.caixiao365.com/accountsReceivable')
|
|
|
+ const redirect_url = encodeURIComponent('http://stat.caixiao365.com/')
|
|
|
var state = 'wx_' + Math.random().toString(36).substr(2, 15)
|
|
|
const scope = 'snsapi_userinfo'
|
|
|
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.appId}&redirect_uri=${redirect_url}&response_type=code&scope=${scope}&state=${state}#wechat_redirect`
|