From 8154108fe9bb5e8d2017e38ab7903af75a81d1c4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 15 Aug 2024 09:24:39 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91=E6=8B=BC=E5=9B=A2=EF=BC=9A=E6=9C=AA=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E7=9A=84=20SKU=20=E9=9C=80=E8=A6=81=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/activity/groupon/detail.vue | 11 +++++++++++ pages/order/detail.vue | 3 +-- sheep/api/migration/chat.js | 14 -------------- sheep/libs/sdk-h5-weixin.js | 2 +- sheep/platform/provider/wechat/miniProgram.js | 1 - sheep/platform/provider/wechat/officialAccount.js | 1 - 6 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 sheep/api/migration/chat.js diff --git a/pages/activity/groupon/detail.vue b/pages/activity/groupon/detail.vue index 66976f3c..7b606ec6 100644 --- a/pages/activity/groupon/detail.vue +++ b/pages/activity/groupon/detail.vue @@ -313,10 +313,21 @@ // 加载商品信息 const { data: spu } = await SpuApi.getSpuDetail(activity.spuId); state.goodsId = spu.id; + // 默认显示最低价 activity.products.forEach((product) => { spu.price = Math.min(spu.price, product.combinationPrice); // 设置 SPU 的最低价格 }); state.goodsInfo = spu; + // 价格、库存使用活动的 + spu.skus.forEach((sku) => { + const product = activity.products.find((product) => product.skuId === sku.id); + if (product) { + sku.price = product.combinationPrice; + } else { + // 找不到可能是没配置,则不能发起秒杀 + sku.stock = 0; + } + }); } else { state.data = null; } diff --git a/pages/order/detail.vue b/pages/order/detail.vue index 4366a9fb..ed0119fa 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -170,7 +170,6 @@ 运费 ¥{{ fen2yuan(state.orderInfo.deliveryPrice) }} - 优惠劵金额 -¥{{ fen2yuan(state.orderInfo.couponPrice) }} @@ -325,7 +324,7 @@ }); } - // 确认收货 TODO 芋艿:待测试 + // 确认收货 async function onConfirm(orderId, ignore = false) { // 需开启确认收货组件 // todo: 芋艿:待接入微信 diff --git a/sheep/api/migration/chat.js b/sheep/api/migration/chat.js deleted file mode 100644 index 140dd75d..00000000 --- a/sheep/api/migration/chat.js +++ /dev/null @@ -1,14 +0,0 @@ -import request from '@/sheep/request'; - -// TODO 芋艿:暂不支持 socket 聊天 -export default { - // 获取聊天token - unifiedToken: () => - request({ - url: 'unifiedToken', - custom: { - showError: false, - showLoading: false, - }, - }), -}; diff --git a/sheep/libs/sdk-h5-weixin.js b/sheep/libs/sdk-h5-weixin.js index 1df26f94..984b8dbd 100644 --- a/sheep/libs/sdk-h5-weixin.js +++ b/sheep/libs/sdk-h5-weixin.js @@ -78,7 +78,7 @@ export default { }); }, - //获取微信收货地址 TODO 芋艿:未测试 + // 获取微信收货地址 openAddress(callback) { this.isReady(() => { jweixin.openAddress({ diff --git a/sheep/platform/provider/wechat/miniProgram.js b/sheep/platform/provider/wechat/miniProgram.js index 26d42d42..5e95edad 100644 --- a/sheep/platform/provider/wechat/miniProgram.js +++ b/sheep/platform/provider/wechat/miniProgram.js @@ -53,7 +53,6 @@ const mobileLogin = async (e) => { } else { return resolve(false); } - // TODO 芋艿:shareInfo: uni.getStorageSync('shareLog') || {}, }); }; diff --git a/sheep/platform/provider/wechat/officialAccount.js b/sheep/platform/provider/wechat/officialAccount.js index 404b8660..ed7beb32 100644 --- a/sheep/platform/provider/wechat/officialAccount.js +++ b/sheep/platform/provider/wechat/officialAccount.js @@ -24,7 +24,6 @@ async function login(code = '', state = '') { // 解密 code 发起登陆 const loginResult = await AuthUtil.socialLogin(socialType, code, state); if (loginResult.code === 0) { - // TODO 芋艿:shareLog setOpenid(loginResult.data.openid); return loginResult; }