From 82674b11041d2a6a4df56ef666988bcdc66b5104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E7=90=B3=E7=BA=A2?= <1921957171@qq.com> Date: Tue, 10 Sep 2024 17:54:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 6 +- pages/pay/result.vue | 4 +- .../s-activity-pop/s-activity-pop.vue | 108 ++++++------- .../s-goods-column/s-goods-column.vue | 30 +++- .../components/s-select-sku/s-select-sku.vue | 142 ++++++++++-------- sheep/hooks/useGoods.js | 1 + 6 files changed, 172 insertions(+), 119 deletions(-) diff --git a/.env b/.env index fef854f2..82a8b46f 100644 --- a/.env +++ b/.env @@ -2,10 +2,10 @@ SHOPRO_VERSION = v1.8.3 # 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 developmentSHOPRO_BASE_URL = http://api-dashboard.yudao.iocoder.cn -SHOPRO_BASE_URL = http://100.80.97.101:48080 +SHOPRO_BASE_URL = http://192.168.10.207:48080 # 后端接口 - 测试环境(通过 process.env.NODE_ENV = developmentSHOPRO_DEV_BASE_URL = http://saas.yibeidl.cn -SHOPRO_DEV_BASE_URL = http://100.80.97.101:48080 +SHOPRO_DEV_BASE_URL = http://192.168.10.207:48080 ### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc # 后端接口前缀(一般不建议调整) @@ -18,7 +18,7 @@ SHOPRO_WEBSOCKET_PATH = /infra/ws SHOPRO_DEV_PORT = 48080 # 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀SHOPRO_STATIC_URL = https://file.sheepjs.com -SHOPRO_STATIC_URL = http://100.80.97.101 +SHOPRO_STATIC_URL = http://192.168.10.207 # 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启) SHOPRO_MPLIVE_ON = 0 diff --git a/pages/pay/result.vue b/pages/pay/result.vue index 49a65f4f..fb0465be 100644 --- a/pages/pay/result.vue +++ b/pages/pay/result.vue @@ -136,13 +136,13 @@ } } // 2.1 情况三一:未支付,且轮询次数小于三次,则继续轮询 - if (state.counter < 3 && state.result === 'unpaid') { + if (state.counter < 10 && state.result === 'unpaid') { setTimeout(() => { getOrderInfo(id); }, 1500); } // 2.2 情况二:超过三次检测才判断为支付失败 - if (state.counter >= 3) { + if (state.counter >= 10) { state.result = 'failed'; } } diff --git a/sheep/components/s-activity-pop/s-activity-pop.vue b/sheep/components/s-activity-pop/s-activity-pop.vue index b13b139b..4baf41d9 100644 --- a/sheep/components/s-activity-pop/s-activity-pop.vue +++ b/sheep/components/s-activity-pop/s-activity-pop.vue @@ -3,69 +3,73 @@ 优惠 - 促销 - - - - - - - 满{{fen2yuan(item.discountPrice)}}元减{{fen2yuan(item.limit)}}元; - - - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + 促销 + + + + + + + 满{{fen2yuan(item.discountPrice)}}元减{{fen2yuan(item.limit)}}元; + + + {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + - - - - - - - - 满{{fen2yuan(item.discountPrice)}}元包邮; - - - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + + + + + 满{{fen2yuan(item.discountPrice)}}元包邮; + + + {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + - - - - - - - - 满{{fen2yuan(item.discountPrice)}}元送{{item.value}}积分; - - - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + + + + + 满{{fen2yuan(item.discountPrice)}}元送{{item.value}}积分; + + + {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + - - - - - - - - 满{{fen2yuan(item.discountPrice)}}元送{{item.value}}张优惠券; - - - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + + + + + 满{{fen2yuan(item.discountPrice)}}元送{{item.value}}张优惠券; + + + {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + + - - - + + 可领优惠券 @@ -83,7 +87,7 @@ {{item.name}} - {{item.validityType==1?formatDateRange(item.startTime,item.endTime) : '领取后'+item.fixedStartTerm+'-'+item.fixedEndTerm +'天可用'}} + {{item.validityType==1?formatDateRange(item.validStartTime,item.validEndTime) : '领取后'+item.fixedStartTerm+'-'+item.fixedEndTerm +'天可用'}} diff --git a/sheep/components/s-goods-column/s-goods-column.vue b/sheep/components/s-goods-column/s-goods-column.vue index 1dd5528e..f0cb1f8d 100644 --- a/sheep/components/s-goods-column/s-goods-column.vue +++ b/sheep/components/s-goods-column/s-goods-column.vue @@ -13,10 +13,18 @@ :style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]"> {{ data.title || data.name }} + + + {{iconShow}} + {{data.reward.rewardActivity}} + + {{ priceUnit }} - {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} + {{fen2yuan(data.discountPrice)}} + {{fen2yuan(data.vipPrice)}} + {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} @@ -34,10 +42,18 @@ class="sm-goods-title ss-line-1 ss-m-b-16"> {{ data.title || data.name }} + + + {{iconShow}} + {{data.reward.rewardActivity}} + + {{ priceUnit }} - {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} + {{fen2yuan(data.discountPrice)}} + {{fen2yuan(data.vipPrice)}} + {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} @@ -131,6 +147,12 @@ + + + {{iconShow}} + {{data.reward.rewardActivity}} + + 0 || data.marketPrice > 0) " class="goods-origin-price ss-flex ss-col-bottom font-OPPOSANS" :style="[{ color: originPriceColor }]"> {{ priceUnit }} - {{ fen2yuan(data.marketPrice) }} + {{fen2yuan(data.discountPrice)}} + {{fen2yuan(data.vipPrice)}} + {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} diff --git a/sheep/components/s-select-sku/s-select-sku.vue b/sheep/components/s-select-sku/s-select-sku.vue index 283f88eb..48bd9f65 100644 --- a/sheep/components/s-select-sku/s-select-sku.vue +++ b/sheep/components/s-select-sku/s-select-sku.vue @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/sheep/hooks/useGoods.js b/sheep/hooks/useGoods.js index a1133c92..3b55ff01 100644 --- a/sheep/hooks/useGoods.js +++ b/sheep/hooks/useGoods.js @@ -447,6 +447,7 @@ export function handListPrice(array,array2) { // 遍历 array 数组并更新 price 和 type array.forEach(item => { if (array2Map[item.id]) { + item.oldPrice = item.price // 如果在 array2Map 中找到了对应的 skuId(即 id) item.price = array2Map[item.id].price; item.type = array2Map[item.id].type;