wangfukang 2 weeks ago
parent
commit
a51f0729b3
  1. 35
      package1/buyFood/buyFood.vue
  2. 9
      package1/order/orderDetail.vue
  3. 27
      package1/planet/adventure.vue
  4. 33
      package1/runErrand/runErrand.vue

35
package1/buyFood/buyFood.vue

@ -351,20 +351,20 @@
@close="closeAddressBook"></address-list> @close="closeAddressBook"></address-list>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="commissionPopup" type="center" background-color="transparent"> <uni-popup ref="commissionPopup" type="center" background-color="transparent" @change="onCommissionPopupChange">
<view class="commission-popup"> <view class="commission-popup" :class="{'commission-popup-keyboard': commissionInputFocus}">
<view class="commission-popup-title">填写配送佣金</view> <view class="commission-popup-title">填写配送佣金</view>
<view class="commission-popup-desc">最低 0.1 最高 200 最多输入 2 位小数</view> <view class="commission-popup-desc">最低 0.1 最高 200 最多输入 2 位小数</view>
<view class="commission-popup-input"> <view class="commission-popup-input">
<text></text> <text></text>
<input type="digit" :value="commissionInputValue" placeholder="请输入佣金" <input type="digit" :value="commissionInputValue" placeholder="请输入佣金"
@input="onCommissionPopupInput" /> :focus="commissionInputFocus" @input="onCommissionPopupInput" />
</view> </view>
<view class="commission-popup-tip" v-if="isGroupBuy && groupItem && groupItem.isFaceToFace && !groupItem.groupId"> <view class="commission-popup-tip" v-if="isGroupBuy && groupItem && groupItem.isFaceToFace && !groupItem.groupId">
佣金为团配送单总佣金设置后会按照参团人数自动计算均摊 佣金为团配送单总佣金设置后会按照参团人数自动计算均摊
</view> </view>
<view class="commission-popup-actions"> <view class="commission-popup-actions">
<view class="commission-popup-cancel" @tap="$refs.commissionPopup.close()">取消</view> <view class="commission-popup-cancel" @tap="closeCommissionPopup">取消</view>
<view class="commission-popup-confirm" @tap="confirmCommission">确定</view> <view class="commission-popup-confirm" @tap="confirmCommission">确定</view>
</view> </view>
</view> </view>
@ -582,6 +582,7 @@
selected: 'buzhiding', selected: 'buzhiding',
customCommission: '', customCommission: '',
commissionInputValue: '', commissionInputValue: '',
commissionInputFocus: false,
shopItem: {}, shopItem: {},
cartItems: [], cartItems: [],
groupItem: null, groupItem: null,
@ -849,7 +850,24 @@
}, },
openCommissionPopup() { openCommissionPopup() {
this.commissionInputValue = ''; this.commissionInputValue = '';
this.commissionInputFocus = false;
this.$refs.commissionPopup.open('center'); this.$refs.commissionPopup.open('center');
this.$nextTick(() => {
setTimeout(() => {
this.commissionInputFocus = true;
}, 300);
});
},
closeCommissionPopup() {
this.commissionInputFocus = false;
uni.hideKeyboard();
this.$refs.commissionPopup.close();
},
onCommissionPopupChange(e) {
if (!e.show) {
this.commissionInputFocus = false;
uni.hideKeyboard();
}
}, },
onCommissionPopupInput(e) { onCommissionPopupInput(e) {
const value = this.filterCommissionInput(e.detail.value); const value = this.filterCommissionInput(e.detail.value);
@ -887,7 +905,7 @@
} }
const value = this.formatCommissionValue(this.commissionInputValue); const value = this.formatCommissionValue(this.commissionInputValue);
this.customCommission = value; this.customCommission = value;
this.$refs.commissionPopup.close(); this.closeCommissionPopup();
this.fetchCoupons(); this.fetchCoupons();
}, },
openRemarkPopup() { openRemarkPopup() {
@ -1009,7 +1027,7 @@
let comm = parseFloat(this.customCommission); let comm = parseFloat(this.customCommission);
// //
if(isNaN(comm)){ if(isNaN(comm)){
this.$refs.commissionPopup.open() this.openCommissionPopup();
return; return;
} }
if (comm < 0.1) { if (comm < 0.1) {
@ -1935,6 +1953,11 @@
border-radius: 32rpx; border-radius: 32rpx;
background: #fff; background: #fff;
box-shadow: 0 28rpx 70rpx rgba(0, 35, 28, 0.18); box-shadow: 0 28rpx 70rpx rgba(0, 35, 28, 0.18);
transition: transform 0.2s ease;
}
.commission-popup-keyboard {
transform: translateY(-190rpx);
} }
.commission-popup-title { .commission-popup-title {

9
package1/order/orderDetail.vue

@ -397,7 +397,7 @@
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.freeAmount != null && orderDetail.freeAmount > 0"> v-if="orderDetail.freeAmount != null && orderDetail.freeAmount > 0 && refundAmountMode == 'user'">
<view style="flex: 1;color: #ff6f2c;font-weight: 700;"> <view style="flex: 1;color: #ff6f2c;font-weight: 700;">
锦鲤免单 锦鲤免单
</view> </view>
@ -415,7 +415,7 @@
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.userCouponNum > 0"> v-if="orderDetail.userCouponNum > 0 && refundAmountMode == 'user'">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
优惠券 优惠券
</view> </view>
@ -424,7 +424,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="orderDetail.status != 6" <view v-if="orderDetail.status != 6 && refundAmountMode == 'user'"
style="display: flex;height: 80rpx;line-height: 100rpx;border-top: 1px solid #eee;font-size: 32rpx;font-weight: 700;"> style="display: flex;height: 80rpx;line-height: 100rpx;border-top: 1px solid #eee;font-size: 32rpx;font-weight: 700;">
<view style="flex: 1;"> <view style="flex: 1;">
{{orderDetail.status == 0 ? '待支付' : '实付'}} {{orderDetail.status == 0 ? '待支付' : '实付'}}
@ -717,7 +717,7 @@
<uni-icons type="info" size="14" color="#ff5722"></uni-icons> <uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text <text
v-if="(((payData.orderType == 2 || payData.orderType == 3) && payData.status == 2) || ((payData.orderType == 2 || payData.orderType == 3) && payData.status == 3) || (payData.deliveryType == 1 && payData.status == 3) || payData.status == 4) && payData.otherOrder == null"> v-if="(((payData.orderType == 2 || payData.orderType == 3) && payData.status == 2) || ((payData.orderType == 2 || payData.orderType == 3) && payData.status == 3) || (payData.deliveryType == 1 && payData.status == 3) || payData.status == 4) && payData.otherOrder == null">
请确认责任方取消订单需要责任方同意 请确认责任方取消订单需要责任方同意{{orderDetail.orderType == 3 ? '团员订单会一并退款!' : ''}}
</text> </text>
<text v-else>请选择退款原因</text> <text v-else>请选择退款原因</text>
</view> </view>
@ -810,6 +810,7 @@
<view class="no-responsibility-cancel-popup"> <view class="no-responsibility-cancel-popup">
<view class="no-responsibility-cancel-title">确认取消订单吗</view> <view class="no-responsibility-cancel-title">确认取消订单吗</view>
<view class="no-responsibility-cancel-desc">符合无责取消条件订单金额将按平台退款处理</view> <view class="no-responsibility-cancel-desc">符合无责取消条件订单金额将按平台退款处理</view>
<view class="no-responsibility-cancel-desc" v-if="orderDetail.orderType == 3">团员订单会一并退款</view>
<view class="no-responsibility-cancel-actions"> <view class="no-responsibility-cancel-actions">
<view class="no-responsibility-cancel-btn no-responsibility-cancel-btn-muted" <view class="no-responsibility-cancel-btn no-responsibility-cancel-btn-muted"
@tap="$refs.noResponsibilityCancelPopup.close()"> @tap="$refs.noResponsibilityCancelPopup.close()">

27
package1/planet/adventure.vue

@ -418,7 +418,7 @@
return cells return cells
}, },
timerText() { timerText() {
return this.playing ? `${this.timeLeft}s` : '300s限时' return this.playing ? `${this.timeLeft}s` : `${this.timeLimit}s限时`
}, },
timerPercent() { timerPercent() {
return Math.max(0, Math.min(100, Math.round(this.timeLeft * 100 / this.timeLimit))) return Math.max(0, Math.min(100, Math.round(this.timeLeft * 100 / this.timeLimit)))
@ -433,7 +433,7 @@
if (!this.playing) return '开始后进入倒计时' if (!this.playing) return '开始后进入倒计时'
if (this.timeLeft <= 30) return '最后冲刺,槽位别满' if (this.timeLeft <= 30) return '最后冲刺,槽位别满'
if (this.timeLeft <= 60) return '时间紧张,加快决策' if (this.timeLeft <= 60) return '时间紧张,加快决策'
return '300秒内完成排位' return `${this.timeLimit}秒内完成排位`
}, },
riskText() { riskText() {
if (this.slots.length >= this.slotLimit - 1) return '危险:差1格就满' if (this.slots.length >= this.slotLimit - 1) return '危险:差1格就满'
@ -484,7 +484,7 @@
const elapsed = Math.floor((Date.now() - this.startTs) / 1000) const elapsed = Math.floor((Date.now() - this.startTs) / 1000)
this.timeLeft = Math.max(0, this.timeLimit - elapsed) this.timeLeft = Math.max(0, this.timeLimit - elapsed)
if (this.timeLeft <= 0) { if (this.timeLeft <= 0) {
this.failLevel('时间到了', '超过300秒,本次挑战结束。') this.failLevel('时间到了', `超过${this.timeLimit}秒,本次挑战结束。`)
} else { } else {
this.startTimer(false) this.startTimer(false)
} }
@ -726,6 +726,7 @@
return return
} }
this.session = res.result this.session = res.result
this.applyServerGameSeconds(res.result.gameSeconds)
this.playing = true this.playing = true
this.startTs = Date.now() this.startTs = Date.now()
this.recordDailyRestartUse() this.recordDailyRestartUse()
@ -741,6 +742,12 @@
this.actionLocked = false this.actionLocked = false
}) })
}, },
applyServerGameSeconds(gameSeconds) {
const seconds = Number(gameSeconds)
if (!seconds || seconds <= 0) return
this.timeLimit = seconds
this.timeLeft = seconds
},
startFixedMode() { startFixedMode() {
if (!requireLoginToCurrentPage()) return if (!requireLoginToCurrentPage()) return
if (!this.fixedSeed && this.isPkMode) { if (!this.fixedSeed && this.isPkMode) {
@ -1360,7 +1367,7 @@
const elapsed = Math.floor((Date.now() - this.startTs) / 1000) const elapsed = Math.floor((Date.now() - this.startTs) / 1000)
this.timeLeft = Math.max(0, this.timeLimit - elapsed) this.timeLeft = Math.max(0, this.timeLimit - elapsed)
if (this.timeLeft <= 0) { if (this.timeLeft <= 0) {
this.failLevel('时间到了', '超过300秒,本次挑战结束。') this.failLevel('时间到了', `超过${this.timeLimit}秒,本次挑战结束。`)
} }
}, 1000) }, 1000)
}, },
@ -1440,10 +1447,20 @@
this.loadHome() this.loadHome()
this.loadGlory() this.loadGlory()
} else { } else {
this.tui.toast(res.message) this.showSubmitFailed(res.message)
} }
}).catch(err => {
this.showSubmitFailed(err && err.message)
}) })
}, },
showSubmitFailed(message) {
this.needRebuildOnStart = true
this.modal = {
show: true,
title: '成绩未计入',
sub: message || '成绩提交失败,请重新开始本关后再试。'
}
},
failLevel(title, sub) { failLevel(title, sub) {
this.playing = false this.playing = false
this.clearTimer() this.clearTimer()

33
package1/runErrand/runErrand.vue

@ -314,17 +314,17 @@
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="commissionPopup" type="center" background-color="transparent"> <uni-popup ref="commissionPopup" type="center" background-color="transparent" @change="onCommissionPopupChange">
<view class="commission-popup"> <view class="commission-popup" :class="{'commission-popup-keyboard': commissionInputFocus}">
<view class="commission-popup-title">填写配送佣金</view> <view class="commission-popup-title">填写配送佣金</view>
<view class="commission-popup-desc">最低 0.1 最高 200 最多输入 2 位小数</view> <view class="commission-popup-desc">最低 0.1 最高 200 最多输入 2 位小数</view>
<view class="commission-popup-input"> <view class="commission-popup-input">
<text></text> <text></text>
<input type="digit" :value="commissionInputValue" placeholder="请输入佣金" <input type="digit" :value="commissionInputValue" placeholder="请输入佣金"
@input="onCommissionPopupInput" /> :focus="commissionInputFocus" @input="onCommissionPopupInput" />
</view> </view>
<view class="commission-popup-actions"> <view class="commission-popup-actions">
<view class="commission-popup-cancel" @tap="$refs.commissionPopup.close()">取消</view> <view class="commission-popup-cancel" @tap="closeCommissionPopup">取消</view>
<view class="commission-popup-confirm" @tap="confirmCommission">确定</view> <view class="commission-popup-confirm" @tap="confirmCommission">确定</view>
</view> </view>
</view> </view>
@ -403,6 +403,7 @@
assignedWorker:null, assignedWorker:null,
customCommission:'', customCommission:'',
commissionInputValue: '', commissionInputValue: '',
commissionInputFocus: false,
remarkInputValue: '', remarkInputValue: '',
shopArea: [], shopArea: [],
kuaidiAreaList: [], kuaidiAreaList: [],
@ -527,7 +528,24 @@
}, },
openCommissionPopup() { openCommissionPopup() {
this.commissionInputValue = ''; this.commissionInputValue = '';
this.commissionInputFocus = false;
this.$refs.commissionPopup.open('center'); this.$refs.commissionPopup.open('center');
this.$nextTick(() => {
setTimeout(() => {
this.commissionInputFocus = true;
}, 300);
});
},
closeCommissionPopup() {
this.commissionInputFocus = false;
uni.hideKeyboard();
this.$refs.commissionPopup.close();
},
onCommissionPopupChange(e) {
if (!e.show) {
this.commissionInputFocus = false;
uni.hideKeyboard();
}
}, },
onCommissionPopupInput(e) { onCommissionPopupInput(e) {
const value = this.filterCommissionInput(e.detail.value); const value = this.filterCommissionInput(e.detail.value);
@ -546,7 +564,7 @@
return; return;
} }
this.customCommission = this.formatCommissionValue(this.commissionInputValue); this.customCommission = this.formatCommissionValue(this.commissionInputValue);
this.$refs.commissionPopup.close(); this.closeCommissionPopup();
/* this.fetchCoupons(); */ /* this.fetchCoupons(); */
}, },
openRemarkPopup() { openRemarkPopup() {
@ -1226,6 +1244,11 @@
border-radius: 32rpx; border-radius: 32rpx;
background: #fff; background: #fff;
box-shadow: 0 28rpx 70rpx rgba(0, 35, 28, 0.18); box-shadow: 0 28rpx 70rpx rgba(0, 35, 28, 0.18);
transition: transform 0.2s ease;
}
.commission-popup-keyboard {
transform: translateY(-190rpx);
} }
.commission-popup-title { .commission-popup-title {

Loading…
Cancel
Save