优化+bug

This commit is contained in:
2025-03-10 02:11:36 +08:00
parent 010f796196
commit 8b321d8d44
10 changed files with 44 additions and 29 deletions

View File

@ -229,7 +229,7 @@ Page({
key:'pre-order', key:'pre-order',
success:(res)=>{ success:(res)=>{
res.data.addressid = this.data.currentAddress.id; res.data.addressid = this.data.currentAddress.id;
res.data.community_id = this.data.currentCommunity.id; res.data.price_request.community_id = this.data.currentCommunity.id;
userApi.order.real(res.data).then((data)=>{ userApi.order.real(res.data).then((data)=>{
this.setData({ this.setData({
isShowOrderConfirm:false, isShowOrderConfirm:false,
@ -241,7 +241,7 @@ Page({
wx.showTabBar({ wx.showTabBar({
success(){ success(){
wx.navigateTo({ wx.navigateTo({
url: `/pages/help/success/index?id=${data.order.orderid}&success_text=${data.success_text}`, url: `/pages/help/success/index?id=${data.order.orderid}&success_text=${data.delivery_time}`,
}) })
} }
}); });

View File

@ -139,3 +139,4 @@ bind:enter="enterPageContainer" bind:leave="leavePageContainer" wx:if="{{isShowO
</view> </view>
</page-container> </page-container>
<modal-view titleText="你有订单未支付!" okButtonText="去支付" model:show="{{isShowPayModal}}" wx:if="{{isShowPayModal}}" bind:ok="navToUnPayOrder"/> <modal-view titleText="你有订单未支付!" okButtonText="去支付" model:show="{{isShowPayModal}}" wx:if="{{isShowPayModal}}" bind:ok="navToUnPayOrder"/>

View File

@ -80,6 +80,7 @@ Page({
}) })
return; return;
} }
console.log('this.data.sendType',this.data.sendType)
wx.setStorage({ wx.setStorage({
key:'pre-order', key:'pre-order',
data:{ data:{
@ -189,7 +190,7 @@ Page({
imgOrderCount = preOrder.price_request.pickup_images_count||0; imgOrderCount = preOrder.price_request.pickup_images_count||0;
} }
this.setData({ this.setData({
sendType:preOrder.delivery_method, sendType:preOrder.delivery_method||this.data.sendType,
stationList:data.items, stationList:data.items,
tempImgs, tempImgs,
imgOrderCount imgOrderCount

View File

@ -3,7 +3,9 @@
<view class="top-content"> <view class="top-content">
<image class="icon" src="/assets/icon/help/success@2x.png"/> <image class="icon" src="/assets/icon/help/success@2x.png"/>
<view class="title">恭喜下单成功</view> <view class="title">恭喜下单成功</view>
<view class="sub-title">{{successText}}</view> <view class="sub-title">
预计 <label class="red">{{successText}}</label> 送达,请注意查收!
</view>
<button class="button" plain bind:tap="navToOrderDetail">查看订单</button> <button class="button" plain bind:tap="navToOrderDetail">查看订单</button>
</view> </view>
</view> </view>

View File

@ -32,6 +32,10 @@ page{
color:#555555; color:#555555;
margin-top:40rpx; margin-top:40rpx;
} }
.sub-title .red{
color:#ff0000;
font-weight: 500;
}
.button{ .button{
border: 1.2rpx solid #999999!important; border: 1.2rpx solid #999999!important;
color:var(--main-font-color)!important; color:var(--main-font-color)!important;

View File

@ -1,4 +1,5 @@
import userApi from '../../../api/user'; import userApi from '../../../api/user';
const app = getApp();
Page({ Page({
/** /**
@ -73,21 +74,13 @@ Page({
prePage.refreshList(); prePage.refreshList();
}); });
}, },
//订单更改后上一个页面如果是订单列表,就刷新
refreshOrderList(){
const pages = getCurrentPages();
const prePage = pages[pages.length-2];
if(prePage&&prePage.refreshList){
prePage.refreshList();
}
},
pay(){ pay(){
const merchantPay = this.selectComponent('#merchantOrderComponent'); const merchantPay = this.selectComponent('#merchantOrderComponent');
merchantPay.createPayment(this.data.orderDetail.orderid,true); merchantPay.createPayment(this.data.orderDetail.orderid,true);
}, },
paySuccess(){ paySuccess(){
this.refreshOrderList();
this.getOrderDetail(); this.getOrderDetail();
app.globalData.needRefreshOrderList = true;
}, },
copyOrderId(){ copyOrderId(){
wx.setClipboardData({ wx.setClipboardData({

View File

@ -2,12 +2,12 @@
<scroll-view scroll-y refresher-enabled class="main" enhanced show-scrollbar="{{false}}" <scroll-view scroll-y refresher-enabled class="main" enhanced show-scrollbar="{{false}}"
bindrefresherrefresh="getOrderDetail" refresher-triggered="{{refresherTriggered}}"> bindrefresherrefresh="getOrderDetail" refresher-triggered="{{refresherTriggered}}">
<view class="order-status {{orderDetail.status}}">{{orderStatusKV[orderDetail.status]}}</view> <view class="order-status {{orderDetail.status}}">{{orderStatusKV[orderDetail.status]}}</view>
<view class="cancel-reason" wx:if="{{orderDetail.status==orderStatus.cancelled}}"> <view class="order-tips" wx:if="{{orderDetail.status==orderStatus.cancelled}}">
原因:<label class="reason">{{orderDetail.cancel_reason}}</label> 原因:<label class="tips">{{orderDetail.cancel_reason}}</label>
</view> </view>
<navigator url="/pages/order/markup/index?orderid={{orderDetail.orderid}}" <navigator url="/pages/order/markup/index?orderid={{orderDetail.orderid}}"
class="markup-tips right-arrow" wx:if="{{orderDetail.status==orderStatus.received&&orderDetail.order_additional_fee&&orderDetail.order_additional_fee.result=='PENDING'}}"> class="order-tips right-arrow" wx:if="{{orderDetail.status==orderStatus.received&&orderDetail.order_additional_fee&&orderDetail.order_additional_fee.result=='PENDING'}}">
配送员发起了加价申请,请点击查看 申请:<label class="tips">配送员发起了加价申请,请查看</label>
</navigator> </navigator>
<view class="page-container sender" wx:if="{{orderDetail.deliveryman_user_id}}"> <view class="page-container sender" wx:if="{{orderDetail.deliveryman_user_id}}">
<view class="title">配送员</view> <view class="title">配送员</view>

View File

@ -39,17 +39,18 @@
.order-status.COMPLETED::before,.order-status.CANCELLED::before{ .order-status.COMPLETED::before,.order-status.CANCELLED::before{
background-color:var(--main-font-color); background-color:var(--main-font-color);
} }
.cancel-reason,.markup-tips{ .order-tips{
background: rgba(255, 195, 0, 0.15); background-color: rgba(255, 195, 0, 0.1);
border-radius: 18rpx; border-radius: 18rpx;
padding:36rpx; padding:36rpx;
margin:20rpx; margin:20rpx;
color: var(--main-font-color); color: var(--main-font-color);
} }
.markup-tips.right-arrow::after{ .order-tips.right-arrow::after{
right:20rpx; right:20rpx;
color: #222222;
} }
.cancel-reason .reason{ .order-tips .tips{
font-weight: 500; font-weight: 500;
} }
.page-container .spliter{ .page-container .spliter{

View File

@ -34,21 +34,22 @@
</view> </view>
<view class="page-container markup-money"> <view class="page-container markup-money">
<view>加价金额</view> <view>加价金额</view>
<view class="money">{{applyDetail.additional_fee_amount}}</view> <view class="value">{{applyDetail.additional_fee_amount}}元</view>
</view> </view>
</scroll-view> </scroll-view>
<view class="bottom-bar-v2"> <view class="bottom-bar-v2">
<view class="btns"> <view class="btns">
<button loading="{{cancelling}}" disabled="{{cancelling}}" <button loading="{{cancelling}}" disabled="{{cancelling}}"
class="cancel" plain bind:tap="cancel">取消订单</button> class="cancel button" plain bind:tap="cancel">取消订单</button>
<button disabled="{{cancelling}}" class="accept" type="primary" <button disabled="{{cancelling}}" class="accept button" type="primary"
bind:tap="accept">同意</button> bind:tap="accept">同意</button>
</view> </view>
</view> </view>
</view> </view>
<modal-view titleText="你确定取消此订单吗?" wx:if="{{isShowCancelView}}" <modal-view titleText="你确定取消配送订单吗?" wx:if="{{isShowCancelView}}"
model:show="{{isShowCancelView}}" bind:ok="cancelOrder"></modal-view> model:show="{{isShowCancelView}}" bind:ok="cancelOrder"
cancel-button-text="再想想"></modal-view>
<modal-view titleText="你确定同意此次加价吗?" wx:if="{{isShowAcceptView}}" <modal-view titleText="你确定同意此次加价吗?" wx:if="{{isShowAcceptView}}"

View File

@ -63,18 +63,30 @@
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
} }
.markup-money .money{ .markup-money .value{
font-size: 40rpx; font-size: 40rpx;
color: #FF0000;
} }
.bottom-bar-v2 .btns{ .bottom-bar-v2 .btns{
display: flex; display: flex;
gap: 24rpx; gap: 24rpx;
align-items: center;
} }
.bottom-bar-v2 .btns .cancel{ .bottom-bar-v2 .btns .cancel{
width:240rpx; width:240rpx!important;
font-weight: normal; font-weight: normal;
border: 1rpx solid rgba(153, 153, 153, 0.5);
color: #555555;
}
.bottom-bar-v2 .btns .button{
box-sizing: border-box;
border-radius: 18rpx;
height:54px;
line-height:54px;
padding:0;
} }
.bottom-bar-v2 .btns .accept{ .bottom-bar-v2 .btns .accept{
flex:1; flex:1;
font-weight: 500; font-weight: 500;
border: 0!important;
} }