Browse Source

我的订单状态修改

确认订单图片地址修改
baolei 2 months ago
parent
commit
e80ec05516

+ 1 - 1
components/existProduct-list/existProduct-list.wxml

@@ -2,7 +2,7 @@
 <view class="prodsList">
             <view class="itemProd" wx:for="{{cartList}}" wx:key="id">
                 <view class="goods-info">
-                    <image src="/images/index/category-item.png" mode="aspectFill"></image>
+                    <image src="{{item.prodPicList[0].picUrl}}" mode="aspectFill"></image>
                     <view class="info">
                         <text>{{item.prodName}}</text>
                         <text>{{item.prodAttrName || item.attrName}}</text>

+ 3 - 2
pages/my/myOrder/myOrder.js

@@ -9,7 +9,8 @@ Page({
   data: {
     tab:[
         {title:"全部订单",status:''},
-        {title:"已支付",status:'PLAYED'},
+        {title:"已下单",status:'ORDERED'},
+        {title:"已支付",status:'PAYED'},
         {title:"已取消",status:'CANCELLED'},
         {title:"已发货",status:'DELIVERED'},
         {title:"已收货",status:'RECEIVED'},
@@ -30,7 +31,7 @@ Page({
   getOrderLists(status){
       API.getOrderLists({pageNum:this.data.pageNum,pageSize:10,status}).then(res=>{
           res.orderDTOS.forEach(item=>{
-              let stats = {PLAYED:"已支付",CANCELLED:"已取消",DELIVERED:"已发货",RECEIVED:"已收货",FINISHED:"完成",ORDERED:"已下单"};
+              let stats = {PAYED:"已支付",CANCELLED:"已取消",DELIVERED:"已发货",RECEIVED:"已收货",FINISHED:"完成",ORDERED:"已下单"};
               item.statusName = stats[item.orderStatus]
           })
           this.setData({

+ 6 - 1
pages/order/confirmOrder/confirmOrder.js

@@ -54,7 +54,12 @@ Page({
         console.log('支付成功', res);
         wx.showToast({ title: '支付成功' });
         // 跳转到订单详情或返回
-      },
+        setTimeout(()=>{
+          wx.redirectTo({
+            url: '/pages/my/myOrder/myOrder',
+          })
+      },3000)
+    },
       fail(err) {
         console.error('支付失败', err);
         wx.showToast({ title: '支付取消', icon: 'none' });