diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index bf94ead..65a7f40 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -15,7 +15,7 @@ "iOSProjectStandardBaseHistory" : { "current" : "iOS_debug_5.24.ipa" }, - "playground" : "custom", + "playground" : "standard", "runSignStatus" : 0, "type" : "uni-app:app-ios" }, diff --git a/manifest.json b/manifest.json index 8edb574..c41ff04 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "信任桥", "appid" : "__UNI__4910728", "description" : "信任桥优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。", - "versionName" : "1.0.6", - "versionCode" : 175, + "versionName" : "1.0.8", + "versionCode" : 176, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/mine_package/mine_order/mine_order.vue b/pages/mine_package/mine_order/mine_order.vue index 8acae2e..7e5da5f 100644 --- a/pages/mine_package/mine_order/mine_order.vue +++ b/pages/mine_package/mine_order/mine_order.vue @@ -285,6 +285,55 @@ + + + + + + 收货成功 + + + + + 贡献值 + +{{ receiptOrderItem.expendNum || 0 }} + + + 可在【我的-钱包】中查看 + + 去查看 + + + + + + + + + + + 抽奖次数 + +{{ receiptOrderItem.raffleNum || 0 }}次 + + + 可在【首页-抽奖】中参与 + + 去查看 + + + + + + + + 确定 + + + + + @@ -427,7 +476,9 @@ export default { deleteShow: false, deleteInfo: {}, mpWarpStyle: {}, - mpHeaderStyle: {} + mpHeaderStyle: {}, + receiptSuccessShow: false, // 确认收货成功弹窗 + receiptOrderItem: {}, // 确认收货的当前订单对象 }; }, onLoad(options) { @@ -845,6 +896,7 @@ export default { content: "是否确认收货?", success: function (res) { if (res.confirm) { + console.log("是否确认收货?", item) then.confirmReceiptFun(item); } }, @@ -856,6 +908,8 @@ export default { }; const resp = await confirmReceipt(params); if (resp && resp.bizcode === 100) { + this.receiptOrderItem = item; + this.receiptSuccessShow = true; this.orderList = []; this.form.page = 1; this.loadData(); @@ -866,6 +920,28 @@ export default { } } }, + goToPurse() { + this.receiptSuccessShow = false; + uni.navigateTo({ + url: '/pages/mine_package/mine_purse/mine_purse', + fail: () => { + uni.navigateTo({ + url: 'pages/mine_package/mine_purse/mine_purse', + }); + } + }); + }, + goToLottery() { + this.receiptSuccessShow = false; + uni.navigateTo({ + url: '/pages/other_package/nine-grid/nine-grid', + fail: () => { + uni.navigateTo({ + url: 'pages/other_package/nine-grid/nine-grid', + }); + } + }); + }, // 判断是否已经签名 async checkSigned() { @@ -1351,4 +1427,107 @@ export default { text-align: center; } } + +/* 确认收货成功弹窗高保真样式 */ +.receipt_success_popup { + width: 580rpx; + background: #ffffff; + border-radius: 32rpx; + padding: 48rpx 36rpx 40rpx; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; + + .receipt_icon_img { + width: 96rpx; + height: 96rpx; + } + + .receipt_title { + font-size: 34rpx; + font-weight: bold; + color: #111111; + margin-top: 20rpx; + margin-bottom: 36rpx; + line-height: 1.4; + } + + .receipt_item_group { + width: 100%; + display: flex; + flex-direction: column; + + .receipt_row { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + + .receipt_label { + font-size: 30rpx; + font-weight: bold; + color: #111111; + line-height: 1.4; + } + + .receipt_value { + font-size: 32rpx; + font-weight: bold; + color: #7934f6; + line-height: 1.4; + } + } + + .sub_row { + margin-top: 10rpx; + + .receipt_sub_text { + font-size: 24rpx; + color: #666666; + line-height: 1.4; + } + + .receipt_action { + display: flex; + flex-direction: row; + align-items: center; + cursor: pointer; + + .action_text { + font-size: 24rpx; + color: #666666; + margin-right: 4rpx; + } + } + } + } + + .receipt_divider { + width: 100%; + height: 1rpx; + background: #f0f0f0; + margin: 24rpx 0; + } + + .receipt_confirm_btn { + width: 100%; + height: 80rpx; + background: #7934f6; + border-radius: 16rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 30rpx; + color: #ffffff; + font-weight: 500; + margin-top: 40rpx; + cursor: pointer; + transition: opacity 0.15s ease; + + &:active { + opacity: 0.85; + } + } +} \ No newline at end of file diff --git a/pages/mine_package/mine_order_info/mine_order_info.vue b/pages/mine_package/mine_order_info/mine_order_info.vue index 8bf90bc..cd4dad4 100644 --- a/pages/mine_package/mine_order_info/mine_order_info.vue +++ b/pages/mine_package/mine_order_info/mine_order_info.vue @@ -178,6 +178,16 @@ 下单时间 {{ formatDate(orderInfo.ctdate) }} + + + 预估获得贡献值 + + + + {{ orderInfo.expendNum }} + + @@ -261,6 +271,55 @@ 确认 + + + + + + + 收货成功 + + + + + 贡献值 + +{{ orderInfo.expendNum }} + + + 可在【我的-钱包】中查看 + + 去查看 + + + + + + + + + + + 抽奖次数 + +{{ orderInfo.raffleNum }}次 + + + 可在【首页-抽奖】中参与 + + 去查看 + + + + + + + + 确定 + + + + @@ -320,7 +379,10 @@ export default { isShowBalance: false, qrcodeVal: '', returnType: 1, - isExpandExpress: false + isExpandExpress: false, + receiptSuccessShow: false, // 确认收货成功弹窗 + expendNum: 0, // 贡献值 + raffleNum: 0, // 抽奖次数 }; }, onLoad(options) { @@ -413,49 +475,49 @@ export default { if (this._paySubmitting) return; this._paySubmitting = true; try { - const payway = this.wayForm.payway; - if (!payway || payway === 0) { - this.$refs.uToastRef.show({ - type: "error", - message: "请先选择支付方式", - }); - return; - } - const params = { - id: this.orderInfo.id, - payway, - }; - if (!await prepareDouyinPay(payway)) return; - const resp = await payment(params); - // 提交订单成功,就唤起支付 - if (resp && resp.bizcode === 100) { - const item = resp.data; - if (item.status === 1) { - jumpWayOk(); - return; - } - if (item.douyin) { - await appDypayFun(item); - } else if (item.wechat && Object.keys(item.wechat).length !== 0) { - this.appWxpay(item.wechat, item.orderId, item.orderNum); - } else if ( - item.alipay && - Object.keys(item.alipay).length !== 0 && - item.alipay - ) { - this.zfbPay(item.alipay, item.orderId, item.orderNum); - } else { + const payway = this.wayForm.payway; + if (!payway || payway === 0) { this.$refs.uToastRef.show({ type: "error", - message: "订单支付失败", + message: "请先选择支付方式", }); - setTimeout(() => { - jumpWayError(); - }, 2000); + return; + } + const params = { + id: this.orderInfo.id, + payway, + }; + if (!await prepareDouyinPay(payway)) return; + const resp = await payment(params); + // 提交订单成功,就唤起支付 + if (resp && resp.bizcode === 100) { + const item = resp.data; + if (item.status === 1) { + jumpWayOk(); + return; + } + if (item.douyin) { + await appDypayFun(item); + } else if (item.wechat && Object.keys(item.wechat).length !== 0) { + this.appWxpay(item.wechat, item.orderId, item.orderNum); + } else if ( + item.alipay && + Object.keys(item.alipay).length !== 0 && + item.alipay + ) { + this.zfbPay(item.alipay, item.orderId, item.orderNum); + } else { + this.$refs.uToastRef.show({ + type: "error", + message: "订单支付失败", + }); + setTimeout(() => { + jumpWayError(); + }, 2000); + } + } else { + this.getOrderInfo(); } - } else { - this.getOrderInfo(); - } } catch (error) { uni.showToast({ title: error.message || error.msg || '支付请求失败,请查看订单后重试', icon: 'none' }); } finally { this._paySubmitting = false; } @@ -509,11 +571,38 @@ export default { }; const resp = await confirmReceipt(params); if (resp && resp.bizcode === 100) { - this.orderList = []; - this.form.page = 1; - this.loadData(); + if (resp.data) { + if (resp.data.expendNum !== undefined) this.expendNum = resp.data.expendNum; + if (resp.data.raffleNum !== undefined) this.raffleNum = resp.data.raffleNum; + if (resp.data.contribution !== undefined) this.expendNum = resp.data.contribution; + if (resp.data.drawCount !== undefined) this.raffleNum = resp.data.drawCount; + } + this.receiptSuccessShow = true; + this.getOrderInfo(); } }, + goToPurse() { + this.receiptSuccessShow = false; + uni.navigateTo({ + url: '/pages/mine_package/mine_purse/mine_purse', + fail: () => { + uni.navigateTo({ + url: 'pages/mine_package/mine_purse/mine_purse', + }); + } + }); + }, + goToLottery() { + this.receiptSuccessShow = false; + uni.navigateTo({ + url: '/pages/other_package/nine-grid/nine-grid', + fail: () => { + uni.navigateTo({ + url: 'pages/other_package/nine-grid/nine-grid', + }); + } + }); + }, /** * 去充值 */ @@ -775,6 +864,15 @@ export default { line-height: 60rpx; font-weight: bold; font-size: 24rpx; + +} + +.coin_icon { + width: 40rpx; + height: 40rpx; + margin-right: 10rpx; + vertical-align: middle; + } .item_title { @@ -784,6 +882,7 @@ export default { .item_value { color: #1a1a1a; display: flex; + align-items: center; } .order_way_warp { @@ -882,4 +981,107 @@ export default { } } } + +/* 确认收货成功弹窗高保真样式 */ +.receipt_success_popup { + width: 580rpx; + background: #ffffff; + border-radius: 32rpx; + padding: 48rpx 36rpx 40rpx; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; + + .receipt_icon_img { + width: 96rpx; + height: 96rpx; + } + + .receipt_title { + font-size: 34rpx; + font-weight: bold; + color: #111111; + margin-top: 20rpx; + margin-bottom: 36rpx; + line-height: 1.4; + } + + .receipt_item_group { + width: 100%; + display: flex; + flex-direction: column; + + .receipt_row { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + + .receipt_label { + font-size: 30rpx; + font-weight: bold; + color: #111111; + line-height: 1.4; + } + + .receipt_value { + font-size: 32rpx; + font-weight: bold; + color: #7934f6; + line-height: 1.4; + } + } + + .sub_row { + margin-top: 10rpx; + + .receipt_sub_text { + font-size: 24rpx; + color: #666666; + line-height: 1.4; + } + + .receipt_action { + display: flex; + flex-direction: row; + align-items: center; + cursor: pointer; + + .action_text { + font-size: 24rpx; + color: #666666; + margin-right: 4rpx; + } + } + } + } + + .receipt_divider { + width: 100%; + height: 1rpx; + background: #f0f0f0; + margin: 24rpx 0; + } + + .receipt_confirm_btn { + width: 100%; + height: 80rpx; + background: #7934f6; + border-radius: 16rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 30rpx; + color: #ffffff; + font-weight: 500; + margin-top: 40rpx; + cursor: pointer; + transition: opacity 0.15s ease; + + &:active { + opacity: 0.85; + } + } +} diff --git a/pages/mine_package/mine_purse/mine_purse.vue b/pages/mine_package/mine_purse/mine_purse.vue index 699c5f1..8b50607 100644 --- a/pages/mine_package/mine_purse/mine_purse.vue +++ b/pages/mine_package/mine_purse/mine_purse.vue @@ -163,7 +163,7 @@ export default { vcoin: { subTitle: "数字积分:", detail: - "根据贡献值按照比例进行转换获得1. 商城贡献值10W内的贡献值1:1转换成数字积分2. 商城贡献值10W外的根据数字积分数量和总贡献值及贡献值占比进行获得。", + "根据贡献值按照比例进行转换获得\n1. 商城贡献值10W内的贡献值1:1转换成数字积分\n2. 商城贡献值10W外的根据数字积分数量和总贡献值及贡献值占比进行获得。", }, rights: { subTitle: "消费者权益:", diff --git a/pages/order_package/order_submit/order_submit.vue b/pages/order_package/order_submit/order_submit.vue index da1aa27..1cdc646 100644 --- a/pages/order_package/order_submit/order_submit.vue +++ b/pages/order_package/order_submit/order_submit.vue @@ -60,7 +60,7 @@ ¥{{ pItem.totalPrice - }} + }} 每件到手价¥{{ pItem.unitPrice }} @@ -84,7 +84,7 @@ ¥{{ pItem.totalPrice - }} + }} 每件到手价¥{{ pItem.unitPrice }} @@ -108,7 +108,7 @@ 运费{{ getValue(PRODUCT_DELIVERY_TIME, addItem.deliveryTime) - }} + }} {{ orderInfo.postage ? "¥" + orderInfo.postage : "包邮" }} @@ -207,6 +207,17 @@ + + + 预估获得贡献值 + + {{ + orderInfo.expendNum + }} + + + + 支付方式 @@ -1069,13 +1080,20 @@ export default { if (this.selectedCoupon) { params["couponUserId"] = this.getCouponUserId(this.selectedCoupon); } - console.log("秦星星----2", params); resp = await settle(params); } console.log("getWayOption", resp); - // 提交订单成功,就唤起支付 + // 临时缓存订单提交结果(写入前先清空) + uni.removeStorageSync("order_submit_temp"); + if (resp) { + uni.setStorageSync("order_submit_temp", { + expendNum: + resp?.data?.expendNum || 0 + }); + } + if (resp && resp.bizcode === 100) { console.log("提交订单成功", resp.data); const item = resp.data; @@ -1086,13 +1104,13 @@ export default { if (item.douyin) { await appDypayFun(item); } else if (item.wechat && Object.keys(item.wechat).length !== 0) { - this.appWxpay(item.wechat, item.orderId, item.orderNum); + this.appWxpay(item.wechat, item.orderId, item.orderNum, item); } else if ( item.alipay && Object.keys(item.alipay).length !== 0 && item.alipay ) { - this.zfbPay(item.alipay, item.orderId, item.orderNum); + this.zfbPay(item.alipay, item.orderId, item.orderNum, item); } else { this.$refs.uToastRef.show({ type: "error", @@ -1110,9 +1128,9 @@ export default { } finally { this._paySubmitting = false; } }, // app 微信支付 - async appWxpay(alipay, orderId, orderNum) { + async appWxpay(alipay, orderId, orderNum, item) { try { - const result = await appWxpayFun(alipay, orderId, orderNum); + const result = await appWxpayFun(alipay, orderId, orderNum, item); console.log("支付成功", result); // 处理支付成功后的逻辑,如更新订单状态等 } catch (error) { @@ -1121,9 +1139,9 @@ export default { } }, // 支付宝支付 - async zfbPay(alipay, orderId, orderNum) { + async zfbPay(alipay, orderId, orderNum, item) { try { - const result = await zfbPayFun(alipay, orderId, orderNum); + const result = await zfbPayFun(alipay, orderId, orderNum, item); console.log("支付成功", result); // 处理支付成功后的逻辑,如更新订单状态等 } catch (error) { @@ -1321,6 +1339,13 @@ export default { padding: 4rpx 12rpx; margin-right: 8rpx; } + + .uni-image { + width: 36rpx; + height: 36rpx; + margin-right: 10rpx; + vertical-align: middle; + } } .way-option { diff --git a/pages/order_package/order_submit_ok/order_submit_ok.vue b/pages/order_package/order_submit_ok/order_submit_ok.vue index 72819e0..5e961b2 100644 --- a/pages/order_package/order_submit_ok/order_submit_ok.vue +++ b/pages/order_package/order_submit_ok/order_submit_ok.vue @@ -1,65 +1,203 @@ - - - - - + + + + + diff --git a/pages/other_package/productInfo/productInfo.vue b/pages/other_package/productInfo/productInfo.vue index f6df09a..076a3d4 100644 --- a/pages/other_package/productInfo/productInfo.vue +++ b/pages/other_package/productInfo/productInfo.vue @@ -82,7 +82,7 @@ - + 下单预计获得{{ orderInfo.contribution }}贡献值 @@ -472,6 +472,48 @@ + + + + + + 贡献值说明 + + + + + + + + + 我能获得多少贡献值? + 1.商品详情页中展示为预估获得贡献值。 + 2.实际赠送的贡献值将根据订单实付金额及商品贡献系数综合计算,其中商品贡献系数由商品毛利等因素确定。 + 3.使用优惠券、发生退款或售后时,贡献值可能相应调整,最终以订单完成后的实际到账为准。 + + + + 生效条件 + 1.收到商品后,在订单中点击【确认收货】时,立马到账。可在【我的-钱包】贡献值进行查看 + 2.消费者权益次日到账,可在【我的-钱包】数字积分-消费者权益中进行查看 + + + + 售后调整 + 1.如发生退货/退款,所有的贡献值、消费者权益将会进行扣除。 + + + + + + + 我知道了 + + + + +