修改部分bug
							parent
							
								
									2ce90ba008
								
							
						
					
					
						commit
						ea60742d82
					
				|  | @ -1,31 +1,53 @@ | |||
| <template> | ||||
|   <view class="content"> | ||||
|     <view class="u-tabs-box"> | ||||
|       <u-tabs bg-color="#fff" :list="list" :is-scroll="false" :current="current" @change="change" | ||||
|         :active-color="$lightColor"></u-tabs> | ||||
|       <u-tabs | ||||
|         bg-color="#fff" | ||||
|         :list="list" | ||||
|         :is-scroll="false" | ||||
|         :current="current" | ||||
|         @change="change" | ||||
|         :active-color="$lightColor" | ||||
|       ></u-tabs> | ||||
|     </view> | ||||
|     <div class="u-tabs-search"> | ||||
|       <u-search placeholder="请输入订单编号" @search="handleGetOrderList(current)" @clear="handleGetOrderList(current)" | ||||
|         @custom="handleGetOrderList(current)" v-model="params.orderSn"></u-search> | ||||
|       <u-search | ||||
|         placeholder="请输入订单编号" | ||||
|         @search="submitSearchOrderList(current)" | ||||
|         @clear="submitSearchOrderList(current)" | ||||
|         @custom="submitSearchOrderList(current)" | ||||
|         v-model="orderSn" | ||||
|       ></u-search> | ||||
|     </div> | ||||
|     <scroll-view class="body-view" scroll-y @scrolltolower="renderDate"> | ||||
|       <view class="seller-view" v-for="(order, orderIndex) in orderList" :key="orderIndex"> | ||||
|       <view | ||||
|         class="seller-view" | ||||
|         v-for="(order, orderIndex) in orderList" | ||||
|         :key="orderIndex" | ||||
|       > | ||||
|         <!-- 店铺名称 --> | ||||
|         <view class="seller-info u-flex u-row-between" v-if="current == 0"> | ||||
|           <view class="seller-name"> | ||||
|             <view class="name">{{ order.storeName }}</view> | ||||
|           </view> | ||||
|           <view class="order-sn">订单编号:{{order.sn}}</view> | ||||
|           <view class="order-sn">订单编号:{{ order.sn }}</view> | ||||
|         </view> | ||||
|         <!-- 申请记录 选项卡 --> | ||||
|         <view class="seller-info u-flex u-row-between" v-if="current != 0"> | ||||
|           <view class="order-sn">售后单号:{{ order.service_sn || order.sn }}</view> | ||||
|           <view class="order-sn" | ||||
|             >售后单号:{{ order.service_sn || order.sn }}</view | ||||
|           > | ||||
|           <view class="order-sn">{{ order.serviceType_text }}</view> | ||||
|         </view> | ||||
|         <view v-for="(sku, goodsIndex) in order.orderItems" :key="goodsIndex"> | ||||
|           <view class="goods-item-view" @click="onDetail(order,sku)"> | ||||
|           <view class="goods-item-view" @click="onDetail(order, sku)"> | ||||
|             <view class="goods-img"> | ||||
|               <u-image border-radius="6" width="100%" height="100%" :src="sku.image"></u-image> | ||||
|               <u-image | ||||
|                 border-radius="6" | ||||
|                 width="100%" | ||||
|                 height="100%" | ||||
|                 :src="sku.image" | ||||
|               ></u-image> | ||||
|             </view> | ||||
|             <view class="goods-info"> | ||||
|               <view class="goods-title u-line-2">{{ sku.name }}</view> | ||||
|  | @ -41,77 +63,136 @@ | |||
|           <view class="btn-view u-flex u-row-between"> | ||||
|             <view class="description"> | ||||
|               <!-- 售后申请 --> | ||||
|               <view v-if=" | ||||
|                   current === 0 &&  order.groupAfterSaleStatus && | ||||
|                  order.groupAfterSaleStatus.includes('ALREADY_APPLIED')  | ||||
|                 " class="cannot_apply"> | ||||
|               <view | ||||
|                 v-if=" | ||||
|                   current === 0 && | ||||
|                   order.groupAfterSaleStatus && | ||||
|                   order.groupAfterSaleStatus.includes('ALREADY_APPLIED') | ||||
|                 " | ||||
|                 class="cannot_apply" | ||||
|               > | ||||
|                 <u-icon class="icon" name="info-circle-fill"></u-icon> | ||||
|                 该商品已申请售后服务 | ||||
|               </view> | ||||
|               <view class="cannot_apply" | ||||
|                 v-if="current === 0 && order.groupAfterSaleStatus && order.groupAfterSaleStatus.includes('EXPIRED')  " | ||||
|                 @click="tipsShow = true"> | ||||
|               <view | ||||
|                 class="cannot_apply" | ||||
|                 v-if=" | ||||
|                   current === 0 && | ||||
|                   order.groupAfterSaleStatus && | ||||
|                   order.groupAfterSaleStatus.includes('EXPIRED') | ||||
|                 " | ||||
|                 @click="tipsShow = true" | ||||
|               > | ||||
|                 <u-icon class="icon" name="info-circle-fill"></u-icon> | ||||
|                 该商品无法申请售后 | ||||
|               </view> | ||||
| 
 | ||||
