优化+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',
success:(res)=>{
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)=>{
this.setData({
isShowOrderConfirm:false,
@ -241,7 +241,7 @@ Page({
wx.showTabBar({
success(){
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>
</page-container>
<modal-view titleText="你有订单未支付!" okButtonText="去支付" model:show="{{isShowPayModal}}" wx:if="{{isShowPayModal}}" bind:ok="navToUnPayOrder"/>

View File

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

View File

@ -3,7 +3,9 @@
<view class="top-content">
<image class="icon" src="/assets/icon/help/success@2x.png"/>
<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>
</view>
</view>

View File

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

View File

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

View File

@ -2,12 +2,12 @@
<scroll-view scroll-y refresher-enabled class="main" enhanced show-scrollbar="{{false}}"
bindrefresherrefresh="getOrderDetail" refresher-triggered="{{refresherTriggered}}">
<view class="order-status {{orderDetail.status}}">{{orderStatusKV[orderDetail.status]}}</view>
<view class="cancel-reason" wx:if="{{orderDetail.status==orderStatus.cancelled}}">
原因:<label class="reason">{{orderDetail.cancel_reason}}</label>
<view class="order-tips" wx:if="{{orderDetail.status==orderStatus.cancelled}}">
原因:<label class="tips">{{orderDetail.cancel_reason}}</label>
</view>
<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>
<view class="page-container sender" wx:if="{{orderDetail.deliveryman_user_id}}">
<view class="title">配送员</view>

View File

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

View File

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

View File

@ -63,18 +63,30 @@
font-size: 32rpx;
font-weight: 500;
}
.markup-money .money{
.markup-money .value{
font-size: 40rpx;
color: #FF0000;
}
.bottom-bar-v2 .btns{
display: flex;
gap: 24rpx;
align-items: center;
}
.bottom-bar-v2 .btns .cancel{
width:240rpx;
width:240rpx!important;
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{
flex:1;
font-weight: 500;
border: 0!important;
}