增加试穿规格

This commit is contained in:
ghusermoon 2020-09-07 14:47:54 +08:00
parent 2ad46ce2a1
commit dcea9608af
2 changed files with 14 additions and 5 deletions

View File

@ -67,7 +67,6 @@ export default {
}
},
methods: {
cancelOrder() {
this.$u.api.cancelOrder({
order_id: this.order.order_id,

View File

@ -12,9 +12,7 @@
<image :src="order.goods_image"></image>
<view class="goods-text">
<view class="goods-name u-line-2">{{ order.goods_name }}</view>
<!-- <view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view> -->
<view class="goods-sku u-line-1" v-if="order.goods_spec">{{ order.goods_spec | concatSpec }}</view>
<!-- <view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view> -->
</view>
</view>
@ -38,7 +36,18 @@ export default {
created() {
this.viewState();
},
filters: {},
filters: {
concatSpec(value) {
let spec = '';
for (const key in value) {
if (value.hasOwnProperty(key)) {
const element = value[key];
spec = spec + element + ';'
}
}
return spec;
}
},
methods: {
// "goods_try_order_status": 0, 穿 0: 20: 40: 50:
viewState() {
@ -131,6 +140,7 @@ export default {
line-height: 38rpx;
}
.goods-sku {
align-self: baseline;
max-width: 230rpx;
background: rgba(236,236,236,1);
border-radius: 6rpx;