|               <div v-if="current === 1 || current === 2"> | ||||
|                 <!-- 申请中 --> | ||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'RETURN_GOODS'"> | ||||
|                   退货处理-{{ order.serviceStatus | serviceStatusList  }}</view> | ||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'"> | ||||
|                   补发商品-{{ order.serviceStatus | serviceStatusList  }}</view> | ||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'RETURN_MONEY'"> | ||||
|                   退款-{{ order.serviceStatus | serviceStatusList  }}</view> | ||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'EXCHANGE_GOODS'"> | ||||
|                   换货-{{ order.serviceStatus | serviceStatusList  }}</view> | ||||
|                 <view | ||||
|                   class="cannot_apply" | ||||
|                   v-if="order.serviceType == 'RETURN_GOODS'" | ||||
|                 > | ||||
|                   退货处理-{{ order.serviceStatus | serviceStatusList }}</view | ||||
|                 > | ||||
|                 <view | ||||
|                   class="cannot_apply" | ||||
|                   v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'" | ||||
|                 > | ||||
|                   补发商品-{{ order.serviceStatus | serviceStatusList }}</view | ||||
|                 > | ||||
|                 <view | ||||
|                   class="cannot_apply" | ||||
|                   v-if="order.serviceType == 'RETURN_MONEY'" | ||||
|                 > | ||||
|                   退款-{{ order.serviceStatus | serviceStatusList }}</view | ||||
|                 > | ||||
|                 <view | ||||
|                   class="cannot_apply" | ||||
|                   v-if="order.serviceType == 'EXCHANGE_GOODS'" | ||||
|                 > | ||||
|                   换货-{{ order.serviceStatus | serviceStatusList }}</view | ||||
|                 > | ||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'CANCEL'"> | ||||
|                   取消订单-{{ order.serviceStatus | serviceStatusList  }}</view> | ||||
|                   取消订单-{{ order.serviceStatus | serviceStatusList }}</view | ||||
|                 > | ||||
|               </div> | ||||
| 
 | ||||
|               <!-- 申请记录 --> | ||||
|             </view> | ||||
|              <!-- 售后申请 --> | ||||
|               <div v-if="current === 0 && sku.afterSaleStatus && (sku.afterSaleStatus.includes('NOT_APPLIED') || sku.afterSaleStatus.includes('PART_AFTER_SALE')) "  @click="applyService(sku.sn, order, sku)" class="sale"> | ||||
|                 <view class=" default-btn border" > | ||||
|                   申请售后 | ||||
|                 </view> | ||||
|               </div> | ||||
|             <!-- 售后申请 --> | ||||
|             <div | ||||
|               v-if=" | ||||
|                 current === 0 && | ||||
|                 sku.afterSaleStatus && | ||||
|                 (sku.afterSaleStatus.includes('NOT_APPLIED') || | ||||
|                   sku.afterSaleStatus.includes('PART_AFTER_SALE')) | ||||
|               " | ||||
|               @click="applyService(sku.sn, order, sku)" | ||||
|               class="sale" | ||||
|             > | ||||
|               <view class="default-btn border"> 申请售后 </view> | ||||
|             </div> | ||||
|             <view class="after-line"> | ||||
| 
 | ||||
