fix:bug修复

This commit is contained in:
黄泽群
2026-07-22 17:18:26 +08:00
parent 53f1ebba18
commit 17ab8beefa
6 changed files with 237 additions and 179 deletions
@@ -1,6 +1,6 @@
<template>
<view class="order_submit_warp">
<Header leftTitle="提交订单" leftPathType="switchTab" leftPath="/pages/shopping_cart/shopping_cart" />
<Header leftTitle="提交订单" :leftPathType="leftPathType" :leftPath="leftPath" />
<!-- 收件人信息 -->
<view class="order_submit_header_warp" @click="checkAddressShow(true, 'data')"
v-if="orderInfo.address && Object.keys(orderInfo.address).length !== 0">
@@ -261,11 +261,9 @@
<view class="address_popup_warp">
<view class="address_popup_title">收件地址</view>
<view class="address_popup_content">
<view class="address_popup_content_add" @click="addAdress">
+ 新增地址</view>
<Address @valueFunc="getAddressValueFunc" />
</view>
<view class="popup_but" @click="addressOk"> 确认 </view>
<view class="popup_but" @click="addAdress"> 新增地址 </view>
</view>
</up-popup>
<u-modal :show="tipsShow" v-if="tipsShow" title="提示" showCancelButton @cancel="onCancel" @confirm="onConfirm"
@@ -364,6 +362,8 @@ export default {
isShow: false,
addressListOne: [],
ids: 0,
leftPathType: "switchTab",
leftPath: "/pages/shopping_cart/shopping_cart",
orderInfo: {
// coupon:2,//优惠卷
paymentMethod: PAYMENT_WAY.ALIPAY, // 支付方式,暂时默认用支付宝
@@ -409,6 +409,8 @@ export default {
if (option.sed) {
this.isPoints = 1;
this.sed = JSON.parse(option.sed);
this.leftPathType = "navigateTo";
this.leftPath = null;
await this.addressList();
// console.log('addressListOne',this.addressListOne)
// if(this.addressListOne && this.addressListOne.length){
@@ -1005,14 +1007,10 @@ export default {
}
},
// 地址选中
getAddressValueFunc(item) {
async getAddressValueFunc(item) {
const addressObj = item;
addressObj.addressStr = assembleAddress(addressObj).names;
this.selectAddress = addressObj;
},
// 地址选中OK
async addressOk() {
console.log("this.selectAddress", this.selectAddress);
const type = this.addressType;
const addressIndex = this.addressIndex;
const shopsIndex = this.shopsIndex;
@@ -1022,7 +1020,7 @@ export default {
this.orderInfo.shops[shopsIndex].addrTimes[addressIndex].address =
this.selectAddress;
}
this.addressShow = this.false;
this.addressShow = false;
if (this.selectAddress && !this.sed) {
const params = {
cartIds: this.ids,
@@ -1040,7 +1038,7 @@ export default {
});
}
data.shops = shops;
data.paymentMethod = null; // 支付方式
data.paymentMethod = null;
this.orderInfo = data;
}
}