diff --git a/components/my-components/my-marketing-mask.vue b/components/my-components/my-marketing-mask.vue
new file mode 100644
index 0000000..d290956
--- /dev/null
+++ b/components/my-components/my-marketing-mask.vue
@@ -0,0 +1,41 @@
+
+
+ 门店未参与{{ name }}活动或主店未开启活动,如需开启参与请联系主店
+
+
+
+
+
+
diff --git a/pageBwc/index/index.vue b/pageBwc/index/index.vue
index d61f3f4..a039d37 100644
--- a/pageBwc/index/index.vue
+++ b/pageBwc/index/index.vue
@@ -1,53 +1,37 @@
-
+
-
+
霸王餐
设置充值消费的N倍,当前订单立即免单
-
+
-
-
- 充值设置
-
+
+ 充值设置
-
+
倍
-
- 用户消费结账时,成功充值订单金额的X倍即可享受免单
-
+ 用户消费结账时,成功充值订单金额的X倍即可享受免单
-
- 充值门槛
-
+ 充值门槛
元
-
- 订单的支付金额满足X元,才能使用
-
+ 订单的支付金额满足X元,才能使用
-
-
- 可用门店
+
+ 可用门店
+
+
-
-
-
-
- 可使用类型
+ 可使用类型
+
+
-
-
-
-
-
+
与优惠券同享
@@ -83,214 +64,212 @@
-
-
-
-
+
+
\ No newline at end of file
+
diff --git a/pageMarket/consumeCashback/components/config.vue b/pageMarket/consumeCashback/components/config.vue
index 25f6837..672a883 100644
--- a/pageMarket/consumeCashback/components/config.vue
+++ b/pageMarket/consumeCashback/components/config.vue
@@ -1,333 +1,293 @@
-
-
-
-
-
- 消费返现
- 用户下单后返现一定的金额到余额,可促进复购
-
-
-
-
-
-
- 可用门店
-
-
-
+
+
+
+
+
+ 消费返现
+ 用户下单后返现一定的金额到余额,可促进复购
+
+
+
+
+
+
+ 可用门店
+
+
+
-
-
- 适用用户
-
-
-
+
+
+ 适用用户
+
+
+
-
-
- 返现类型
-
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
- 阶梯设置
-
-
-
- {{ returnName(index) }}
-
-
- 返现门槛
-
- 元
-
-
- {{form.cashbackType === 'percentage' ? '返现比例' : '返现金额'}}
-
- {{ returnUnit }}
- 删除
-
-
-
-
+
+
+ 返现类型
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ 阶梯设置
+
+
+
+ {{ returnName(index) }}
+
+
+ 返现门槛
+
+ 元
+
+
+ {{ form.cashbackType === 'percentage' ? '返现比例' : '返现金额' }}
+
+ {{ returnUnit }}
+ 删除
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
\ No newline at end of file
+
diff --git a/pageMarket/consumeCashback/index.vue b/pageMarket/consumeCashback/index.vue
index 0a7b6b9..d853a99 100644
--- a/pageMarket/consumeCashback/index.vue
+++ b/pageMarket/consumeCashback/index.vue
@@ -5,29 +5,27 @@
- {{selShop.shopName || "全部门店"}}
+ {{ selShop.shopName || '全部门店' }}
-
+
-
+
- 关联订单:{{ item.orderNo }}
+ 关联订单:{{ item.orderNo }}
- {{ item.shopName }}
+ {{ item.shopName }}
{{ item.createTime }}
- ID:{{ item.id }}
+ ID:{{ item.id }}
@@ -40,16 +38,15 @@
返现金额
- {{ item.cashbackAmount ||0 }}
+ {{ item.cashbackAmount || 0 }}
-
+
支付金额
{{ item.amount || 0 }}
-
-
+
@@ -57,159 +54,157 @@
-
-
+
+
+
\ No newline at end of file
+.delete-btn {
+ background: #ffe7e6;
+ color: #ff1c1c;
+}
+
diff --git a/pageMarket/couponExchangeCode/index.vue b/pageMarket/couponExchangeCode/index.vue
index a8e52dd..b769bcf 100644
--- a/pageMarket/couponExchangeCode/index.vue
+++ b/pageMarket/couponExchangeCode/index.vue
@@ -1,359 +1,325 @@
-
-
-
-
-
-
-
- 券兑换码
- 可添加多券组合兑换
-
-
-
+
+
+
+
+
+
+ 券兑换码
+ 可添加多券组合兑换
+
+
+
+
+
+
+
+
+ 适用门店
+
+ 全部
+ {{ returnStatusText }}
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.status == 0 ? '有效' : '无效' }}
+
+
+
+ 有效期:{{ item.startTime }} 至 {{ item.endTime }}
+
+ 优惠券(张):
+ {{ item.couponNum }}
+
+ {{ returnCoupon(item) }}
+
- size="18"
- :active-value="1"
- :inactive-value="0"
- >
-
-
-
-
-
-
- 适用门店
-
- 全部
- {{ returnStatusText }}
-
-
-
-
-
-
-
- {{ item.name }}
- {{
- item.status == 0 ? "有效" : "无效"
- }}
-
-
-
- 有效期:{{ item.startTime }} 至 {{ item.endTime }}
- 优惠券(张):
- {{
- item.couponNum
- }}
- {{ returnCoupon(item) }}
-
-
- 查看
-
-
-
-
-
-
-
- 添加兑换码
-
-
+
+
+
+
+
+ 添加兑换码
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
diff --git a/pageMarket/rechargeExchangeCode/index.vue b/pageMarket/rechargeExchangeCode/index.vue
index 5179f15..97a7cec 100644
--- a/pageMarket/rechargeExchangeCode/index.vue
+++ b/pageMarket/rechargeExchangeCode/index.vue
@@ -1,372 +1,335 @@
-
-
-
-
-
-
-
- 充值兑换码
- 兑换码直充余额,可当作礼品赠送
-
-
-
-
-
-
-
-
-
- 适用门店
-
- 全部
- {{ returnStatusText }}
-
-
-
-
-
-
-
-
- {{ item.name }}
- 金额:{{ item.amount }}元
-
- {{
- item.status == 0 ? "有效" : "无效"
- }}
-
-
-
- {{ item.startTime }} 至 {{ item.endTime }}
-
-
- 总数:
- {{
- item.total
- }}
-
-
- 库存:
- {{
- item.stock
- }}
-
-
-
-
+
+
+
+
+
+
+
+ 充值兑换码
+ 兑换码直充余额,可当作礼品赠送
+
+
+
+
+
+
+
+
+ 适用门店
+
+ 全部
+ {{ returnStatusText }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ 金额:{{ item.amount }}元
+
+ {{ item.status == 0 ? '有效' : '无效' }}
+
+
+
+ {{ item.startTime }} 至 {{ item.endTime }}
+
+
+ 总数:
+ {{ item.total }}
+
+
+ 库存:
+ {{ item.stock }}
+
+
+
+
- 查看
-
-
-
-
-
-
-
- 添加兑换码
-
-
+
+
+
+
+
+ 添加兑换码
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
-
-
+
+
diff --git a/pageRecharge/index.vue b/pageRecharge/index.vue
index 882292f..7ff478a 100644
--- a/pageRecharge/index.vue
+++ b/pageRecharge/index.vue
@@ -87,6 +87,7 @@
+
@@ -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);
}
diff --git a/store/account.js b/store/account.js
index c3bf537..c0990f8 100644
--- a/store/account.js
+++ b/store/account.js
@@ -1,41 +1,65 @@
// stores/counter.js
-import { defineStore } from "pinia";
+import {
+ defineStore
+} from "pinia";
import * as shopApi from "@/http/api/shop.js";
-//判断是否是主店
+// 判断是否是主店,并且是否有查看权限
export const isMainShop = (shopId) => {
- const shopInfo=uni.getStorageSync("shopInfo");
- if(shopInfo.isHeadShop){
- return true
- }
- if(shopInfo.shopType=='only'){
- return true
- }
- return false
+ const shopInfo = uni.getStorageSync("shopInfo");
+ if (shopInfo.isHeadShop) {
+ return true
+ }
+ if (shopInfo.shopType == 'only') {
+ return true
+ }
+ return false
+}
+
+/**
+ * 主店在配置该功能时未选择分店
+ * 判断分店是否显示活动信息
+ * @param {Object} activit
+ * 活动信息
+ */
+export function isMarketShow(activit = null, key = 'shopIdList') {
+ console.log('isMarketShow===', activit);
+ if (activit == null || !activit.id) return false
+
+ let flag = false
+ const shopInfo = uni.getStorageSync("shopInfo");
+
+ if (!shopInfo.isHeadShop && (!activit[key].some(item => item == shopInfo.id) || !activit.isEnable)) {
+ flag = true
+ } else {
+ flag = false
+ }
+ console.log('isMarketShow===', flag);
+ return flag
}
// 分销
export const useAccountInfoStore = defineStore("accountInfo", {
- state: () => {
- return {
- shopInfo: {},
- };
- },
- actions: {
- getShopInfo() {
- return shopApi.getShopInfo().then((res) => {
- this.shopInfo = res;
- return this.shopInfo;
- });
- },
- editShopInfo(data,autoRefresh = true) {
- return shopApi.editShopInfo(data).then((res) => {
- if(autoRefresh) {
- this.getShopInfo()
- }
- return res
- });
- },
- },
- unistorage: true, // 开启后对 state 的数据读写都将持久化
-});
+ state: () => {
+ return {
+ shopInfo: {},
+ };
+ },
+ actions: {
+ getShopInfo() {
+ return shopApi.getShopInfo().then((res) => {
+ this.shopInfo = res;
+ return this.shopInfo;
+ });
+ },
+ editShopInfo(data, autoRefresh = true) {
+ return shopApi.editShopInfo(data).then((res) => {
+ if (autoRefresh) {
+ this.getShopInfo()
+ }
+ return res
+ });
+ },
+ },
+ unistorage: true, // 开启后对 state 的数据读写都将持久化
+});
\ No newline at end of file