From c5011c53d70480b4260c9b26cdade0151e89c5b6 Mon Sep 17 00:00:00 2001 From: quantulr <35954003+quantulr@users.noreply.github.com> Date: Fri, 24 May 2024 17:17:01 +0800 Subject: [PATCH] fix button status --- app.js | 4 +- .../logistics_details/logistics_details.wxml | 6 +- .../logistics_details/logistics_details.wxss | 4 +- pages/my/after_sales/after_sales.js | 46 ++++- pages/my/after_sales/after_sales.wxml | 2 + pages/my/after_sales/after_sales.wxss | 192 +++++++++--------- pages/my/my_order/my_order.js | 2 +- pages/my/my_order/my_order.wxml | 42 ++-- pages/order_details/order_details.wxml | 12 +- pages/order_detailsCode/order_details.wxml | 141 ++++++------- 10 files changed, 259 insertions(+), 192 deletions(-) diff --git a/app.js b/app.js index 22508e5..2f31552 100644 --- a/app.js +++ b/app.js @@ -146,8 +146,8 @@ App({ bgImg: 'https://sanpinhuicai.com/wisdommining/static/icon/bg/',//背景图片地址 // ip: 'http://106.54.198.47/', //接口地址 - ip: 'https://sanpinhuicai.com/', //接口地址 - // ip: 'http://192.168.0.112:9000/', //接口地址/ + // ip: 'https://sanpinhuicai.com/', //接口地址 + ip: 'http://192.168.0.112:9000/', //接口地址/ // ip: 'http://127.0.0.1:9000/', //接口地址/ //appId wx65c9560afc9cbaa7 diff --git a/pages/logistics_details/logistics_details.wxml b/pages/logistics_details/logistics_details.wxml index 74c8ebd..13f848d 100644 --- a/pages/logistics_details/logistics_details.wxml +++ b/pages/logistics_details/logistics_details.wxml @@ -12,7 +12,7 @@ - + 快递走件,催派等物流信息,请联系物流公司,如需平台接入请联系客服 @@ -26,8 +26,8 @@ 运单号: {{logistics[activePackage].logisticsNumber}} - - + + {{item.name}} {{item.spec}} {{item.num}} diff --git a/pages/logistics_details/logistics_details.wxss b/pages/logistics_details/logistics_details.wxss index 504a83e..aa2cefd 100644 --- a/pages/logistics_details/logistics_details.wxss +++ b/pages/logistics_details/logistics_details.wxss @@ -48,9 +48,9 @@ page { padding-left: 48rpx; } .goods-name { - overflow: hidden; + /* overflow: hidden; text-overflow: ellipsis; - white-space: nowrap; + white-space: nowrap; */ } .record-item:not(:last-child) { diff --git a/pages/my/after_sales/after_sales.js b/pages/my/after_sales/after_sales.js index 04a188c..7ba2814 100644 --- a/pages/my/after_sales/after_sales.js +++ b/pages/my/after_sales/after_sales.js @@ -26,6 +26,48 @@ Page({ url: '/pages/my/after_sales_next/after_sales_next?id=' + this.data.id + '&&num=' + this.data.num, }) }, + // 撤销退换货申请 + cancel() { + wx.showModal({ + title: '确定要撤销申请吗?', + // content: '', + complete: (res) => { + if (res.cancel) { + + } + + if (res.confirm) { + wx.request({ + url: app.globalData.ip + '/wisdommining/api/order/cancelRefund', + method: 'GET', + header: { + "content-type": "application/x-www-form-urlencoded", + }, + data: { + orderId: this.data.id + }, + success(res) { + if (res.data.code == 1) { + wx.showToast({ + title: res.data.message, + }) + wx.navigateTo({ + url: '/pages/my/my_order/my_order?state=' + 3, + }) + } else { + wx.showModal({ + title: '提示!', + content: res.data.message, + showCancel: false, + }) + } + } + }) + } + } + }) + + }, /** * 生命周期函数--监听页面初次渲染完成 @@ -49,14 +91,14 @@ Page({ }, data: { userId: app.globalData.userId, - orderNumber:this.data.num, + orderNumber: this.data.num, }, success: res => { console.log(res) wx.hideLoading() if (res.data.code == 1) { let goods = res.data.value; - if(goods.orderRefundImage){ + if (goods.orderRefundImage) { goods.orderRefundImage = goods.orderRefundImage.split(','); } this.setData({ diff --git a/pages/my/after_sales/after_sales.wxml b/pages/my/after_sales/after_sales.wxml index 12849b9..91742b3 100644 --- a/pages/my/after_sales/after_sales.wxml +++ b/pages/my/after_sales/after_sales.wxml @@ -81,6 +81,8 @@ 下一步 +撤销申请 + diff --git a/pages/my/after_sales/after_sales.wxss b/pages/my/after_sales/after_sales.wxss index 8b8722b..2d9bf01 100644 --- a/pages/my/after_sales/after_sales.wxss +++ b/pages/my/after_sales/after_sales.wxss @@ -1,29 +1,29 @@ /* pages/my/after_sales/after_sales.wxss */ -page{ +page { background-color: #f5f5f5; } -.top{ +.top { width: 750rpx; - height: 80rpx; - line-height: 80rpx; + height: 80rpx; + line-height: 80rpx; background-color: #f7e0cd; font-size: 28rpx; color: #333333; text-align: center; } -.top text{ +.top text { color: #ff372d; /* margin-left: 15rpx; */ } -.jl{ - width:750rpx; - background-color: #ffffff; +.jl { + width: 750rpx; + background-color: #ffffff; border-radius: 40rpx; margin-top: 30rpx; - padding-bottom:60rpx; + padding-bottom: 60rpx; } -.title{ +.title { width: 100%; height: 90rpx; line-height: 90rpx; @@ -33,40 +33,38 @@ page{ border-bottom: 1rpx #eeeeee solid; margin-bottom: 35rpx; } -.jlcont{ - padding:0 30rpx; +.jlcont { + padding: 0 30rpx; margin-bottom: 35rpx; line-height: 45rpx; } -.cont-1{ +.cont-1 { width: 15rpx; - height: 15rpx; + height: 15rpx; background-color: #cccccc; border-radius: 50%; - margin-top:15rpx; + margin-top: 15rpx; margin-right: 15rpx; } -.cont-1h{ +.cont-1h { background-color: #ffbb00; } -.cont-2{ +.cont-2 { font-size: 28rpx; color: #999999; width: 150rpx; } -.cont-3{ +.cont-3 { font-size: 28rpx; color: #333333; width: 480rpx; } -.btn{ +.btn { width: 690rpx; - height: 80rpx; - line-height: 80rpx; - background-image: linear-gradient(90deg, - #fdac04 0%, - #ee7c1d 100%); + height: 80rpx; + line-height: 80rpx; + background-image: linear-gradient(90deg, #fdac04 0%, #ee7c1d 100%); border-radius: 40rpx; position: fixed; left: 30rpx; @@ -75,100 +73,114 @@ page{ color: #ffffff; text-align: center; } -.btn-1{ - width: 690rpx; - height: 80rpx; - line-height: 80rpx; - background-color: #999; - border-radius: 40rpx; - position: fixed; - left: 30rpx; - bottom: 50rpx; - font-size: 32rpx; - color: #ffffff; - text-align: center; -} -.dengdai{ - margin-top: 200rpx; - font-size: 32rpx; - color: #ffbb00; -} -.dengdai view image{ - width: 103rpx; - height: 103rpx; -} -.dengdai view{ - text-align: center; -} -.jieguo_cont{ +.btn-cancel { + bottom: 160rpx; +} +.btn-1 { + width: 690rpx; + height: 80rpx; + line-height: 80rpx; + background-color: #999; + border-radius: 40rpx; + position: fixed; + left: 30rpx; + bottom: 50rpx; + font-size: 32rpx; + color: #ffffff; + text-align: center; +} +.btn-2 { + width: 690rpx; + height: 80rpx; + line-height: 80rpx; + background-color: #999; + border-radius: 40rpx; + position: fixed; + left: 30rpx; + bottom: 160rpx; + font-size: 32rpx; + color: #ffffff; + text-align: center; +} +.dengdai { + margin-top: 200rpx; + font-size: 32rpx; + color: #ffbb00; +} +.dengdai view image { + width: 103rpx; + height: 103rpx; +} +.dengdai view { + text-align: center; +} + +.jieguo_cont { font-size: 28rpx; - line-height: 48rpx; + line-height: 48rpx; color: #999999; width: 690rpx; padding: 0 30rpx; } - - - -.goods{ +.goods { width: 690rpx; padding: 0 30rpx; - background-color: #ffffff; + background-color: #ffffff; border-radius: 20rpx; margin: 30rpx 0; } -.cont{ +.cont { padding: 30rpx 0; border-bottom: 1rpx #dcdcdc solid; } -.cont:last-child{ +.cont:last-child { border-bottom: none; } -.cont-l image{ +.cont-l image { width: 160rpx; - height: 160rpx; + height: 160rpx; } -.cont-m{ +.cont-m { width: 400rpx; padding: 10rpx 0; display: flex; flex-wrap: wrap; align-content: space-between; } -.name{ - width:100%; +.name { + width: 100%; font-size: 28rpx; - color: #333333; + color: #333333; } -.specs{ - width:100%; +.specs { + width: 100%; font-size: 24rpx; color: #999999; } -.price{ - width:100%; +.price { + width: 100%; font-size: 36rpx; - color: #ff291e; + color: #ff291e; } -.price text{ +.price text { font-size: 24rpx; color: #999999; text-decoration: line-through; margin-left: 11rpx; } -.cont-r{ +.cont-r { display: flex; - align-items : flex-end; + align-items: flex-end; font-size: 32rpx; color: #0b0b0b; height: 130rpx; } -.up{ +.up { width: 690rpx; - background-color: #ffffff; + background-color: #ffffff; border-radius: 20rpx; padding: 30rpx; } @@ -176,7 +188,6 @@ page{ font-size: 32rpx; color: #333; margin: 0 0 30rpx 0; - } .title text { @@ -184,7 +195,6 @@ page{ color: #bababa; } - .photo { margin-top: 50rpx; } @@ -199,7 +209,7 @@ page{ float: left; } -.photo_all>view:nth-child(4) { +.photo_all > view:nth-child(4) { margin-right: 0; } @@ -211,7 +221,6 @@ page{ margin-right: 30rpx; margin-bottom: 30rpx; float: left; - } .photo_cont image { @@ -236,9 +245,7 @@ page{ .submit { width: 690rpx; height: 80rpx; - background-image: linear-gradient(-90deg, - #ee7b1e 0%, - #fdae03 100%); + background-image: linear-gradient(-90deg, #ee7b1e 0%, #fdae03 100%); border-radius: 40rpx; font-size: 36rpx; line-height: 80rpx; @@ -247,37 +254,36 @@ page{ position: fixed; bottom: 100rpx; left: 30rpx; - } -.aArice{ +.aArice { width: 690rpx; padding: 0 30rpx; height: 100rpx; line-height: 100rpx; - background-color: #ffffff; + background-color: #ffffff; border-radius: 20rpx; margin: 30rpx 0; font-size: 28rpx; - letter-spacing: 1rpx; - color: #333333; + letter-spacing: 1rpx; + color: #333333; } -.aArice text{ +.aArice text { font-size: 28rpx; - letter-spacing: 2rpx; - color: #ee7b1e; + letter-spacing: 2rpx; + color: #ee7b1e; } -.aArice text text{ +.aArice text text { font-size: 36rpx; } -.aArice2{ +.aArice2 { font-size: 28rpx; - letter-spacing: 1rpx; + letter-spacing: 1rpx; color: #333333; margin-top: 30rpx; border-radius: 20rpx; } -.aArice input{ +.aArice input { height: 100%; line-height: 100%; border: none; diff --git a/pages/my/my_order/my_order.js b/pages/my/my_order/my_order.js index 0f0b9c3..843d592 100644 --- a/pages/my/my_order/my_order.js +++ b/pages/my/my_order/my_order.js @@ -210,7 +210,7 @@ Page({ url: app.globalData.ip + '/wisdommining/api/order/afterSales', method: 'POST', header: { - "content-type": "application/x-www-form-urlencoded", + "content-type": "application/json", }, data: { orderRefund: '', diff --git a/pages/my/my_order/my_order.wxml b/pages/my/my_order/my_order.wxml index b21dc02..9675f88 100644 --- a/pages/my/my_order/my_order.wxml +++ b/pages/my/my_order/my_order.wxml @@ -29,15 +29,20 @@ - - {{item.status==5?'已取消':item.status==1?'待支付':item.status==2?'待发货':item.status==3?'待收货':item.status==4?'已完成':''}} + + {{item.status==5?'已取消' + :item.status==1?'待支付' + :item.status==2?'待发货' + :item.status==3?'待收货' + :item.status==4?'已完成' + :''}} {{ item.afterSalesStatus==61?'换货审核中' - :item.afterSalesStatus==62?'退货审核中' - :item.afterSalesStatus==63&&item.orderRefundType==1?'换货申请成功' - :item.afterSalesStatus==63&&item.orderRefundType==2?'退货申请成功' + :item.afterSalesStatus==62?'退款审核中' + :item.afterSalesStatus==63&&item.orderRefundType==1?'请退回商品' + :item.afterSalesStatus==63&&item.orderRefundType==2?'请退货' :item.afterSalesStatus==64&&item.orderRefundType==1?'换货待商家收货' :item.afterSalesStatus==64&&item.orderRefundType==2?'退货待商家收货' :item.afterSalesStatus==65&&item.orderRefundType==1?'换货完成' @@ -45,6 +50,7 @@ :item.afterSalesStatus==65&&item.orderRefundType==3?'退款完成' :item.afterSalesStatus==66&&item.orderRefundType==1?'换货失败' :item.afterSalesStatus==66&&item.orderRefundType==2?'退货失败' + :item.afterSalesStatus==66&&item.orderRefundType==3?'退款失败' :'' }} @@ -74,31 +80,33 @@ 您需要在{{item.timeStr}}内处理 - - 物流查询 - 确认收货 + + 物流查询 + 确认收货 立即支付 删除订单 - - + + 申请退款 - 申请退货 - 申请换货 + 申请退货 + 申请换货 - 查看进度 + + 查看进度 退换货记录 + + + 修改地址 + - - - 修改地址 - diff --git a/pages/order_details/order_details.wxml b/pages/order_details/order_details.wxml index 3947c1c..3c5d333 100644 --- a/pages/order_details/order_details.wxml +++ b/pages/order_details/order_details.wxml @@ -23,6 +23,14 @@ findGoods: findGoods, } + + function toFixed(num, precise) { + return typeof (num) === "undefined" ? num : num.toFixed(precise) + } + module.exports = { + toFixed: toFixed, + } + 还剩余{{ticker}}订单将自动取消 @@ -100,7 +108,7 @@ 商品合计 - {{goods.orderPayWay!=2?'¥'+total:goods.orderOtherPay+'积分'}} + {{goods.orderPayWay!=2?'¥'+ num.toFixed(total, 2) : goods.orderOtherPay+'积分'}} 运费 @@ -130,7 +138,7 @@ 实际支付 - {{goods.orderPayWay!=2?'¥'+goods.orderActualPay:goods.orderOtherPay+'积分'}} + {{goods.orderPayWay!=2?'¥'+num.toFixed(goods.orderActualPay, 2):goods.orderOtherPay+'积分'}} diff --git a/pages/order_detailsCode/order_details.wxml b/pages/order_detailsCode/order_details.wxml index 4569e44..ce3f4f9 100644 --- a/pages/order_detailsCode/order_details.wxml +++ b/pages/order_detailsCode/order_details.wxml @@ -1,88 +1,89 @@ - - - {{goods.orderAddress}} + + {{goods.orderAddress}} - - - - - - {{item.goodsName}} - 规格:{{item.wisdGoodsSpec.specName}} - - ¥{{item.wisdGoodsSpec.specBulyPrice==null?item.wisdGoodsSpec.specPrice:item.wisdGoodsSpec.specBulyPrice}} - ¥{{item.wisdGoodsSpec.originalPrice}} - - ¥0 - - x{{item.goodsNum}} - + + + + + + {{item.goodsName}} + 规格:{{item.wisdGoodsSpec.specName}} + + ¥{{item.wisdGoodsSpec.specBulyPrice==null?item.wisdGoodsSpec.specPrice:item.wisdGoodsSpec.specBulyPrice}} + ¥{{item.wisdGoodsSpec.originalPrice}} + + ¥0 + + x{{item.goodsNum}} + - - 商品合计 - ¥{{total}} - - - 运费 - {{goods.orderPick==1?'自提':goods.orderFreight==0?'包邮':'¥'+goods.orderFreight}} - - - 优惠 - - - - {{goods.orderPayWay==4?'现金券':goods.orderPayWay==5?'折扣券':''}}-¥{{goods.orderOtherPay}} - 套餐券-1 - - - 备注 - {{goods.orderRemark==''?'无':goods.orderRemark}} - - - 实际支付 - ¥{{goods.orderActualPay==null?'0':goods.orderActualPay}} - + + 商品合计 + ¥{{total}} + + + 运费 + {{goods.orderPick==1?'自提':goods.orderFreight==0?'包邮':'¥'+goods.orderFreight}} + + + 优惠 + + + + + {{goods.orderPayWay==4?'现金券':goods.orderPayWay==5?'折扣券':''}}-¥{{goods.orderOtherPay}} + + 套餐券-1 + + + 备注 + {{goods.orderRemark==''?'无':goods.orderRemark}} + + + 实际支付 + ¥{{goods.orderActualPay==null?'0':goods.orderActualPay}} + - - 支付方式 - - {{goods.orderPayWay==1?'微信支付':goods.orderPayWay==2?'积分支付':goods.orderPayWay==3?'套餐券':goods.orderPayWay==4?'微信支付+现金券':goods.orderPayWay==1?'微信支付+折扣券':''}} - - - - 支付时间 - {{goods.orderPayTime}} - - - 自提时间 - {{goods.orderPickTime}} - - - 订单编号 - {{goods.orderNumber}} - - - 物流单号 - 暂无 - - - 联系方式 - {{goods.userPhone}} - + + 支付方式 + + {{goods.orderPayWay==1?'微信支付':goods.orderPayWay==2?'积分支付':goods.orderPayWay==3?'套餐券':goods.orderPayWay==4?'微信支付+现金券':goods.orderPayWay==1?'微信支付+折扣券':''}} + + + + 支付时间 + {{goods.orderPayTime}} + + + 自提时间 + {{goods.orderPickTime}} + + + 订单编号 + {{goods.orderNumber}} + + + 物流单号 + 暂无 + + + 联系方式 + {{goods.userPhone}} + - - 确认提货 + + 确认提货 \ No newline at end of file