|
@@ -25,7 +25,7 @@ export default {
|
|
|
auth_data:'',
|
|
|
isneedpay:false,
|
|
|
dialogVisible:false,
|
|
|
- usertype:21
|
|
|
+ usertype:21,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -38,24 +38,53 @@ export default {
|
|
|
methods:{
|
|
|
handleOpen () {},
|
|
|
handleClose () {},
|
|
|
- // 查询应用授权
|
|
|
- getAuthList () {
|
|
|
- let active_modules = JSON.parse(sessionStorage.getItem('active_modules'))
|
|
|
- this.auth_data = active_modules.apps
|
|
|
- let usertype = JSON.parse(sessionStorage.getItem('active_account'))
|
|
|
- this.usertype = usertype.usertype
|
|
|
- console.log(this.usertype,'usertype')
|
|
|
- if (this.activePath) {
|
|
|
- this.activePath = active_modules.apps[0].path
|
|
|
- } else {
|
|
|
- if (this.auth_data[0].isneedpay){
|
|
|
- this.activePath = '/mask'
|
|
|
- this.$router.replace({path:'/mask',meta:{title: '无权限'}})
|
|
|
- this.open()
|
|
|
- }else {
|
|
|
- this.activePath = this.$route.path
|
|
|
+ // 获取应用授权
|
|
|
+ getAuthList (flags) {
|
|
|
+ if (flags === 1) {
|
|
|
+ let active_modules = JSON.parse(sessionStorage.getItem('active_modules'))
|
|
|
+ this.auth_data = active_modules.apps
|
|
|
+ let usertype = JSON.parse(sessionStorage.getItem('active_account'))
|
|
|
+ this.usertype = usertype.usertype
|
|
|
+ if (this.activePath) {
|
|
|
+ this.activePath = active_modules.apps[0].path
|
|
|
+ } else {
|
|
|
+ if (this.auth_data[0].isneedpay){
|
|
|
+ this.activePath = '/mask'
|
|
|
+ this.$router.replace({path:'/mask',meta:{title: '无权限'}})
|
|
|
+ this.open()
|
|
|
+ }else {
|
|
|
+ this.activePath = this.$route.path
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ let active_modules = JSON.parse(sessionStorage.getItem('active_modules'))
|
|
|
+ this.auth_data = active_modules.apps
|
|
|
+ let usertype = JSON.parse(sessionStorage.getItem('active_account'))
|
|
|
+ this.usertype = usertype.usertype
|
|
|
+ if (this.activePath) {
|
|
|
+ this.activePath = active_modules.apps[0].path
|
|
|
+ } else {
|
|
|
+ if (this.auth_data[0].isneedpay){
|
|
|
+ this.query_userauth()
|
|
|
+ }else {
|
|
|
+ this.activePath = this.$route.path
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ },
|
|
|
+ // 查询应用授权
|
|
|
+ async query_userauth () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "system.payorder.payorder",
|
|
|
+ "method": "query_userauth",
|
|
|
+ "content": {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.auth_data = res.data
|
|
|
+ sessionStorage.setItem('module_info', JSON.stringify(this.auth_data))
|
|
|
+ this.getAuthList(1)
|
|
|
+ /*this.$router.push('/main')*/
|
|
|
},
|
|
|
clickNow(val){
|
|
|
this.isneedpay = val.isneedpay
|