|               <!-- 申请中 --> | ||||
|               <view class="default-btn border" v-if=" | ||||
|               <view | ||||
|                 class="default-btn border" | ||||
|                 v-if=" | ||||
|                   current === 2 && | ||||
|                   order.serviceStatus && | ||||
|                   order.serviceStatus == 'PASS' && | ||||
|                   order.serviceType != 'RETURN_MONEY' | ||||
|                 " @click="onExpress(order, sku)"> | ||||
|                 " | ||||
|                 @click="onExpress(order, sku)" | ||||
|               > | ||||
|                 提交物流 | ||||
|               </view> | ||||
|               <view @click="close(order,sku)" v-if="current === 1" class="default-btn close"> | ||||
|               <view | ||||
|                 @click="close(order, sku)" | ||||
|                 v-if="current === 1" | ||||
|                 class="default-btn close" | ||||
|               > | ||||
|                 取消售后 | ||||
|               </view> | ||||
|               <view @click="afterDetails(order, sku)" v-if="current === 1 || current === 2" class="default-btn border"> | ||||
|               <view | ||||
|                 @click="afterDetails(order, sku)" | ||||
|                 v-if="current === 1 || current === 2" | ||||
|                 class="default-btn border" | ||||
|               > | ||||
|                 售后详情 | ||||
|               </view> | ||||
|             </view> | ||||
|           </view> | ||||
|         </view> | ||||
|         <view v-if=" | ||||
|             current === 0 && order.groupAfterSaleStatus && | ||||
|         <view | ||||
|           v-if=" | ||||
|             current === 0 && | ||||
|             order.groupAfterSaleStatus && | ||||
|             order.groupAfterSaleStatus != 'ALREADY_APPLIED' && | ||||
|             order.orderItems.length >= 1 | ||||
|           " class="btn-view u-flex u-row-between"> | ||||
|           " | ||||
|           class="btn-view u-flex u-row-between" | ||||
|         > | ||||
|           <!-- 多个商品显示订单总价格 --> | ||||
|           <view class="cannot_apply"> | ||||
|             订单总金额:<span class="countMoney">¥{{ order.flowPrice | unitPrice }}</span> | ||||
|             订单总金额:<span class="countMoney" | ||||
|               >¥{{ order.flowPrice | unitPrice }}</span | ||||
|             > | ||||
|           </view> | ||||
|         </view> | ||||
|       </view> | ||||
|       <u-loadmore bg-color="#f8f8f8" :status="status" /> | ||||
|     </scroll-view> | ||||
|     <u-modal show-cancel-button @confirm="closeService" v-model="cancelShow" content="确认取消售后"></u-modal> | ||||
|     <u-modal v-model="tipsShow" content="当订单未确认收货|已过售后服务有效期|已申请售后服务时,不能申请售后"></u-modal> | ||||
|     <u-modal | ||||
|       show-cancel-button | ||||
|       @confirm="closeService" | ||||
|       v-model="cancelShow" | ||||
|       content="确认取消售后" | ||||
|     ></u-modal> | ||||
|     <u-modal | ||||
|       v-model="tipsShow" | ||||
|       content="当订单未确认收货|已过售后服务有效期|已申请售后服务时,不能申请售后" | ||||
|     ></u-modal> | ||||
|   </view> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -148,7 +229,7 @@ export default { | |||
|         pageNumber: 1, | ||||
|         pageSize: 10, | ||||
|         sort: "createTime", | ||||
|         flowPrice:  1, | ||||
|         flowPrice: 1, | ||||
|         order: "desc", | ||||
|       }, | ||||
| 
 | ||||
