修改部分页面判断问题

master
lemon橪 2021-11-03 11:54:38 +08:00
parent 375653eb78
commit 48c7030c0e
3 changed files with 34 additions and 24 deletions

View File

@ -1,10 +1,12 @@
<template> <template>
<view class="content"> <view class="content">
<view class="u-tabs-box"> <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> </view>
<div class="u-tabs-search"> <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="handleGetOrderList(current)" @clear="handleGetOrderList(current)"
@custom="handleGetOrderList(current)" v-model="params.orderSn"></u-search>
</div> </div>
<scroll-view class="body-view" scroll-y @scrolltolower="renderDate"> <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">
@ -40,31 +42,38 @@
<view class="description"> <view class="description">
<!-- 售后申请 --> <!-- 售后申请 -->
<view v-if=" <view v-if="
current === 0 && order.groupAfterSaleStatus && current === 0 && order.groupAfterSaleStatus &&
order.groupAfterSaleStatus === 'ALREADY_APPLIED' order.groupAfterSaleStatus.includes('ALREADY_APPLIED')
" class="cannot_apply"> " class="cannot_apply">
<u-icon class="icon" name="info-circle-fill"></u-icon> <u-icon class="icon" name="info-circle-fill"></u-icon>
该商品已申请售后服务 该商品已申请售后服务
</view> </view>
<view class="cannot_apply" v-if="current === 0 && order.groupAfterSaleStatus && order.groupAfterSaleStatus === '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> <u-icon class="icon" name="info-circle-fill"></u-icon>
该商品无法申请售后 该商品无法申请售后
</view> </view>
<div v-if="current === 1 || current === 2"> <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 == 'RETURN_GOODS'">
<view class="cannot_apply" v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'">-{{ order.serviceStatus | serviceStatusList }}</view> 退货处理-{{ 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 == 'SUPPLY_AGAIN_GOODS'">
<view class="cannot_apply" v-if="order.serviceType == 'EXCHANGE_GOODS'">-{{ order.serviceStatus | serviceStatusList }}</view> 补发商品-{{ order.serviceStatus | serviceStatusList }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'CANCEL'">-{{ 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>
</div> </div>
<!-- 申请记录 --> <!-- 申请记录 -->
</view> </view>
<view class="after-line"> <view class="after-line">
<!-- 售后申请 --> <!-- 售后申请 -->
<view v-if=" <view v-if="
current === 0 && order.groupAfterSaleStatus=='NOT_APPLIED' current === 0 && order.groupAfterSaleStatus.includes('NOT_APPLIED')
" @click="applyService(sku.sn, order, sku)" class="rebuy-btn"> " @click="applyService(sku.sn, order, sku)" class="rebuy-btn">
申请售后 申请售后
</view> </view>
@ -276,19 +285,20 @@ export default {
/** /**
* 查看详情 * 查看详情
*/ */
onDetail(goods,sku) { onDetail(goods, sku) {
// //
if(this.current == 0){ if (this.current == 0) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/goods?id=${sku.skuId}&goodsId=${sku.goodsId || sku.goodsId}`, url: `/pages/product/goods?id=${sku.skuId}&goodsId=${
sku.goodsId || sku.goodsId
}`,
}); });
} } else {
else{
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/goods?id=${goods.skuId}&goodsId=${goods.goodsId || goods.goodsId}`, url: `/pages/product/goods?id=${goods.skuId}&goodsId=${
goods.goodsId || goods.goodsId
}`,
}); });
} }
}, },

View File

@ -57,7 +57,7 @@
<u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)"> <u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
确认收货 确认收货
</u-button> </u-button>
<u-button ripple shape="circle" class="cancel-btn" size="mini" v-if="order.groupAfterSaleStatus=='NOT_APPLIED'" @click="applyService(order)"> <u-button ripple shape="circle" class="cancel-btn" size="mini" v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')" @click="applyService(order)">
退款/售后 退款/售后
</u-button> </u-button>
<!-- TODO 后续完善 --> <!-- TODO 后续完善 -->

View File

@ -27,7 +27,7 @@
boxNormalColor="#D8D8D8" cursorColor="#D8D8D8" /> boxNormalColor="#D8D8D8" cursorColor="#D8D8D8" />
<div class="fetch-btn"> <div class="fetch-btn">
<u-verification-code change-text="x" end-text="" keep-running unique-key="page-login" <u-verification-code change-text="x" end-text="" unique-key="page-login"
:seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code> :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
<span @tap="fetchCode" :style="{color:codeColor}"> {{tips}}</span> <span @tap="fetchCode" :style="{color:codeColor}"> {{tips}}</span>
</div> </div>
@ -136,6 +136,8 @@ export default {
} }
//#endif //#endif
}, },
mounted() { mounted() {
// #ifndef APP-PLUS // #ifndef APP-PLUS
// //
@ -143,7 +145,7 @@ export default {
if (ua.match(/MicroMessenger/i) == "micromessenger") { if (ua.match(/MicroMessenger/i) == "micromessenger") {
this.wechatLogin = true; this.wechatLogin = true;
return; return;
} }
// #endif // #endif
/** /**
* 条件编译判断当前客户端类型 * 条件编译判断当前客户端类型
@ -532,8 +534,6 @@ export default {
title: "加载中", title: "加载中",
}); });
if (!this.codeFlag) { if (!this.codeFlag) {
this.codeFlag = true;
let timer = setInterval(() => { let timer = setInterval(() => {
if (this.$refs.verification) { if (this.$refs.verification) {
this.$refs.verification.error(); // this.$refs.verification.error(); //