Commit 5eecc271 authored by 黄奎's avatar 黄奎

页面修改

parent a38ab5d0
......@@ -16,8 +16,7 @@
</view>
</view>
</view>
<scroll-view scroll-y class="sku-box"
:style="{'max-height':x.isdateformat==1?'400px':'300px'}">
<scroll-view scroll-y class="sku-box" :style="{'max-height':x.isdateformat==1?'400px':'300px'}">
<view class="sku-item" v-for="(x, i) in g.attr_groups" :key="i" v-if="x.isdateformat==0">
<view class="sku-title">{{ x.attr_group_name }} </view>
<view>
......@@ -31,7 +30,7 @@
</view>
</view>
</view>
<view class="sku-item" v-for="(x, i) in g.attr_groups" v-if="x.isdateformat==1">
<!-- <view class="sku-item" v-for="(x, i) in g.attr_groups" v-if="x.isdateformat==1">
<view class="sku-title">{{ x.attr_group_name }} </view>
<view>
<view class="sku-chi" :style="{
......@@ -43,15 +42,12 @@
<text class="val">{{ y.attr_name }}</text>
</view>
</view>
</view>
</view> -->
<view class="sku-item" v-for="(x, i) in g.attr_groups" v-if="x.isdateformat==1">
<!--x.isdateformat=1 改成日历模式 -->
<view class="sku-title">{{ x.attr_group_name }} </view>
<view>
<calendar @finish="chosenDateResult"
:defaultDate="x.attr_list[0].attr_name"
:immediately="true"
:priceList="x.attr_list"></calendar>
<calendar @finish="chosenDateResult" :defaultDate="x.attr_list[0].attr_name" :immediately="true" :priceList="x.attr_list"></calendar>
</view>
</view>
</scroll-view>
......@@ -250,11 +246,10 @@
},
methods: {
chosenDateResult(result) {
console.log(result,'---')
for(let index=0;index<this.g.attr_groups.length;index++){
for(let j=0;j<this.g.attr_groups[index].attr_list.length;j++){
if(this.g.attr_groups[index].attr_list[j].attr_name==result.start){
this.clickSkuItemHandler(j,index)
for (let index = 0; index < this.g.attr_groups.length; index++) {
for (let j = 0; j < this.g.attr_groups[index].attr_list.length; j++) {
if (this.g.attr_groups[index].attr_list[j].attr_name == result.start) {
this.clickSkuItemHandler(j, index)
}
}
}
......@@ -420,8 +415,6 @@
}
});
}
if (unchosen != '') {
this.sku = unchosen;
this.skuObj = null;
......@@ -493,15 +486,13 @@
}
});
}
console.log("priceSign", priceSign);
console.log("sign", sign);
if (this.g.attr_groups && this.g.attr_groups.length > 0) {
this.g.attr_groups.forEach((x, index) => {
if (x.isdateformat == 1) {
if (x.attr_list && x.attr_list.length > 0) {
x.attr_list.forEach((subItem,subIndex) => {
x.attr_list.forEach((subItem, subIndex) => {
var newSign = (subIndex + 1) + ":" + priceSign;
console.log("subItem",subItem);
if (this.g.attr && this.g.attr.length) {
this.g.attr.forEach(y => {
if (y.sign_id == newSign) {
......@@ -512,13 +503,10 @@
}
})
}
console.log("x", x)
}
});
}
console.log("this.g.attr_groups", this.g.attr_groups)
if (this.g.attr && this.g.attr.length) {
this.g.attr.forEach(x => {
if (x.sign_id == sign) {
......@@ -526,12 +514,9 @@
}
});
}
if (this.skuObj != null) {
this.goodimage = this.skuObj.pic_url || this.g.cover_pic;
this.goodprice = (parseFloat(this.skuObj.price) * parseFloat(this.gc)).toFixed(2);
console.log("this.goodprice2", this.goodprice);
this.goodamount = this.skuObj.stock;
}
},
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment