mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-11-10 02:48:53 +08:00
refactor(goods): 移除商品详情页配送地址相关功能
- 删除了"送至"地址展示卡片区域 - 移除了配送地址弹窗组件(popupAddress)的引用和导入 - 删除了 delivery 和 addressFlag 响应式变量 - 删除了 deliveryFun 和 closePopupAddress 函数 - 移除了 popupGoods 组件中的 addr 属性传参 - 删除了 shutMask 中地址弹窗的 case 3 逻辑 - 移除了 address.vue 中未登录跳转登录页的 else 分支
This commit is contained in:
@@ -170,17 +170,6 @@
|
|||||||
<u-icon name="more-dot-fill"></u-icon>
|
<u-icon name="more-dot-fill"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
</view>
|
||||||
|
|
||||||
<!-- 评价 -->
|
<!-- 评价 -->
|
||||||
@@ -271,12 +260,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<!-- 配送地址弹窗 -->
|
|
||||||
<popupAddress @closeAddress="closePopupAddress" @deliveryData="deliveryFun" v-if="goodsDetail.id"
|
|
||||||
:goodsId="goodsDetail.id" :addressFlag="addressFlag" />
|
|
||||||
|
|
||||||
<!-- 商品规格 商品详情,以及默认参与活动的id-->
|
<!-- 商品规格 商品详情,以及默认参与活动的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"
|
@queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
|
||||||
v-if="goodsDetail.id" :pointDetail="pointDetail" @handleClickSku="selectSku"
|
v-if="goodsDetail.id" :pointDetail="pointDetail" @handleClickSku="selectSku"
|
||||||
:buyMask="buyMask" />
|
:buyMask="buyMask" />
|
||||||
@@ -318,7 +303,6 @@ import storeLayout from './product/shop/-shop'
|
|||||||
import Evaluation from './product/evaluation/-evaluation'
|
import Evaluation from './product/evaluation/-evaluation'
|
||||||
import GoodsSwiper from './product/goods/-goods-swiper'
|
import GoodsSwiper from './product/goods/-goods-swiper'
|
||||||
import popupGoods from '@/components/m-buy/goods'
|
import popupGoods from '@/components/m-buy/goods'
|
||||||
import popupAddress from './product/popup/address'
|
|
||||||
import shares from '@/components/m-share/index'
|
import shares from '@/components/m-share/index'
|
||||||
import takeDownFormSaleGoods from '@/components/m-take-down-sale-goods/index'
|
import takeDownFormSaleGoods from '@/components/m-take-down-sale-goods/index'
|
||||||
import setup from './product/popup/popup'
|
import setup from './product/popup/popup'
|
||||||
@@ -358,7 +342,6 @@ const goodsSpec = ref<any>("")
|
|||||||
const imgList = ref<any[]>([])
|
const imgList = ref<any[]>([])
|
||||||
const favorite = ref(false)
|
const favorite = ref(false)
|
||||||
const recommendList = ref<any[]>([])
|
const recommendList = ref<any[]>([])
|
||||||
const addressFlag = ref(false)
|
|
||||||
const buyMask = ref(false)
|
const buyMask = ref(false)
|
||||||
const num = ref(1)
|
const num = ref(1)
|
||||||
const skuId = ref<any>("")
|
const skuId = ref<any>("")
|
||||||
@@ -372,7 +355,6 @@ const PromotionList = ref<any>("")
|
|||||||
const specList = ref<any[]>([])
|
const specList = ref<any[]>([])
|
||||||
const selectedSpec = ref<any[]>([])
|
const selectedSpec = ref<any[]>([])
|
||||||
const nums = ref(0)
|
const nums = ref(0)
|
||||||
const delivery = ref<any>("")
|
|
||||||
const exchange = ref<any>({})
|
const exchange = ref<any>({})
|
||||||
const productId = ref(0)
|
const productId = ref(0)
|
||||||
const startTimer = ref(false)
|
const startTimer = ref(false)
|
||||||
@@ -550,13 +532,6 @@ function changedGoods(val: any) {
|
|||||||
selectedGoods.value = val
|
selectedGoods.value = val
|
||||||
}
|
}
|
||||||
|
|
||||||
function deliveryFun(val: any) {
|
|
||||||
delivery.value = val
|
|
||||||
}
|
|
||||||
|
|
||||||
function closePopupAddress(val: any) {
|
|
||||||
addressFlag.value = val
|
|
||||||
}
|
|
||||||
|
|
||||||
function closePopupBuy(val: any) {
|
function closePopupBuy(val: any) {
|
||||||
buyMask.value = val
|
buyMask.value = val
|
||||||
@@ -694,15 +669,11 @@ function handleBuyClick() {
|
|||||||
function shutMask(flag: any, buyFlag?: any, type?: any) {
|
function shutMask(flag: any, buyFlag?: any, type?: any) {
|
||||||
promotionShow.value = false
|
promotionShow.value = false
|
||||||
buyMask.value = false
|
buyMask.value = false
|
||||||
addressFlag.value = false
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
case 1:
|
case 1:
|
||||||
promotionShow.value = true
|
promotionShow.value = true
|
||||||
break
|
break
|
||||||
case 3:
|
|
||||||
addressFlag.value = true
|
|
||||||
break
|
|
||||||
case 4:
|
case 4:
|
||||||
buyMask.value = true
|
buyMask.value = true
|
||||||
if (buyFlag == "PINTUAN") {
|
if (buyFlag == "PINTUAN") {
|
||||||
|
|||||||
@@ -54,10 +54,6 @@ const cityList = ref([
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (isLogin('auth')) {
|
if (isLogin('auth')) {
|
||||||
getShippingAddress()
|
getShippingAddress()
|
||||||
} else {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/passport/login',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user