From df87d0f9c86fe704be54933d53318933faea74c8 Mon Sep 17 00:00:00 2001 From: linxi <957440651@qq.com> Date: Thu, 2 Jul 2026 10:06:50 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E6=8A=BD=E5=A5=96=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/OrderSubmission/index.vue | 38 ++++++++++--- pkg-video/views/county-claim-address.vue | 68 ++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 6 deletions(-) diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue index c45c512..040d3cd 100644 --- a/pages/order/OrderSubmission/index.vue +++ b/pages/order/OrderSubmission/index.vue @@ -117,7 +117,7 @@ {{ force2Decimal(orderPrice.payPostage) }} --> - + 优惠券 @@ -255,7 +255,7 @@ 0 || + cartInfo.some(item => Number( + item.drawActivityId || + (item.productInfo && item.productInfo.drawActivityId) || + 0 + ) > 0) + ) + }, + getOrderCouponId() { + if (this.isLotteryOrder()) return 0 + return this.couponList.usable.length === 0 ? 0 : (this.couponId || 0) + }, couponMax(e) { // this.couponTitle = e.couponTitle // this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0 @@ -477,12 +496,17 @@ export default { postOrderComputed(this.orderGroupInfo.orderKey, { addressId: this.addressInfo.id, useIntegral: this.useIntegral ? 1 : 0, - couponId: this.couponList.usable.length === 0 ? 0 : this.couponId, + couponId: this.getOrderCouponId(), usePoints: this.usePointsCheck ? 1 : 0, shipping_type: parseInt(this.shipping_type) + 1 }).then(res => { this.couponList = res.data.result.couponList - if(!f) { + if (this.isLotteryOrder()) { + this.couponTitle = '' + if (this.couponId !== 0) { + this.couponId = 0 + } + } else if(!f) { this.couponId = res.data.result.defaultCouponId } const data = res.data; @@ -683,7 +707,7 @@ export default { phone: this.contactsTel, addressId: this.addressInfo.id, useIntegral: this.useIntegral ? 1 : 0, - couponId: this.couponList.usable.length === 0 ? 0 : this.couponId || 0, + couponId: this.getOrderCouponId(), usePoints: this.usePointsNumber || 0, payType: this.active, pinkId: this.pinkId, @@ -811,11 +835,13 @@ export default { this.show = !this.show }, showCouponsPopup() { + if (this.isLotteryOrder()) return if (this.couponList.usable.length === 0) return this.show = !this.show }, // v9-2 changeCoupons(item) { + if (this.isLotteryOrder()) return if(!item) return if (this.couponList.usable.length === 0) return this.show = !this.show diff --git a/pkg-video/views/county-claim-address.vue b/pkg-video/views/county-claim-address.vue index fb7925e..af3fd85 100644 --- a/pkg-video/views/county-claim-address.vue +++ b/pkg-video/views/county-claim-address.vue @@ -29,6 +29,13 @@ + + 填写收货地址 + + 选择现有地址 + + + 收货人 @@ -190,6 +197,7 @@ export default { this.fetchRealnameStatus() }, onShow() { + this.handleChooseAddress() const done = uni.getStorageSync('countyClaimAuthDone') const needAutoSubmit = uni.getStorageSync('countyClaimNeedAutoSubmit') if (done && (this.waitSubmitAfterRealname || needAutoSubmit)) { @@ -219,6 +227,41 @@ export default { goBack() { uni.navigateBack() }, + chooseExistingAddress() { + uni.setStorageSync('sourceAddress', { + realName: this.form.realName || '', + phone: this.form.phone || '', + userAddress: `${this.address.province || ''}${this.address.city || ''}${this.address.district || ''}${this.form.detail || ''}`, + province: this.address.province || '', + city: this.address.city || '', + district: this.address.district || '', + detail: this.form.detail || '' + }) + this.$yrouter.push({ + path: '/pages/user/address/AddressManagement/index', + query: { + choosMode: 1 + } + }) + }, + handleChooseAddress() { + const chooseAddress = uni.getStorageSync('chooseAddress') || {} + if (!chooseAddress.id) return + uni.setStorageSync('chooseAddress', {}) + this.fillAddressForm(chooseAddress) + }, + fillAddressForm(address = {}) { + this.form.realName = address.realName || address.real_name || '' + this.form.phone = address.phone || '' + this.form.detail = address.detail || '' + this.address = { + province: address.province || '', + city: address.city || '', + district: address.district || '', + city_id: address.city_id || address.cityId || address.city_id + } + this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`.trim() + }, getCityList() { getCity().then(res => { this.district = res.data || [] @@ -585,6 +628,31 @@ export default { padding: 0 24rpx 24rpx; } +.form-card-header { + min-height: 88rpx; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 2rpx dashed #e5e5e5; +} + +.form-card-title { + color: #262626; + font-size: 30rpx; + font-weight: 700; +} + +.select-address-entry { + display: flex; + align-items: center; + color: #BD3124; +} + +.select-address-text { + font-size: 26rpx; + margin-right: 8rpx; +} + .form-row { min-height: 92rpx; display: flex;