从 xghmall(云闪付版湘工游)迁移民票模块,改造为微信公众号 H5: - 技术栈沿用 uni-app + Vue2 + uView(含定制版日历组件) - 登录/支付独立成层(common/auth.js、common/pay.js): 一期假登录(测试手机号)+ 模拟支付,后端微信接口就绪后只换这两处 - 登录页重写:短信验证码 + 公众号网页授权(code 换用户信息)预留 - 门票列表页为入口页(进页必须登录),加订单悬浮按钮 - 支付成功页接通:查看订单/继续逛逛 + 订单状态轮询 - 详情页定位导航改用 uni.openLocation + 高德网页兜底 - 出行人页:身份证 18 位格式校验,删除死的删除按钮,修正证件类型回显笔误 - 清理云闪付 SDK、支付宝授权、死页面引用等残留 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
148 lines
3.3 KiB
Vue
148 lines
3.3 KiB
Vue
<template>
|
||
<view>
|
||
<view class="item" v-for="(item,index) in lookList" :key="index" @tap='toOrderDetail(item.id)'>
|
||
<view class="item_h">
|
||
<text>订单编号:{{item.id}}</text>
|
||
<text>{{getText(item.orderStatus,1)}}</text>
|
||
</view>
|
||
<view class="item_rq">
|
||
<view style="font-weight: bold;color: #000;">{{item.skuName}}</view>
|
||
<view style="width: 606rpx;display: flex;justify-content: space-between;color: rgba(0, 0, 0, 0.8);margin-top: 24rpx;">
|
||
<text>使用日期:{{item.orderDate}}</text>
|
||
<text>¥{{(item.orderAmount/100).toFixed(2)}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<u-loadmore :status="status" />
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
var that=''
|
||
export default{
|
||
data(){
|
||
return{
|
||
status: 'loadmore',
|
||
obj: {
|
||
"orderPhone": "",
|
||
"orderStatus": "",
|
||
"pageSize": 10,
|
||
"pageNum": 1,
|
||
|
||
},
|
||
pageAll:2,
|
||
isLoad:true,
|
||
lookList:[],
|
||
orderList:[{
|
||
text:'待支付',
|
||
value:'WAITPAY',
|
||
label:'逾期未支付订单将自动关闭'
|
||
},{
|
||
text:'出票中',
|
||
value:'WAITSEND',
|
||
label:'正在出票中,预计30分钟内出票,超时未出票系统将为您自动退款'
|
||
},{
|
||
text:'已出票',
|
||
value:'HAVESEND',
|
||
label:'已出票,如有疑问请及时联系客服'
|
||
},{
|
||
text:'已完成',
|
||
value:'COMPLETED',
|
||
label:'订单已完成'
|
||
},{
|
||
text:'已取消',
|
||
value:'CANCELLED',
|
||
label:'订单已取消'
|
||
},{
|
||
text:'退款中',
|
||
value:'REFUNDING',
|
||
label:'已确认退款,款项将在1-7个工作日内退回您的付款渠道,请耐心等待'
|
||
},{
|
||
text:'已退款',
|
||
value:'BACKPAYED',
|
||
label:'退款完成,款项已退回您的付款渠道'
|
||
}]
|
||
}
|
||
},
|
||
onLoad(){
|
||
that=this
|
||
this.obj.orderPhone=uni.getStorageSync('phone')
|
||
|
||
|
||
},
|
||
onShow() {
|
||
this.pageAll=2
|
||
this.obj.pageNum=1
|
||
this.lookList=[]
|
||
this.queryTicketsOrderPageMethod()
|
||
},
|
||
onReachBottom() {
|
||
this.queryTicketsOrderPageMethod()
|
||
},
|
||
methods:{
|
||
getText(e,f){
|
||
if(f==1){
|
||
let str=this.orderList.filter(item=>{
|
||
return item.value==e
|
||
})[0].text
|
||
return str
|
||
}else if(f==2){
|
||
let str=this.orderList.filter(item=>{
|
||
return item.value==e
|
||
})[0].label
|
||
return str
|
||
}
|
||
},
|
||
queryTicketsOrderPageMethod() {
|
||
if (that.obj.pageNum <= that.pageAll&&this.isLoad) {
|
||
this.isLoad=false
|
||
this.$u.api.queryTicketsOrderPage(this.obj).then(res => {
|
||
this.isLoad=true
|
||
that.obj.pageNum = that.obj.pageNum * 1 + 1;
|
||
that.pageAll = Math.ceil(res.data.total / 10)
|
||
if (that.page == 2) {
|
||
that.lookList = res.data.list
|
||
} else {
|
||
that.lookList = that.lookList.concat(res.data.list)
|
||
}
|
||
if (that.obj.pageNum > that.pageAll) {
|
||
that.status = "nomore"
|
||
}
|
||
})
|
||
}
|
||
},
|
||
toOrderDetail(e){
|
||
uni.navigateTo({
|
||
url:'orderdetail?id='+e
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
page{
|
||
background: #F8F9FC;
|
||
padding-top: 24rpx;
|
||
}
|
||
</style>
|
||
<style lang="less" scoped>
|
||
.item{
|
||
width: 750rpx;
|
||
margin-bottom: 20rpx;
|
||
padding: 24rpx;
|
||
background: #fff;
|
||
.item_h{
|
||
width: 702rpx;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
color: rgba(0, 0, 0, 0.5);
|
||
}
|
||
.item_rq{
|
||
width: 654rpx;
|
||
margin: 24rpx 24rpx 0rpx 24rpx;
|
||
background: #F8F9FC;
|
||
padding: 24rpx;
|
||
}
|
||
}
|
||
</style> |