feat: 质惠游 H5 一期 —— 门票模块全链路(微信公众号版)
从 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>
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view>
|
||||
<text class="text">需添加 {{value}} 个出行人</text>
|
||||
<view class="h_item" @click="toAddPerson">
|
||||
<text class="text1">新增出行人</text>
|
||||
<text class="text2">+</text>
|
||||
</view>
|
||||
<view class="item" v-for="(item,index) in list" :key="index">
|
||||
<image src="https://aliyunoss.hn12301.net/sd/ticket_edit.png" style="width: 48rpx;height: 48rpx;" @click="toPerson(item)"></image>
|
||||
<text style="margin-left: 24rpx;">{{item.name}}</text>
|
||||
<text style="margin-left: 24rpx;">{{item.identityNo}}</text>
|
||||
<view style="position: absolute;right: 0rpx;">
|
||||
<u-checkbox v-model="item.isSelect" active-color="#457AF7"></u-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 702rpx;left: 24rpx;position: fixed;bottom: 24rpx;">
|
||||
<u-button shape="circle" size="default" style="background: linear-gradient(180deg, #FF9E49 0%, #ED3B1A 100%);color: #fff;" @click="select">完成</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var that=''
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checked:true,
|
||||
list:[],
|
||||
value:0
|
||||
};
|
||||
},
|
||||
onLoad(e){
|
||||
that=this
|
||||
this.value=e.value
|
||||
},
|
||||
onShow(){
|
||||
this.getMemberTouristMethod()
|
||||
},
|
||||
methods: {
|
||||
// 选中某个复选框时,由checkbox时触发
|
||||
checkboxChange(e) {
|
||||
console.log(e);
|
||||
},
|
||||
toAddPerson(){
|
||||
uni.navigateTo({
|
||||
url: 'person'
|
||||
})
|
||||
},
|
||||
toPerson(e){
|
||||
uni.navigateTo({
|
||||
url: 'person?info='+JSON.stringify(e)
|
||||
})
|
||||
},
|
||||
getMemberTouristMethod(){
|
||||
this.$u.api.getMemberTourist({mobile:uni.getStorageSync('phone')}).then(res => {
|
||||
if (res) {
|
||||
res.data.forEach(item=>{
|
||||
this.$set(item,'isSelect',false)
|
||||
})
|
||||
this.list=res.data
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
select(){
|
||||
let arr =[]
|
||||
this.list.forEach(item=>{
|
||||
if(item.isSelect){
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
let pages = getCurrentPages(); //获取所有页面栈实例列表
|
||||
let nowPage = pages[pages.length - 1]; //当前页页面实例
|
||||
let prevPage = pages[pages.length - 2]; //上一页页面实例
|
||||
prevPage.objitem = JSON.stringify(arr); //修改上一页面的 couponNumber 参数值为 value
|
||||
uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.text{
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
margin: 24rpx 0rpx 0rpx 24rpx;
|
||||
font-size: 36rpx;
|
||||
height: 88rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.h_item{
|
||||
width: 702rpx;
|
||||
margin-top: 24rpx;
|
||||
display: flex;
|
||||
margin-left: 24rpx;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px dashed #E1E1E1;
|
||||
align-items: center;
|
||||
padding-bottom: 24rpx;
|
||||
.text1{
|
||||
color:rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.text2{
|
||||
color:#457AF7;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
}
|
||||
.item{
|
||||
width: 702rpx;
|
||||
margin-left: 24rpx;
|
||||
height: 112rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user