代码更新
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
$hasPermission
|
||||
} from '@/http/yskApi/shop.js'
|
||||
import { $hasPermission } from '@/http/yskApi/shop.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
|
||||
const $PermissionObj = {
|
||||
@@ -147,17 +145,18 @@ export async function hasPermission(params) {
|
||||
if (!params) {
|
||||
return infoBox.showToast('未找到相关权限,请检查代码或在权限配置文件commons/utils/hasPermission.js文件进行修改或增加')
|
||||
}
|
||||
const option = Object.assign({
|
||||
tips: true,
|
||||
key: '',
|
||||
text: ''
|
||||
}, params)
|
||||
const res = await $hasPermission({
|
||||
code: params.key
|
||||
})
|
||||
if (!res && option.tips) {
|
||||
infoBox.showToast('您没有' + params.text + '权限!')
|
||||
}
|
||||
return res
|
||||
// const option = Object.assign({
|
||||
// tips: true,
|
||||
// key: '',
|
||||
// text: ''
|
||||
// }, params)
|
||||
// const res = await $hasPermission({
|
||||
// code: params.key
|
||||
// })
|
||||
// if (!res && option.tips) {
|
||||
// infoBox.showToast('您没有' + params.text + '权限!')
|
||||
// }
|
||||
// return res
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user