增加退款权限校验
This commit is contained in:
@@ -49,6 +49,8 @@
|
||||
import tuicaiVue from './components/tuicai.vue';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import {$hasPermission} from '@/http/yskApi/shop.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
@@ -70,9 +72,18 @@
|
||||
tuicai.isSeatFee = seatFee
|
||||
tuicai.selGoods = seatFee
|
||||
}
|
||||
|
||||
function onSeatFeeTuiKuan(seatFee) {
|
||||
//是否有允许退款权限
|
||||
async function hasTuiKuan(){
|
||||
const isHas=await hasPermission('允许退款')
|
||||
return isHas
|
||||
}
|
||||
|
||||
async function onSeatFeeTuiKuan(seatFee) {
|
||||
console.log(seatFee);
|
||||
const canTuikuan=await hasTuiKuan()
|
||||
if(!canTuikuan){
|
||||
return
|
||||
}
|
||||
const {
|
||||
id,
|
||||
productId,
|
||||
@@ -138,8 +149,13 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function onTuikuan(goods, index) {
|
||||
|
||||
|
||||
async function onTuikuan(goods, index) {
|
||||
const canTuikuan=await hasTuiKuan()
|
||||
if(!canTuikuan){
|
||||
return
|
||||
}
|
||||
const {
|
||||
id,
|
||||
productId,
|
||||
@@ -147,6 +163,7 @@
|
||||
productName,
|
||||
productSkuName,
|
||||
cartId,
|
||||
orderId,
|
||||
num,
|
||||
priceAmount,
|
||||
price
|
||||
@@ -154,6 +171,7 @@
|
||||
go.to('PAGES_ORDER_TUIKUAN', {
|
||||
id,
|
||||
cartId,
|
||||
orderId,
|
||||
productId,
|
||||
productSkuId,
|
||||
productName,
|
||||
|
||||
Reference in New Issue
Block a user