Przeglądaj źródła

Merge branch 'ghm' into v2

MS-IOHQJGHXZHQD\Administrator 4 miesięcy temu
rodzic
commit
bd30207a61

+ 36 - 24
src/pages.json

@@ -550,57 +550,69 @@
 				},{
 					"path": "productDetails/index",
 					"style": {
-						//"navigationBarTitleText": "商品详情",
-						"navigationStyle": "custom",
+						"navigationBarTitleText": "商品详情",
+						"navigationBarBackgroundColor": "#2cb8d4",
+						"navigationBarTextStyle": "white",
 						"app-plus": {
-     						 "titleNView": false // 关闭 App 端导航栏
-    					}
+							"softinputNavBar": "none",
+							"titleNView": false
+						}
 					}
 				},{
 					"path": "productDetails/addressManagement",
 					"style": {
-						//"navigationBarTitleText": "地址管理",
-						"navigationStyle": "custom",
+						"navigationBarTitleText": "地址管理",
+						"navigationBarBackgroundColor": "#2cb8d4",
+						"navigationBarTextStyle": "white",
 						"app-plus": {
-     						 "titleNView": false // 关闭 App 端导航栏
-    					}
+							"softinputNavBar": "none",
+							"titleNView": false
+						}
 						
 					}
 				},{
 					"path": "productDetails/paymentSuccessful",
 					"style": {
-						//"navigationBarTitleText": "兑换成功",
-						"navigationStyle": "custom",
+						"navigationBarTitleText": "兑换成功",
+						"navigationBarBackgroundColor": "#2cb8d4",
+						"navigationBarTextStyle": "white",
 						"app-plus": {
-     						 "titleNView": false // 关闭 App 端导航栏
-    					}
+							"softinputNavBar": "none",
+							"titleNView": false
+						}
 					}
 				},{
 					"path": "productDetails/pendingPayment",
 					"style": {
-						//"navigationBarTitleText": "待支付",
-						"navigationStyle": "custom",
+						"navigationBarTitleText": "待支付",
+						"navigationBarBackgroundColor": "#2cb8d4",
+						"navigationBarTextStyle": "white",
 						"app-plus": {
-     						 "titleNView": false // 关闭 App 端导航栏
-    					}
+							"softinputNavBar": "none",
+							"titleNView": false
+						}
 					}
 				},{
 					"path": "productDetails/applyRefund",
 					"style": {
-						//"navigationBarTitleText": "申请退款",
-						"navigationStyle": "custom",
+						"navigationBarTitleText": "申请退款",
+						"navigationBarBackgroundColor": "#2cb8d4",
+						"navigationBarTextStyle": "white",
 						"app-plus": {
-     						 "titleNView": false // 关闭 App 端导航栏
-    					}
+							"softinputNavBar": "none",
+							"titleNView": false
+						}
 					}
 				},{
 					"path": "productDetails/applyExchange",
 					"style": {
-						//"navigationBarTitleText": "申请换货",
-						"navigationStyle": "custom",
+						"navigationBarTitleText": "申请换货",
+						"navigationBarBackgroundColor": "#2cb8d4",
+						"navigationBarTextStyle": "white",
 						"app-plus": {
-     						 "titleNView": false // 关闭 App 端导航栏
-    					}
+							"softinputNavBar": "none",
+							"titleNView": false
+						}
 					}
 				}
 			]

+ 127 - 111
src/points/order/orderDetails.vue

@@ -14,9 +14,9 @@ export default {
       imageErrorMap: {},
       // 设备信息
       deviceInfo: uni.getSystemInfoSync(),
-      show:false,
-      title:'',
-      content:'',
+      show: false,
+      title: '',
+      content: '',
       // 物流单号弹窗
       showLogistics: false,
       logisticsNumber: '',
@@ -146,27 +146,18 @@ export default {
         afterSalesType: this.afterSalesType
       });
       // 这里可以调用售后API
