切换git

This commit is contained in:
2025-04-01 00:55:43 +08:00
parent 34ad2076f0
commit 747c1645ec
3 changed files with 20 additions and 23 deletions

View File

@ -13,7 +13,7 @@ Page({
qrcodeUrl:'',
lng:0,
lat:0,
merchantOrderStatus:shopApi.merchantOrderStatus,
orderStatus:shopApi.merchantOrderStatus,
merchantOrderStatusKV:shopApi.merchantOrderStatusKV,
genderKV:userApi.genderKV,
@ -46,24 +46,17 @@ Page({
onLoad(options) {
this.data.orderId = options.id;
this.setScrollViewHieght();
app.getLocation().then((data)=>{
this.setData({
lng:data.longitude,
lat:data.latitude,
});
this.getOrderDetail();
}).catch(()=>{
this.getOrderDetail();
});
},
setScrollViewHieght(){
const windowInfo = wx.getWindowInfo();
let height = windowInfo.windowHeight;
console.log(this.data.orderDetail.status==this.data.merchantOrderStatus.created,
this.data.orderDetail.status==this.data.merchantOrderStatus.unverified);
console.log(this.data.orderDetail.status==this.data.orderStatus.created,
this.data.orderDetail.status==this.data.orderStatus.unverified);
if(this.data.orderDetail&&this.data.orderDetail.id){
if(this.data.orderDetail.status==this.data.merchantOrderStatus.created||
this.data.orderDetail.status==this.data.merchantOrderStatus.unverified){
if(this.data.orderDetail.status==this.data.orderStatus.created||
this.data.orderDetail.status==this.data.orderStatus.unverified){
height = height - 94;
}
}
@ -96,7 +89,7 @@ Page({
orderDetail:data,
refresherTriggered:false
});
if(data.status==this.data.merchantOrderStatus.unverified){
if(data.status==this.data.orderStatus.unverified){
this.getQRCode();
}else{
this.setData({

View File

@ -87,11 +87,12 @@
<view class="bottom-bar-v2"
wx:if="{{orderDetail.status==merchantOrderStatus.created||orderDetail.status==merchantOrderStatus.unverified}}">
<!-- <button class="button button1" plain size="mini">取消订单</button> -->
<button type="primary" wx:if="{{orderDetail.status==merchantOrderStatus.created}}"
<button class="button btn-cancel" plain size="mini"
wx:if="{{orderDetail.order.status==orderStatus.created}}">取消订单</button>
<button class="button btn-pay" type="primary" wx:if="{{orderDetail.status.status==orderStatus.created}}"
bind:tap="pay">去支付</button>
<button class="button button2" plain size="mini" bind:tap="refund" loading="{{refunding}}"
wx:if="{{orderDetail.status==merchantOrderStatus.unverified}}">申请退款</button>
<button class="button btn-re-order" plain size="mini" bind:tap="refund" loading="{{refunding}}"
wx:if="{{orderDetail.order.status==orderStatus.complete}}">再来一单</button>
</view>
</view>
<merchant-order id="merchantOrderComponent" bind:paySuccess="paySuccess"/>

View File

@ -161,20 +161,23 @@
.bottom-bar-v2{
text-align: right;
display: flex;
justify-content:flex-end;
}
.bottom-bar-v2 .button{
line-height: 72rpx;
padding:0 36rpx;
font-weight: normal;
border-radius: 18rpx;
margin:0!important;
gap: 30rpx;
}
.bottom-bar-v2 .button1{
.bottom-bar-v2 .btn-cancel,.bottom-bar-v2 .btn-re-order{
color: #555555;
border: 1rpx solid rgba(153, 153, 153, 0.5);
font-size: 32rpx;
}
.bottom-bar-v2 .button2{
.bottom-bar-v2 .btn-pay{
font-size: 32rpx;
margin-left:30rpx;
flex:1;
}