|
|
|
@ -11,7 +11,8 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="tip"> |
|
|
|
|
<view v-if="homestayOrderData.orderStatus == '2'||homestayOrderData.orderStatus == '3'"> |
|
|
|
|
{{homestayOrderData.cancelReason}}</view> |
|
|
|
|
{{homestayOrderData.cancelReason}} |
|
|
|
|
</view> |
|
|
|
|
<view v-else>{{promptText(homestayOrderData.orderStatus)}}</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
@ -128,12 +129,11 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<u-popup :show="isPayPopup" mode="bottom" @close="isPayPopup = false" round="10"> |
|
|
|
|
<u-popup :show="isPayPopup" mode="bottom" @close="closePay" round="10"> |
|
|
|
|
<f-pay :show-title="false" :show="isPayPopup" :order="homestayOrderData" |
|
|
|
|
:payMoney="homestayOrderData.orderAmount" :tradeNo="homestayOrderData.orderNumber" |
|
|
|
|
@payResult="payResult"></f-pay> |
|
|
|
|
</u-popup> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -142,7 +142,6 @@ |
|
|
|
|
import uPopup from "../components/uview-ui/components/u-popup/u-popup.vue"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
|
|
|
|
components: { |
|
|
|
|
fPay, |
|
|
|
|
uPopup |
|
|
|
@ -222,16 +221,43 @@ |
|
|
|
|
}, |
|
|
|
|
//导航 |
|
|
|
|
navigation() { |
|
|
|
|
console.log("this.homestayOrderData",this.homestayOrderData) |
|
|
|
|
uni.openLocation({ |
|
|
|
|
latitude: Number(this.homestayOrderData.lat), |
|
|
|
|
longitude: Number(this.homestayOrderData.lon), |
|
|
|
|
longitude: Number(this.homestayOrderData.lng), |
|
|
|
|
name: this.homestayOrderData.hotelName, |
|
|
|
|
address: this.homestayOrderData.addressInfo, |
|
|
|
|
complete: function(result) { |
|
|
|
|
console.log(result); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
// #ifdef H5 |
|
|
|
|
if (this.$wechat.isWechat()) { |
|
|
|
|
var mapParam = { |
|
|
|
|
latitude: this.homestayOrderData.lat, |
|
|
|
|
longitude: this.homestayOrderData.lng, |
|
|
|
|
scale: 18, |
|
|
|
|
name: this.homestayOrderData.hotelName, |
|
|
|
|
address: this.homestayOrderData.addressInfo, |
|
|
|
|
}; |
|
|
|
|
this.$util.openLocation(mapParam); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
window.location.href = |
|
|
|
|
"https://uri.amap.com/navigation?from=" + |
|
|
|
|
this.$param.clng + |
|
|
|
|
"," + |
|
|
|
|
this.$param.clat + |
|
|
|
|
",我的位置&to=" + |
|
|
|
|
this.homestayOrderData.lng + |
|
|
|
|
"," + |
|
|
|
|
this.homestayOrderData.lat + |
|
|
|
|
"," + |
|
|
|
|
this.homestayOrderData.addressInfo + |
|
|
|
|
"&mode=walk&src=sjz_uniapp&callnative=1"; |
|
|
|
|
// #endif |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 根据订单状态反馈提示文字 |
|
|
|
|
promptText: function(val) { |
|
|
|
|
//订单状态 0未支付 1待确认 2已取消 3 预定失败 4预定成功 5 已入住 6已离店 7 退款中 8已退款 |
|
|
|
@ -240,7 +266,7 @@ |
|
|
|
|
return "酒店房间有限,请尽快支付,超时后订单将自动取消" |
|
|
|
|
break; |
|
|
|
|
case "1": |
|
|
|
|
return "等待商家确认汇总,请及时关注订单状态" |
|
|
|
|
return "等待商家确认中,请及时关注订单状态" |
|
|
|
|
break; |
|
|
|
|
case "2": |
|
|
|
|
return "订单超时未支付,请重新下单" |
|
|
|
@ -277,6 +303,13 @@ |
|
|
|
|
url: "/subPageC/orderHomestay/cancelStep?orderId=" + orderId |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
payOrder(val) { |
|
|
|
|
console.log("订单==========", val) |
|
|
|
|
|
|
|
|
|
this.isPayPopup = true |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//支付结果 |
|
|
|
|
payResult(data) { |
|
|
|
|
if (data.payStatus == 1) { |
|
|
|
@ -299,10 +332,21 @@ |
|
|
|
|
//uni.showToast({title: data.detail.errMsg,icon:'none'}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
payOrder(val) { |
|
|
|
|
console.log("订单==========", val) |
|
|
|
|
|
|
|
|
|
this.isPayPopup = true |
|
|
|
|
closePay() { |
|
|
|
|
let that = this |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '提示', |
|
|
|
|
content: '确定取消支付?', |
|
|
|
|
cancelText: '再想想', |
|
|
|
|
showCancel: true, |
|
|
|
|
success: function(res) { |
|
|
|
|
if (res.confirm) { |
|
|
|
|
that.isPayPopup = false |
|
|
|
|
} else if (res.cancel) { |
|
|
|
|
console.log('用户点击取消'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
stateImg: function(val) { |
|
|
|
@ -340,7 +384,7 @@ |
|
|
|
|
//取消订单 |
|
|
|
|
cacelOrder() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: "/subPageC/orderHomestay/orderCancel?orderId=" + this.homestayOrderData.orderNumber |
|
|
|
|
url: "/subPageC/orderHomestay/orderCancel?id=" + this.homestayOrderData.id |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
stateMessage: function(val) { |
|
|
|
|