功能完善 微信支付
This commit is contained in:
2023-03-03 08:45:56 +08:00
parent 1022c3ba03
commit 322aaf3b44
7 changed files with 1012 additions and 880 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -5,29 +5,36 @@
<scroll-view class="list-scroll-content" scroll-y>
<!-- 订单列表 -->
<view class="order-item">
<view class="i-top b-b">
<text class="state" :style="{ color: orderInfo.stateTipColor }">{{orderInfo.orderSn}}</text>
</view>
<view class="i-top b-b">
<text class="time">{{ orderInfo.createTime }}</text>
<!-- <text class="state" :style="{ color: orderInfo.stateTipColor }" @click="navToDetailPage(item)">{{ orderInfo.id }}--</text> -->
<text class="state"
:style="{ color: orderInfo.stateTipColor }">{{ orderInfo.stateTip }}</text>
<text v-if="orderInfo.status === 9" class="del-btn yticon icon-iconfontshanchu1"
@click="deleteOrder(index)"></text>
</view>
<view class="i-top b-b">
<text class="state" :style="{ color: orderInfo.stateTipColor }">订单商品</text>
</view>
<view v-if="goodsItem.type === 1" class="goods-box-single"
v-for="(goodsItem, goodsIndex) in orderInfo.orderItemList" :key="goodsIndex">
<img class="goods-img" :src="goodsItem.productPic" mode="aspectFill"></img>
<view class="right">
<text class="title clamp">{{ goodsItem.productName }}</text>
<text class="attr-box">{{ goodsItem.productAttr }} x
{{ goodsItem.productQuantity }}</text>
<text class="price">{{ goodsItem.productPrice }} </text>
<view class="num_price">
<text class="attr-box">x {{ goodsItem.productQuantity }}</text>
<text class="price">{{ goodsItem.productPrice }}</text>
</view>
<view style="display: flex;flex-direction: row;">
<text style="color: #c1c1c1;font-size: 13px;"
v-if="orderInfo.status === 5||orderInfo.status === 3">{{orderInfo.deliveryCompany}}</text>
<text style="color: #c1c1c1;font-size: 13px;"
v-if="orderInfo.status === 5||orderInfo.status === 3">{{ orderInfo.deliverySn }}</text>
</view>
</view>
</view>
<view class="i-top b-b">
<!-- <view class="i-top b-b">
<text class="state" :style="{ color: orderInfo.stateTipColor }">订单赠品</text>
</view>
<view v-if="goodsItem.type === 2" class="goods-box-single"
@@ -39,38 +46,41 @@
{{ goodsItem.productQuantity }}</text>
<text class="price">{{ goodsItem.productPrice }} </text>
</view>
</view>
</view> -->
<view style="display: flex;flex-direction: column; margin-right: 13px;margin-bottom: 10px;">
<view class="price-box">
<text class="num">{{ orderInfo.orderItemList.length }}</text>
件商品, 会员折扣
<text class="price">{{ orderInfo.vipAmount }}</text>
优惠券抵扣
, 优惠券抵扣
<text class="price">{{ orderInfo.couponAmount }}</text>
</view>
<view class="price-box">
积分抵扣
<text class="price">{{ orderInfo.integrationAmount }}</text>
,运费
, 运费
<text class="price">{{ orderInfo.freightAmount }}</text>
<view class="yt-list-cell b-b" v-if="groupActivity">
<!-- <view class="yt-list-cell b-b" v-if="groupActivity">
<text class="cell-tit clamp">活动金额</text>
<text class="cell-tip">{{ groupActivity.price }}</text>
</view>
,实付款
</view> -->
, 实付款
<text class="price">{{ orderInfo.payAmount }}</text>
</view>
<view class="action-box b-t">
</view>
<view class="action-box b-t" v-if="orderInfo.status==12||orderInfo.status==3">
<button v-if="orderInfo.status == 12" class="action-btn"
@click="cancelOrder(orderInfo)">取消订单</button>
<button v-if="orderInfo.status == 12" class="action-btn recom"
@click="payOrder(orderInfo)">立即支付</button>
<button v-if="orderInfo.status <7" class="action-btn recom"
@click="applyRefund(orderInfo.id)">申请售后</button>
<!-- <button v-if="orderInfo.status <7" class="action-btn recom"
@click="applyRefund(orderInfo.id)">申请售后</button> -->
<button v-if="orderInfo.status == 3" class="action-btn recom"
@click="confimDelivery(orderInfo)">确认收货</button>
<button class='action-btn recom' hover-class="btn-hover" v-if="orderInfo.status === 4"
@click="toEvaluate(orderInfo.id)">立即评价</button>
<!-- <button class='action-btn recom' hover-class="btn-hover" v-if="orderInfo.status === 4"
@click="toEvaluate(orderInfo.id)">立即评价</button>-->
</view>
</view>
</scroll-view>
@@ -101,7 +111,9 @@
data() {
return {
tabCurrentIndex: 0,
orderInfo: [],
orderInfo: {
orderItemList:[]
},
navList: [{
status: 0,
text: '全部',
@@ -143,6 +155,8 @@
this.orderInfo = await Api.apiCall('get', Api.order.orderDetail, params);
this.orderInfo = Object.assign(this.orderInfo, this.orderStateExp(this.orderInfo.status));
this.orderInfo.createTime = this.dateFormat(this.orderInfo.createTime);
console.log("data:------" + JSON.stringify(this.orderInfo))
console.log("data:------" + this.orderInfo.stateTip)
},
methods: {
@@ -233,15 +247,11 @@
orderStateExp(value) {
let stateTip = '',
stateTipColor = '#fa436a';
if (value === 12) {
stateTipColor = '#909399';
return '待付款';
}
if (value === 1) {
stateTipColor = '#909399';
return '支付成功,没有回掉';
}
if (value === 2) {
stateTip= '支付成功,没有回掉';
}else if (value === 2) {
stateTip = '待发货';
} else if (value === 3) {
stateTip = '待收货';
@@ -256,6 +266,9 @@
stateTip = ' 维权已完成';
} else if (value === 8) {
stateTip = '待分享';
}else if (value === 12) {
stateTipColor = '#909399';
stateTip= '待付款';
} else if (value === 13) {
stateTip = '申请退款';
} else if (value === 14) {
@@ -426,16 +439,23 @@
line-height: 1;
}
.num_price {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 5px;
.attr-box {
flex: 1;
font-size: $font-sm + 2upx;
color: $font-color-light;
padding: 10upx 12upx;
margin: 0 2upx 0 8upx;
}
.price {
font-size: $font-base + 2upx;
color: $font-color-dark;
&:before {
content: '¥';
font-size: $font-sm;
@@ -443,13 +463,13 @@
}
}
}
}
}
.price-box {
display: flex;
justify-content: flex-end;
align-items: baseline;
padding: 20upx 30upx;
font-size: $font-sm + 2upx;
color: $font-color-light;