parent
20460279a9
commit
3ce0271116
@ -1,151 +1,151 @@ |
|||||||
<template> |
<template> |
||||||
<view class="v-order-cancel"> |
<view class="v-order-cancel"> |
||||||
<view class="v-card container-fluid"> |
<view class="v-card container-fluid"> |
||||||
<view class="row v-timeline-title"> |
<view class="row v-timeline-title"> |
||||||
<view>退款金额:</view> |
<view>退款金额:</view> |
||||||
<view class="price"> |
<view class="price"> |
||||||
<text class="num_pr">¥</text><text class="num_jd">{{homestayOrderRefund.sumRefundPrice}}</text> |
<text class="num_pr">¥</text><text class="num_jd">{{homestayOrderRefund.sumRefundPrice}}</text> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="row v-timeline-title m-t-24">退款进度</view> |
<view class="row v-timeline-title m-t-24">退款进度</view> |
||||||
<view class="v-timeline m-t-24"> |
<view class="v-timeline m-t-24"> |
||||||
<view class="v-timeline-item" v-for="item in homestayOrderRefund.list"> |
<view class="v-timeline-item" v-for="item in homestayOrderRefund.list"> |
||||||
<view class="v-timeline-item__content">{{item.refundName}}</view> |
<view class="v-timeline-item__content">{{item.refundName}}</view> |
||||||
<view class="v-timeline-item__timestamp">{{parseTime(item.refundTime,'{y}-{m}-{d} {h}:{i}:{s}')}} |
<view class="v-timeline-item__timestamp">{{parseTime(item.refundTime,'{y}-{m}-{d} {h}:{i}:{s}')}} |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
import { |
import { |
||||||
parseTime |
parseTime |
||||||
} from "@/common/util"; |
} from "@/common/util"; |
||||||
export default { |
export default { |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
homestayOrderRefund: {} |
homestayOrderRefund: {} |
||||||
} |
} |
||||||
}, |
}, |
||||||
onLoad(option) { |
onLoad(option) { |
||||||
console.log(option.orderId) |
console.log(option.orderId) |
||||||
this.getInitPage(option.orderId) |
this.getInitPage(option.orderId) |
||||||
}, |
}, |
||||||
methods: { |
methods: { |
||||||
getInitPage(orderId) { |
getInitPage(orderId) { |
||||||
let data = { |
let data = { |
||||||
'orderId': orderId |
'orderId': orderId |
||||||
} |
} |
||||||
this.$Request.get(this.$config.getHomestayOrderRefund, data, null, null, false, true).then((res) => { |
this.$Request.get(this.$config.getMerchantRefundLog, data, null, null, false, true).then((res) => { |
||||||
console.log(res) |
console.log(res) |
||||||
if (res.code == 0) { |
if (res.code == 0) { |
||||||
this.homestayOrderRefund = res.data |
this.homestayOrderRefund = res.data |
||||||
} else { |
} else { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: res.data, |
title: res.data, |
||||||
icon: 'none', |
icon: 'none', |
||||||
duration: 2000 |
duration: 2000 |
||||||
}) |
}) |
||||||
} |
} |
||||||
}); |
}); |
||||||
}, |
}, |
||||||
parseTime(val, par) { |
parseTime(val, par) { |
||||||
return parseTime(val, par) |
return parseTime(val, par) |
||||||
}, |
}, |
||||||
|
|
||||||
} |
} |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss"> |
<style lang="scss"> |
||||||
/*每个页面公共css */ |
/*每个页面公共css */ |
||||||
@import '@/static/css/common.scss'; |
@import '@/static/css/common.scss'; |
||||||
|
|
||||||
.v-timeline-title { |
.v-timeline-title { |
||||||
font-size: 30rpx; |
font-size: 30rpx; |
||||||
color: #1B1B1B; |
color: #1B1B1B; |
||||||
|
|
||||||
.price { |
.price { |
||||||
.num_pr { |
.num_pr { |
||||||
font-size: 24rpx; |
font-size: 24rpx; |
||||||
color: #e02222; |
color: #e02222; |
||||||
} |
} |
||||||
|
|
||||||
.num_jd { |
.num_jd { |
||||||
margin: 0 4rpx; |
margin: 0 4rpx; |
||||||
font-size: 40rpx; |
font-size: 40rpx; |
||||||
color: #e02222; |
color: #e02222; |
||||||
font-weight: bold; |
font-weight: bold; |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.v-timeline { |
.v-timeline { |
||||||
padding: 20rpx; |
padding: 20rpx; |
||||||
background-color: rgba(250, 251, 255, 1); |
background-color: rgba(250, 251, 255, 1); |
||||||
|
|
||||||
.v-timeline-item { |
.v-timeline-item { |
||||||
position: relative; |
position: relative; |
||||||
padding: 0 30rpx 20rpx 30rpx; |
padding: 0 30rpx 20rpx 30rpx; |
||||||
margin-bottom: 20rpx; |
margin-bottom: 20rpx; |
||||||
|
|
||||||
&:before { |
&:before { |
||||||
content: ""; |
content: ""; |
||||||
position: absolute; |
position: absolute; |
||||||
left: -10rpx; |
left: -10rpx; |
||||||
top: 10rpx; |
top: 10rpx; |
||||||
z-index: 1; |
z-index: 1; |
||||||
height: 20rpx; |
height: 20rpx; |
||||||
width: 20rpx; |
width: 20rpx; |
||||||
border-radius: 20rpx; |
border-radius: 20rpx; |
||||||
background-color: #0983FF; |
background-color: #0983FF; |
||||||
} |
} |
||||||
|
|
||||||
&:after { |
&:after { |
||||||
content: ""; |
content: ""; |
||||||
position: absolute; |
position: absolute; |
||||||
left: 0; |
left: 0; |
||||||
top: 15rpx; |
top: 15rpx; |
||||||
height: 100%; |
height: 100%; |
||||||
width: 1rpx; |
width: 1rpx; |
||||||
background-color: #eeeeee; |
background-color: #eeeeee; |
||||||
} |
} |
||||||
|
|
||||||
.v-timeline-item__content { |
.v-timeline-item__content { |
||||||
font-size: 28rpx; |
font-size: 28rpx; |
||||||
color: #1B1B1B; |
color: #1B1B1B; |
||||||
} |
} |
||||||
|
|
||||||
.v-timeline-item__tip { |
.v-timeline-item__tip { |
||||||
margin: 8rpx 0; |
margin: 8rpx 0; |
||||||
font-size: 26rpx; |
font-size: 26rpx; |
||||||
color: #1B1B1B; |
color: #1B1B1B; |
||||||
} |
} |
||||||
|
|
||||||
.v-timeline-item__timestamp { |
.v-timeline-item__timestamp { |
||||||
font-size: 24rpx; |
font-size: 24rpx; |
||||||
color: #808080; |
color: #808080; |
||||||
} |
} |
||||||
|
|
||||||
&.active { |
&.active { |
||||||
.v-timeline-item__content { |
.v-timeline-item__content { |
||||||
color: #0983FF; |
color: #0983FF; |
||||||
} |
} |
||||||
|
|
||||||
&:after { |
&:after { |
||||||
display: none; |
display: none; |
||||||
} |
} |
||||||
|
|
||||||
&:before { |
&:before { |
||||||
width: 30rpx; |
width: 30rpx; |
||||||
height: 30rpx; |
height: 30rpx; |
||||||
border-radius: 30rpx; |
border-radius: 30rpx; |
||||||
top: 0; |
top: 0; |
||||||
left: -15rpx; |
left: -15rpx; |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
</style> |
</style> |
@ -1,139 +1,139 @@ |
|||||||
<template> |
<template> |
||||||
<view class="v-order-cancel"> |
<view class="v-order-cancel"> |
||||||
<view class="v-card container-fluid"> |
<view class="v-card container-fluid"> |
||||||
<view class="v-order-title">取消原因<text class="text">*</text></view> |
<view class="v-order-title">取消原因<text class="text">*</text></view> |
||||||
<view class="v-order-tip">请告知取消原因,我们将努力改善服务</view> |
<view class="v-order-tip">请告知取消原因,我们将努力改善服务</view> |
||||||
<view class="v-order-cancel-list"> |
<view class="v-order-cancel-list"> |
||||||
|
|
||||||
<radio-group @change="radioChange"> |
<radio-group @change="radioChange"> |
||||||
<label class="list_item row" v-for="(item, index) in cancelList" :key="item.value"> |
<label class="list_item row" v-for="(item, index) in cancelList" :key="item.value"> |
||||||
<view class="label col">{{item.label}}</view> |
<view class="label col">{{item.label}}</view> |
||||||
<view> |
<view> |
||||||
<radio color="#0983ff" :value="item.value" :checked="item.value === current" /> |
<radio color="#0983ff" :value="item.value" :checked="item.value === current" /> |
||||||
</view> |
</view> |
||||||
</label> |
</label> |
||||||
</radio-group> |
</radio-group> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="v-cancel-bottom"> |
<view class="v-cancel-bottom"> |
||||||
<view class="btn" @click="submit">确认取消订单</view> |
<view class="btn" @click="submit">确认取消订单</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
export default { |
export default { |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
cancelList: [], |
cancelList: [], |
||||||
current: "1", |
current: "1", |
||||||
orderId: undefined |
orderId: undefined |
||||||
} |
} |
||||||
}, |
}, |
||||||
onLoad(options) { |
onLoad(options) { |
||||||
this.orderId = options.id |
this.orderId = options.id |
||||||
this.getInitPage() |
this.getInitPage() |
||||||
}, |
}, |
||||||
|
|
||||||
methods: { |
methods: { |
||||||
getInitPage(id) { |
getInitPage(id) { |
||||||
this.$Request.get(this.$config.getDictDataList, null, null, null, false, true).then((res) => { |
this.$Request.get(this.$config.getMerchantDictDataList, null, null, null, false, true).then((res) => { |
||||||
this.cancelList = res.data |
this.cancelList = res.data |
||||||
}).catch(() => { |
}).catch(() => { |
||||||
|
|
||||||
}); |
}); |
||||||
}, |
}, |
||||||
radioChange: function(evt) { |
radioChange: function(evt) { |
||||||
for (let i = 0; i < this.cancelList.length; i++) { |
for (let i = 0; i < this.cancelList.length; i++) { |
||||||
if (this.cancelList[i].value === evt.detail.value) { |
if (this.cancelList[i].value === evt.detail.value) { |
||||||
this.current = evt.detail.value; |
this.current = evt.detail.value; |
||||||
break; |
break; |
||||||
} |
} |
||||||
} |
} |
||||||
}, |
}, |
||||||
submit() { |
submit() { |
||||||
const userInfo = uni.getStorageSync("userInfo"); |
const userInfo = uni.getStorageSync("userInfo"); |
||||||
let parame = { |
let parame = { |
||||||
id: this.orderId, |
orderId: this.orderId, |
||||||
openid: userInfo.openid, |
openid: userInfo.openid, |
||||||
cancelType: this.current, |
cancelType: this.current, |
||||||
} |
} |
||||||
|
|
||||||
this.$Request.get(this.$config.userCancelUpdateOrder, parame, null, null, false, null).then((res) => { |
this.$Request.get(this.$config.getMerchantOrderCancelOrder, parame, null, null, false, true).then((res) => { |
||||||
if (res.code == "0") { |
if (res.code == "0") { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: '订单取消成功', |
title: '订单取消成功', |
||||||
icon: 'none' |
icon: 'none' |
||||||
}); |
}); |
||||||
setTimeout(() => { |
setTimeout(() => { |
||||||
uni.navigateBack({ |
uni.navigateBack({ |
||||||
delta: 2 |
delta: 2 |
||||||
}); |
}); |
||||||
}, 1000) |
}, 1000) |
||||||
} else { |
} else { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: '订单取消失败,请稍后重试', |
title: '订单取消失败,请稍后重试', |
||||||
icon: 'none' |
icon: 'none' |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
}).catch(() => { |
}).catch(() => { |
||||||
|
|
||||||
}); |
}); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss"> |
<style lang="scss"> |
||||||
.v-order-title { |
.v-order-title { |
||||||
font-size: 32rpx; |
font-size: 32rpx; |
||||||
|
|
||||||
.text { |
.text { |
||||||
color: #E02222; |
color: #E02222; |
||||||
margin-left: 8rpx; |
margin-left: 8rpx; |
||||||
} |
} |
||||||
|
|
||||||
margin-bottom: 24rpx; |
margin-bottom: 24rpx; |
||||||
font-weight: bold; |
font-weight: bold; |
||||||
} |
} |
||||||
|
|
||||||
.v-order-tip { |
.v-order-tip { |
||||||
font-size: 24rpx; |
font-size: 24rpx; |
||||||
color: #999999; |
color: #999999; |
||||||
} |
} |
||||||
|
|
||||||
.v-order-cancel-list { |
.v-order-cancel-list { |
||||||
padding: 2rpx 30rpx; |
padding: 2rpx 30rpx; |
||||||
margin-top: 20rpx; |
margin-top: 20rpx; |
||||||
border-radius: 10rpx; |
border-radius: 10rpx; |
||||||
background: linear-gradient(to bottom, rgba(9, 131, 255, .05), transparent); |
background: linear-gradient(to bottom, rgba(9, 131, 255, .05), transparent); |
||||||
|
|
||||||
.list_item { |
.list_item { |
||||||
margin: 30rpx 0; |
margin: 30rpx 0; |
||||||
|
|
||||||
.label { |
.label { |
||||||
font-size: 28rpx; |
font-size: 28rpx; |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.v-cancel-bottom { |
.v-cancel-bottom { |
||||||
position: fixed; |
position: fixed; |
||||||
bottom: 30rpx; |
bottom: 30rpx; |
||||||
left: 0; |
left: 0; |
||||||
width: 100%; |
width: 100%; |
||||||
padding: 24rpx 32rpx; |
padding: 24rpx 32rpx; |
||||||
box-sizing: border-box; |
box-sizing: border-box; |
||||||
|
|
||||||
.btn { |
.btn { |
||||||
font-size: 30rpx; |
font-size: 30rpx; |
||||||
height: 88rpx; |
height: 88rpx; |
||||||
line-height: 88rpx; |
line-height: 88rpx; |
||||||
border-radius: 88rpx; |
border-radius: 88rpx; |
||||||
color: #fff; |
color: #fff; |
||||||
text-align: center; |
text-align: center; |
||||||
background: linear-gradient(to right, #0983FF, #57ABFF); |
background: linear-gradient(to right, #0983FF, #57ABFF); |
||||||
} |
} |
||||||
} |
} |
||||||
</style> |
</style> |
File diff suppressed because it is too large
Load Diff
@ -1,370 +1,365 @@ |
|||||||
<template> |
<template> |
||||||
<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" |
||||||
> |
> |
||||||
<view class="item_title">{{item.hotelName}}</view> |
<view class="item_title">{{item.merchantName}}</view> |
||||||
<view class="row" @click="toHomeStayDetailPage(item.id)"> |
<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.picUrls" mode="widthFix"></image> |
||||||
</view> |
</view> |
||||||
<view class="item_content col"> |
<view class="item_content col"> |
||||||
<view class="content-title">{{item.houseName}}</view> |
<!-- <view class="content-title">{{item.merchantName}}</view>--> |
||||||
<view class="content-date">{{item.checkTime}} |
<view class="content-date">{{item.goodsName}}¥{{item.goodsPrice}} |
||||||
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-data-line.png" |
* |
||||||
mode="widthFix"> |
<!-- <image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-data-line.png" |
||||||
</image> |
mode="widthFix"> |
||||||
{{item.checkOutTime}} |
</image> --> |
||||||
</view> |
{{item.goodsNum}} |
||||||
<view class="content-price">总价:¥{{item.orderAmount}}</view> |
</view> |
||||||
</view> |
<view class="content-price">总价:¥{{item.orderAmount}}</view> |
||||||
</view> |
</view> |
||||||
<view class="item_content"> |
</view> |
||||||
<view class="content-bottom"> |
<view class="item_content"> |
||||||
<view class="btn" v-if="item.orderStatus=='0'" @click="payOrder(item)">去支付</view> |
<view class="content-bottom"> |
||||||
<view class="btn" v-if="item.orderStatus !='0' && item.orderStatus !='1'" |
<view class="btn" v-if="item.orderStatus=='0'" @click="payOrder(item)">去支付</view> |
||||||
@click="toHomeStayBookingPage(item.hotelId)">再次预定</view> |
<view class="btn" v-if="item.orderStatus !='0' && item.orderStatus !='1'" |
||||||
<view class="btn" v-if="item.refundDisplay =='1'" @click="toRefundPage(item.id)">退款进度</view> |
@click="toHomeStayBookingPage(item.hotelId)">再次购买</view> |
||||||
</view> |
<view class="btn" v-if="item.refundDisplay =='1'" @click="toRefundPage(item.id)">退款进度</view> |
||||||
</view> |
</view> |
||||||
<view class="tip-bage"></view> |
</view> |
||||||
<view class="tip-state m-t-12" v-if="item.orderStatus=='1'">等待商家确认中,请及时关注订单状态</view> |
<view class="tip-bage"></view> |
||||||
<view class="state" :class="'type'+item.orderStatus">{{stateMessage(item.orderStatus)}}</view> |
<view class="tip-state m-t-12" v-if="item.orderStatus=='1'">等待商家接单中,请及时关注订单状态</view> |
||||||
</view> |
<view class="state" :class="'type'+item.orderStatus">{{stateMessage(item.orderStatus)}}</view> |
||||||
</mescroll-uni> |
</view> |
||||||
<u-popup :show="isPayPopup" mode="bottom" @close="closePay" round="10"> |
</mescroll-uni> |
||||||
<f-pay :show-title="false" :show="isPayPopup" :order="orderInfo" :payMoney="orderInfo.orderAmount" |
<u-popup :show="isPayPopup" mode="bottom" @close="closePay" round="10"> |
||||||
:tradeNo="orderInfo.orderNumber" @payResult="payResult"></f-pay> |
<f-pay :show-title="false" :show="isPayPopup" :order="orderInfo" :payMoney="orderInfo.orderAmount" |
||||||
</u-popup> |
:tradeNo="orderInfo.orderNumber" @payResult="payResult"></f-pay> |
||||||
|
</u-popup> |
||||||
|
|
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
import fPay from "../components/f-pay/f-pay"; |
import fPay from "../components/f-pay/f-pay"; |
||||||
import uPopup from "../components/uview-ui/components/u-popup/u-popup.vue"; |
import uPopup from "../components/uview-ui/components/u-popup/u-popup.vue"; |
||||||
|
|
||||||
import MescrollUni from '@/components/mescroll-diy/mescroll-xinlang.vue'; |
import MescrollUni from '@/components/mescroll-diy/mescroll-xinlang.vue'; |
||||||
export default { |
export default { |
||||||
components: { |
components: { |
||||||
MescrollUni, |
MescrollUni, |
||||||
fPay, |
fPay, |
||||||
uPopup |
uPopup |
||||||
}, |
}, |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
rootPath: this.$config.ROOTPATH, |
rootPath: this.$config.ROOTPATH, |
||||||
//是否支付弹窗 |
//是否支付弹窗 |
||||||
isPayPopup: false, |
isPayPopup: false, |
||||||
//滚动 |
//滚动 |
||||||
downOption: { |
downOption: { |
||||||
auto: false //是否在初始化完毕之后自动执行下拉回调callback; 默认true |
auto: false //是否在初始化完毕之后自动执行下拉回调callback; 默认true |
||||||
}, |
}, |
||||||
upOption: { |
upOption: { |
||||||
auto: true //是否在初始化完毕之后自动执行下拉回调callback; 默认true |
auto: true //是否在初始化完毕之后自动执行下拉回调callback; 默认true |
||||||
}, |
}, |
||||||
mescroll: '', |
mescroll: '', |
||||||
param: { |
param: { |
||||||
pageSize: 10, |
pageSize: 10, |
||||||
pageNo: 1, |
pageNo: 1, |
||||||
noData: false, |
noData: false, |
||||||
loading: false, |
loading: false, |
||||||
finished: false, |
finished: false, |
||||||
openid: undefined, |
openid: undefined, |
||||||
appid: undefined, |
appid: undefined, |
||||||
}, |
}, |
||||||
orderList: [], |
orderList: [], |
||||||
list: [], //商品数据 |
list: [], //商品数据 |
||||||
orderInfo: undefined, |
orderInfo: undefined, |
||||||
} |
} |
||||||
}, |
}, |
||||||
onLoad() { |
onLoad() { |
||||||
//TODO: |
//TODO: |
||||||
this.judgeLogin() |
this.judgeLogin() |
||||||
}, |
}, |
||||||
onShow() { |
onShow() { |
||||||
this.param.pageNo = 1 |
this.param.pageNo = 1 |
||||||
this.loadData() |
this.loadData() |
||||||
}, |
}, |
||||||
methods: { |
methods: { |
||||||
stateMessage: function(val) { |
stateMessage: function(val) { |
||||||
//订单状态 0未支付 1已支付 2已取消 3 预定失败 4预定成功 5 已入住 6已离店 7 退款中 8已退款 |
//订单状态 0未支付 1已支付 2已取消 3 预定失败 4预定成功 5 已入住 6已离店 7 退款中 8已退款 |
||||||
switch (val) { |
switch (val) { |
||||||
case "0": |
case "0": |
||||||
return "待支付" |
return "待支付" |
||||||
break; |
break; |
||||||
case "1": |
case "1": |
||||||
return "待确认" |
return "待确认" |
||||||
break; |
break; |
||||||
case "2": |
case "2": |
||||||
return "已取消" |
return "已取消" |
||||||
break; |
break; |
||||||
case "3": |
case "3": |
||||||
return "预订失败" |
return "退款中" |
||||||
break; |
break; |
||||||
case "4": |
case "4": |
||||||
return "预订成功" |
return "已退款" |
||||||
break; |
break; |
||||||
case "5": |
case "5": |
||||||
return "已入住" |
return "商家接单" |
||||||
break; |
break; |
||||||
case "6": |
case "6": |
||||||
return "已离店" |
return "交易完成" |
||||||
break; |
break; |
||||||
case "7": |
} |
||||||
return "退款中" |
}, |
||||||
break; |
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */ |
||||||
case "8": |
/*下拉刷新的回调 */ |
||||||
return "已退款" |
downCallback(mescroll) { |
||||||
break; |
this.mescroll = mescroll |
||||||
} |
this.param.pageNo = 1 |
||||||
}, |
this.loadData(); |
||||||
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */ |
// #ifdef H5 |
||||||
/*下拉刷新的回调 */ |
this.top = uni.upx2px(100 + 88) + 'px'; // H5的高度需加上 88的标题栏 |
||||||
downCallback(mescroll) { |
// #endif |
||||||
this.mescroll = mescroll |
// #ifndef H5 |
||||||
this.param.pageNo = 1 |
this.top = uni.upx2px(100) + 'px'; // 非H5不必加 |
||||||
this.loadData(); |
// #endif |
||||||
// #ifdef H5 |
setTimeout(() => { |
||||||
this.top = uni.upx2px(100 + 88) + 'px'; // H5的高度需加上 88的标题栏 |
this.mescroll.endSuccess(); |
||||||
// #endif |
this.top = 0; |
||||||
// #ifndef H5 |
}, 2500); |
||||||
this.top = uni.upx2px(100) + 'px'; // 非H5不必加 |
}, |
||||||
// #endif |
upCallback(mescroll) { |
||||||
setTimeout(() => { |
this.mescroll = mescroll |
||||||
this.mescroll.endSuccess(); |
this.param.pageNo = this.mescroll.num |
||||||
this.top = 0; |
this.loadData(); |
||||||
}, 2500); |
}, |
||||||
}, |
//支付结果 |
||||||
upCallback(mescroll) { |
payResult(data) { |
||||||
this.mescroll = mescroll |
if (data.payStatus == 1) { |
||||||
this.param.pageNo = this.mescroll.num |
uni.showToast({ |
||||||
this.loadData(); |
title: '支付成功', |
||||||
}, |
icon: 'none' |
||||||
//支付结果 |
}); |
||||||
payResult(data) { |
setTimeout(() => { |
||||||
if (data.payStatus == 1) { |
this.isPayPopup = false |
||||||
uni.showToast({ |
this.param.pageNo = 1 |
||||||
title: '支付成功', |
this.loadData() |
||||||
icon: 'none' |
}, 1000) |
||||||
}); |
} else { |
||||||
setTimeout(() => { |
uni.showToast({ |
||||||
this.isPayPopup = false |
title: '支付失败', |
||||||
this.param.pageNo = 1 |
icon: 'none' |
||||||
this.loadData() |
}); |
||||||
}, 1000) |
this.isPayPopup = false |
||||||
} else { |
} |
||||||
uni.showToast({ |
//uni.showToast({title: data.detail.errMsg,icon:'none'}); |
||||||
title: '支付失败', |
}, |
||||||
icon: 'none' |
// 下拉刷新 |
||||||
}); |
loadData() { |
||||||
this.isPayPopup = false |
// TODO: 需从缓存获取appId openId |
||||||
} |
const userInfo = uni.getStorageSync("userInfo"); |
||||||
//uni.showToast({title: data.detail.errMsg,icon:'none'}); |
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {}; |
||||||
}, |
let appId = extConfig.app_id |
||||||
// 下拉刷新 |
this.param.openid = userInfo.openid |
||||||
loadData() { |
this.param.appid = appId |
||||||
// TODO: 需从缓存获取appId openId |
// this.param.openid = "oohzD5b7g4hNA1qJyAwlSA5H4NCY" |
||||||
const userInfo = uni.getStorageSync("userInfo"); |
// this.param.appid = 23 |
||||||
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {}; |
this.$Request.get(this.$config.getMerchantOrderList, this.param, null, null, false, true).then((res) => { |
||||||
let appId = extConfig.app_id |
const curPageData = res.data.list || [] // 当前页数据 |
||||||
|
if (this.mescroll.num == 1) this.orderList = []; // 第一页需手动制空列表 |
||||||
|
curPageData.forEach((item, index) => { |
||||||
|
this.orderList.push(item) |
||||||
|
}) |
||||||
|
|
||||||
this.param.openid = userInfo.openid |
setTimeout(() => { |
||||||
this.param.appid = appId |
this.mescroll.endSuccess(curPageData.length); // 请求成功, 结束加载 |
||||||
|
}, 1000); |
||||||
this.$Request.get(this.$config.getHomestayOrderList, this.param, null, null, false, true).then((res) => { |
}).catch(() => { |
||||||
const curPageData = res.data.list || [] // 当前页数据 |
this.mescroll.endErr(); // 请求失败, 结束加载 |
||||||
if (this.mescroll.num == 1) this.orderList = []; // 第一页需手动制空列表 |
}); |
||||||
curPageData.forEach((item, index) => { |
}, |
||||||
this.orderList.push(item) |
// 支付 |
||||||
}) |
payOrder(val) { |
||||||
|
this.orderInfo = val |
||||||
setTimeout(() => { |
console.log("订单==========", this.orderInfo) |
||||||
this.mescroll.endSuccess(curPageData.length); // 请求成功, 结束加载 |
this.isPayPopup = true |
||||||
}, 1000); |
}, |
||||||
}).catch(() => { |
closePay() { |
||||||
this.mescroll.endErr(); // 请求失败, 结束加载 |
let that = this |
||||||
}); |
uni.showModal({ |
||||||
}, |
title: '提示', |
||||||
// 支付 |
content: '确定取消支付?', |
||||||
payOrder(val) { |
cancelText: '再想想', |
||||||
this.orderInfo = val |
showCancel: true, |
||||||
console.log("订单==========", this.orderInfo) |
success: function(res) { |
||||||
this.isPayPopup = true |
if (res.confirm) { |
||||||
}, |
that.isPayPopup = false |
||||||
closePay() { |
} else if (res.cancel) { |
||||||
let that = this |
console.log('用户点击取消'); |
||||||
uni.showModal({ |
this.isPayPopup=false |
||||||
title: '提示', |
} |
||||||
content: '确定取消支付?', |
} |
||||||
cancelText: '再想想', |
}) |
||||||
showCancel: true, |
}, |
||||||
success: function(res) { |
// 跳转民宿订单详情页 |
||||||
if (res.confirm) { |
toHomeStayDetailPage(id) { |
||||||
that.isPayPopup = false |
uni.navigateTo({ |
||||||
} else if (res.cancel) { |
url: "/subPageC/orderShop/orderDetail?id=" + id |
||||||
console.log('用户点击取消'); |
}); |
||||||
this.isPayPopup=false |
}, |
||||||
} |
//跳转预订页面 |
||||||
} |
toHomeStayBookingPage(hotelId) { |
||||||
}) |
uni.navigateTo({ |
||||||
}, |
url: "/subPageB/Homestay/homestaydetail/homestaydetail?guid=" + hotelId |
||||||
// 跳转民宿订单详情页 |
}); |
||||||
toHomeStayDetailPage(id) { |
}, |
||||||
uni.navigateTo({ |
//跳转退款页面 |
||||||
url: "/subPageC/orderHomestay/orderDetail?id=" + id |
toRefundPage(orderId) { |
||||||
}); |
uni.navigateTo({ |
||||||
}, |
url: "/subPageC/orderHomestay/cancelStep?orderId=" + orderId |
||||||
//跳转预订页面 |
}); |
||||||
toHomeStayBookingPage(hotelId) { |
} |
||||||
uni.navigateTo({ |
} |
||||||
url: "/subPageB/Homestay/homestaydetail/homestaydetail?guid=" + hotelId |
} |
||||||
}); |
|
||||||
}, |
|
||||||
//跳转退款页面 |
|
||||||
toRefundPage(orderId) { |
|
||||||
uni.navigateTo({ |
|
||||||
url: "/subPageC/orderHomestay/cancelStep?orderId=" + orderId |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss"> |
<style lang="scss"> |
||||||
/*每个页面公共css */ |
/*每个页面公共css */ |
||||||
@import '@/static/css/common.scss'; |
@import '@/static/css/common.scss'; |
||||||
|
|
||||||
.v-order-list { |
.v-order-list { |
||||||
padding: 0; |
padding: 0; |
||||||
|
|
||||||
.list_item { |
.list_item { |
||||||
position: relative; |
position: relative; |
||||||
z-index: 9; |
z-index: 9; |
||||||
overflow: hidden; |
overflow: hidden; |
||||||
box-sizing: border-box; |
box-sizing: border-box; |
||||||
padding: 30rpx 24rpx 20rpx 24rpx; |
padding: 30rpx 24rpx 20rpx 24rpx; |
||||||
background-color: #fff; |
background-color: #fff; |
||||||
border-radius: 10rpx; |
border-radius: 10rpx; |
||||||
|
|
||||||
.item_title { |
.item_title { |
||||||
margin-top: -5rpx; |
margin-top: -5rpx; |
||||||
margin-bottom: 10rpx; |
margin-bottom: 10rpx; |
||||||
padding-left: 30rpx; |
padding-left: 30rpx; |
||||||
font-size: 32rpx; |
font-size: 32rpx; |
||||||
color: #1B1B1B; |
color: #1B1B1B; |
||||||
font-weight: bold; |
font-weight: bold; |
||||||
} |
} |
||||||
|
|
||||||
.item_image { |
.item_image { |
||||||
width: 180rpx; |
width: 180rpx; |
||||||
height: 150rpx; |
height: 150rpx; |
||||||
margin-right: 20rpx; |
margin-right: 20rpx; |
||||||
overflow: hidden; |
overflow: hidden; |
||||||
|
|
||||||
.img { |
.img { |
||||||
width: 200rpx; |
width: 200rpx; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.tip-bage { |
.tip-bage { |
||||||
position: absolute; |
position: absolute; |
||||||
left: 0; |
left: 0; |
||||||
top: 20rpx; |
top: 20rpx; |
||||||
width: 40rpx; |
width: 40rpx; |
||||||
height: 36rpx; |
height: 36rpx; |
||||||
background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-homestay.png'); |
background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-homestay.png'); |
||||||
background-repeat: no-repeat; |
background-repeat: no-repeat; |
||||||
background-position: left 4rpx; |
background-position: left 4rpx; |
||||||
background-size: 40rpx; |
background-size: 40rpx; |
||||||
} |
} |
||||||
|
|
||||||
.state { |
.state { |
||||||
position: absolute; |
position: absolute; |
||||||
right: 0; |
right: 0; |
||||||
top: 30rpx; |
top: 30rpx; |
||||||
font-size: 26rpx; |
font-size: 26rpx; |
||||||
color: #0983FF; |
color: #0983FF; |
||||||
padding: 8rpx 30rpx 8rpx 20rpx; |
padding: 8rpx 30rpx 8rpx 20rpx; |
||||||
border-radius: 30rpx 0 0 30rpx; |
border-radius: 30rpx 0 0 30rpx; |
||||||
background: linear-gradient(to right, rgba(9, 131, 255, .2), transparent); |
background: linear-gradient(to right, rgba(9, 131, 255, .2), transparent); |
||||||
|
|
||||||
|
|
||||||
&.type0 { |
&.type0 { |
||||||
color: #FF850A; |
color: #FF850A; |
||||||
padding: 8rpx 30rpx 8rpx 20rpx; |
padding: 8rpx 30rpx 8rpx 20rpx; |
||||||
border-radius: 30rpx 0 0 30rpx; |
border-radius: 30rpx 0 0 30rpx; |
||||||
background: linear-gradient(to right, rgba(255, 133, 10, .2), transparent); |
background: linear-gradient(to right, rgba(255, 133, 10, .2), transparent); |
||||||
} |
} |
||||||
|
|
||||||
&.type1 { |
&.type1 { |
||||||
color: #0983FF; |
color: #0983FF; |
||||||
padding: 8rpx 30rpx 8rpx 20rpx; |
padding: 8rpx 30rpx 8rpx 20rpx; |
||||||
border-radius: 30rpx 0 0 30rpx; |
border-radius: 30rpx 0 0 30rpx; |
||||||
background: linear-gradient(to right, rgba(9, 131, 255, .2), transparent); |
background: linear-gradient(to right, rgba(9, 131, 255, .2), transparent); |
||||||
} |
} |
||||||
|
|
||||||
&.type2 { |
&.type2 { |
||||||
color: #666666; |
color: #666666; |
||||||
padding: 8rpx 30rpx 8rpx 20rpx; |
padding: 8rpx 30rpx 8rpx 20rpx; |
||||||
border-radius: 30rpx 0 0 30rpx; |
border-radius: 30rpx 0 0 30rpx; |
||||||
background: linear-gradient(to right, rgba(102, 102, 102, .2), transparent); |
background: linear-gradient(to right, rgba(102, 102, 102, .2), transparent); |
||||||
} |
} |
||||||
|
|
||||||
&.type3 { |
&.type3 { |
||||||
color: #666666; |
color: #666666; |
||||||
padding: 8rpx 30rpx 8rpx 20rpx; |
padding: 8rpx 30rpx 8rpx 20rpx; |
||||||
border-radius: 30rpx 0 0 30rpx; |
border-radius: 30rpx 0 0 30rpx; |
||||||
background: linear-gradient(to right, rgba(102, 102, 102, .2), transparent); |
background: linear-gradient(to right, rgba(102, 102, 102, .2), transparent); |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.tip-state { |
.tip-state { |
||||||
margin-left: -24rpx; |
margin-left: -24rpx; |
||||||
margin-bottom: -24rpx; |
margin-bottom: -24rpx; |
||||||
color: #0983FF; |
color: #0983FF; |
||||||
padding: 10rpx 30rpx; |
padding: 10rpx 30rpx; |
||||||
font-size: 24rpx; |
font-size: 24rpx; |
||||||
background: linear-gradient(to right, rgba(9, 131, 255, .15), transparent); |
background: linear-gradient(to right, rgba(9, 131, 255, .15), transparent); |
||||||
} |
} |
||||||
|
|
||||||
.item_content { |
.item_content { |
||||||
|
|
||||||
.content-title, |
.content-title, |
||||||
.content-date, |
.content-date, |
||||||
.content-price { |
.content-price { |
||||||
margin: 8rpx; |
margin: 8rpx; |
||||||
color: #666666; |
color: #666666; |
||||||
font-size: 28rpx; |
font-size: 28rpx; |
||||||
} |
} |
||||||
|
|
||||||
.content-date { |
.content-date { |
||||||
image { |
image { |
||||||
width: 24rpx; |
width: 24rpx; |
||||||
height: 22rpx; |
height: 22rpx; |
||||||
margin: 0 10rpx; |
margin: 0 10rpx; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.content-bottom { |
.content-bottom { |
||||||
text-align: right; |
text-align: right; |
||||||
|
|
||||||
.btn { |
.btn { |
||||||
display: inline-block; |
display: inline-block; |
||||||
margin: 0 10rpx; |
margin: 0 10rpx; |
||||||
padding: 0 20rpx; |
padding: 0 20rpx; |
||||||
border: 1rpx solid #CCCCCC; |
border: 1rpx solid #CCCCCC; |
||||||
color: #1B1B1B; |
color: #1B1B1B; |
||||||
font-size: 28rpx; |
font-size: 28rpx; |
||||||
text-align: center; |
text-align: center; |
||||||
height: 60rpx; |
height: 60rpx; |
||||||
line-height: 60rpx; |
line-height: 60rpx; |
||||||
border-radius: 60rpx; |
border-radius: 60rpx; |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
Loading…
Reference in new issue