refactor(goods): 移除商品详情页配送地址相关功能

- 删除了"送至"地址展示卡片区域
- 移除了配送地址弹窗组件(popupAddress)的引用和导入
- 删除了 delivery 和 addressFlag 响应式变量
- 删除了 deliveryFun 和 closePopupAddress 函数
- 移除了 popupGoods 组件中的 addr 属性传参
- 删除了 shutMask 中地址弹窗的 case 3 逻辑
- 移除了 address.vue 中未登录跳转登录页的 else 分支
This commit is contained in:
pikachu1995@126.com
2026-10-29 17:17:35 +08:00
parent af7bd78614
commit 44c69e0cb2
2 changed files with 1 additions and 34 deletions

View File

@@ -170,17 +170,6 @@
<u-icon name="more-dot-fill"></u-icon>
</view>
</view>
<view class="card-flex" @click="shutMask(3)">
<view class="card-title"> 送至</view>
<view class="card-content">
<span v-if="delivery">{{clearStrComma(delivery.consigneeAddressPath)
}}</span>
<span v-else>暂无地址信息</span>
</view>
<view class="card-bottom">
<u-icon name="more-dot-fill"></u-icon>
</view>
</view>
</view>
<!-- 评价 -->
@@ -271,12 +260,8 @@
</view>
</u-popup>
<!-- 配送地址弹窗 -->
<popupAddress @closeAddress="closePopupAddress" @deliveryData="deliveryFun" v-if="goodsDetail.id"
:goodsId="goodsDetail.id" :addressFlag="addressFlag" />
<!-- 商品规格 商品详情,以及默认参与活动的id-->
<popupGoods :addr="delivery" ref="popupGoodsRef" @changed="changedGoods" @closeBuy="closePopupBuy"
<popupGoods ref="popupGoodsRef" @changed="changedGoods" @closeBuy="closePopupBuy"
@queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
v-if="goodsDetail.id" :pointDetail="pointDetail" @handleClickSku="selectSku"
:buyMask="buyMask" />
@@ -318,7 +303,6 @@ import storeLayout from './product/shop/-shop'
import Evaluation from './product/evaluation/-evaluation'
import GoodsSwiper from './product/goods/-goods-swiper'
import popupGoods from '@/components/m-buy/goods'
import popupAddress from './product/popup/address'
import shares from '@/components/m-share/index'
import takeDownFormSaleGoods from '@/components/m-take-down-sale-goods/index'
import setup from './product/popup/popup'
@@ -358,7 +342,6 @@ const goodsSpec = ref<any>("")
const imgList = ref<any[]>([])
const favorite = ref(false)
const recommendList = ref<any[]>([])
const addressFlag = ref(false)
const buyMask = ref(false)
const num = ref(1)
const skuId = ref<any>("")
@@ -372,7 +355,6 @@ const PromotionList = ref<any>("")
const specList = ref<any[]>([])
const selectedSpec = ref<any[]>([])
const nums = ref(0)
const delivery = ref<any>("")
const exchange = ref<any>({})
const productId = ref(0)
const startTimer = ref(false)
@@ -550,13 +532,6 @@ function changedGoods(val: any) {
selectedGoods.value = val
}
function deliveryFun(val: any) {
delivery.value = val
}
function closePopupAddress(val: any) {
addressFlag.value = val
}
function closePopupBuy(val: any) {
buyMask.value = val
@@ -694,15 +669,11 @@ function handleBuyClick() {
function shutMask(flag: any, buyFlag?: any, type?: any) {
promotionShow.value = false
buyMask.value = false
addressFlag.value = false
if (flag) {
switch (flag) {
case 1:
promotionShow.value = true
break
case 3:
addressFlag.value = true
break
case 4:
buyMask.value = true
if (buyFlag == "PINTUAN") {

View File

@@ -54,10 +54,6 @@ const cityList = ref([
onMounted(() => {
if (isLogin('auth')) {
getShippingAddress()
} else {
uni.navigateTo({
url: '/pages/passport/login',
})
}
})