|
|
@ -2,9 +2,9 @@ |
|
|
|
<view class="v-order-list"> |
|
|
|
<view class="v-order-list"> |
|
|
|
<mescroll-uni :up="upOption" @down="downCallback" @up="upCallback" :fixed="false"> |
|
|
|
<mescroll-uni :up="upOption" @down="downCallback" @up="upCallback" :fixed="false"> |
|
|
|
<view class="list_item container-fluid m-b-24" v-for="(item,index) in orderList" |
|
|
|
<view class="list_item container-fluid m-b-24" v-for="(item,index) in orderList" |
|
|
|
@click="toHomeStayDetailPage(item.id)"> |
|
|
|
> |
|
|
|
<view class="item_title">{{item.hotelName}}</view> |
|
|
|
<view class="item_title">{{item.hotelName}}</view> |
|
|
|
<view class="row"> |
|
|
|
<view class="row" @click="toHomeStayDetailPage(item.id)"> |
|
|
|
<view class="item_image"> |
|
|
|
<view class="item_image"> |
|
|
|
<image class="img" :src="item.hotelLogo" mode="widthFix"></image> |
|
|
|
<image class="img" :src="item.hotelLogo" mode="widthFix"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -17,6 +17,9 @@ |
|
|
|
{{item.checkOutTime}} |
|
|
|
{{item.checkOutTime}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="content-price">总价:¥{{item.orderAmount}}</view> |
|
|
|
<view class="content-price">总价:¥{{item.orderAmount}}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item_content"> |
|
|
|
<view class="content-bottom"> |
|
|
|
<view class="content-bottom"> |
|
|
|
<view class="btn" v-if="item.orderStatus=='0'" @click="payOrder(item)">去支付</view> |
|
|
|
<view class="btn" v-if="item.orderStatus=='0'" @click="payOrder(item)">去支付</view> |
|
|
|
<view class="btn" v-if="item.orderStatus !='0' && item.orderStatus !='1'" |
|
|
|
<view class="btn" v-if="item.orderStatus !='0' && item.orderStatus !='1'" |
|
|
@ -24,13 +27,12 @@ |
|
|
|
<view class="btn" v-if="item.refundDisplay =='1'" @click="toRefundPage(item.id)">退款进度</view> |
|
|
|
<view class="btn" v-if="item.refundDisplay =='1'" @click="toRefundPage(item.id)">退款进度</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="tip-bage"></view> |
|
|
|
<view class="tip-bage"></view> |
|
|
|
<view class="tip-state m-t-12" v-if="item.orderStatus=='1'">等待商家确认中,请及时关注订单状态</view> |
|
|
|
<view class="tip-state m-t-12" v-if="item.orderStatus=='1'">等待商家确认中,请及时关注订单状态</view> |
|
|
|
<view class="state" :class="'type'+item.orderStatus">{{stateMessage(item.orderStatus)}}</view> |
|
|
|
<view class="state" :class="'type'+item.orderStatus">{{stateMessage(item.orderStatus)}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</mescroll-uni> |
|
|
|
</mescroll-uni> |
|
|
|
<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="orderInfo" :payMoney="orderInfo.orderAmount" |
|
|
|
<f-pay :show-title="false" :show="isPayPopup" :order="orderInfo" :payMoney="orderInfo.orderAmount" |
|
|
|
:tradeNo="orderInfo.orderNumber" @payResult="payResult"></f-pay> |
|
|
|
:tradeNo="orderInfo.orderNumber" @payResult="payResult"></f-pay> |
|
|
|
</u-popup> |
|
|
|
</u-popup> |
|
|
@ -80,10 +82,9 @@ |
|
|
|
//TODO: |
|
|
|
//TODO: |
|
|
|
this.judgeLogin() |
|
|
|
this.judgeLogin() |
|
|
|
}, |
|
|
|
}, |
|
|
|
onUnload: function() { |
|
|
|
onShow() { |
|
|
|
uni.navigateTo({ |
|
|
|
this.param.pageNo = 1 |
|
|
|
url: '/pages/personcenter/personcenter' |
|
|
|
this.loadData() |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
stateMessage: function(val) { |
|
|
|
stateMessage: function(val) { |
|
|
@ -146,17 +147,17 @@ |
|
|
|
title: '支付成功', |
|
|
|
title: '支付成功', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none' |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.isPayPopup = false |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
uni.navigateTo({ |
|
|
|
this.isPayPopup = false |
|
|
|
url: "/subPageC/orderHomestay/orderList" |
|
|
|
this.param.pageNo = 1 |
|
|
|
}); |
|
|
|
this.loadData() |
|
|
|
}, 1000) |
|
|
|
}, 1000) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '支付失败', |
|
|
|
title: '支付失败', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.isPayPopup = false |
|
|
|
} |
|
|
|
} |
|
|
|
//uni.showToast({title: data.detail.errMsg,icon:'none'}); |
|
|
|
//uni.showToast({title: data.detail.errMsg,icon:'none'}); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -165,14 +166,12 @@ |
|
|
|
// TODO: 需从缓存获取appId openId |
|
|
|
// TODO: 需从缓存获取appId openId |
|
|
|
const userInfo = uni.getStorageSync("userInfo"); |
|
|
|
const userInfo = uni.getStorageSync("userInfo"); |
|
|
|
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {}; |
|
|
|
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {}; |
|
|
|
console.log(uni.getExtConfigSync(), 'extConfigextConfigextConfig') |
|
|
|
|
|
|
|
let appId = extConfig.app_id |
|
|
|
let appId = extConfig.app_id |
|
|
|
|
|
|
|
|
|
|
|
this.param.openid = userInfo.openid |
|
|
|
this.param.openid = userInfo.openid |
|
|
|
this.param.appid = appId |
|
|
|
this.param.appid = appId |
|
|
|
|
|
|
|
|
|
|
|
this.$Request.get(this.$config.getHomestayOrderList, this.param, null, null, false, true).then((res) => { |
|
|
|
this.$Request.get(this.$config.getHomestayOrderList, this.param, null, null, false, true).then((res) => { |
|
|
|
console.log("bbbbb") |
|
|
|
|
|
|
|
const curPageData = res.data.list || [] // 当前页数据 |
|
|
|
const curPageData = res.data.list || [] // 当前页数据 |
|
|
|
if (this.mescroll.num == 1) this.orderList = []; // 第一页需手动制空列表 |
|
|
|
if (this.mescroll.num == 1) this.orderList = []; // 第一页需手动制空列表 |
|
|
|
curPageData.forEach((item, index) => { |
|
|
|
curPageData.forEach((item, index) => { |
|
|
@ -192,6 +191,23 @@ |
|
|
|
console.log("订单==========", this.orderInfo) |
|
|
|
console.log("订单==========", this.orderInfo) |
|
|
|
this.isPayPopup = true |
|
|
|
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('用户点击取消'); |
|
|
|
|
|
|
|
this.isPayPopup=false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 跳转民宿订单详情页 |
|
|
|
// 跳转民宿订单详情页 |
|
|
|
toHomeStayDetailPage(id) { |
|
|
|
toHomeStayDetailPage(id) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
@ -241,7 +257,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
.item_image { |
|
|
|
.item_image { |
|
|
|
width: 180rpx; |
|
|
|
width: 180rpx; |
|
|
|
height: 200rpx; |
|
|
|
height: 150rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
overflow: hidden; |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
|
|