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

View File

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

View File

@ -161,20 +161,23 @@
.bottom-bar-v2{ .bottom-bar-v2{
text-align: right; display: flex;
justify-content:flex-end;
} }
.bottom-bar-v2 .button{ .bottom-bar-v2 .button{
line-height: 72rpx; line-height: 72rpx;
padding:0 36rpx; padding:0 36rpx;
font-weight: normal; font-weight: normal;
border-radius: 18rpx; 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; color: #555555;
border: 1rpx solid rgba(153, 153, 153, 0.5); border: 1rpx solid rgba(153, 153, 153, 0.5);
font-size: 32rpx; font-size: 32rpx;
} }
.bottom-bar-v2 .button2{ .bottom-bar-v2 .btn-pay{
font-size: 32rpx; font-size: 32rpx;
margin-left:30rpx; flex:1;
} }