fix(ticket): 购票bug修复,移除自定义导航栏

This commit is contained in:
woody 2025-05-28 15:29:20 +08:00
parent 76042fddfa
commit 0a96a18a93
4 changed files with 15 additions and 97 deletions

View File

@ -832,28 +832,19 @@
"path": "pages/ticket/index", "path": "pages/ticket/index",
"style": { "style": {
"navigationBarTitleText": "门票活动", "navigationBarTitleText": "门票活动",
"navigationBarBackgroundColor": "#fff",
"navigationBarHidden": true,
"navigationStyle": "custom",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{ {
"path": "pages/ticket/buy", "path": "pages/ticket/buy",
"style": { "style": {
"navigationBarTitleText": "自助购票", "navigationBarTitleText": "自助购票"
"navigationBarBackgroundColor": "#fff",
"navigationBarHidden": true,
"navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/ticket/detail", "path": "pages/ticket/detail",
"style": { "style": {
"navigationBarTitleText": "我的门票", "navigationBarTitleText": "我的门票"
"navigationBarBackgroundColor": "#fff",
"navigationBarHidden": true,
"navigationStyle": "custom"
} }
}, },
{ {

View File

@ -6,17 +6,6 @@
--> -->
<template> <template>
<view class="buy-ticket-container"> <view class="buy-ticket-container">
<!-- 自定义导航栏 -->
<view class="custom-navbar">
<view class="navbar-content">
<view class="back-btn" @click="goBack">
<u-icon name="arrow-left" size="20" color="#333"></u-icon>
</view>
<view class="navbar-title">自助购票</view>
<view class="placeholder"></view>
</view>
</view>
<!-- 内容区域 --> <!-- 内容区域 -->
<view class="content-area"> <view class="content-area">
<!-- 提示信息 --> <!-- 提示信息 -->
@ -342,17 +331,12 @@ export default {
return false return false
} }
if (!/^1[3-9]\d{9}$/.test(buyer.phone)) {
uni.$u.toast(`购票人${i + 1}的联系方式格式不正确`)
return false
}
if (!buyer.idCard.trim()) { if (!buyer.idCard.trim()) {
uni.$u.toast(`购票人${i + 1}的证件号码不能为空`) uni.$u.toast(`购票人${i + 1}的证件号码不能为空`)
return false return false
} }
if (buyer.sexIndex === -1 || !buyer.sex) { if (buyer.sexIndex === -1 || (!buyer.sex && buyer.sex !== 0)) {
uni.$u.toast(`请选择购票人${i + 1}的性别`) uni.$u.toast(`请选择购票人${i + 1}的性别`)
return false return false
} }
@ -367,8 +351,8 @@ export default {
return false return false
} }
if (!/^1[3-9]\d{9}$/.test(buyer.emergencyPhone)) { if (buyer.emergencyPhone === buyer.phone) {
uni.$u.toast(`购票人${i + 1}的紧急联系方式格式不正确`) uni.$u.toast(`购票人${i + 1}的紧急联系方式不能与联系方式相同`)
return false return false
} }
} }
@ -518,9 +502,9 @@ export default {
} }
.content-area { .content-area {
margin-top: calc(var(--status-bar-height) + 44px); margin-top: 10rpx;
padding: 16px; padding: 24rpx;
padding-bottom: 100px; padding-bottom: 200rpx;
} }
.tip-banner { .tip-banner {

View File

@ -6,17 +6,6 @@
--> -->
<template> <template>
<view class="ticket-detail-container"> <view class="ticket-detail-container">
<!-- 自定义导航栏 -->
<view class="custom-navbar">
<view class="navbar-content">
<view class="back-btn" @click="goBack">
<u-icon name="arrow-left" size="20" color="#333"></u-icon>
</view>
<view class="navbar-title">我的门票</view>
<view class="placeholder"></view>
</view>
</view>
<!-- 内容区域 --> <!-- 内容区域 -->
<view class="content-area"> <view class="content-area">
<view v-if="ticketDetail" class="ticket-detail-card"> <view v-if="ticketDetail" class="ticket-detail-card">
@ -209,46 +198,7 @@ export default {
background: #f8f8f8; background: #f8f8f8;
} }
.custom-navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
background: #fff;
padding-top: var(--status-bar-height);
border-bottom: 1px solid #eee;
.navbar-content {
display: flex;
align-items: center;
height: 44px;
padding: 0 16px;
.back-btn {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.navbar-title {
flex: 1;
text-align: center;
font-size: 18px;
font-weight: 600;
color: #333;
}
.placeholder {
width: 40px;
}
}
}
.content-area { .content-area {
margin-top: calc(var(--status-bar-height) + 44px);
padding: 16px; padding: 16px;
} }

View File

@ -6,17 +6,6 @@
--> -->
<template> <template>
<view class="ticket-container"> <view class="ticket-container">
<!-- 自定义导航栏 -->
<view class="custom-navbar">
<view class="navbar-content">
<view class="back-btn" @click="goBack">
<u-icon name="arrow-left" size="20" color="#333"></u-icon>
</view>
<view class="navbar-title">门票活动</view>
<view class="placeholder"></view>
</view>
</view>
<!-- Tab切换 --> <!-- Tab切换 -->
<view class="tab-container"> <view class="tab-container">
<view class="tab-wrapper"> <view class="tab-wrapper">
@ -583,7 +572,7 @@ export default {
uni.$u.toast('请输入身份证号') uni.$u.toast('请输入身份证号')
return return
} }
if (!this.editForm.sex) { if (!this.editForm.sex && this.editForm.sex !== 0) {
uni.$u.toast('请选择性别') uni.$u.toast('请选择性别')
return return
} }
@ -591,6 +580,10 @@ export default {
uni.$u.toast('请输入尺码') uni.$u.toast('请输入尺码')
return return
} }
if (this.editForm.emergencyPhone === this.editForm.phone) {
uni.$u.toast('紧急联系方式不能与联系方式相同')
return
}
// //
this.editForm.sexVal = this.editForm.sex === '1' ? '男' : '女' this.editForm.sexVal = this.editForm.sex === '1' ? '男' : '女'
@ -711,9 +704,9 @@ export default {
} }
.content-area { .content-area {
margin-top: calc(var(--status-bar-height) + 88rpx + 120rpx); margin-top: calc(100rpx);
padding: 24rpx; padding: 24rpx;
min-height: calc(100vh - var(--status-bar-height) - 88rpx - 120rpx); min-height: calc(100vh - 100rpx);
} }
.activity-card { .activity-card {