Fix(订单):[#1358]下架商品从订单列表点击商品图,需提示:商品已下架
This commit is contained in:
@@ -35,24 +35,26 @@
|
||||
<view class="item-info acea-row row-between row-top" v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||
:key="cartInfoIndex">
|
||||
<view class="pictrue">
|
||||
<image :src="cart.productInfo.image" @click.stop="
|
||||
$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:cart.productInfo.id} })
|
||||
" v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0"/>
|
||||
<image :src="cart.productInfo.image" @click.stop="
|
||||
$yrouter.push({
|
||||
path: '/pages/activity/GroupDetails/index',query:{id:cart.combinationId}
|
||||
})
|
||||
" v-else-if="cart.combinationId > 0"/>
|
||||
<image :src="cart.productInfo.image" @click.stop="
|
||||
$yrouter.push({
|
||||
path: '/pages/activity/DargainDetails/index',query:{id:cart.bargainId}
|
||||
})
|
||||
" v-else-if="cart.bargainId > 0"/>
|
||||
<image :src="cart.productInfo.image" @click.stop="
|
||||
$yrouter.push({
|
||||
path: '/pages/activity/SeckillDetails/index',query:{id:cart.seckillId}
|
||||
})
|
||||
" v-else-if="cart.seckillId > 0"/>
|
||||
<image
|
||||
v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0"
|
||||
:src="cart.productInfo.image"
|
||||
@click.stop="gotoGoodDetail(cart, 1, { id: cart.productInfo.id })"
|
||||
/>
|
||||
<image
|
||||
v-else-if="cart.combinationId > 0"
|
||||
:src="cart.productInfo.image"
|
||||
@click.stop="gotoGoodDetail(cart, 2, { id: cart.combinationId })"
|
||||
/>
|
||||
<image
|
||||
v-else-if="cart.bargainId > 0"
|
||||
:src="cart.productInfo.image"
|
||||
@click.stop="gotoGoodDetail(cart, 3, { id: cart.bargainId })"
|
||||
/>
|
||||
<image
|
||||
v-else-if="cart.seckillId > 0"
|
||||
:src="cart.productInfo.image"
|
||||
@click.stop="gotoGoodDetail(cart, 4, { id: cart.seckillId })"
|
||||
/>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="acea-row name-wrap">
|
||||
@@ -238,6 +240,30 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
gotoGoodDetail(cart, type, query){
|
||||
// isProductStillExist:0-不存在,1-存在
|
||||
const isProductStillExist = cart.isProductStillExist || 0
|
||||
if (isProductStillExist === 0) {
|
||||
this.$dialog.toast({ mes: '商品已下架' })
|
||||
return
|
||||
}
|
||||
let path = ''
|
||||
switch(type) {
|
||||
case 1:
|
||||
path = '/pages/shop/GoodsCon/index'
|
||||
break
|
||||
case 2:
|
||||
path = '/pages/activity/GroupDetails/index'
|
||||
break
|
||||
case 3:
|
||||
path = '/pages/activity/DargainDetails/index'
|
||||
break
|
||||
case 4:
|
||||
path = '/pages/activity/SeckillDetails/index'
|
||||
break
|
||||
}
|
||||
this.$yrouter.push({ path, query })
|
||||
},
|
||||
getOrderData() {
|
||||
getOrderData().then(res => {
|
||||
this.orderData = res.data;
|
||||
|
||||
Reference in New Issue
Block a user