-      this.afterSalesShow = false;
-
-      let receivedStatus
-      let tab
-      if (this.receiptStatus == 'notReceived') {
-        receivedStatus = 1
-        tab = 1
-      } else if (this.receiptStatus == "received" && this.afterSalesType == "refund") {
-        receivedStatus = 2
-        tab = 1
-      } else if (this.receiptStatus == "received" && this.afterSalesType == "exchange") {
+      
+      //订单状态(0:待付款 1:待发货 2:待收货 3:已收货 4:售后中  11:取消订单)
+      
+      if (this.orderInfo.orderStatus == 1 || this.orderInfo.orderStatus == 2) {
         uni.navigateTo({
-          url: `/points/productDetails/applyExchange?orderNo=${this.orderInfo.orderNo}&orderId=${this.orderInfo.id}`
+          url: `/points/productDetails/applyRefund?orderNo=${this.orderInfo.orderNo}&orderId=${this.orderInfo.id}&orderStatus=${this.orderInfo.orderStatus}`
+        });
+      } else if (this.orderInfo.orderStatus == 3) {
+        uni.navigateTo({
+          url: `/points/productDetails/applyExchange?orderNo=${this.orderInfo.orderNo}&orderId=${this.orderInfo.id}&orderStatus=${this.orderInfo.orderStatus}`
         });
-        return
       }
-      //receivedStatus 1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
-      //tab 1 退款 2 换货
-      uni.navigateTo({ 
-        url: `/points/productDetails/applyRefund?receivedStatus=${receivedStatus}&tab=${tab}&orderNo=${this.orderInfo.orderNo}&orderId=${this.orderInfo.id}`
-      });
     },
     //获取售后时间
     getafterTime(){
@@ -221,27 +212,27 @@ export default {
       </view>
       <view class="info-item">
         <text class="info-label">发货时间</text>
-        <text class="info-value">{{ orderInfo.deliveryTime || '--'  }}</text>
+        <text class="info-value">{{ orderInfo.deliveryTime || '--' }}</text>
       </view>
       <view class="info-item">
         <text class="info-label">订单号</text>
-        <text class="info-value">{{ orderInfo.orderNo || '--'  }}</text>
+        <text class="info-value">{{ orderInfo.orderNo || '--' }}</text>
       </view>
       <view class="info-item">
         <text class="info-label">物流单号</text>
-        <text class="info-value">{{ orderInfo.logisticsNo || '--'  }}</text>
+        <text class="info-value">{{ orderInfo.logisticsNo || '--' }}</text>
       </view>
       <view class="info-item">
         <text class="info-label">收件人</text>
-        <text class="info-value">{{ orderInfo.receiverName || '--'  }}</text>
+        <text class="info-value">{{ orderInfo.receiverName || '--' }}</text>
       </view>
       <view class="info-item">
         <text class="info-label">联系电话</text>
-        <text class="info-value">{{ orderInfo.receiverPhone || '--'  }}</text>
+        <text class="info-value">{{ orderInfo.receiverPhone || '--' }}</text>
       </view>
       <view class="info-item">
         <text class="info-label">收件地址</text>
-        <text class="info-value">{{ orderInfo.addressName || '--'  }}</text>
+        <text class="info-value">{{ orderInfo.addressName || '--' }}</text>
       </view>
     </view>
 
@@ -335,7 +326,7 @@ export default {
         </view>
     </u-modal>
     <!-- 填写物流单号 -->
-    <u-popup :show="showLogistics" mode="bottom"  @close="showLogistics = false" round="20rpx">
+    <u-popup :show="showLogistics" mode="bottom" @close="showLogistics = false" round="20rpx">
       <view class="logistics-popup">
         <!-- 标题 -->
         <view class="popup-header">
@@ -345,12 +336,8 @@ export default {
 
         <!-- 输入框 -->
         <view class="popup-content">
-          <u--textarea v-model="logisticsNumber"
-                       placeholder="请输入物流单号"
-                       border="surround"
-                       :border-radius="10"
-                       class="logistics-input"
-          ></u--textarea>
+          <u--textarea v-model="logisticsNumber" placeholder="请输入物流单号" border="surround" :border-radius="10"
+            class="logistics-input"></u--textarea>
         </view>
 
         <!-- 提交按钮 -->
@@ -360,7 +347,7 @@ export default {
       </view>
     </u-popup>
     <!-- 售后 -->
-    <u-popup :show="afterSalesShow" mode="bottom"  @close="afterSalesShow = false" round="20rpx">
+    <u-popup :show="afterSalesShow" mode="bottom" @close="afterSalesShow = false" round="20rpx">
       <view class="after-sales-popup">
         <!-- 标题 -->
         <view class="popup-header">
@@ -372,16 +359,10 @@ export default {
         <view class="popup-section">
           <text class="section-title">请选择收货状态</text>
           <view class="option-group">
-            <button
-              class="option-button"
-              :class="{ active: receiptStatus === 'notReceived' }"
-              @click="receiptStatus = 'notReceived'"
-            >未收到货</button>
-            <button
-              class="option-button"
-              :class="{ active: receiptStatus === 'received' }"
-              @click="receiptStatus = 'received'"
-            >已收到货</button>
+            <button class="option-button" :class="{ active: receiptStatus === 'notReceived' }"
+              @click="receiptStatus = 'notReceived'">未收到货</button>
+            <button class="option-button" :class="{ active: receiptStatus === 'received' }"
+              @click="receiptStatus = 'received'">已收到货</button>
           </view>
         </view>
 
@@ -389,16 +370,10 @@ export default {
         <view class="popup-section" v-if="receiptStatus === 'received'">
           <text class="section-title">请选择售后类型</text>
           <view class="option-group">
-            <button
-              class="option-button"
-              :class="{ active: afterSalesType === 'refund' }"
-              @click="afterSalesType = 'refund'"
-            >退货</button>
-            <button
-              class="option-button"
-              :class="{ active: afterSalesType === 'exchange' }"
-              @click="afterSalesType = 'exchange'"
-            >换货</button>
+            <button class="option-button" :class="{ active: afterSalesType === 'refund' }"
+              @click="afterSalesType = 'refund'">退货</button>
+            <button class="option-button" :class="{ active: afterSalesType === 'exchange' }"
+              @click="afterSalesType = 'exchange'">换货</button>
           </view>
         </view>
 
@@ -438,7 +413,7 @@ export default {
 </template>
 
 <style scoped lang="scss">
-.order-details{
+.order-details {
   width: 750rpx;
   min-height: 100vh;
   background-image: url("@/static/points/orderBg.png");
@@ -446,8 +421,9 @@ export default {
   background-repeat: no-repeat;
   background-color: #F5F8F8;
   padding-top: 54rpx;
-  ::v-deep .u-modal{
-    .u-modal__title{
+
+  ::v-deep .u-modal {
+    .u-modal__title {
       background: #E8FFFD;
       height: 92rpx;
       padding: 0;
@@ -457,16 +433,19 @@ export default {
       color: #000000;
       line-height: 92rpx;
     }
-    .u-modal__content,.u-modal__button-group--confirm-button{
+
+    .u-modal__content,
+    .u-modal__button-group--confirm-button {
       padding: 0;
     }
   }
 
   // 模态框样式
-  .modal-content{
+  .modal-content {
     padding: 40rpx 32rpx;
     text-align: center;
-    .modal-text{
+
+    .modal-text {
       font-family: PingFang SC, PingFang SC;
       font-weight: 500;
       font-size: 28rpx;
@@ -474,12 +453,14 @@ export default {
       line-height: 39rpx;
     }
   }
-  .modal-footer{
+
+  .modal-footer {
     border-top: 1rpx solid #EEEEEE;
     display: flex;
     justify-content: center;
     padding: 24rpx 58rpx;
-    button{
+
+    button {
       width: 225rpx;
       height: 68rpx;
       border-radius: 60rpx;
@@ -489,20 +470,24 @@ export default {
       margin: 0 20rpx;
       padding: 0;
     }
-    .modal-cancel{
+
+    .modal-cancel {
       border: 1rpx solid #999999;
       color: #333333;
     }
-    .modal-confirm{
-      background: linear-gradient( 78deg, #1AD8CF 0%, #21C8C0 100%);
+
+    .modal-confirm {
+      background: linear-gradient(78deg, #1AD8CF 0%, #21C8C0 100%);
       color: #FFFFFF;
     }
   }
-  .header{
+
+  .header {
     width: 100%;
     margin-bottom: 38rpx;
     text-align: center;
-    .header-title{
+
+    .header-title {
       font-family: PingFang SC, PingFang SC;
       font-weight: 500;
       font-size: 36rpx;
@@ -510,7 +495,8 @@ export default {
       line-height: 40rpx;
     }
   }
-  .product-info{
+
+  .product-info {
     width: 686rpx;
     height: 168rpx;
     background: #FFFFFF;
@@ -518,18 +504,22 @@ export default {
     margin: 0 auto 24rpx;
     padding: 24rpx;
     display: flex;
-    .product-image{
+
+    .product-image {
       width: 120rpx;
       height: 120rpx;
       margin-right: 24rpx;
-      image{
+
+      image {
         width: 100%;
         height: 100%;
       }
     }
-    .product-details{
+
+    .product-details {
       flex: 1;
-      .product-name{
+
+      .product-name {
         font-family: PingFang SC, PingFang SC;
         font-weight: bold;
         font-size: 28rpx;
@@ -538,7 +528,8 @@ export default {
         margin-bottom: 24rpx;
         display: block;
       }
-      .product-spec{
+
+      .product-spec {
         font-family: PingFang SC, PingFang SC;
         font-size: 26rpx;
         line-height: 26rpx;
@@ -546,7 +537,8 @@ export default {
         margin-bottom: 2rpx;
         display: block;
       }
-      .product-price{
+
+      .product-price {
         font-family: PingFang SC, PingFang SC;
         font-weight: bold;
         line-height: 26rpx;
@@ -555,28 +547,33 @@ export default {
       }
     }
   }
+
   .order-info,
-  .refund-info{
+  .refund-info {
     width: 686rpx;
     background-color: #FFFFFF;
     border-radius: 16rpx;
     margin: 0 auto 24rpx;
     padding: 26rpx 24rpx;
-    .info-item{
+
+    .info-item {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       margin-bottom: 22rpx;
-      &:last-child{
+
+      &:last-child {
         margin-bottom: 0;
       }
-      .info-label{
+
+      .info-label {
         font-family: PingFang SC, PingFang SC;
         font-weight: 400;
         font-size: 26rpx;
         color: #666666;
       }
-      .info-value{
+
+      .info-value {
         flex: 1;
         font-family: PingFang SC, PingFang SC;
         font-weight: 400;
@@ -586,7 +583,8 @@ export default {
       }
     }
   }
-  .action-buttons{
+
+  .action-buttons {
     width: 750rpx;
     background: #FFFFFF;
     position: fixed;
@@ -598,11 +596,13 @@ export default {
     // 正常手机的高度
     height: auto;
     min-height: 100rpx;
+
     // 有安全区域的设备的高度
     &.safe-area {
       height: 164rpx;
     }
-    .detail-button{
+
+    .detail-button {
       padding: 0 30rpx;
       height: 56rpx;
       border-radius: 98rpx;
@@ -613,7 +613,8 @@ export default {
       border: 2rpx solid #999999;
       margin: 0;
     }
-    .action-button{
+
+    .action-button {
       padding: 0 30rpx;
       height: 56rpx;
       background: #03C1B8;
@@ -627,18 +628,19 @@ export default {
   }
 
   // 物流单号弹出框样式
-  .logistics-popup{
+  .logistics-popup {
     width: 100%;
     padding: 40rpx;
     background: #F5F8F8;
     border-radius: 32rpx 32rpx 0 0;
 
-    .popup-header{
+    .popup-header {
       display: flex;
       justify-content: space-between;
       align-items: center;
       margin-bottom: 32rpx;
-      .popup-title{
+
+      .popup-title {
         font-size: 40rpx;
         font-weight: bold;
         color: #333333;
@@ -646,15 +648,17 @@ export default {
         background-repeat: no-repeat;
         background-position: 20rpx 40rpx;
       }
-      .popup-close{
+
+      .popup-close {
         font-size: 28rpx;
         color: #999999;
       }
     }
 
-    .popup-content{
+    .popup-content {
       margin-bottom: 32rpx;
-      .logistics-input{
+
+      .logistics-input {
         width: 100%;
         height: 180rpx;
         padding: 20rpx;
@@ -665,11 +669,11 @@ export default {
       }
     }
 
-    .popup-footer{
-      .submit-button{
+    .popup-footer {
+      .submit-button {
         width: 100%;
         height: 80rpx;
-        background: linear-gradient( 78deg, #1AD8CF 0%, #21C8C0 100%);
+        background: linear-gradient(78deg, #1AD8CF 0%, #21C8C0 100%);
         border-radius: 40rpx;
         font-size: 32rpx;
         color: #FFFFFF;
@@ -682,55 +686,60 @@ export default {
   }
 
   // 售后弹出框样式
-  .after-sales-popup{
+  .after-sales-popup {
     width: 100%;
     background: #F8F8F8;
     border-radius: 32rpx 32rpx 0 0;
 
-    .popup-header{
+    .popup-header {
       display: flex;
       justify-content: space-between;
       align-items: center;
       height: 92rpx;
       padding: 0 32rpx;
-      .popup-title{
+
+      .popup-title {
         width: 100%;
         text-align: center;
         font-size: 32rpx;
         font-weight: bold;
         color: #333333;
       }
-      .popup-close{
+
+      .popup-close {
         font-size: 32rpx;
         color: #999999;
       }
     }
 
-    .popup-section{
+    .popup-section {
       width: 686rpx;
       min-height: 202rpx;
       background: #FFFFFF;
       border-radius: 16rpx;
       margin: 0 auto 24rpx;
       padding: 24rpx;
-      .section-title{
+
+      .section-title {
         font-family: PingFang SC, PingFang SC;
         font-weight: bold;
         font-size: 28rpx;
         color: #333333;
         display: block;
         margin-bottom: 24rpx;
-        .time-limit{
+
+        .time-limit {
           font-size: 24rpx;
           color: #f53e54;
           font-weight: normal;
         }
       }
 
-      .option-group{
+      .option-group {
         display: flex;
         justify-content: space-between;
-        .option-button{
+
+        .option-button {
           flex: 1;
           height: 72rpx;
           border-radius: 38rpx;
@@ -742,7 +751,8 @@ export default {
           line-height: 72rpx;
           margin: 0 10rpx;
           padding: 0;
-          &.active{
+
+          &.active {
             background: #1AD8CF;
             border-color: #1AD8CF;
             color: #FFFFFF;
@@ -750,30 +760,35 @@ export default {
         }
       }
 
-      .product-item{
+      .product-item {
         display: flex;
         padding: 20rpx;
         background-color: #F5F8F8;
         border-radius: 10rpx;
-        .product-image{
+
+        .product-image {
           width: 100rpx;
           height: 100rpx;
           margin-right: 20rpx;
-          image{
+
+          image {
             width: 100%;
             height: 100%;
             border-radius: 10rpx;
           }
         }
-        .product-details{
+
+        .product-details {
           flex: 1;
-          .product-name{
+
+          .product-name {
             font-size: 28rpx;
             color: #333333;
             margin-bottom: 10rpx;
             display: block;
           }
-          .product-spec{
+
+          .product-spec {
             font-size: 24rpx;
             color: #999999;
             display: block;
@@ -782,15 +797,16 @@ export default {
       }
     }
 
-    .popup-footer{
+    .popup-footer {
       width: 750rpx;
       height: 124rpx;
       background: #FFFFFF;
       padding: 20rpx 40rpx;
-      .next-button{
+
+      .next-button {
         width: 100%;
         height: 80rpx;
-        background: linear-gradient( 78deg, #1AD8CF 0%, #21C8C0 100%);
+        background: linear-gradient(78deg, #1AD8CF 0%, #21C8C0 100%);
         border-radius: 40rpx;
         font-size: 32rpx;
         color: #FFFFFF;

+ 2 - 1
src/points/order/orderList.vue

@@ -69,7 +69,8 @@ export default {
     },
     viewDetail(order) {
       //payStatus": 0 未支付, 1已支付
-      if (order.payStatus==0) { //未支付----跳转到待支付页面
+      //订单状态(0:待付款 1:待发货 2:待收货 3:已收货 4:售后中  11:取消订单)
+      if (order.orderStatus==0 || order.orderStatus==11) { //0:待付款 11:已取消----跳转到待支付页面
         uni.navigateTo({
           url: `/points/productDetails/pendingPayment?orderNo=${order.orderNo}`
         });

+ 6 - 31
src/points/productDetails/applyExchange.vue

@@ -3,11 +3,11 @@
     <view>
         <scroll-view :scroll-y="true" @scroll="handleContentScroll">
             <!-- 导航栏  :leftIconColor="!isTop ? '#fff' : '#000'"-->
-            <u-navbar :placeholder="true" autoBack @click="autoBackFun">
+            <!-- <u-navbar :placeholder="true" autoBack @click="autoBackFun">
                 <view slot="center">
                     <view class="centerTitle" style="background-color: #fff;">{{ title }}</view>
                 </view>
-            </u-navbar>
+            </u-navbar> -->
 
             <view class="content">
                 <view class="productPrice">
@@ -85,37 +85,13 @@ export default {
         return {
             orderNo:null,
             orderId:null,
+            orderStatus:null,
             fileList: [],
             questionOrDiscribeValue: null,
             selectReasonValue: null,
-            title: '申请换货',
             isTop: 0,
             redemptionRulesShowPopup: false,
             selectProductShowPopup: false,
-            list: [
-                {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                    defaultAddress: '默认',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                },
-            ]
 
 
         }
@@ -126,6 +102,7 @@ export default {
             //decodeURIComponent (data) 
             if(data.orderId)this.orderId=data.orderId
             if(data.orderNo)this.orderNo=data.orderNo
+            if(data.orderStatus)this.orderStatus=data.orderStatus 
             if (data.questionOrDiscribeValue && data.questionOrDiscribeValue !== "null" && data.questionOrDiscribeValue !== "") {
                 this.questionOrDiscribeValue = data.questionOrDiscribeValue
             }
@@ -175,12 +152,10 @@ export default {
         handleContentScroll(e) {
             this.isTop = e.detail.scrollTop > 0
         },
-        //选择申请原因
+        //选择申请原因--换货
         selectApplyReasonFun(tab) {
-            //receivedStatus 1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
-            //tab 1 退款 2 换货
             uni.navigateTo({
-                url: `/points/productDetails/applyRefund?receivedStatus=3&tab=${tab}&selectReasonValue=${encodeURIComponent(this.selectReasonValue)}&questionOrDiscribeValue=${encodeURIComponent(this.questionOrDiscribeValue)}&fileList=${JSON.stringify(this.fileList)}&orderNo=${this.orderNo}&orderId=${this.orderId}`
+                url: `/points/productDetails/applyRefund?tab=${tab}&selectReasonValue=${encodeURIComponent(this.selectReasonValue)}&questionOrDiscribeValue=${encodeURIComponent(this.questionOrDiscribeValue)}&fileList=${JSON.stringify(this.fileList)}&orderNo=${this.orderNo}&orderId=${this.orderId}&orderStatus=${this.orderStatus}`
             })
 
         },

+ 66 - 27
src/points/productDetails/applyRefund.vue

@@ -4,16 +4,16 @@
     <view>
         <scroll-view :scroll-y="true" @scroll="handleContentScroll">
             <!-- 导航栏  :leftIconColor="!isTop ? '#fff' : '#000'"-->
-            <u-navbar :placeholder="true" autoBack @click="autoBackFun">
+            <!-- <u-navbar :placeholder="true" autoBack @click="autoBackFun">
                 <view slot="center">
                     <view class="centerTitle" style="background-color: #fff;">
                         {{ receivedStatus == '1' || receivedStatus == '2' ? '申请退款' : '申请换货' }}</view>
                 </view>
-            </u-navbar>
+            </u-navbar> -->
 
             <view class="content">
-                <view v-if="tab == '1'">
-                    <view class="contentDetail">
+                <view>
+                    <view class="contentDetail" v-if="orderStatus && tab==1">
                         <view class="tip">请选择取消订单的原因(必选):</view>
                         <u-radio-group v-model="selectReason" @change="groupChange">
                             <view>
@@ -29,7 +29,7 @@
                             </view>
                         </u-radio-group>
                     </view>
-                    <view class="tip2" v-if="receivedStatus == '1'">
+                    <view class="tip2" v-if="orderStatus == 1">
                         <view class="title">温馨提示:</view>
                         <view class="textClass">
                             1.订单一旦取消,无法恢复<br>
@@ -38,7 +38,7 @@
                         </view>
                     </view>
                 </view>
-                <view v-if="tab == '2'">
+                <view v-if="orderStatus == 3 && tab==2">
                     <view class="Box">
                         <view class="questionOrDiscribe">
                             <view>问题与描述:</view>
@@ -72,7 +72,7 @@
                 <u-button :customStyle="{
                     color: '#fff',
                     background: '#03C1B8'
-                }" @click="goSubmit">{{ receivedStatus == 3 ? '确认' : '提交' }}</u-button>
+                }" @click="goSubmit">{{ orderStatus == 3 ? '确认' : '提交' }}</u-button>
 
             </view>
 
@@ -82,21 +82,21 @@
 </template>
 
 <script>
-import { afterSaleOrder } from '@/api/pointOrder'
+import { afterSaleOrder, productOrderCancel } from '@/api/pointOrder'
 import Upload from '@/components/upload/index.vue';
 export default {
     components: { Upload },
     data() {
         return {
+            tab: '1',//1 申请换货-申请原因选择  2申请换货-描述、凭证
             orderNo: null,
             orderId: null,
+            orderStatus: null,
             fileList: [],
-            tab: null,//1 退款/换货申请第一步  2 已收货-换货申请第二步
             headPhotoImg: [],
             questionOrDiscribeValue: '',
             selectReason: '',
             selectReasonValue: null,
-            receivedStatus: null,//1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
             isTop: 0,
             list: [],
             servicePromise: [
@@ -158,18 +158,30 @@ export default {
     },
     computed: {
         filteredList() {
-            if (this.receivedStatus === '1') return this.list1;
-            if (this.receivedStatus === '2') return this.list2;
+            if (this.orderStatus == 1) return this.list1;
+            if (this.orderStatus == 2) return this.list2;
             return this.list3;
         }
     },
     onLoad(data) {
+        //订单状态(0:待付款 1:待发货 2:待收货 3:已收货 4:售后中  11:取消订单)
         console.log(data, 'onLoad-applyRefund')
         if (data) {
-            this.receivedStatus = data.receivedStatus
-            this.tab = data.tab ? data.tab : null
+            if (data.tab) this.tab = data.tab
             if (data.orderId) this.orderId = data.orderId
             if (data.orderNo) this.orderNo = data.orderNo
+            if (data.orderStatus) this.orderStatus = data.orderStatus
+            if (this.orderStatus == 1 || this.orderStatus == 2) {
+                uni.setNavigationBarTitle({
+                    title: '申请退款'
+                });
+            } else if (this.orderStatus == 3) {
+                uni.setNavigationBarTitle({
+                    title: '申请换货'
+                });
+            }
+
+            if (data.servicePromise) this.servicePromise = data.servicePromise
             if (data.questionOrDiscribeValue && data.questionOrDiscribeValue !== "null") {
                 this.questionOrDiscribeValue = data.questionOrDiscribeValue
             }
@@ -194,6 +206,7 @@ export default {
 
     },
     onShow(data) {
+        console.log(this.orderStatus,this.filteredList)
         let flag = this.servicePromise.some(f => {
             return f.indexOf('7天无理由退') !== -1
         })
@@ -250,22 +263,48 @@ export default {
         //提交
         goSubmit() {
             console.log('提交 applyRefund')
-            //receivedStatus 1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
-            //tab 1 退款 2 换货
-            afterSaleOrder({ // 未收到-申请退款,已收到货-申请退款
-                orderId: this.orderId,
-                orderNo: this.orderNo,
-                applyReason: this.selectReasonValue,
-                afterSaleType: this.receivedStatus == 1 ? 3 : this.receivedStatus == 2 ? 1 : null,//1:退货 2:换  3:未收到货
-                //applyDesc:'',
-                //applyImages:'',
-            }).then(res => {
+            if (this.orderStatus == 0 || this.orderStatus == 1) { //待支付、待发货 走订单取消接口
+                let params = {
+                    openId: uni.getStorageSync('wx_copenid'),
+                    orderNo: this.orderNo,
+                    cancelReason: this.selectReasonValue,
+                }
+                productOrderCancel(params).then(res => {
+                    if (res.data.code == 200) {
+                        clearInterval(this.timer);
+                        this.cancelOrderShowPopup = false
+                        uni.navigateTo({
+                            url: `/points/productDetails/pendingPayment?orderNo=${this.orderNo}`
+                        });
+                    } else {
+                        //alert(res.data.msg)
+                        uni.showToast({
+                            title: res.data.msg,
+                            icon: 'none'
+                        })
+                    }
 
-            })
+                })
+                return
+            }
+
+            //订单状态(2:待收货 3:已收货 4:售后中)
+            if (this.orderStatus == 2) {
+                afterSaleOrder({ // 未收到-申请退款,已收到货-申请退款
+                    orderId: this.orderId,
+                    orderNo: this.orderNo,
+                    applyReason: this.selectReasonValue,
+                    afterSaleType: this.orderStatus == 2 ? 3 : null, // afterSaleType  1:退货 2:换  3:未收到货
+                    //applyDesc:'',
+                    //applyImages:'',
+                }).then(res => {
+
+                })
+            }
 
-            if (this.receivedStatus == 3) {
+            if (this.orderStatus == 3) { //换货
                 uni.navigateTo({
-                    url: `/points/productDetails/applyExchange?selectReasonValue=${encodeURIComponent(this.selectReasonValue)}&questionOrDiscribeValue=${encodeURIComponent(this.questionOrDiscribeValue)}&fileList=${JSON.stringify(this.fileList)}&orderNo=${this.orderNo}&orderId=${this.orderId}`
+                    url: `/points/productDetails/applyExchange?selectReasonValue=${encodeURIComponent(this.selectReasonValue)}&questionOrDiscribeValue=${encodeURIComponent(this.questionOrDiscribeValue)}&fileList=${JSON.stringify(this.fileList)}&orderNo=${this.orderNo}&orderId=${this.orderId}&orderStatus=${this.orderStatus}`
                 });
 
             }

+ 2 - 2
src/points/productDetails/index.vue

@@ -2,11 +2,11 @@
   <view class="member-content">
     <scroll-view class="sheet-content" :scroll-y="true" @scroll="handleContentScroll">
       <!-- 导航栏  :leftIconColor="!isTop ? '#fff' : '#000'"-->
-      <u-navbar :placeholder="true" autoBack>
+      <!-- <u-navbar :placeholder="true" autoBack>
         <view slot="center">
           <view class="center navbar-title" style="background-color: #fff;">商品详情</view>
         </view>
-      </u-navbar>
+      </u-navbar> -->
       <!-- 主图 -->
       <view class="mainImame">
         <ImageItem :src="$globalData.publicUrl + params.productMainImage" />

+ 2 - 27
src/points/productDetails/paymentSuccessful.vue

@@ -2,11 +2,11 @@
     <view>
         <scroll-view :scroll-y="true" @scroll="handleContentScroll">
             <!-- 导航栏  :leftIconColor="!isTop ? '#fff' : '#000'"-->
-            <u-navbar :placeholder="true" autoBack @click="autoBackFun">
+            <!-- <u-navbar :placeholder="true" autoBack @click="autoBackFun">
                 <view slot="center">
                     <view class="centerTitle" style="background-color: #fff;">{{ title }}</view>
                 </view>
-            </u-navbar>
+            </u-navbar> -->
 
             <view class="content">
                 <view class="contentBox">
@@ -71,31 +71,6 @@ export default {
             isTop: 0,
             redemptionRulesShowPopup: false,
             selectProductShowPopup: false,
-            list: [
-                {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                    defaultAddress: '默认',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                }, {
-                    addressName: '迎泽西大街86号信达国际金融中心',
-                    userName: '郭丽丽',
-                    userPhone: '16635680981',
-                },
-            ]
-
 
         }
     },

+ 26 - 23
src/points/productDetails/pendingPayment.vue

@@ -1,13 +1,13 @@
 <template>
-    <view>
+    <view v-if="orderInfo">
         <scroll-view :scroll-y="true" @scroll="handleContentScroll">
-            <u-navbar :placeholder="true" autoBack @click="autoBackFun">
+            <!-- <u-navbar :placeholder="true" autoBack @click="autoBackFun">
                 <view slot="center">
                     <view class="centerTitle" style="background-color: #fff;">{{ title }}</view>
                 </view>
-            </u-navbar>
+            </u-navbar> -->
 
-            <view class="contentBox" v-if="orderInfo">
+            <view class="contentBox" >
                 <view class="remainingTime">
                     {{ orderStatus }}
                     <text v-if="orderInfo.orderStatus == 0 && countdownText != '00:00'">{{ countdownText }}</text>
@@ -27,9 +27,6 @@
 
                     </view>
 
-                    <image style="width: 35rpx;height: 35rpx;position: absolute;right: 40rpx;top:40rpx"
-                        @click="closeSelectProduct" src="@/static/points/closeIcon.png" mode=""></image>
-
                     <view class="productPrice">
                         <view style="display:flex;">
                             <view>
@@ -111,21 +108,23 @@
                 </view>
             </view>
             <view class="buttonClass">
-                <u-button v-if="title == '待支付'" :customStyle="{
+                
+                <u-button v-if="orderInfo.orderStatus==0" :customStyle="{
                     color: '#999',
                     background: '',
                     border: '2rpx solid rgba(153, 153, 153, 1)'
                 }" @click="cancelOrderFun">取消支付</u-button>
 
-                <u-button v-if="title == '待支付'" :customStyle="{
+                <u-button v-if="orderInfo.orderStatus==0" :customStyle="{
                     color: '#fff ',
                     background: '#03C1B8'
                 }" @click="goPay">去付款</u-button>
-
-                <u-button v-if="title == '订单取消'" :customStyle="{
+               <u-button v-if="orderInfo.orderStatus==11" :customStyle="{
                     color: '#fff ',
                     background: '#03C1B8'
-                }" @click="buyAgain">再次购买</u-button>
+                }" @click="buyAgain">再次购买</u-button> 
+
+                
             </view>
 
         </scroll-view>
@@ -171,7 +170,7 @@
 
 <script>
 
-import { getPointOrderInfo,productOrderCancel, productOrderPay} from '@/api/pointOrder'
+import { getPointOrderInfo, productOrderCancel, productOrderPay } from '@/api/pointOrder'
 import { getInfo, } from '@/api/index.js';
 
 //paymentType 商品的付款类型 付款类型(1:积分 2:金额 3:积分+金额)
@@ -186,7 +185,6 @@ export default {
         return {
             selectReason: '',
             selectReasonValue: '',
-            title: '',
             cancelOrderShowPopup: false,
             countdownText: '',
             orderStatus: '', //超时未支付
@@ -234,16 +232,23 @@ export default {
             })
             this.orderInfo = res.data.data.orderInfo
             this.productInfo = res.data.data.productInfo
+            //this.orderInfo.remainSeconds = 30
             if (this.orderInfo.remainSeconds > 0 && this.orderInfo.orderStatus == 0) {
                 this.orderCountdownFun(this.orderInfo.remainSeconds)
                 this.orderStatus = '剩余时间'
-                this.title = '待支付'
+                uni.setNavigationBarTitle({
+                    title: '待支付'
+                });
             } else if (this.orderInfo.remainSeconds < 0 && this.orderInfo.orderStatus == 0) {
                 this.orderStatus = '超时未支付'
-                this.title = '订单取消'
+                uni.setNavigationBarTitle({
+                    title: '订单取消'
+                });
             } else if (this.orderInfo.orderStatus == 11) {
                 this.orderStatus = '您已取消支付'
-                this.title = '订单取消'
+                uni.setNavigationBarTitle({
+                    title: '订单取消'
+                });
             }
 
         },
@@ -254,8 +259,7 @@ export default {
                 this.countdownText = this.formatTime(remain);
                 if (remain <= 0) {
                     clearInterval(this.timer);
-                    this.orderStatus = '超时未支付'
-                    this.title = '订单取消'
+                    this.getOrderInfo()
                     this.cancelOrderShowPopup = false
                 }
             }, 1000);
@@ -272,10 +276,10 @@ export default {
         goPay() {
             if (this.orderInfo.payType == 1) {
                 //微信支付 
-                this.weixinPay(params)
+                this.weixinPay()
             } else if (this.orderInfo.payType == 2) {
                 //余额支付
-                this.nowYuyue(params)
+                this.nowYuyue()
             }
 
         },
@@ -389,8 +393,7 @@ export default {
                 if (res.data.code == 200) {
                     clearInterval(this.timer);
                     this.cancelOrderShowPopup = false
-                    this.title = '订单取消'
-                    this.orderStatus = '您已取消支付'
+                    this.getOrderInfo();
                 } else {
                     //alert(res.data.msg)
                     uni.showToast({