|
|
@ -396,6 +396,7 @@ |
|
|
import deliveryTimeOp from '@/package1/components/delivery-time-op/delivery-time-op.vue' |
|
|
import deliveryTimeOp from '@/package1/components/delivery-time-op/delivery-time-op.vue' |
|
|
import addressList from '@/package1/address/addressList.vue' |
|
|
import addressList from '@/package1/address/addressList.vue' |
|
|
import { buildHomeSharePath } from '@/utils/sharePath.js' |
|
|
import { buildHomeSharePath } from '@/utils/sharePath.js' |
|
|
|
|
|
import { requireLoginToCurrentPage } from '@/utils/authRedirect.js' |
|
|
|
|
|
|
|
|
const SHARE_TARGET_PATH = '/package1/runErrand/runErrand' |
|
|
const SHARE_TARGET_PATH = '/package1/runErrand/runErrand' |
|
|
|
|
|
|
|
|
@ -542,6 +543,9 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
requirePageLogin() { |
|
|
|
|
|
return requireLoginToCurrentPage() |
|
|
|
|
|
}, |
|
|
enableShareMenu() { |
|
|
enableShareMenu() { |
|
|
if (!uni.showShareMenu) return |
|
|
if (!uni.showShareMenu) return |
|
|
uni.showShareMenu({ |
|
|
uni.showShareMenu({ |
|
|
@ -623,6 +627,7 @@ |
|
|
}).catch(() => {}); |
|
|
}).catch(() => {}); |
|
|
}, |
|
|
}, |
|
|
openCommissionPopup() { |
|
|
openCommissionPopup() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.commissionInputValue = ''; |
|
|
this.commissionInputValue = ''; |
|
|
this.commissionInputFocus = false; |
|
|
this.commissionInputFocus = false; |
|
|
this.$refs.commissionPopup.open('center'); |
|
|
this.$refs.commissionPopup.open('center'); |
|
|
@ -649,6 +654,7 @@ |
|
|
return value; |
|
|
return value; |
|
|
}, |
|
|
}, |
|
|
confirmCommission() { |
|
|
confirmCommission() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
let commission = parseFloat(this.commissionInputValue); |
|
|
let commission = parseFloat(this.commissionInputValue); |
|
|
if (!this.validateCustomCommission(commission)) return; |
|
|
if (!this.validateCustomCommission(commission)) return; |
|
|
this.customCommission = this.formatCommissionValue(this.commissionInputValue); |
|
|
this.customCommission = this.formatCommissionValue(this.commissionInputValue); |
|
|
@ -656,6 +662,7 @@ |
|
|
/* this.fetchCoupons(); */ |
|
|
/* this.fetchCoupons(); */ |
|
|
}, |
|
|
}, |
|
|
openRemarkPopup() { |
|
|
openRemarkPopup() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.remarkInputValue = this.addFormData.remark || ''; |
|
|
this.remarkInputValue = this.addFormData.remark || ''; |
|
|
this.$refs.remarkPopup.open('center'); |
|
|
this.$refs.remarkPopup.open('center'); |
|
|
}, |
|
|
}, |
|
|
@ -688,11 +695,13 @@ |
|
|
this.remarkInputValue = (this.remarkInputValue || '').toString().slice(0, 30); |
|
|
this.remarkInputValue = (this.remarkInputValue || '').toString().slice(0, 30); |
|
|
}, |
|
|
}, |
|
|
confirmRemark() { |
|
|
confirmRemark() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.addFormData.remark = (this.remarkInputValue || '').slice(0, 30); |
|
|
this.addFormData.remark = (this.remarkInputValue || '').slice(0, 30); |
|
|
uni.hideKeyboard(); |
|
|
uni.hideKeyboard(); |
|
|
this.$refs.remarkPopup.close(); |
|
|
this.$refs.remarkPopup.close(); |
|
|
}, |
|
|
}, |
|
|
openCouponPopup() { |
|
|
openCouponPopup() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
/* this.fetchCoupons(); */ |
|
|
/* this.fetchCoupons(); */ |
|
|
this.$refs.couponPopup.open('bottom'); |
|
|
this.$refs.couponPopup.open('bottom'); |
|
|
}, |
|
|
}, |
|
|
@ -800,6 +809,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
openAddressBook(mode) { |
|
|
openAddressBook(mode) { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.addressSelectMode = mode; |
|
|
this.addressSelectMode = mode; |
|
|
this.isBookPopupOpen = true; |
|
|
this.isBookPopupOpen = true; |
|
|
this.addressBookVisible = true; |
|
|
this.addressBookVisible = true; |
|
|
@ -843,6 +853,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
openKuaidiPicker() { |
|
|
openKuaidiPicker() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.getShopArea(); |
|
|
this.getShopArea(); |
|
|
this.$refs.kuaidiPickerPopup.open(); |
|
|
this.$refs.kuaidiPickerPopup.open(); |
|
|
}, |
|
|
}, |
|
|
@ -851,6 +862,7 @@ |
|
|
this.$refs.kuaidiPickerPopup.close(); |
|
|
this.$refs.kuaidiPickerPopup.close(); |
|
|
}, |
|
|
}, |
|
|
goDetail() { |
|
|
goDetail() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
let shopAreaId = ''; |
|
|
let shopAreaId = ''; |
|
|
if (this.isKuaidi) { |
|
|
if (this.isKuaidi) { |
|
|
shopAreaId = this.selectedPickupArea ? this.selectedPickupArea.id : ''; |
|
|
shopAreaId = this.selectedPickupArea ? this.selectedPickupArea.id : ''; |
|
|
@ -874,6 +886,7 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
checkTime(type) { |
|
|
checkTime(type) { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
if (type === this.formData.isImmediately) { |
|
|
if (type === this.formData.isImmediately) { |
|
|
if (type === false) { |
|
|
if (type === false) { |
|
|
this.$refs.model.open() |
|
|
this.$refs.model.open() |
|
|
@ -940,6 +953,7 @@ |
|
|
this.$refs.model.close(); |
|
|
this.$refs.model.close(); |
|
|
}, |
|
|
}, |
|
|
checkWorker(type) { |
|
|
checkWorker(type) { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
if (type == this.selectedWorker) return; |
|
|
if (type == this.selectedWorker) return; |
|
|
this.selectedWorker = type; |
|
|
this.selectedWorker = type; |
|
|
if (this.selectedWorker == 'buzhiding') { |
|
|
if (this.selectedWorker == 'buzhiding') { |
|
|
@ -948,15 +962,19 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
checkWeightOrVolume() { |
|
|
checkWeightOrVolume() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.addFormData.isOverweightOrOvervolume = !this.addFormData.isOverweightOrOvervolume |
|
|
this.addFormData.isOverweightOrOvervolume = !this.addFormData.isOverweightOrOvervolume |
|
|
}, |
|
|
}, |
|
|
addCode() { |
|
|
addCode() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.addFormData.codeList.push({ code: '' }) |
|
|
this.addFormData.codeList.push({ code: '' }) |
|
|
}, |
|
|
}, |
|
|
delCode(index) { |
|
|
delCode(index) { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.addFormData.codeList.splice(index, 1) |
|
|
this.addFormData.codeList.splice(index, 1) |
|
|
}, |
|
|
}, |
|
|
pictureAdd() { |
|
|
pictureAdd() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
let that = this |
|
|
let that = this |
|
|
uni.chooseMedia({ |
|
|
uni.chooseMedia({ |
|
|
count: 9, |
|
|
count: 9, |
|
|
@ -1009,6 +1027,7 @@ |
|
|
}, 1000) |
|
|
}, 1000) |
|
|
}, |
|
|
}, |
|
|
delPicture(index) { |
|
|
delPicture(index) { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
this.addFormData.picture.splice(index, 1); |
|
|
this.addFormData.picture.splice(index, 1); |
|
|
}, |
|
|
}, |
|
|
getMustFinishTime() { |
|
|
getMustFinishTime() { |
|
|
@ -1038,6 +1057,7 @@ |
|
|
return null; |
|
|
return null; |
|
|
}, |
|
|
}, |
|
|
submitPay() { |
|
|
submitPay() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
uni.hideKeyboard(); |
|
|
uni.hideKeyboard(); |
|
|
if (this.currentOrderId) { |
|
|
if (this.currentOrderId) { |
|
|
this.goPayOrderDetail(); |
|
|
this.goPayOrderDetail(); |
|
|
@ -1174,6 +1194,7 @@ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
wxPayment() { |
|
|
wxPayment() { |
|
|
|
|
|
if (!this.requirePageLogin()) return |
|
|
let that = this; |
|
|
let that = this; |
|
|
if (!this.currentOrderId || !this.backendTotalAmount) return; |
|
|
if (!this.currentOrderId || !this.backendTotalAmount) return; |
|
|
|
|
|
|
|
|
|