状态码报错

This commit is contained in:
2022-12-05 11:20:52 +08:00
parent fd7f08d6c5
commit ad710aa0a7
4 changed files with 74 additions and 22 deletions

View File

@@ -95,7 +95,7 @@
</template>
<script>
import {authority} from '@config/getData2.js'
import {handRequest, authority} from '@config/getData2.js'
export default {
name: 'Home',
data () {
@@ -111,6 +111,7 @@ export default {
document.getElementsByTagName('body')[0].className = 'bgwhite'
},
created () {
// this._handRequest()
this._authority()
},
// beforeDestroy () {
@@ -140,6 +141,12 @@ export default {
}
this.$router.push(e.path.substr(2))
},
async _handRequest () {
let res = await handRequest()
if (res.code === '1') {
this.toast(res.desc)
}
},
async _authority () {
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : ''
let res = await authority(accountId)