This commit is contained in:
2020-07-07 17:47:00 +08:00
parent 77083c0404
commit 5ede514a02
8 changed files with 230 additions and 90 deletions

View File

@@ -2,30 +2,32 @@
<view class="order-item">
<view class="order-title">
<view class="store-info">
<image src="@/pageE/static/mine/23.png"></image>
<view class="store-name">胖胖的店</view>
<image :src="order.extend_store.store_avatar"></image>
<view class="store-name">{{ order.extend_store.store_name }}</view>
</view>
<view class="order-status">交易成功</view>
<view class="order-status">{{ order.order_state | viewState }}</view>
</view>
<view class="goods-info" @click="toDetailsPage">
<image src="@/pageE/static/mine/23.png"></image>
<view class="goods-text">
<view class="goods-name u-line-2">木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
<view class="goods-sku u-line-1" v-if="current !== 5 && current !== 6">XL;红色条纹XL;红色条纹XL;红色条纹</view>
<view class="goods-time u-line-1" v-if="current == 1 || current == 4">距离结束23:23:38</view>
<view class="goods-price u-line-1" v-if="current == 5 || current == 6">总价99.00实付款99</view>
<view class="goods-date" v-if="current == 5 || current == 6">
<image src="@/pageE/static/mine/26.png"></image>
<view>2020.05.17</view>
<view class="goods-info">
<view class="goods-item" @click="toDetailsPage" v-for="goods in order.extend_order_goods" :key="goods.goods_id">
<image :src="goods.goods_image"></image>
<view class="goods-text">
<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">XL;红色条纹XL;红色条纹XL;红色条纹</view>
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">距离结束23:23:38</view>
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价99.00实付款99</view>
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
<image src="@/pageE/static/mine/26.png"></image>
<view>2020.05.17</view>
</view>
</view>
</view>
</view>
<view class="order-btn" v-if="[0, 2, 4].indexOf(current) < 0">
<view class="logistics" v-if="current == 3" @click="toLogistics">查看物流</view>
<view class="comment" v-if="current == 5" @click="toComment">立即评价</view>
<view class="payment" v-if="current == 1">立即支付</view>
<view class="service" v-if="current == 6">联系官方客服</view>
<view class="submit" v-if="current == 6">提交官方审核</view>
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
<view class="logistics" v-if="order.order_state == 30" @click="toLogistics">查看物流</view>
<view class="comment" v-if="order.order_state == 20" @click="toComment">立即评价</view>
<view class="payment" v-if="order.order_state == 10">立即支付</view>
<view class="service" v-if="order.order_state == 40">联系官方客服</view>
<view class="submit" v-if="order.order_state == 40">提交官方审核</view>
</view>
</view>
</template>
@@ -35,12 +37,40 @@ export default {
return {}
},
props: {
current: Number
order: Object
},
filters: {
viewState(value) {
let state;
switch (value) {
case 10:
state = '待支付';
break;
case 0:
state = '已取消';
break;
case 30:
state = '待收货';
break;
case -1:
state = '试穿试送';
break;
case 20:
state = '待评价';
break;
case 40:
state = '售后';
break;
default:
break;
}
return state;
},
},
methods: {
toDetailsPage() {
uni.navigateTo({
url: '/pageE/order/Details?current=' + this.current
url: '/pageE/order/Details?order.order_state=' + this.order.order_state
});
},
toLogistics() {
@@ -87,49 +117,51 @@ export default {
}
}
.goods-info {
display: flex;
margin-bottom: 28rpx;
> image {
flex-shrink: 0;
width: 180rpx;
height: 160rpx;
border-radius: 10rpx;
margin-right: 30rpx;
}
.goods-text {
.goods-item {
display: flex;
flex-direction: column;
justify-content: space-between;
.goods-name {
font-size: 28rpx;
color: rgba(51,51,51,1);
line-height: 38rpx;
margin-bottom: 28rpx;
> image {
flex-shrink: 0;
width: 180rpx;
height: 160rpx;
border-radius: 10rpx;
margin-right: 30rpx;
}
.goods-sku {
max-width: 230rpx;
background: rgba(236,236,236,1);
border-radius: 6rpx;
padding: 10rpx 15rpx;
font-size: 24rpx;
color: rgba(153,153,153,1);
}
.goods-time {
font-size: 24rpx;
color: rgba(255,49,49,1);
}
.goods-price {
font-size: 24rpx;
color: rgba(253,211,96,1);
}
.goods-date {
.goods-text {
display: flex;
align-items: center;
font-size: 24rpx;
color: rgba(153,153,153,1);
> image {
width: 24rpx;
height: 24rpx;
margin-right: 21rpx;
flex-direction: column;
justify-content: space-between;
.goods-name {
font-size: 28rpx;
color: rgba(51,51,51,1);
line-height: 38rpx;
}
.goods-sku {
max-width: 230rpx;
background: rgba(236,236,236,1);
border-radius: 6rpx;
padding: 10rpx 15rpx;
font-size: 24rpx;
color: rgba(153,153,153,1);
}
.goods-time {
font-size: 24rpx;
color: rgba(255,49,49,1);
}
.goods-price {
font-size: 24rpx;
color: rgba(253,211,96,1);
}
.goods-date {
display: flex;
align-items: center;
font-size: 24rpx;
color: rgba(153,153,153,1);
> image {
width: 24rpx;
height: 24rpx;
margin-right: 21rpx;
}
}
}
}