Merge pull request 'order spec 8.14' (#193) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/193
This commit is contained in:
hansu 2020-08-14 11:25:26 +08:00
commit 4d76db71fe
2 changed files with 19 additions and 7 deletions

View File

@ -12,9 +12,7 @@
<image :src="goods.goods_image"></image> <image :src="goods.goods_image"></image>
<view class="goods-text"> <view class="goods-text">
<view class="goods-name u-line-2">{{ goods.goods_name }}</view> <view class="goods-name u-line-2">{{ goods.goods_name }}</view>
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec"> <view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">{{ goods.goods_spec | concatSpec }}</view>
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view>
<!-- <view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view> --> <!-- <view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view> -->
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view> <view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view>
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40"> <view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
@ -53,6 +51,18 @@ export default {
mounted() { mounted() {
this.viewState(); this.viewState();
}, },
filters: {
concatSpec(value) {
let spec = '';
for (const key in value) {
if (value.hasOwnProperty(key)) {
const element = value[key];
spec = spec + element + ';'
}
}
return spec;
}
},
methods: { methods: {
viewState() { viewState() {
let state; let state;
@ -172,15 +182,16 @@ export default {
margin-right: 30rpx; margin-right: 30rpx;
} }
.goods-text { .goods-text {
display: flex; // display: flex;
flex-direction: column; // flex-direction: column;
justify-content: space-between; // justify-content: space-between;
.goods-name { .goods-name {
font-size: 28rpx; font-size: 28rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
line-height: 38rpx; line-height: 38rpx;
} }
.goods-sku { .goods-sku {
margin-top: 10rpx;
display: inline-block; display: inline-block;
max-width: 230rpx; max-width: 230rpx;
background: rgba(236,236,236,1); background: rgba(236,236,236,1);

View File

@ -79,6 +79,7 @@ export default {
}) })
}, },
async getBrowseList ({ load = 'reload' } = {}) { async getBrowseList ({ load = 'reload' } = {}) {
if(load == 'reload') this.page = 1;
const res = await this.$u.api.getBrowseList({ page: this.page }); const res = await this.$u.api.getBrowseList({ page: this.page });
this.timer = true; this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
@ -124,7 +125,7 @@ export default {
background: rgba(255,255,255,1); background: rgba(255,255,255,1);
border-radius: 10rpx; border-radius: 10rpx;
padding: 20rpx 20rpx 22rpx; padding: 20rpx 20rpx 22rpx;
margin: 0 10rpx 20rpx 0; margin: 0 11rpx 20rpx 0;
.item-title { .item-title {
display: flex; display: flex;
align-items: center; align-items: center;