添加无货

main
fanfan 8 months ago
parent 9b658bd294
commit 6d90d8e1bc
  1. 2
      api/goods/index.js
  2. 2836
      components/goods-sku-popup/index.vue
  3. 12
      pages/goods/components/SkuPopup.vue
  4. 31
      pages/goods/detail.vue
  5. 2379
      pages/sureOrder/index.vue

@ -92,5 +92,5 @@ export const editGoodsSeckillPrice = param => {
}
// 是否有货
export const getGoodsStock = param => {
return request.get('goods/getGoodsStock', param)
return request.post('goods/getGoodsStock', param)
}

File diff suppressed because it is too large Load Diff

@ -184,9 +184,17 @@
},
selectedOld(e) {
this.selectSku = e
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
},
numChange(e) {
this.shopNum = e
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
},
// sku -----------------------------------------------------------
openSkuPopup() {
@ -194,10 +202,6 @@
},
closeSkuPopup() {
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
// console.log(" - sku")
},

@ -117,17 +117,17 @@
</view>
</view>
<view class="orderInfo">
<view class="chosed" v-if="goods.spec_type == 20" @click="choseSku(3)">
<view class="chosed" v-if="goods.spec_type == 20" @click="stockValue=='有货'?choseSku(3):''">
<view class="title">已选</view>
<view class="info" style="justify-content: flex-start;" v-if="goods.skuList.length>0">
<text
style="margin-right: 10rpx;">{{selectSku.title.name}}-{{selectSku.value.name}}</text>{{selectShop}}
</view>
<u-icon name="arrow-right" color="#B7B7B7"></u-icon>
<u-icon name="arrow-right" color="#B7B7B7" v-if="stockValue=='有货'"></u-icon>
</view>
<view class="chosed" v-else @click="choseSku(3)">
<view class="chosed" v-else @click="stockValue=='有货'?choseSku(3):''">
<view class="title">已选</view>
<view class="info">{{selectShop}}</view>
<view class="info">{{selectNum}}</view>
<u-icon name="arrow-right" color="#B7B7B7"></u-icon>
</view>
<view class="chosed" v-if="goods.skuList && goods.skuList.length > 0 && goods.skuList[0].stock_num > 0">
@ -284,12 +284,15 @@
<template v-if="isSeckill">
<template v-if="isBuy">
<template v-if="seckillText=='距离'">
<view class="addCar" @click="choseSku(2)">
<view class="addCar" @click="choseSku(2)" v-if="stockValue=='有货'">
加入购物车
</view>
<view class="buyNow" @click="choseSku(3)">
<view class="buyNow" @click="choseSku(3)" v-if="stockValue=='有货'">
立即购买
</view>
<view class="btn-bg" v-if="stockValue=='无货'">
无货
</view>
</template>
<template v-else>
<view class="btn-bg">
@ -304,12 +307,15 @@
</template>
</template>
<template v-else>
<view class="addCar" @click="choseSku(2)">
<view class="addCar" @click="choseSku(2)" v-if="stockValue=='有货'">
加入购物车
</view>
<view class="buyNow" @click="choseSku(3)">
<view class="buyNow" @click="choseSku(3)" v-if="stockValue=='有货'">
立即购买
</view>
<view class="btn-bg" v-if="stockValue=='无货'">
无货
</view>
</template>
</template>
<template v-if="isPre">
@ -484,11 +490,11 @@
name: '运损换新'
}],
selectSku: '',
selectShop: 1,
selectNum: 1,
multiIndex: [0, 0, 0],
multiArray: [],
multiData: [],
stockValue: '南京市',
stockValue: '有货',
addressResult: {
province: '江苏省',
city: '南京市',
@ -552,7 +558,7 @@
methods: {
async getGoodsStockInfor() {
let params = {
goods_id: this.goodsId,
list:[{goods_id:this.goodsId,num:this.selectNum}],
province: this.addressResult ? this.addressResult.province : '江苏省',
city: this.addressResult ? this.addressResult.city : '南京市',
district: this.addressResult ? this.addressResult.district : '玄武区'
@ -836,8 +842,9 @@
})
},
onGetSku(e) {
console.log(e)
this.selectSku = e.selectSku
this.selectShop = e.shopNum
this.selectNum = e.shopNum
},
//
onAddCart(total) {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save