【订单详情】

1、接入物流的单号展示
pull/1/MERGE
YunaiV 2023-08-13 20:13:00 +08:00
parent 1279ba6b5d
commit d68b24445a
4 changed files with 23 additions and 28 deletions

View File

@ -155,7 +155,7 @@
}); });
PayOrderApi.submitOrder({ PayOrderApi.submitOrder({
id: this.orderId, id: this.orderId,
channelCode1: channelCode, channelCode: channelCode,
returnUrl: this.getPayReturnUrl(), returnUrl: this.getPayReturnUrl(),
channelExtras: { // TODO channelExtras: { // TODO
// openid: "ockUAwIZ-0OeMZl9ogcZ4ILrGba0" // wx_pub openid // openid: "ockUAwIZ-0OeMZl9ogcZ4ILrGba0" // wx_pub openid

View File

@ -201,26 +201,19 @@
</view> </view>
<!-- 配送信息 --> <!-- 配送信息 -->
<view v-if="orderInfo.status !== 0"> <view v-if="orderInfo.logisticsId !== undefined">
<view class='wrapper borRadius14' v-if='orderInfo.deliveryType === 1'> <view class='wrapper borRadius14' v-if='orderInfo.logisticsId > 0'>
<view class='item acea-row row-between'> <view class='item acea-row row-between'>
<view>配送方式</view> <view>配送方式</view>
<view class='conter'>发货</view> <view class='conter'>发货</view>
</view> </view>
<!-- TODO 芋艿这里的字段对应 -->
<view class='item acea-row row-between'> <view class='item acea-row row-between'>
<view>快递公司</view> <view>快递公司</view>
<view class='conter'>{{ orderInfo.deliveryName || ''}}</view> <view class='conter'>{{ orderInfo.logisticsName || ''}}</view>
</view> </view>
<view class='item acea-row row-between'> <view class='item acea-row row-between'>
<view>快递号</view> <view>快递号</view>
<view class='conter'>{{ orderInfo.deliveryId || ''}}</view> <view class='conter'>{{ orderInfo.logisticsNo || ''}}</view>
</view>
</view>
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType === 2'>
<view class='item acea-row row-between'>
<view>配送方式</view>
<view class='conter'>门店自提</view>
</view> </view>
</view> </view>
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType === 0'> <view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType === 0'>
@ -438,20 +431,21 @@
title: '确认收货', title: '确认收货',
content: '为保障权益,请收到货确认无误后,再确认收货', content: '为保障权益,请收到货确认无误后,再确认收货',
success: (res) => { success: (res) => {
if (res.confirm) { if (!res.confirm) {
OrderApi.takeOrder(this.orderInfo.id).then(res => { return
return this.$util.Tips({
title: '收货成功',
icon: 'success'
}, () => {
this.getOrderInfo();
});
}).catch(err => {
return this.$util.Tips({
title: err
});
})
} }
OrderApi.takeOrder(this.orderInfo.id).then(res => {
return this.$util.Tips({
title: '收货成功',
icon: 'success'
}, () => {
this.getOrderInfo();
});
}).catch(err => {
return this.$util.Tips({
title: err
});
})
} }
}) })
}, },

View File

@ -46,6 +46,7 @@
<view class='font-color'>{{order.orderStatus}}</view> <view class='font-color'>{{order.orderStatus}}</view>
<view v-if="order.status === 0" class="font-color"></view> <view v-if="order.status === 0" class="font-color"></view>
<view v-else-if="order.status === 10 && order.deliveryType === 1" class="font-color">待发货</view> <view v-else-if="order.status === 10 && order.deliveryType === 1" class="font-color">待发货</view>
<!-- TODO 芋艿核销逻辑 -->
<view v-else-if="order._status === 10 && order.deliveryType === 2" class="font-color">待核销</view> <view v-else-if="order._status === 10 && order.deliveryType === 2" class="font-color">待核销</view>
<view v-else-if="order.status === 20" class="font-color">待收货</view> <view v-else-if="order.status === 20" class="font-color">待收货</view>
<view v-else-if="order.status === 30 && !order.commentStatus" class="font-color">待评价</view> <view v-else-if="order.status === 30 && !order.commentStatus" class="font-color">待评价</view>

View File

@ -59,10 +59,10 @@ function baseRequest(url, method, data, {
return new Promise((reslove, reject) => { return new Promise((reslove, reject) => {
uni.request({ uni.request({
// url: url.indexOf('app-api') < 0 ? Url + '/api/front/' + url // url: url.indexOf('app-api') < 0 ? Url + '/api/front/' + url
// : 'http://127.0.0.1:48080/' + url, // TODO 芋艿:搞个 url 的配置
url: url.indexOf('app-api') < 0 ? Url + '/api/front/' + url url: url.indexOf('app-api') < 0 ? Url + '/api/front/' + url
: 'http://yunai.natapp1.cc/' + url, // TODO 芋艿:搞个 url 的配置 // : 'http://yunai.natapp1.cc/' + url, // TODO 芋艿:搞个 url 的配置
method: method || 'GET', : 'http://127.0.0.1:48080/' + url, // TODO 芋艿:搞个 url 的配置
method: method || 'GET',
header: header, header: header,
data: data || {}, data: data || {},
success: (res) => { success: (res) => {