Commit 19e55b4a authored by 黄奎's avatar 黄奎

页面修改

parent 317f9d0d
......@@ -9,10 +9,6 @@
<text class="small"></text>
<text>{{ goodprice }}</text>
</view>
<view class="origin" v-if="g.original_price && g.original_price > 0 && g.original_price != goodprice">
<text class="small"></text>
<text>{{ g.original_price.toFixed(2) }}</text>
</view>
<view class="amount">{{g.form_id ==1?'余位':'库存'}} {{ goodamount }} {{ g.unit }}</view>
<view class="sku">{{ skuObj ? '已选择' : '选择' }} {{ sku }}</view>
<view class="sku_close">
......@@ -20,6 +16,7 @@
</view>
</view>
</view>
<scroll-view scroll-y class="sku-box">
<view class="sku-item" v-for="(x, i) in g.attr_groups" :key="i">
<view class="sku-title">{{ x.attr_group_name }}</view>
......
......@@ -9,9 +9,9 @@
<text class="small"></text>
<text>{{ goodprice }}</text>
</view>
<view class="origin" v-if="g.original_price && g.original_price > 0 && g.original_price != goodprice">
<view class="origin" v-if="good_original_price && good_original_price >0 && good_original_price != goodprice">
<text class="small"></text>
<text>{{ g.original_price.toFixed(2) }}</text>
<text>{{ good_original_price }}</text>
</view>
<view class="amount amount2">可报名额 {{ goodamount }}</view>
<view class="sku_close">
......@@ -41,7 +41,8 @@
<view class="val3 sku-chi2" :style="{
background: y.attr_id == x.checkId ? mc : '#eee',
color: y.attr_id == x.checkId ? '#FFF' : '#333'
}" v-if="notes" v-for="(item, index) in g.goodsRelevanceList" :key="index">
}"
v-if="notes" v-for="(item, index) in g.goodsRelevanceList" :key="index">
<text>{{item.RelevanceName}}</text>
<text></text>
<text>{{item.RelevancePrice}}</text>
......@@ -118,6 +119,7 @@
notes: true,
goodimage: '',
goodprice: '',
good_original_price: 0,
goodamount: '',
mc: '',
fu: '',
......@@ -186,7 +188,6 @@
GoodsId: this.good.id
}
},
res => {
this.g = res.data.goods;
this.g.totalStock = 0;
......@@ -197,37 +198,52 @@
this.mc = this.$uiConfig.mainColor;
this.fu = this.$uiConfig.secondary;
this.secondary = this.$uiConfig.secondary;
var jjxkt_original_price = 0; //原价
if (this.g.jjxkt_original_price && this.g.jjxkt_original_price > 0) {
jjxkt_original_price = this.g.jjxkt_original_price;
}
console.log("jjxkt_original_price", jjxkt_original_price)
this.good_original_price = this.g.jjxkt_original_price;
this.skuObj = this.skued.id ? this.skued : null;
if (this.skuObj) {
this.goodimage = this.skuObj.pic_url || this.g.cover_pic;
this.goodamount = this.skuObj.stock;
// var tempGoodprice = (parseFloat(this.skuObj.price) * parseFloat(this.g.attr_groups[0].service_time)).toFixed(2);
// var tempGoodprice = (this.skuObj.price).toFixed(2);
if (this.g.goodsRelevanceList && this.g.goodsRelevanceList.length > 0) {
this.$nextTick(() => {
this.g.goodsRelevanceList.forEach(item => {
// tempGoodprice += parseFloat(item.RelevancePrice).toFixed(2)
console.log(11)
this.goodprice = (parseFloat(this.skuObj.price) + parseFloat(item
.RelevancePrice)).toFixed(2)
.RelevancePrice)).toFixed(2);
//计算原价
if (jjxkt_original_price > 0) {
this.good_original_price = (parseFloat(jjxkt_original_price) + parseFloat(item
.RelevancePrice)).toFixed(2);
}
});
})
} else {
this.$nextTick(() => {
this.goodprice = (parseFloat(this.g.price)).toFixed(2);
})
}
// this.goodprice = tempGoodprice
} else {
this.goodimage = this.g.cover_pic;
// var tempGoodprice = (this.g.price).toFixed(2);
this.goodamount = this.g.goods_stock;
if (this.g.goodsRelevanceList && this.g.goodsRelevanceList.length > 0) {
this.$nextTick(() => {
this.g.goodsRelevanceList.forEach(item => {
// tempGoodprice += parseFloat(item.RelevancePrice).toFixed(2)
this.goodprice = (parseFloat(this.g.price) + parseFloat(item
.RelevancePrice)).toFixed(2)
.RelevancePrice)).toFixed(2);
//计算原价
if (jjxkt_original_price > 0) {
this.good_original_price = (parseFloat(jjxkt_original_price) + parseFloat(item
.RelevancePrice)).toFixed(2);
}
});
})
......@@ -565,6 +581,7 @@
text-decoration: line-through;
margin-left: 10rpx;
}
.amount2 {
margin-top: 40rpx;
}
......
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