接口节流优化

This commit is contained in:
仲么了
2023-08-31 16:14:15 +08:00
parent 14c7eb5bb1
commit fb5de4370b
4 changed files with 20 additions and 11 deletions

View File

@@ -46,6 +46,7 @@ export default {
onLoad(options) {
this.options = options
this.engineeringList = uni.getStorageSync('engineeringList')
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
},
onShow() {
queryEngineering().then(res => {
@@ -53,9 +54,16 @@ export default {
})
},
onNavigationBarButtonTap(e) {
uni.navigateTo({
url: '/pages/engineering/new',
})
if (this.userInfo.authorities === 'app_vip_user' || this.userInfo.authorities === 'engineering_user') {
uni.navigateTo({
url: `/pages/engineering/new`,
})
} else {
uni.showToast({
title: '暂无权限',
icon: 'none',
})
}
},
methods: {
confirm(e) {