商品添加优化
This commit is contained in:
parent
9d9762bd80
commit
0d2438ccff
@ -26,7 +26,8 @@
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view>发票抬头</view>
|
||||
<input name="receipt_title" :value="receipt_title" :maxlength="20" placeholder="需要开具发票的企业名称"/>
|
||||
<input v-if="receipt_title_type == 1" name="receipt_title" :value="receipt_title" :maxlength="20" placeholder="需要开具发票的姓名"/>
|
||||
<input v-else name="receipt_title" :value="receipt_title" :maxlength="20" placeholder="需要开具发票的企业名称"/>
|
||||
<text class="iconfont icon-xiangyou" @click="callTitle" ></text>
|
||||
</view>
|
||||
<view v-show="receipt_title_type == '2'" class="acea-row row-middle">
|
||||
|
@ -103,7 +103,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
|
||||
<gatherBusiness :userInfoData="userInfoData" />
|
||||
</view>
|
||||
|
||||
<!-- <view class="business com" v-if="userInfoData.mer_info.type_id === 11"> -->
|
||||
@ -230,7 +230,7 @@
|
||||
that.userInfoData = res.data;
|
||||
this.mer_id = res.data.service.mer_id
|
||||
if (!res.data.mer_info) {
|
||||
that.$set(this, 'jurisdiction', true);
|
||||
that.$set(this, 'jurisdiction', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -894,6 +894,7 @@
|
||||
//如果没有属性,赋值给商品默认库存
|
||||
if (productSelect === undefined && !this.attr.productAttr.length)
|
||||
productSelect = this.attr.productSelect;
|
||||
console.log(productSelect);
|
||||
//无属性值即库存为0;不存在加减;
|
||||
if (productSelect === undefined) return;
|
||||
let stock = productSelect.stock || 0;
|
||||
@ -904,11 +905,11 @@
|
||||
this.$set(this.attr.productSelect, "cart_num", stock);
|
||||
this.$set(this, "cart_num", stock);
|
||||
}
|
||||
if (num.cart_num > this.storeInfo.once_max_count && this.storeInfo.once_max_count != 0) {
|
||||
if (num.cart_num > productSelect.stock) {
|
||||
this.$set(this.attr.productSelect, "cart_num", this.storeInfo.once_max_count);
|
||||
this.$set(this, "cart_num", this.storeInfo.once_max_count);
|
||||
return this.$util.Tips({
|
||||
title: "单次购买件数不能超过" + this.storeInfo.once_max_count + "件!"
|
||||
title: "单次购买件数不能超过" + productSelect.stock + "件!"
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
@ -47,12 +47,12 @@
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
addor(item, index) {
|
||||
this.info.num += item;
|
||||
if (this.info.num <= 0) {
|
||||
console.log(goods_info);
|
||||
this.info.num = 1;
|
||||
}
|
||||
},
|
||||
|
@ -183,7 +183,7 @@
|
||||
if (type === 1) {
|
||||
if (this.stype == 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/addGoods/index'
|
||||
url: `/pages/product/addGoods/index?mer_id=${this.mer_id}`
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -105,6 +105,7 @@
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
singleSpecification: {
|
||||
handler(val) {
|
||||
@ -125,6 +126,12 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// console.log('123');
|
||||
// uni.removeStorage({
|
||||
// key: 'singleSpecification'
|
||||
// });
|
||||
// },
|
||||
methods: {
|
||||
selectMoreThan() {
|
||||
this.formList = this.formList.concat(this.moreThanList);
|
||||
|
@ -87,7 +87,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.relevance.length == 1 && k===index" class="product">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;"
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;"
|
||||
scroll-with-animation show-scrollbar="true">
|
||||
<view class="product-item" v-for="(goods,idx) in list.relevance" :key="idx"
|
||||
v-if="goods.spu">
|
||||
@ -203,7 +203,8 @@
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<scroll-view scroll-y="true" v-if="currentNav === 3" class="video-list"
|
||||
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'" :refresher-triggered="isTriggered" @scrolltolower="getGoods()" >
|
||||
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'" :refresher-triggered="isTriggered"
|
||||
@scrolltolower="getGoods()">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
|
||||
@ -320,7 +321,7 @@
|
||||
}, mapGetters(['isLogin', 'uid'])),
|
||||
data() {
|
||||
return {
|
||||
isTriggered:false,
|
||||
isTriggered: false,
|
||||
imgHost: HTTP_REQUEST_URL,
|
||||
videoID: 0,
|
||||
pinlunNum: 0,
|
||||
@ -390,8 +391,8 @@
|
||||
page: 1,
|
||||
limit: 5
|
||||
},
|
||||
communityId:'',
|
||||
Listcount:'',
|
||||
communityId: '',
|
||||
Listcount: '',
|
||||
loadMore: true,
|
||||
}
|
||||
},
|
||||
@ -427,6 +428,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
this.getOptions(options);
|
||||
this.videoID = options.id;
|
||||
this.isUser = options.user == 1 ? true : false;
|
||||
@ -516,7 +518,7 @@
|
||||
} = await graphicLstApi(this.where)
|
||||
this.cateGoods.push(...data.list)
|
||||
this.where.page++
|
||||
if(data.list.length < this.where.limit){
|
||||
if (data.list.length < this.where.limit) {
|
||||
this.loadMore = false
|
||||
}
|
||||
},
|
||||
@ -700,7 +702,7 @@
|
||||
animationfinish(event) {
|
||||
let that = this
|
||||
if (!that.loadVideo || !that.loadMore) return
|
||||
if (this.k == this.dataList.length - 1 && this.currentNav === 1) {
|
||||
if (this.k == this.dataList.length - 1 && this.currentNav == 1) {
|
||||
that.loadVideo = false
|
||||
this.get()
|
||||
}
|
||||
@ -730,10 +732,10 @@
|
||||
duration: 2000
|
||||
});
|
||||
}) :
|
||||
videoList({
|
||||
graphicLstApi({
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
id: that.videoID
|
||||
category_id: -1
|
||||
}).then(res => {
|
||||
that.videoData(res.data.list)
|
||||
if (res.data.list.length < that.limit) {
|
||||
@ -746,7 +748,7 @@
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
that.loadVideo = true
|
||||
that.loadVideo = true
|
||||
},
|
||||
getFocusList() {
|
||||
let that = this;
|
||||
|
@ -331,11 +331,11 @@
|
||||
<style lang="scss">
|
||||
page{background: #ffffff;}
|
||||
.history{
|
||||
margin-bottom: 96rpx;
|
||||
margin-bottom: 100rpx;
|
||||
.history_count{
|
||||
padding: 0 30rpx 0;
|
||||
padding: 0 30rpx calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
padding: 0 30rpx calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
padding: 0 30rpx calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
}
|
||||
.history_header{
|
||||
justify-content: space-between;
|
||||
|
Loading…
x
Reference in New Issue
Block a user