From 6355534a15fe7303317da880cfe514dc1151834e Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Fri, 5 Dec 2025 16:00:51 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=90=A5=E9=94=80=E4=B8=AD?=
=?UTF-8?q?=E5=BF=83=E9=9C=B8=E7=8E=8B=E9=A4=90/=E8=B6=85=E7=BA=A7?=
=?UTF-8?q?=E4=BC=9A=E5=91=98=E5=88=86=E5=BA=97=E9=99=90=E6=97=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageBwc/index/index.vue | 6 +-
pageMarket/couponExchangeCode/index.vue | 2 +-
pageMarket/limitDiscount/index.vue | 6 +-
pageMarket/superVip/components/config.vue | 551 ++++++++++----------
pageMarket/superVip/index.vue | 599 ++++++++++------------
store/account.js | 36 +-
6 files changed, 566 insertions(+), 634 deletions(-)
diff --git a/pageBwc/index/index.vue b/pageBwc/index/index.vue
index a039d37..cb819e1 100644
--- a/pageBwc/index/index.vue
+++ b/pageBwc/index/index.vue
@@ -65,7 +65,7 @@
-
+
@@ -74,6 +74,9 @@ import { onShow, onLoad } from '@dcloudio/uni-app';
import { reactive, ref, watch } from 'vue';
import { isMainShop, isMarketShow } from '@/store/account';
import { getFreeDing, updateFreeDing } from '@/http/api/freeDing.js';
+
+const configInfo = ref({});
+
const form = reactive({
rechargeTimes: 2,
rechargeThreshold: '',
@@ -96,6 +99,7 @@ onShow(() => {
*/
const getlist = async () => {
let res = await getFreeDing();
+ configInfo.value = res;
res.shopIdList = res.shopIdList || [];
Object.assign(form, res);
};
diff --git a/pageMarket/couponExchangeCode/index.vue b/pageMarket/couponExchangeCode/index.vue
index b769bcf..aff49b7 100644
--- a/pageMarket/couponExchangeCode/index.vue
+++ b/pageMarket/couponExchangeCode/index.vue
@@ -78,7 +78,7 @@
@select="selectStatus"
:show="showAction"
>
-
+
diff --git a/pageMarket/limitDiscount/index.vue b/pageMarket/limitDiscount/index.vue
index 7c1e98f..91f98d3 100644
--- a/pageMarket/limitDiscount/index.vue
+++ b/pageMarket/limitDiscount/index.vue
@@ -1,6 +1,8 @@
-
+
@@ -49,7 +51,7 @@ import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
import { limitTimeDiscountPage, limitTimeDiscountDel } from '@/http/api/market/index.js';
import go from '@/commons/utils/go.js';
import { convertTimeFormat } from '@/utils/index.js';
-import {isMainShop} from "@/store/account.js";
+import { isMainShop, isMarketShow } from '@/store/account.js';
// 去编辑
function editorHandle(item) {
uni.setStorageSync('limitDiscountObj', item);
diff --git a/pageMarket/superVip/components/config.vue b/pageMarket/superVip/components/config.vue
index b3335ad..b1c472a 100644
--- a/pageMarket/superVip/components/config.vue
+++ b/pageMarket/superVip/components/config.vue
@@ -1,354 +1,329 @@
-
-
-
-
- 提交生日/姓名
-
-
-
- 是
-
-
-
-
- 否
-
-
-
-
- *成为会员前需提交生日、姓名、性别信息
-
-
+
+
+
+
+ 提交生日/姓名
+
+
+
+ 是
+
+
+
+
+ 否
+
+
+
+
+ *成为会员前需提交生日、姓名、性别信息
+
+
-
-
-
- 会员开通方式
-
-
-
- 购买开通
-
-
-
-
- 条件开通
-
-
-
-
-
-
-
-
-
- 会员周期列表
-
- 去设置
-
-
-
-
-
-
- 成为会员条件
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
-
-
-
- 可用门店
-
-
+
+
+
+ 会员开通方式
+
+
+
+ 购买开通
+
+
+
+
+ 条件开通
+
+
+
+
+
+
+
+
+
+ 会员周期列表
+
+ 去设置
+
+
+
+
+
+
+ 成为会员条件
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用门店
+
+
-
- 规则说明
-
-
+
+ 规则说明
+
+
-
- 获取成长值升级
- *两个条件必选有一条是大于0的数值
-
- 每消费1元获得成长值
-
-
-
- 每充值1元获得成长值
-
-
-
-
-
+
+ 获取成长值升级
+ *两个条件必选有一条是大于0的数值
+
+ 每消费1元获得成长值
+
+
+
+ 每充值1元获得成长值
+
+
+
+
+
diff --git a/pageMarket/superVip/index.vue b/pageMarket/superVip/index.vue
index cd10f41..f08c874 100644
--- a/pageMarket/superVip/index.vue
+++ b/pageMarket/superVip/index.vue
@@ -1,447 +1,372 @@
-
-
-
-
-
-
-
- 超级会员
- 用户会员管理设置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ userComponentQuery.startTime }} -
- {{ userComponentQuery.endTime }}
-
-
-
-
-
-
- 请选择日期范围
-
-
-
-
+
+
+
+
+
+
+
+ 超级会员
+ 用户会员管理设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userComponentQuery.startTime }} -
+ {{ userComponentQuery.endTime }}
+
+
+
+
+
+
+ 请选择日期范围
+
+
+
+
-
-
- {{
- listRes.totalRow
- }}
- 订单数
-
-
- {{
- listRes.totalAmount
- }}
- 订单金额(元)
-
-
-
-
- {{
- listRes.successAmount
- }}
- 已入账金额(元)
-
-
- {{
- listRes.pendingAmount || 0
- }}
- 待入账金额(元)
-
-
- {{
- listRes.balanceAmount
- }}
-
- 运营余额(元)
- 充值{{ ">" }}
-
-
-
-
-
-
-
+
+
+ {{ listRes.totalRow }}
+ 订单数
+
+
+ {{ listRes.totalAmount }}
+ 订单金额(元)
+
+
+
+
+ {{ listRes.successAmount }}
+ 已入账金额(元)
+
+
+ {{ listRes.pendingAmount || 0 }}
+ 待入账金额(元)
+
+
+ {{ listRes.balanceAmount }}
+
+ 运营余额(元)
+ 充值{{ '>' }}
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
+
-
-
-
+
+
+
+
+
diff --git a/store/account.js b/store/account.js
index c0990f8..bd03f61 100644
--- a/store/account.js
+++ b/store/account.js
@@ -16,25 +16,51 @@ export const isMainShop = (shopId) => {
return false
}
+/**
+ * 判断值是否为 非null + 非空对象(纯对象)
+ * @param {any} obj 要检测的值
+ * @returns {boolean} true=非空对象,false=否则
+ */
+function isNonEmptyObject(obj) {
+ // 第一步:排除 null/undefined
+ if (obj === null || obj === undefined) {
+ return false;
+ }
+
+ // 第二步:排除非纯对象(数组、函数、日期等)
+ if (Object.prototype.toString.call(obj) !== '[object Object]') {
+ return false;
+ }
+
+ // 第三步:判断是否为空对象(无自有可枚举属性)
+ for (const key in obj) {
+ // 只检测自有属性(排除原型链属性)
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ 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
+export function isMarketShow(activit = null, key = 'shopIdList', isEnableKey = 'isEnable') {
+ console.log('isMarketShow.activit===', activit);
+ if (!isNonEmptyObject(activit)) return false
let flag = false
const shopInfo = uni.getStorageSync("shopInfo");
- if (!shopInfo.isHeadShop && (!activit[key].some(item => item == shopInfo.id) || !activit.isEnable)) {
+ if (!shopInfo.isHeadShop && (!activit[key].some(item => item == shopInfo.id) || !activit[isEnableKey])) {
flag = true
} else {
flag = false
}
- console.log('isMarketShow===', flag);
+ console.log('isMarketShow.flag===', flag);
return flag
}