Files
h5-meike/pages/ticket/select.vue
T
xuchaoandClaude Opus 4.8 f767aa93de fix: 设备适配 —— 宽屏居中锁定手机尺寸 + 全面屏底部安全区
宽屏(桌面/平板):
- pages.json 配置 rpxCalcMaxDeviceWidth=750/rpxCalcBaseDeviceWidth=375,
  窗口超过 750px 时 rpx 换算基准锁定为 375px(uni-app 官方机制),不再随屏幕拉伸
- 页面列宽 750rpx 居中展示,两侧露出底色+阴影形成手机框视觉
- 固定底栏统一 left/right:0+margin:auto 视口居中,与页面列对齐
- 悬浮球及菜单项宽屏时锚定到页面列左缘

全面屏(iPhone 刘海屏):
- 订单底栏/订单详情按钮栏/弹窗确认栏用同色边框向下延伸覆盖 home 指示条区域
- 悬浮按钮(完成/选择)整体上移避开安全区
- 确认订单页底栏改为 bottom 锚定(原来用 JS 计算 top)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 08:57:40 +08:00

119 lines
2.8 KiB
Vue

<template>
<view>
<text class="text">需添加 &nbsp;{{value}}&nbsp;个出行人</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;position: fixed;left: 0rpx;right: 0rpx;margin: 0 auto;bottom: calc(24rpx + env(safe-area-inset-bottom));">
<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>