From 0b9de8d4391dfc291f73d87d702ece141c47c70e Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期一, 08 九月 2025 15:32:08 +0800 Subject: [PATCH] 移除取消订单按钮 --- pages/order/myOrder.vue | 50 +++++++++++++++++++++++++++++++++++++------------- 1 files changed, 37 insertions(+), 13 deletions(-) diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue index 865a80e..2d917c9 100644 --- a/pages/order/myOrder.vue +++ b/pages/order/myOrder.vue @@ -102,7 +102,7 @@ >绔嬪嵆浠樻</view > <!-- 鍙栨秷璁㈠崟 --> - <view +<!-- <view ripple class="cancel-btn" shape="circle" @@ -111,7 +111,7 @@ @click="onCancel(order.sn)" > 鍙栨秷璁㈠崟 - </view> + </view> --> <!-- 绛夊緟鏀惰揣 --> <view ripple @@ -138,13 +138,25 @@ shape="circle" class="cancel-btn" size="mini" - v-if="order.groupAfterSaleStatus && ( order.groupAfterSaleStatus.includes('NOT_APPLIED') || order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))" + v-if="order.groupAfterSaleStatus && + ( order.groupAfterSaleStatus.includes('NOT_APPLIED') + || order.groupAfterSaleStatus.includes('PART_AFTER_SALE')||order.orderStatus === 'UNDELIVERED')" @click="applyService(order)" > 閫�娆�/鍞悗 </view> + <view + ripple + shape="circle" + class="cancel-btn" + size="mini" + v-if="order.orderStatus === 'COMPLETED'" + @click="buyBack(order)" + > + 鍐嶆潵涓�鍗� + </view> <!-- TODO 鍚庣画瀹屽杽 --> - <!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if=" +<!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if=" order.orderStatus === 'CANCELLED' || order.orderStatus === 'COMPLETE' " @click="reBuy(order)"> @@ -217,6 +229,7 @@ import { getOrderXcxList, cancelOrder, confirmReceipt } from "@/api/order.js"; import { getClearReason } from "@/api/after-sale.js"; import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js"; +import {buyBack} from "@/api/trade.js"; export default { data() { @@ -362,6 +375,26 @@ }, }, methods: { + //鍐嶆潵涓�鍗� + buyBack(order){ + console.log(JSON.stringify(order)) + const param = order.orderItems.map(item => { + return { + skuId: item.skuId, + num: item.num + } + }) + console.log('------------------>',JSON.stringify(param)) + buyBack(param).then(res=>{ + console.log('------------------->',res) + if(res.data.code==200){ + uni.navigateTo({ + url: "/pages/order/fillorder?way=CART" + }) + } + }) + + }, // 鍞悗 applyService(order) { uni.navigateTo({ @@ -415,18 +448,9 @@ */ pay(val) { if (val.sn) { - // #ifdef MP-WEIXIN - new LiLiWXPay({ - sn: val.sn, - price: val.flowPrice, - orderType: "ORDER", - }).pay(); - // #endif - // #ifndef MP-WEIXIN uni.navigateTo({ url: "/pages/cart/payment/payOrder?order_sn=" + val.sn, }); - // #endif } }, -- Gitblit v1.8.0