多规格商品下单错误

zh
jjj 4 years ago
parent 700293e4d6
commit 712cbd1b52

@ -10,9 +10,10 @@
</view> -->
<view class="live-item bg-white" v-for="(item,index) in liveVideos" :key="index">
<view class="live-main-pic">
<u-lazy-load threshold="-100" :image="item.cover" :loading-img="IMAGE_URL + '/null05.png'" :index="index" :error-img="IMAGE_URL + '/null05.png'" @click="toLiveDetail(item.id,item.isLive)"></u-lazy-load>
<u-lazy-load threshold="-100" :image="judgeCover(item.cover)" :loading-img="IMAGE_URL + '/null05.png'" :index="index" :error-img="IMAGE_URL + '/null05.png'" @click="toLiveDetail(item.id,item.isLive)"></u-lazy-load>
<view class="icon text-white flex">
<text class="cuIcon-playfill"></text>
<image class="liveStatus" v-if="item.isLive === 1" src="../static/play.gif"></image>
<text class="cuIcon-playfill" v-else></text>
<text style="padding: 0 8rpx;">{{item.look}}人看过</text>
</view>
</view>
@ -144,6 +145,14 @@
url:`/pages/livePlayback/livePlayback?id=${id}&isLive=${isLive}`
// url: "/pages/livePlayback/livePlayback?id=" + id
})
},
judgeCover (val) {
let arr = val.split('/')
if (arr[0] === 'http:') {
return val
}
return this.IMAGE_URL + val
}
}
@ -168,6 +177,9 @@
image {
background-color: #FFFFFF;
}
.liveStatus{
width: 32rpx;
}
.icon {
position: absolute;

@ -521,6 +521,9 @@
if (options.q !== undefined) {
let url = decodeURIComponent(options.q)
options.id = url.split("/")[6];
if( url.split("/")[7] != undefined){
this.$store.commit('setinvite', url.split("/")[7]);
}
}
if (uni.getStorageSync("userInfo").roleLevel) {
this.roleLevel = uni.getStorageSync("userInfo").roleLevel
@ -636,6 +639,15 @@
this.selectArr[0] = this.goodsDetail.attributes[0].children[0].id
this.subIndex[0] = 0
}
if (this.goodsDetail.attributes.length > 1) {
let arr = []
if (this.goodsDetail.attributes[0].children[0].id < this.goodsDetail.attributes[1].children[0].id) {
this.goodsDetail.attributes.forEach((item) => {
arr.unshift(item)
})
this.$set(this.goodsDetail, 'attributes', arr)
}
}
console.log(res.data.data)
this.swiperImgList = res.data.data.mainPhotos
@ -664,7 +676,7 @@
for (let i in this.goodsDetail.sku) {
this.shopItemInfo[this.goodsDetail.sku[i].combineId.split(",").reverse().join(",")] = this.goodsDetail.sku[i]; //便
}
console.log(this.shopItemInfo)
// console.log(this.shopItemInfo)
this.checkItem();
},
@ -733,6 +745,7 @@
createOrder() {
console.log(this.sku_id)
console.log(this.checkedSku)
if (!this.sku_id) {
this.$u.toast("请选择商品规格")
@ -808,7 +821,7 @@
for (let i in option) {
result[i] = this.selectArr[i] ? this.selectArr[i] : '';
}
// console.log(result)
console.log(option)
for (let i in option) {
let last = result[i]; //last
for (let k in option[i].children) {
@ -828,12 +841,13 @@
this.$forceUpdate(); //
},
isMay(result) {
console.log(this.shopItemInfo, result)
for (var i in result) {
if (result[i] == '') {
return true; //true
}
}
// console.log(this.shopItemInfo[result])
console.log(this.shopItemInfo[result])
return this.shopItemInfo[result].inventory == 0 ? false : true; //truefalse
},
chooseAddress(e) {

@ -34,7 +34,7 @@
<view class="flex flex-direction justify-around text-white btns-con">
<!-- 视频转发功能接口需要改动最好详情接口把所有数据返回要么前端将数据全部带出去接收者进入页面是加判断是否有参数接收有则修改vuex状态管理中视频详情的值 -->
<!-- <button class="btn-item" open-type="share"><text class="cuIcon-forwardfill"></text></button> -->
<button class="btn-item" @tap="showCommentsModel"><text class="cuIcon-commentfill"></text></button>
<!-- <button class="btn-item" @tap="showCommentsModel"><text class="cuIcon-commentfill"></text></button> -->
<button class="btn-item" @tap="setPraiseVideo"><text class="cuIcon-likefill" :class="videoDetail.isPraise?'red':''"></text></button>
</view>
</view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Loading…
Cancel
Save