diff --git a/common/config.js b/common/config.js index f070d96..3992b85 100644 --- a/common/config.js +++ b/common/config.js @@ -1,5 +1,5 @@ // const debug = process.env.NODE_ENV == 'development' ? true : false; -const debug = false; +const debug = true; // false线上 true本地 // #ifdef H5 const proxyApi = "/api"; // #endif @@ -21,36 +21,36 @@ const baseUrlwws = debug ? proxyApiwws : "wss://czgeatws.sxczgkj.com/wss"; // const version = "100"; const autoRemoveCache = { - count: 100000, - size: 100000, + count: 100000, + size: 100000, }; - uni.conf = { - debug, - baseUrl, - version, - autoRemoveCache, - baseUrlwws, +uni.conf = { + debug, + baseUrl, + version, + autoRemoveCache, + baseUrlwws, }; export const changeEnv = (env) => { - if (env === "test") { - uni.conf = { - debug: true, - baseUrl: "http://192.168.1.42", - phpUrl:'http://192.168.1.42:8787/api/', - phpChatWx:'ws://192.168.1.42:2348', - version: 100, - autoRemoveCache, - baseUrlwws: "ws://192.168.1.42:2348", - }; - } - if (env === "prod") { - uni.conf = { - debug: false, - baseUrl: "https://cashier.sxczgkj.com", - version: 100, - autoRemoveCache, - baseUrlwws: "wss://czgeatws.sxczgkj.com/wss", - }; - } -}; + if (env === "test") { + uni.conf = { + debug: true, + baseUrl: "http://192.168.1.42", + phpUrl: 'http://192.168.1.42:8787/api/', + phpChatWx: 'ws://192.168.1.42:2348', + version: 100, + autoRemoveCache, + baseUrlwws: "ws://192.168.1.42:2348", + }; + } + if (env === "prod") { + uni.conf = { + debug: false, + baseUrl: "https://cashier.sxczgkj.com", + version: 100, + autoRemoveCache, + baseUrlwws: "wss://czgeatws.sxczgkj.com/wss", + }; + } +}; \ No newline at end of file diff --git a/components/attract-popup.vue b/components/attract-popup.vue new file mode 100644 index 0000000..5fef6ec --- /dev/null +++ b/components/attract-popup.vue @@ -0,0 +1,230 @@ + + + + + + diff --git a/components/drainage.vue b/components/drainage.vue index e0d1ceb..473365b 100644 --- a/components/drainage.vue +++ b/components/drainage.vue @@ -1,114 +1,93 @@ \ No newline at end of file + diff --git a/components/order-finish-modal.vue b/components/order-finish-modal.vue index 8f6e73a..b2c6d25 100644 --- a/components/order-finish-modal.vue +++ b/components/order-finish-modal.vue @@ -1,43 +1,49 @@ - - diff --git a/pages/index/indexs.vue b/pages/index/indexs.vue index 6e790d1..131b7fb 100644 --- a/pages/index/indexs.vue +++ b/pages/index/indexs.vue @@ -2,31 +2,27 @@ - - - HI,欢迎回来 + HI,欢迎回来 会员身份 - 优惠券:{{allConfig.couponNum}} - 积分:{{allConfig.pointNum}} + 优惠券:{{ allConfig.couponNum }} + 积分:{{ allConfig.pointNum }} - @@ -52,8 +48,6 @@ -自助下单 快人一步- - - @@ -90,10 +84,9 @@ 股东共享 邀请好友,获得佣金 - - + @@ -112,512 +105,499 @@ + + \ No newline at end of file +} + +.groupBuying { + padding: 16rpx 38rpx; + border-top: 2rpx solid #ededed; + background-color: #fff; + display: flex; + justify-content: space-between; + align-items: center; + + .img { + width: 40px; + height: 40px; + } +} + +.title { + color: #333333; + font-size: 36rpx; + font-weight: 700; +} + +.desc { + margin-top: 16rpx; + font-size: 28rpx; + color: #999; +} + +.points { + margin-top: 34rpx; + background-color: #fff; + padding: 16rpx 68rpx; + border-radius: 16rpx; + display: flex; + align-items: center; + justify-content: space-between; + + .img { + width: 98px; + height: 98px; + } +} + +.bottom_menus { + display: flex; + gap: 14rpx; + margin-top: 34rpx; + + .item { + flex: 1; + display: flex; + padding: 20rpx; + flex-direction: column; + align-items: center; + border-radius: 18rpx; + background: #fff; + + .img { + width: 39px; + height: 39px; + } + + .title { + font-size: 32rpx; + } + + .desc { + margin-top: 8rpx; + color: #999; + font-size: 24rpx; + white-space: nowrap; + } + } +} + diff --git a/utils/util.js b/utils/util.js index ac85718..d85b319 100644 --- a/utils/util.js +++ b/utils/util.js @@ -475,4 +475,24 @@ export function includesString(target, searchStr, options = {}) { // 4. 执行包含判断 return processedTarget.includes(processedSearch); +} + +/** + * 校验一维基础类型数组A的元素是否存在于数组B(支持部分/全部存在,默认全部存在) + * @param {Array} arrA - 待校验的一维数组 + * @param {Array} arrB - 参考的一维数组 + * @param {boolean} [partial=false] - 是否校验「部分存在」(true=部分存在,false=全部存在,默认false) + * @returns {boolean} 校验结果 + */ +export function checkArrayElementsExist(arrA, arrB, partial = false) { + // 边界处理:空数组特殊逻辑 + if (arrA.length === 0) return !partial + + // 转Set优化查找性能(一维数组核心优化) + const bSet = new Set(arrB) + + // 核心逻辑:partial=true → some(部分存在),partial=false → every(全部存在) + return partial ? + arrA.some(item => bSet.has(item)) : + arrA.every(item => bSet.has(item)) } \ No newline at end of file