优化分店营销中心的权限问题
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
</template>
|
||||
<my-model ref="model" :desc="modelData.desc"></my-model>
|
||||
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker"></my-date-pickerview>
|
||||
<my-marketing-mask name="智慧充值" v-if="isMarketShow(shopRechargeRes)"></my-marketing-mask>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -105,7 +106,7 @@ import $util from '@/commons/utils/getDateArea.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { shopRechargePost, shopRechargeGet } from '@/http/api/market/index.js';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { isMainShop } from '@/store/account.js';
|
||||
import { isMainShop, isMarketShow } from '@/store/account.js';
|
||||
|
||||
const isCanEdit = computed(() => {
|
||||
return isMainShop();
|
||||
@@ -192,11 +193,12 @@ function useTypeChange(e) {
|
||||
}
|
||||
|
||||
// 获取设置
|
||||
const shopRechargeRes = ref({});
|
||||
async function shopRechargeGetAjax() {
|
||||
try {
|
||||
const res = await shopRechargeGet();
|
||||
isOpen.value = res.isEnable;
|
||||
res.rechargeDetailList.forEach((item) => {
|
||||
shopRechargeRes.value = await shopRechargeGet();
|
||||
isOpen.value = shopRechargeRes.value.isEnable;
|
||||
shopRechargeRes.value.rechargeDetailList.forEach((item) => {
|
||||
item.couponInfoList.forEach((val) => {
|
||||
if (val.coupon && val.coupon !== null) {
|
||||
val.id = val.coupon.id;
|
||||
@@ -204,8 +206,8 @@ async function shopRechargeGetAjax() {
|
||||
}
|
||||
});
|
||||
});
|
||||
settingForm.value = res;
|
||||
rechargeLists.value = res.rechargeDetailList;
|
||||
settingForm.value = shopRechargeRes.value;
|
||||
rechargeLists.value = shopRechargeRes.value.rechargeDetailList;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user