修复已知问题

This commit is contained in:
bobobobo
2026-01-26 23:19:37 +08:00
parent 92ca8d72ce
commit 33bf08c981
15 changed files with 460 additions and 121 deletions

View File

@@ -41,6 +41,10 @@
state: false,
loading: true
})
/** 地址选项弹出窗 */
const isPopup = ref(null)
/** 地址列表 */
const ressDataList = ref([])
const tixian = ref(null)
const originalPrice = ref(0)
@@ -55,11 +59,26 @@
topRessData.id = data?.id || ''
topRessData.phone = data?.phone || ''
topRessData.loading = false
ressDataList.value = res.rows
}
/** 用户地址跳转 */
/** 选中地址 */
const onAddress = data => {
topRessData.state = !data?.id
topRessData.name = data?.name || ''
topRessData.houseNum = data?.houseNum || ''
topRessData.id = data?.id || ''
topRessData.phone = data?.phone || ''
isPopup.value.close()
}
/** 点击顶部地址选项 */
const onRess = () => {
navigateTo('/pages/address/index')
if (topRessData.name) {
isPopup.value.open()
} else {
navigateTo('/pages/address/index')
}
}
const getData = async productId => {
@@ -119,9 +138,6 @@
quantity: formData.num,
skuId: formData.spec
}
console.log(data, '===data===')
return
tixian.value.close()
const res = await addOrder(data)
await refreshUserInfo()
@@ -245,6 +261,49 @@
<bottom-view>
<cb-button @click="onConfirm">确认支付</cb-button>
</bottom-view>
<!-- 地址选项弹出窗 -->
<uni-popup
ref="isPopup"
type="bottom"
borderRadius="16rpx 16rpx 0 0"
backgroundColor="#ffffff"
>
<view class="popup-box">
<view class="top-name">
<text class="title">地址选项</text>
<uni-icons
type="closeempty"
size="44rpx"
@click="isPopup.close()"
></uni-icons>
</view>
<!-- 选项卡片 -->
<view class="card-list">
<view
v-for="(item, index) in ressDataList"
:key="index"
class="card-box"
@click="onAddress(item)"
>
<view class="name-box">
<text v-if="item.defaultAddress == 1" class="mode">
默认
</text>
<text class="name">{{ item.houseNum }}</text>
</view>
<view class="right-box">
<text class="p">{{ item.name }}</text>
<uni-icons type="right" size="36rpx"></uni-icons>
</view>
</view>
</view>
<!-- 底部添加按钮 -->
<view class="btn" @click="navigateTo('/pages/address/index')">
添加新地址
</view>
</view>
</uni-popup>
</view>
</template>