|
|
@@ -28,7 +28,8 @@
|
|
|
件 预估回收价
|
|
|
<text class="color-red">¥{{ orderInfo.totalRecycleMoney || 0 }}</text>
|
|
|
</view>
|
|
|
- <text class="common-text tip">*旧书预估价格满{{ orderInfo.minOrderMoney }}元起收</text>
|
|
|
+ <text class="common-text tip">*<text v-if="orderInfo.minOrderNum">旧书满{{ orderInfo.minOrderNum
|
|
|
+ }}本,或</text>预估价格满{{ orderInfo.minOrderMoney }}元起收</text>
|
|
|
</view>
|
|
|
|
|
|
<button class="scan-btn next-btn" @click="handleValidate" :disabled="isDisabled">
|
|
|
@@ -89,7 +90,8 @@
|
|
|
<KindReminder ref="kindReminder" @start="handleStartSelling" @viewRules="handleViewRules" />
|
|
|
|
|
|
<!-- 客服按钮 -->
|
|
|
- <FloatingDrag :width="126" :height="140" :initial-position="servicePosition" @position-change="handlePositionChange">
|
|
|
+ <FloatingDrag :width="126" :height="140" :initial-position="servicePosition"
|
|
|
+ @position-change="handlePositionChange">
|
|
|
<!-- #ifdef MP-ALIPAY -->
|
|
|
<button class="service-btn" @click="navigateToCustomerService">
|
|
|
<image src="/static/img/kf.png" mode="widthFix" style="width: 126rpx; height: 140rpx"></image>
|
|
|
@@ -203,7 +205,13 @@ export default {
|
|
|
.toFixed(2);
|
|
|
},
|
|
|
isDisabled() {
|
|
|
- return this.totalPrice < this.orderInfo.minOrderMoney;
|
|
|
+ //minOrderNum或minOrderMoney可能没有值,
|
|
|
+ let { minOrderNum, minOrderMoney } = this.orderInfo
|
|
|
+ if (!minOrderMoney && !minOrderNum) return false
|
|
|
+ //minOrderMoney没有值,minOrderNum有值
|
|
|
+ if (minOrderNum && !minOrderMoney) return minOrderNum > this.totalBooks
|
|
|
+ if (minOrderNum && !minOrderMoney) return minOrderMoney > this.totalPrice
|
|
|
+ if (minOrderNum && minOrderMoney) return minOrderNum > this.totalBooks && minOrderMoney > this.totalPrice
|
|
|
},
|
|
|
},
|
|
|
onPageScroll(e) {
|
|
|
@@ -261,8 +269,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
onShow() {
|
|
|
- console.log(app.globalData.isColdLaunch, "onShow");
|
|
|
- if (!app.globalData.isColdLaunch) return
|
|
|
+ if (!app.globalData.isColdLaunch) {
|
|
|
+ let token = uni.getStorageSync("token");
|
|
|
+ if (token) {
|
|
|
+ this.getLastOrder();
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
eventBus.on("loginSuccess", (data) => {
|
|
|
console.log(data, "登录成功loginSuccess");
|
|
|
this.loginSuccess(data);
|
|
|
@@ -459,6 +472,7 @@ export default {
|
|
|
} else {
|
|
|
this.handleBookCode(res.data.code);
|
|
|
}
|
|
|
+ this.getLastOrder();
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
@@ -504,13 +518,13 @@ export default {
|
|
|
})
|
|
|
: [];
|
|
|
this.serviceList = res.data.serviceList || [];
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
icon: "none",
|
|
|
});
|
|
|
}
|
|
|
- }).finally(()=>{
|
|
|
+ }).finally(() => {
|
|
|
// #ifdef MP-ALIPAY
|
|
|
my.stopPullDownRefresh()
|
|
|
// #endif
|
|
|
@@ -582,6 +596,7 @@ export default {
|
|
|
|
|
|
&.tip {
|
|
|
color: #ff8a4b;
|
|
|
+ font-size: 26rpx;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -644,7 +659,7 @@ export default {
|
|
|
|
|
|
.next-btn {
|
|
|
margin: 0;
|
|
|
- margin-left: 20rpx;
|
|
|
+ margin-left: 40rpx;
|
|
|
|
|
|
&[aria-disabled="true"] {
|
|
|
background-color: #cccccc;
|