|  | @ -157,21 +238,27 @@ export default { | |||
|         pageSize: 10, | ||||
|       }, | ||||
|       status: "loadmore", | ||||
|       orderSn: "", // 搜索订单sn | ||||
|     }; | ||||
|   }, | ||||
|   onLoad(options) { | ||||
|     this.orderList = []; | ||||
|     this.params.pageNumber = 1; | ||||
|     if (options.orderSn) this.params.orderSn = options.orderSn; | ||||
|     this.getOrderList(this.current); | ||||
|     this.searchOrderList(this.current); | ||||
|   }, | ||||
|   onPullDownRefresh() { | ||||
|     this.change(this.current); | ||||
|   }, | ||||
|   methods: { | ||||
|     handleGetOrderList(current) { | ||||
|     /** | ||||
|      * 点击搜索执行搜索 | ||||
|      */ | ||||
|     submitSearchOrderList(current) { | ||||
|       this.params.pageNumber = 1; | ||||
|       this.logParams.pageNumber = 1; | ||||
|       this.orderList = []; | ||||
|       this.getOrderList(current); | ||||
|       this.searchOrderList(current); | ||||
|     }, | ||||
|     /** | ||||
|      * 切换tab页时,初始化数据 | ||||
|  | @ -184,8 +271,18 @@ export default { | |||
|       }; | ||||
|       this.orderList = []; | ||||
|       //如果是2 则读取售后申请记录列表 | ||||
|       this.searchOrderList(index); | ||||
|       uni.stopPullDownRefresh(); | ||||
|     }, | ||||
| 
 | ||||
|     /** | ||||
|      * 搜索初始化 | ||||
|      * 根据当前tab传值的索引进行更改 | ||||
|      */ | ||||
|     searchOrderList(index) { | ||||
|       if (index == 0) { | ||||
|         this.getOrderList(index); | ||||
|         this.orderSn ? (this.params.orderSn = this.orderSn) : ""; | ||||
|         this.getOrderList(); | ||||
|       } else { | ||||
|         this.logParams = { | ||||
|           pageNumber: 1, | ||||
|  | @ -196,16 +293,16 @@ export default { | |||
|         if (index === 1) { | ||||
|           this.logParams.serviceStatus = "APPLY"; | ||||
|         } | ||||
|         this.orderSn ? (this.logParams.orderSn = this.orderSn) : ""; | ||||
|         this.orderList = []; | ||||
|         this.getAfterSaleLogList(); | ||||
|       } | ||||
|       uni.stopPullDownRefresh(); | ||||
|     }, | ||||
| 
 | ||||
|     /** | ||||
|      * 获取订单列表 | ||||
|      */ | ||||
|     getOrderList(index) { | ||||
|     getOrderList() { | ||||
|       uni.showLoading({ | ||||
|         title: "加载中", | ||||
|         mask: true, | ||||
|  | @ -245,7 +342,7 @@ export default { | |||
|         }); | ||||
|       } | ||||
|       this.orderList = []; | ||||
|       this.getOrderList(this.current); | ||||
|       this.searchOrderList(this.current); | ||||
| 
 | ||||
|       uni.hideLoading(); | ||||
|     }, | ||||
|  |  | |||
|  | @ -7,6 +7,9 @@ import api from "@/config/api.js"; | |||
| 
 | ||||
| import uuid from "@/utils/uuid.modified.js"; | ||||
| 
 | ||||
| 
 | ||||
| let isNavigateTo = false | ||||
| 
 | ||||
| function cleanStorage() { | ||||
|   uni.showToast({ | ||||
|     title: "你的登录状态已过期,请重新登录", | ||||
|  | @ -25,23 +28,20 @@ function cleanStorage() { | |||
|   storage.setUserInfo({}); | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
|   // 防抖处理跳转
 | ||||
|   // #ifdef MP-WEIXIN
 | ||||
| 
 | ||||
|   uni.navigateTo({ | ||||
|     url: "/pages/passport/wechatMPLogin", | ||||
|   }); | ||||
| 
 | ||||
|   // #endif
 | ||||
| 
 | ||||
|   // #ifndef MP-WEIXIN
 | ||||
| 
 | ||||
|   uni.navigateTo({ | ||||
|     url: "/pages/passport/login", | ||||
|   }); | ||||
| 
 | ||||
|   if(!isNavigateTo){ | ||||
| 	  isNavigateTo= true | ||||
| 	  // 防抖处理跳转
 | ||||
| 	  // #ifdef MP-WEIXIN
 | ||||
| 	  uni.navigateTo({ | ||||
| 		url: "/pages/passport/wechatMPLogin", | ||||
| 	  }); | ||||
| 	  // #endif
 | ||||
| 	  // #ifndef MP-WEIXIN
 | ||||
| 	  uni.navigateTo({ | ||||
| 		url: "/pages/passport/login", | ||||
| 	  }); | ||||
|   //  #endif
 | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| let http = new Request(); | ||||
|  | @ -105,6 +105,7 @@ let requests = []; | |||
| // 必须使用异步函数,注意
 | ||||
| http.interceptors.response.use( | ||||
|   async (response) => { | ||||
| 	isNavigateTo = false | ||||
|     /* 请求之后拦截器。可以使用async await 做异步操作  */ | ||||
|     // token存在并且token过期
 | ||||
|     if (isRefreshing && response.statusCode === 403) { | ||||
|  |  | |||
|  | @ -92,11 +92,11 @@ export default { | |||
|   removeRefreshToken() { | ||||
|     uni.removeStorageSync(REFRESH_TOKEN); | ||||
|   }, | ||||
|   // 写入刷新token
 | ||||
| 
 | ||||
|   setAfterSaleData(val) { | ||||
|     uni.setStorageSync(AFTERSALE_DATA, val); | ||||
|   }, | ||||
|   // 获取刷新token
 | ||||
| 
 | ||||
|   getAfterSaleData() { | ||||
|     return uni.getStorageSync(AFTERSALE_DATA); | ||||
|   }, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue