Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/qingduTicketing
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <u-popup v-model="showPop" :mask-close-able="false" overlayOpacity="0.7" @open="open" @close="handleClose" |
| | | mode="bottom" round="16"> |
| | | <view class="popup-content"> |
| | | <view class="tit-close flex a-center j-between pt-38 pr-31 pl-33"> |
| | | 请选择性别 <image src="/static/image/close.png" class="w-46 h-46" @tap="handleClose" mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | <picker-view indicator-style="height:85rpx;font-size: 38rpx;color: #333333;" |
| | | indicator-class="check-class" :value="value" @change="bindChange" class="picker-view"> |
| | | <picker-view-column> |
| | | <view class="item h-85" v-for="(item,index) in conditionList" :key="index">{{item}}</view> |
| | | </picker-view-column> |
| | | </picker-view> |
| | | |
| | | <view class="sure-btn" @tap="emit('submit', value)"> |
| | | 确认 |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { |
| | | ref, |
| | | watch |
| | | } from 'vue' |
| | | |
| | | // 定义props |
| | | const props = defineProps({ |
| | | show: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | conditon: { |
| | | type: String, |
| | | default: () => '' |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: () => '' |
| | | } |
| | | }) |
| | | |
| | | // 定义emits |
| | | const emit = defineEmits(['close', 'submit']) |
| | | |
| | | // 响应式数据 |
| | | const conditionList = ref(['男', '女']) |
| | | const value = ref([0]) |
| | | const showPop = ref(false) |
| | | |
| | | // 监听 show 变化 |
| | | watch(() => props.show, (newValue) => { |
| | | showPop.value = newValue |
| | | }) |
| | | |
| | | // 方法 |
| | | const open = () => {} |
| | | |
| | | const handleClose = () => { |
| | | showPop.value = false |
| | | emit('close') |
| | | } |
| | | |
| | | const bindChange = (e) => { |
| | | value.value = e.detail.value |
| | | // emit('submit', conditionList.value[value.value[0]]) |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .color1 { |
| | | color: rgba(0, 0, 0, .60); |
| | | } |
| | | |
| | | .picker-view { |
| | | width: 750rpx; |
| | | height: 376.54rpx; |
| | | font-size: 35rpx; |
| | | } |
| | | |
| | | ::v-deep .picker-view { |
| | | width: 711.54rpx; |
| | | // justify-content: center; |
| | | margin: 0 auto; |
| | | |
| | | .item { |
| | | text-align: center; |
| | | line-height: 40px; |
| | | height: 85rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-size: 38rpx !important; |
| | | color: #333333 !important; |
| | | } |
| | | } |
| | | |
| | | .cancel { |
| | | font-weight: 400; |
| | | font-size: 30rpx; |
| | | color: #1677FF; |
| | | line-height: 42rpx; |
| | | } |
| | | |
| | | .sure { |
| | | width: 231rpx; |
| | | height: 77rpx; |
| | | background: linear-gradient(270deg, #E67E22 0%, #FF9023 100%); |
| | | border-radius: 42rpx; |
| | | display: flex; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 27rpx; |
| | | color: #FFFFFF; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .tit { |
| | | font-size: 31rpx; |
| | | font-weight: bold; |
| | | color: rgba(0, 0, 0, 0.78); |
| | | line-height: 58rpx; |
| | | } |
| | | |
| | | .titleTop { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 15.37rpx 23.08rpx 17.31rpx 23.08rpx; |
| | | border-bottom: 1rpx solid rgba(238, 238, 238, 1); |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .close-img { |
| | | width: 35rpx; |
| | | height: 37rpx; |
| | | margin-left: 198.08rpx; |
| | | margin-right: 38.46rpx; |
| | | } |
| | | |
| | | .tit-close { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 35rpx; |
| | | color: #333333; |
| | | padding-bottom: 40.38rpx; |
| | | border-bottom: 1rpx solid rgba(229, 229, 229, 1); |
| | | } |
| | | |
| | | ::v-deep .check-class { |
| | | height: 85rpx; |
| | | font-size: 38rpx !important; |
| | | color: #333333 !important; |
| | | } |
| | | |
| | | .popup-content { |
| | | padding-bottom: 40rpx; |
| | | } |
| | | |
| | | .sure-btn { |
| | | width: 635rpx; |
| | | height: 96rpx; |
| | | background: linear-gradient(270deg, #08C866 0%, #06C584 100%); |
| | | box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(6, 197, 132, 0.15), 0rpx 8rpx 19rpx 0rpx rgba(6, 197, 132, 0.19); |
| | | border-radius: 67rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 35rpx; |
| | | color: #FFFFFF; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | margin: 40rpx auto 0; |
| | | cursor: pointer; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <u-popup :show="show" mode="bottom" @close="$emit('close')" :safe-area-inset-bottom="true" round="38rpx" |
| | | @open="open" :overlay="true"> |
| | | <view class="date-popup"> |
| | | <view class="header"> |
| | | <text class="pl-30">选择日期</text> |
| | | <image src="/static/home/close.png" class="w-46 h-46 mr-30" mode="" @click="$emit('close')"></image> |
| | | </view> |
| | | <picker-view v-if="visible" :indicator-style="indicatorStyle" :value="value" |
| | | indicator-class="pickerColor" class="picker-view" @change="bindChange"> |
| | | <picker-view-column> |
| | | <view class="item" v-for="(item,index) in years" :key="index">{{item}}</view> |
| | | </picker-view-column> |
| | | <picker-view-column> |
| | | <view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view> |
| | | </picker-view-column> |
| | | <picker-view-column> |
| | | <view class="item" v-for="(item,index) in days" :key="index"> |
| | | {{item}}日 |
| | | </view> |
| | | </picker-view-column> |
| | | <picker-view-column> |
| | | <view class="item" v-for="(item,index) in hours" :key="index">{{item}}时</view> |
| | | </picker-view-column> |
| | | <picker-view-column> |
| | | <view class="item" v-for="(item,index) in minutes" :key="index">{{item}}分</view> |
| | | </picker-view-column> |
| | | <picker-view-column> |
| | | <view class="item" v-for="(item,index) in seconds" :key="index">{{item}}秒</view> |
| | | </picker-view-column> |
| | | </picker-view> |
| | | |
| | | <view @click="submit" class="sureBtn"> |
| | | 确定 |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from '../uni_modules/uview-ui/libs/util/dayjs' |
| | | export default { |
| | | name: "selectCity", |
| | | props: { |
| | | show: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | currentYear: { |
| | | type: Number, |
| | | default: () => Number(new Date().getFullYear()) |
| | | }, |
| | | currentMon: { |
| | | type: Number, |
| | | default: () => Number(new Date().getMonth() + 1) |
| | | }, |
| | | currentDay: { |
| | | type: Number, |
| | | default: () => Number(new Date().getDate()) |
| | | }, |
| | | currentHour: { |
| | | type: Number, |
| | | default: () => Number(new Date().getHours()) |
| | | }, |
| | | currentMinute: { |
| | | type: Number, |
| | | default: () => Number(new Date().getMinutes()) |
| | | }, |
| | | currentSecond: { |
| | | type: Number, |
| | | default: () => Number(new Date().getSeconds()) |
| | | }, |
| | | |
| | | }, |
| | | data() { |
| | | const date = new Date() |
| | | const years = [] |
| | | const year = date.getFullYear() |
| | | const months = [] |
| | | const month = date.getMonth() + 1 |
| | | const days = [] |
| | | const day = date.getDate() |
| | | |
| | | // 时分秒数据 |
| | | const hours = [] |
| | | const minutes = [] |
| | | const seconds = [] |
| | | const hour = date.getHours() |
| | | const minute = date.getMinutes() |
| | | const second = date.getSeconds() |
| | | |
| | | for (let i = 1900; i <= date.getFullYear(); i++) { |
| | | years.push(i) |
| | | } |
| | | for (let i = 1; i <= 12; i++) { |
| | | months.push(i) |
| | | } |
| | | for (let i = 1; i <= 31; i++) { |
| | | days.push(i) |
| | | } |
| | | |
| | | // 初始化时分秒数组 |
| | | for (let i = 0; i < 24; i++) { |
| | | hours.push(i) |
| | | } |
| | | for (let i = 0; i < 60; i++) { |
| | | minutes.push(i) |
| | | seconds.push(i) |
| | | } |
| | | |
| | | return { |
| | | years, |
| | | year, |
| | | months, |
| | | month, |
| | | days, |
| | | day, |
| | | hours, |
| | | hour, |
| | | minutes, |
| | | minute, |
| | | seconds, |
| | | second, |
| | | value: [0, 0, 0, 0, 0, 0], |
| | | visible: true, |
| | | indicatorStyle: `height: 100rpx;color: rgba(255, 255, 255, 1)`, |
| | | }; |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | bindChange(e) { |
| | | this.value = e.detail.value |
| | | this.year = this.years[this.value[0]] |
| | | this.month = this.months[this.value[1]] |
| | | |
| | | // 计算当前选择月份的天数 |
| | | const daysInMonth = new Date(this.year, this.month, 0).getDate() |
| | | let days = [] |
| | | for (let i = 1; i <= daysInMonth; i++) { |
| | | days.push(i) |
| | | } |
| | | this.days = days |
| | | |
| | | // 如果选择的是当前年月,限制日期范围 |
| | | if (this.year === dayjs(new Date).format('YYYY') && |
| | | this.month === Number(dayjs(new Date).format('MM'))) { |
| | | const currentDay = Number(dayjs(new Date).format('DD')) |
| | | this.days = this.days.filter(day => day <= currentDay) |
| | | } |
| | | |
| | | this.day = this.days[this.value[2]] |
| | | |
| | | // 处理时分秒选择 |
| | | this.hour = this.hours[this.value[3]] |
| | | this.minute = this.minutes[this.value[4]] |
| | | this.second = this.seconds[this.value[5]] |
| | | }, |
| | | |
| | | submit() { |
| | | // 格式化日期时间字符串,确保两位数格式 |
| | | const year = this.year |
| | | const month = this.month.toString().padStart(2, '0') |
| | | const day = this.day.toString().padStart(2, '0') |
| | | const hour = this.hour.toString().padStart(2, '0') |
| | | const minute = this.minute.toString().padStart(2, '0') |
| | | const second = this.second.toString().padStart(2, '0') |
| | | |
| | | let dateTime = `${year}-${month}-${day} ${hour}:${minute}:${second}` |
| | | this.$emit('confirm', dateTime) |
| | | }, |
| | | |
| | | open() { |
| | | this.value = [ |
| | | this.years.findIndex((item) => item === this.currentYear), |
| | | this.months.findIndex((item) => item === this.currentMon), |
| | | this.days.findIndex((item) => item === this.currentDay), |
| | | this.hours.findIndex((item) => item === this.currentHour), |
| | | this.minutes.findIndex((item) => item === this.currentMinute), |
| | | this.seconds.findIndex((item) => item === this.currentSecond) |
| | | ] |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | /deep/ .u-popup__content { |
| | | // background-color: rgb(0, 0, 0); |
| | | } |
| | | |
| | | .date-popup { |
| | | background: #fff; |
| | | border-radius: 24rpx 24rpx 0 0; |
| | | padding: 0 0 30rpx 0; |
| | | position: relative; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | position: relative; |
| | | font-size: 32rpx; |
| | | font-weight: bold; |
| | | margin-bottom: 60rpx; |
| | | padding-top: 40rpx; |
| | | border-radius: 38rpx 38rpx 0rpx 0rpx; |
| | | background: linear-gradient(180deg, #E8F1FF 0%, #FFFFFF 100%); |
| | | |
| | | text { |
| | | width: 154rpx; |
| | | height: 54rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 38rpx; |
| | | color: #333333; |
| | | line-height: 54rpx; |
| | | text-align: right; |
| | | font-style: normal; |
| | | } |
| | | |
| | | .u-icon { |
| | | position: absolute; |
| | | right: 30rpx; |
| | | top: 0; |
| | | } |
| | | } |
| | | |
| | | .picker-view { |
| | | width: 750rpx; |
| | | height: 600rpx; |
| | | margin-top: 36rpx; |
| | | // color: rgba(255, 255, 255, 1) !important; |
| | | } |
| | | |
| | | |
| | | .item { |
| | | line-height: 101rpx; |
| | | font-size: 32rpx; |
| | | text-align: center !important; |
| | | font-weight: 600 !important; |
| | | |
| | | } |
| | | |
| | | /deep/.uni-picker-view-indicator:before { |
| | | |
| | | content: none; |
| | | |
| | | } |
| | | |
| | | /deep/.uni-picker-view-indicator::after { |
| | | |
| | | content: none; |
| | | |
| | | } |
| | | |
| | | .activeCgey { |
| | | color: rgba(255, 255, 255, 0.8) !important; |
| | | font-weight: 700; |
| | | } |
| | | |
| | | // /deep/ .uni-picker-view-indicator {} |
| | | |
| | | /deep/ .uni-picker-view-mask { |
| | | |
| | | // background: red; |
| | | // background-position: top, bottom; |
| | | // background-repeat: no-repeat; |
| | | |
| | | |
| | | } |
| | | |
| | | /deep/ .uni-picker-view-indicator { |
| | | background: rgba(22, 118, 252, 0.1); |
| | | // border-radius: 19rpx; |
| | | // margin: 0 20rpx; |
| | | width: 100%; |
| | | } |
| | | |
| | | /deep/ .pickerColor {} |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | .color2 { |
| | | color: #659157; |
| | | } |
| | | |
| | | .sureBtn { |
| | | margin: 0 38rpx; |
| | | background: #1676FC; |
| | | border-radius: 48rpx; |
| | | height: 42rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 31rpx; |
| | | color: #FFFFFF; |
| | | line-height: 42rpx; |
| | | text-align: center; |
| | | padding: 27rpx 0; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | |
| | | <view v-if="show"> |
| | | <u-popup v-model="showPop" :mask-close-able="false" @close="$emit('close')" @open="open" mode='bottom'> |
| | | <u-popup v-model="showPop" :mask-close-able="false" @close="emit('close')" @open="open" mode='bottom'> |
| | | <view class="relative pb-56 bgcolor111"> |
| | | <view class="tit-close flex a-center j-between pt-38 pr-31 pl-33"> |
| | | 请选择出生日期 <image src="/static/image/home/Group@2x.png" class="w-35 h-35" @tap="$emit('close')" |
| | | 请选择出生日期 <image src="/static/image/close.png" class="w-46 h-46" @tap="emit('close')" |
| | | mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "selectDateYear", |
| | | props: { |
| | | show: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | currentDate: { |
| | | type: String, |
| | | default: () => '' |
| | | } |
| | | <script setup> |
| | | import { |
| | | ref, |
| | | watch, |
| | | nextTick |
| | | } from 'vue' |
| | | |
| | | // 定义组件名称 |
| | | defineOptions({ |
| | | name: "selectDateYear" |
| | | }) |
| | | |
| | | // 定义 props |
| | | const props = defineProps({ |
| | | show: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | watch: { |
| | | show(newValue, oldValue) { |
| | | console.log('111111111111111', newValue) |
| | | if (newValue) { |
| | | this.showPop = newValue |
| | | } |
| | | |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | indicatorStyle: {}, |
| | | years: [], |
| | | months: [], |
| | | day: 31, |
| | | days: [], |
| | | value: [0, 0, 0], |
| | | showPop: false, |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.months = [] |
| | | this.days = [] |
| | | this.years = [] |
| | | this.day = new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).getDate(); |
| | | let y = new Date().getFullYear() |
| | | let mo = new Date().getMonth() + 1 |
| | | let da = new Date().getDate() |
| | | for (let i = -100; i < 10; i++) { |
| | | this.years.push(y + i) |
| | | } |
| | | for (let i = 1; i <= 12; i++) { |
| | | this.months.push(i) |
| | | } |
| | | for (let i = 1; i <= this.day; i++) { |
| | | this.days.push(i) |
| | | } |
| | | |
| | | this.$nextTick(() => { |
| | | if (this.currentDate == '全部日期' || !this.currentDate || this.currentDate == '') { |
| | | this.value = [this.years.indexOf(y), this.months.indexOf(mo), this.days.indexOf(da)]; |
| | | } else { |
| | | const dateArr = this.currentDate.split('-'); |
| | | const year = parseInt(dateArr[0]); |
| | | const month = parseInt(dateArr[1]); |
| | | const day = parseInt(dateArr[2]); |
| | | this.value = [this.years.indexOf(year), this.months.indexOf(month), this.days.indexOf( |
| | | day)]; |
| | | } |
| | | }) |
| | | }, |
| | | bindChange(e) { |
| | | this.value = e.detail.value |
| | | if (this.value[0] != 0) { |
| | | this.months = [] |
| | | for (let i = 1; i <= 12; i++) { |
| | | this.months.push(i) |
| | | } |
| | | this.day = new Date(new Date().getFullYear(), this.value[1], 0).getDate(); |
| | | this.days = [] |
| | | for (let i = 1; i <= this.day; i++) { |
| | | this.days.push(i) |
| | | } |
| | | } else { |
| | | this.months = [] |
| | | for (let i = 1; i <= 12; i++) { |
| | | this.months.push(i) |
| | | } |
| | | |
| | | this.day = new Date(new Date().getFullYear(), this.months[this.value[1]], 0).getDate(); |
| | | this.days = [] |
| | | let da = new Date().getDate() |
| | | for (let i = da; i <= this.day; i++) { |
| | | this.days.push(i) |
| | | } |
| | | } |
| | | |
| | | if (this.value[1] != 0) { |
| | | this.day = new Date(new Date().getFullYear(), this.months[this.value[1]], 0).getDate(); |
| | | this.days = [] |
| | | for (let i = 1; i <= this.day; i++) { |
| | | this.days.push(i) |
| | | } |
| | | } else { |
| | | this.days = [] |
| | | this.day = new Date(new Date().getFullYear(), this.months[this.value[1]], 0).getDate(); |
| | | let da = 1 |
| | | for (let i = da; i <= this.day; i++) { |
| | | this.days.push(i) |
| | | } |
| | | } |
| | | }, |
| | | submitDate() { |
| | | let value = '' |
| | | if (this.value[0] == -1) { |
| | | this.value[0] = 0 |
| | | } |
| | | |
| | | if (this.value[1] == -1) { |
| | | this.value[1] = 0 |
| | | } |
| | | |
| | | if (this.value[2] == -1) { |
| | | this.value[2] = 0 |
| | | } |
| | | let day = this.days[this.value[2]] < 10 ? '0' + this.days[this.value[2]] : this.days[this.value[2]] |
| | | if (this.months[this.value[1]] < 10) { |
| | | value = this.years[this.value[0]] + "-0" + this.months[this.value[1]] + '-' + day |
| | | } else { |
| | | value = this.years[this.value[0]] + "-" + this.months[this.value[1]] + '-' + day |
| | | } |
| | | |
| | | this.$emit('submit', value) |
| | | }, |
| | | currentDate: { |
| | | type: String, |
| | | default: () => '' |
| | | } |
| | | }) |
| | | |
| | | // 定义 emits |
| | | const emit = defineEmits(['close', 'submit']) |
| | | |
| | | // 响应式数据 |
| | | const indicatorStyle = ref({}) |
| | | const years = ref([]) |
| | | const months = ref([]) |
| | | const day = ref(31) |
| | | const days = ref([]) |
| | | const value = ref([0, 0, 0]) |
| | | const showPop = ref(false) |
| | | |
| | | // 监听 show 变化 |
| | | watch(() => props.show, (newValue) => { |
| | | console.log('111111111111111', newValue) |
| | | if (newValue) { |
| | | showPop.value = newValue |
| | | } |
| | | }) |
| | | |
| | | // 方法 |
| | | const open = () => { |
| | | months.value = [] |
| | | days.value = [] |
| | | years.value = [] |
| | | day.value = new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).getDate(); |
| | | let y = new Date().getFullYear() |
| | | let mo = new Date().getMonth() + 1 |
| | | let da = new Date().getDate() |
| | | for (let i = -100; i < 10; i++) { |
| | | years.value.push(y + i) |
| | | } |
| | | for (let i = 1; i <= 12; i++) { |
| | | months.value.push(i) |
| | | } |
| | | for (let i = 1; i <= day.value; i++) { |
| | | days.value.push(i) |
| | | } |
| | | |
| | | nextTick(() => { |
| | | // 默认选中今天 |
| | | let yearIndex = years.value.indexOf(y) |
| | | let monthIndex = months.value.indexOf(mo) |
| | | let dayIndex = days.value.indexOf(da) |
| | | |
| | | // 如果传入了有效的日期格式,则使用传入的日期 |
| | | if (props.currentDate && props.currentDate !== '全部日期' && props.currentDate !== '请选择' && props.currentDate !== '') { |
| | | const dateArr = props.currentDate.split('-'); |
| | | if (dateArr.length === 3) { |
| | | const year = parseInt(dateArr[0]); |
| | | const month = parseInt(dateArr[1]); |
| | | const dayVal = parseInt(dateArr[2]); |
| | | const yearIdx = years.value.indexOf(year); |
| | | const monthIdx = months.value.indexOf(month); |
| | | const dayIdx = days.value.indexOf(dayVal); |
| | | |
| | | // 只有当所有索引都有效时才使用传入的日期 |
| | | if (yearIdx !== -1 && monthIdx !== -1 && dayIdx !== -1) { |
| | | yearIndex = yearIdx; |
| | | monthIndex = monthIdx; |
| | | dayIndex = dayIdx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 确保索引有效,如果无效则使用今天的日期 |
| | | if (yearIndex === -1) yearIndex = years.value.indexOf(y); |
| | | if (monthIndex === -1) monthIndex = months.value.indexOf(mo); |
| | | if (dayIndex === -1) dayIndex = days.value.indexOf(da); |
| | | |
| | | value.value = [yearIndex, monthIndex, dayIndex]; |
| | | }) |
| | | } |
| | | |
| | | const bindChange = (e) => { |
| | | value.value = e.detail.value |
| | | if (value.value[0] != 0) { |
| | | months.value = [] |
| | | for (let i = 1; i <= 12; i++) { |
| | | months.value.push(i) |
| | | } |
| | | day.value = new Date(new Date().getFullYear(), value.value[1], 0).getDate(); |
| | | days.value = [] |
| | | for (let i = 1; i <= day.value; i++) { |
| | | days.value.push(i) |
| | | } |
| | | } else { |
| | | months.value = [] |
| | | for (let i = 1; i <= 12; i++) { |
| | | months.value.push(i) |
| | | } |
| | | |
| | | day.value = new Date(new Date().getFullYear(), months.value[value.value[1]], 0).getDate(); |
| | | days.value = [] |
| | | let da = new Date().getDate() |
| | | for (let i = da; i <= day.value; i++) { |
| | | days.value.push(i) |
| | | } |
| | | } |
| | | |
| | | if (value.value[1] != 0) { |
| | | day.value = new Date(new Date().getFullYear(), months.value[value.value[1]], 0).getDate(); |
| | | days.value = [] |
| | | for (let i = 1; i <= day.value; i++) { |
| | | days.value.push(i) |
| | | } |
| | | } else { |
| | | days.value = [] |
| | | day.value = new Date(new Date().getFullYear(), months.value[value.value[1]], 0).getDate(); |
| | | let da = 1 |
| | | for (let i = da; i <= day.value; i++) { |
| | | days.value.push(i) |
| | | } |
| | | } |
| | | } |
| | | |
| | | const submitDate = () => { |
| | | let dateValue = '' |
| | | if (value.value[0] == -1) { |
| | | value.value[0] = 0 |
| | | } |
| | | |
| | | if (value.value[1] == -1) { |
| | | value.value[1] = 0 |
| | | } |
| | | |
| | | if (value.value[2] == -1) { |
| | | value.value[2] = 0 |
| | | } |
| | | let dayVal = days.value[value.value[2]] < 10 ? '0' + days.value[value.value[2]] : days.value[value.value[2]] |
| | | if (months.value[value.value[1]] < 10) { |
| | | dateValue = years.value[value.value[0]] + "-0" + months.value[value.value[1]] + '-' + dayVal |
| | | } else { |
| | | dateValue = years.value[value.value[0]] + "-" + months.value[value.value[1]] + '-' + dayVal |
| | | } |
| | | |
| | | emit('submit', dateValue) |
| | | } |
| | | </script> |
| | | |
| | |
| | | |
| | | .color1 { |
| | | color: rgba(0, 0, 0, .60); |
| | | } |
| | | |
| | | ::v-deep .selected { |
| | | background-color: #007AFF; |
| | | /* 选中的背景色 */ |
| | | color: white; |
| | | /* 选中的文字颜色 */ |
| | | } |
| | | |
| | | .picker-view { |
| | |
| | | .sure-btn { |
| | | width: 635rpx; |
| | | height: 96rpx; |
| | | background: linear-gradient(270deg, #6BEADF 0%, #1BA8EC 100%); |
| | | border-radius: 48rpx; |
| | | background: linear-gradient(270deg, #08C866 0%, #06C584 100%); |
| | | box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(6, 197, 132, 0.15), 0rpx 8rpx 19rpx 0rpx rgba(6, 197, 132, 0.19); |
| | | border-radius: 67rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 35rpx; |
| | |
| | | }, |
| | | "usingComponents": true |
| | | }, |
| | | "sassImplementationName": "node-sass", |
| | | "mp-alipay": { |
| | | "usingComponents": true |
| | | }, |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/mineInfo/mineInfo", |
| | | "style": { |
| | | "navigationBarTitleText": "个人中心" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/order/order", |
| | | "style": { |
| | | "navigationBarTitleText": "我的订单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/tourist/tourist", |
| | | "style": { |
| | | "navigationBarTitleText": "选择游客" |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ticket/ticket", |
| | | "style": { |
| | | "navigationBarTitleText": "青城后山门票预订", |
| | | "navigationBarBackgroundColor": "#fff" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/book-notice/book-notice", |
| | | "style": { |
| | | "navigationBarTitleText": "预订须知", |
| | | "navigationBarBackgroundColor": "#fff" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/orderDetail/orderDetail", |
| | | "style": { |
| | | "navigationStyle": "custom" |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | :list="noticeList"></u-notice-bar> |
| | | </view> |
| | | <view class="iconList"> |
| | | <view class="relative br-19 bgcolor2 pt-27 pb-29"> |
| | | <view class="relative br-19 bgcolor2 pt-27 pb-29" @tap.stop="toTicket()"> |
| | | <view class="flex a-center br-154 py-12 px-12 ml-27 bgcolor3 w-fit"> |
| | | <view class="fs-27 lh-23 font-bold mr-4 color1">景区门票</view> |
| | | <image class="w-19 h-19 ml-4 shrink0" src="/static/image/home/Group@2x (3).png" /> |
| | |
| | | url: '/pages/notice/notice' |
| | | }) |
| | | } |
| | | const toTicket = () => { |
| | | uni.navigateTo({ |
| | | url: '/pages/ticket/ticket' |
| | | }) |
| | | } |
| | | </script> |
| | | <style> |
| | | page { |
| | |
| | | <template> |
| | | <view> |
| | | <image src="/static/image/mine/bg.png" class="w100 relative" mode="widthFix"></image> |
| | | |
| | | <view class="userInfo relative"> |
| | | <view class="info flex" @tap="goInfo"> |
| | | <image src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" class="avatar" |
| | | mode="aspectFill"> |
| | | </image> |
| | | <view class="info-de flex1 flex ml-19 j-between a-center"> |
| | | <view class="nickName"> |
| | | <view class="nickname"> |
| | | 卞琼梅 |
| | | </view> |
| | | <view class="phone"> |
| | | 17475792147 |
| | | </view> |
| | | </view> |
| | | |
| | | <image src="/static/image/mine/right.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="orderList"> |
| | | <view class="title flex j-between">景区门票 <view class="more">查看全部</view> |
| | | </view> |
| | | <view class="flex j-between mt-38"> |
| | | <view class="nopay flex flex-column j-center a-center"> |
| | | <image src="/static/image/mine/notpay.png" class="w-50 h-47" mode="aspectFill"></image> |
| | | <view class="mt-13 label">待支付</view> |
| | | </view> |
| | | |
| | | <view class="nopay flex flex-column j-center a-center"> |
| | | <image src="/static/image/mine/waitUse.png" class="w-46 h-46" mode="aspectFill"></image> |
| | | <view class="mt-13 label"> |
| | | 待支付 |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="nopay flex flex-column j-center a-center"> |
| | | <image src="/static/image/mine/userd.png" class="w-53 h-46" mode="aspectFill"></image> |
| | | <view class="mt-13 label"> |
| | | 已使用 |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="nopay flex flex-column j-center a-center"> |
| | | <image src="/static/image/mine/returnM.png" class="w-53 h-46" mode="aspectFill"></image> |
| | | <view class="mt-13 label"> |
| | | 售后退款 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="service-card"> |
| | | <view class="title flex j-between ml-27">常用服务</view> |
| | | |
| | | <view class="opt-card mt-8"> |
| | | <view class="opt-cell flex j-between pl-27 pr-27 a-center pt-30 pb-30"> |
| | | <view class="opt-left flex"> |
| | | <image src="/static/image/mine/list.png" class="w-35 h-38 mr-27" mode="aspectFill"></image> |
| | | <view class="title"> |
| | | 文创商品订单 |
| | | </view> |
| | | </view> |
| | | <image src="/static/image/mine/gary.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | </view> |
| | | <view class="opt-cell flex j-between pl-27 pr-27 a-center pt-30 pb-30"> |
| | | <view class="opt-left flex"> |
| | | <image src="/static/image/mine/account.png" class="w-42 h-38 mr-27" mode="aspectFill"> |
| | | </image> |
| | | <view class="title"> |
| | | 常用游客管理 |
| | | </view> |
| | | </view> |
| | | <image src="/static/image/mine/gary.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | </view> |
| | | <view class="opt-cell flex j-between pl-27 pr-27 a-center pt-30 pb-30"> |
| | | <view class="opt-left flex"> |
| | | <image src="/static/image/mine/tip.png" class="w-35 h-38 mr-27" mode="aspectFill"></image> |
| | | <view class="title"> |
| | | 发票管理 |
| | | </view> |
| | | </view> |
| | | <image src="/static/image/mine/gary.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | </view> |
| | | <view class="opt-cell flex j-between pl-27 pr-27 a-center pt-30 pb-30"> |
| | | <view class="opt-left flex"> |
| | | <image src="/static/image/mine/location.png" class="w-35 h-38 mr-27" mode="aspectFill"> |
| | | </image> |
| | | <view class="title"> |
| | | 收货地址管理 |
| | | </view> |
| | | </view> |
| | | <image src="/static/image/mine/gary.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | const info = ref({ userType: 1, phone: '', code: '', profilePhoto: '' }) |
| | | |
| | | onShow(() => { |
| | | htmlConfig(4).then(res => { |
| | | if (res.code == 200) { |
| | | if (res.data.content) { |
| | | res.data.content = res.data.content.replace(/<img/gi, |
| | | '<img style="max-width:100%;height:auto;margin:0 auto;display:block"') |
| | | } |
| | | content.value = res.data.content |
| | | } |
| | | }) |
| | | getInfo() |
| | | |
| | | // getInfo() |
| | | |
| | | }) |
| | | const getInfo = () => { |
| | |
| | | info.value = res.data |
| | | uni.setStorageSync('userInfo', res.data) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const goInfo = () => { |
| | | uni.navigateTo({ |
| | | url: '/pages/mineInfo/mineInfo' |
| | | }) |
| | | } |
| | | |
| | |
| | | </script> |
| | | |
| | | |
| | | <style> |
| | | <style scoped> |
| | | html, |
| | | page { |
| | | background-image: url("https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/b36f0148-0e33-461a-a8a4-30ede3c49b30.png"); |
| | | background-size: cover; |
| | | background: #F5F6F7; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss" scoped> |
| | | .pos-absolute { |
| | | left: 50%; |
| | | bottom: 12rpx; |
| | | transform: translate(-50%); |
| | | .avatar { |
| | | width: 154rpx; |
| | | height: 154rpx; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .color1 { |
| | | color: #666666; |
| | | .userInfo { |
| | | margin-top: -311.54rpx; |
| | | padding-left: 27rpx; |
| | | padding-right: 27rpx; |
| | | } |
| | | |
| | | .color2 { |
| | | color: #fedd9f; |
| | | .nickname { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 35rpx; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .color3 { |
| | | color: #ffe8bd; |
| | | .phone { |
| | | font-family: Plumb, Plumb; |
| | | font-weight: bold; |
| | | font-size: 27rpx; |
| | | color: #FFFFFF; |
| | | margin-top: 23rpx; |
| | | } |
| | | |
| | | .color4 { |
| | | color: #202f45; |
| | | .orderList { |
| | | margin-top: 38.46rpx; |
| | | background: #fff; |
| | | border-radius: 19rpx; |
| | | padding: 26.92rpx 26.92rpx 32.69rpx 26.92rpx; |
| | | } |
| | | |
| | | .color5 { |
| | | .title { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 29rpx; |
| | | color: #191F3F; |
| | | } |
| | | |
| | | .more { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 23rpx; |
| | | color: rgba(0, 0, 0, 0.45); |
| | | } |
| | | |
| | | .label { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 23rpx; |
| | | color: rgba(0, 0, 0, 0.65); |
| | | } |
| | | |
| | | .bgimg1 { |
| | | background-image: url("https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/9a204862-449f-47a4-9fb1-e9f68f90289f.png"); |
| | | background-size: cover; |
| | | } |
| | | |
| | | .bgcolor1 { |
| | | background: linear-gradient(270deg, #f9e1bb 0%, #f8e2be 100%); |
| | | } |
| | | |
| | | .bgcolor2 { |
| | | background-color: #fff; |
| | | .service-card { |
| | | background: #fff; |
| | | border-radius: 19rpx; |
| | | margin-top: 27rpx; |
| | | padding-top: 26.92rpx; |
| | | padding-bottom: 29.62rpx; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="pl-27 pr-27 flex flex-column a-center"> |
| | | <view class="mt-37 w-192 h-192 relative" style="border-radius: 50%;" @tap="getAvatar"> |
| | | <image class="w-192 h-192" |
| | | :src="avatar?avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" |
| | | mode="aspectFill" style="border-radius: 50%;"> |
| | | </image> |
| | | |
| | | <image src="/static/image/mine/edit.png" class="w-50 h-50 absolute" style="right: 12rpx; bottom: 5rpx;" |
| | | mode="aspectFill"> |
| | | </image> |
| | | |
| | | |
| | | </view> |
| | | <view class="van-cell border1 w100 flex flex-column" @tap="getNickName"> |
| | | 昵称 |
| | | <view class="flex a-center choice j-between" :class="nickName!='请选择'?'fs-bl':''">{{nickName}} |
| | | <image src="/static/image/mine/gary.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="van-cell border1 w100 flex flex-column" @tap="showSex = true"> |
| | | 性别 <view class="flex a-center choice j-between" :class="gender!='请选择'?'fs-bl':''">{{gender}} |
| | | <image src="/static/image/mine/gary.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | <view class="van-cell border1 w100 flex flex-column" @tap="showBir = true"> |
| | | 生日 <view class="flex a-center choice flex1 j-between" :class="birthday!='请选择'?'fs-bl':''">{{birthday}} |
| | | <image src="/static/image/mine/gary.png" class="w-23 h-23" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | <view class="van-cell border1 w100 flex flex-column"> |
| | | 电话 <view class="name"> |
| | | <input type="text" |
| | | style="text-align: left;font-family: PingFangSC, PingFang SC;font-weight: 500;font-size: 27rpx;color: #082400;" |
| | | v-model="phone" @blur="updateUserInfo" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="logout" @tap="logout"> |
| | | 退出登录 |
| | | </view> |
| | | </view> |
| | | <!-- 性别选择弹窗组件 --> |
| | | <checkSex :show="showSex" @close="showSex = false" @submit="handleSexSubmit" /> |
| | | <!-- 生日选择弹窗组件 --> |
| | | <selectDateYear :show="showBir" :currentDate="birthday" @close="showBir = false" @submit="handleBirthdaySubmit" /> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ref, reactive } from "vue"; |
| | | import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app" |
| | | import checkSex from "../../components/checkSex.vue" |
| | | import selectDateYear from "../../components/selectDateYear.vue" |
| | | |
| | | const nickName = ref('请选择') |
| | | const gender = ref('请选择') |
| | | const birthday = ref('请选择') |
| | | const avatar = ref('') |
| | | const phone = ref('') |
| | | |
| | | // 性别选择弹窗显隐 |
| | | const showSex = ref(false) |
| | | // 生日选择弹窗显隐 |
| | | const showBir = ref(false) |
| | | |
| | | // 性别选择回调 |
| | | const handleSexSubmit = (val : number[] | any) => { |
| | | // 组件当前提交的是索引数组,例如 [0] / [1] |
| | | const index = Array.isArray(val) ? val[0] : 0 |
| | | gender.value = index === 0 ? '男' : '女' |
| | | showSex.value = false |
| | | } |
| | | |
| | | // 生日选择回调 |
| | | const handleBirthdaySubmit = (dateValue : string) => { |
| | | birthday.value = dateValue |
| | | showBir.value = false |
| | | // 这里可以添加更新用户信息的逻辑 |
| | | // updateUserInfo() |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | page, |
| | | html { |
| | | background: #fff; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .popup-content { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .tip { |
| | | height: 46rpx; |
| | | background: rgba(0, 0, 0, 0.4); |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 23rpx; |
| | | color: #FFFFFF; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .van-cell { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | line-height: 60rpx; |
| | | padding: 28.46rpx 0; |
| | | |
| | | .name { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 27rpx; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | line-height: 38rpx; |
| | | } |
| | | } |
| | | |
| | | .border1 { |
| | | border-bottom: 1rpx solid rgba(151, 151, 151, .2); |
| | | } |
| | | |
| | | .choice { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 400; |
| | | font-size: 28rpx; |
| | | color: rgba(0, 0, 0, .4); |
| | | } |
| | | |
| | | .fs-bl { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | |
| | | .logout { |
| | | position: fixed; |
| | | bottom: 92.32rpx; |
| | | width: 327rpx; |
| | | height: 96rpx; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(255, 106, 11, 0.16); |
| | | border-radius: 58rpx; |
| | | border: 2rpx solid #06C584; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 31rpx; |
| | | color: #06C584; |
| | | text-shadow: 0px 4px 25px rgba(255, 106, 11, 0.16); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tab-card mt-38 flex pl-27 pr-27 j-between"> |
| | | <view class="tab-item relative " v-for="(item,index) in tabList" :key="index" @tap="changeTab(item)" |
| | | :class="activeTab==item.value && 'activeItem'"> |
| | | {{item.label}} |
| | | <image v-if="activeTab==item.value" src="/static/image/mine/Line@2x.png" class="tab-active" |
| | | mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="order-List mt-46"> |
| | | |
| | | <view class="list-item"> |
| | | <view class="item-top flex j-between"> |
| | | <view class="name">青城后山成人票</view> |
| | | <view class="status">待支付</view> |
| | | </view> |
| | | |
| | | <view class="good-info flex"> |
| | | <image src="/static/image/home/backImg.png" class="w-154 h-154 br-19" mode="aspectFill"></image> |
| | | |
| | | <view class="info"> |
| | | <view class="order-time">2025-09-09</view> |
| | | <view class="use-time">2025-09-09 周五</view> |
| | | <view class="use-time">16:00</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ref, reactive } from "vue"; |
| | | |
| | | const tabList = ref([{ |
| | | label: '全部', |
| | | value: 1 |
| | | }, { |
| | | label: '待支付', |
| | | value: 2 |
| | | }, { |
| | | label: '待使用', |
| | | value: 3 |
| | | }, { |
| | | label: '已使用', |
| | | value: 4 |
| | | }, { |
| | | label: '退款', |
| | | value: 5 |
| | | }]) |
| | | |
| | | const activeTab = ref(1) |
| | | |
| | | |
| | | const changeTab = (item) => { |
| | | activeTab.value = item.value |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | page, |
| | | html { |
| | | background: #fff; |
| | | } |
| | | </style> |
| | | |
| | | <style scoped lang="scss"> |
| | | .tab-item { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 31rpx; |
| | | color: #4F4F4F; |
| | | width: 110rpx; |
| | | text-align: center; |
| | | |
| | | .tab-active { |
| | | position: absolute; |
| | | width: 86rpx; |
| | | height: 42rpx; |
| | | bottom: -28rpx; |
| | | left: 0rpx; |
| | | right: 0; |
| | | margin: 0 auto; |
| | | } |
| | | } |
| | | |
| | | .activeItem { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 38rpx; |
| | | color: #303133; |
| | | |
| | | .tab-active { |
| | | position: absolute; |
| | | width: 86rpx; |
| | | height: 42rpx; |
| | | bottom: -28rpx; |
| | | left: 0; |
| | | right: 0; |
| | | margin: 0 auto; |
| | | } |
| | | } |
| | | |
| | | .list-item { |
| | | width: 696.15rpx; |
| | | height: 388.46rpx; |
| | | background: url('/static/image/mine/orderBg.png') no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | margin: 0 auto; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="relative"> |
| | | <view class="filter-time"> |
| | | <view class="date-card"> |
| | | <view class="date-list"> |
| | | <view class="date-item" v-for="(item,index) in dateList" :key="index" @tap.stop="changeDate(item)"> |
| | | <view>{{item.date||""}}</view> |
| | | <view>{{item.week||''}}</view> |
| | | <image v-if="activeDate==item.date" src="/static/image/ticket/active.png" class="active-date" /> |
| | | </view> |
| | | </view> |
| | | <view class="choose-date"> |
| | | <view>全部日期</view> |
| | | <image src="/static/image/ticket/more.png" class="w-13 h-7 mt-17" /> |
| | | </view> |
| | | </view> |
| | | <view class="time-card"> |
| | | <view class="time-item" v-for="(item,index) in timeList" :key="index" |
| | | :class="activeTime==item?'active-time':''" @tap.stop="changeTime(item)"> |
| | | {{item}} |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="ticket-list"> |
| | | <view class="ticket-item" v-for="(item,index) in ticketList" :key="index" @tap.stop="toDetail(item)"> |
| | | <view class="flex flex-column a-center j-between"> |
| | | <view class="flex flex-column"> |
| | | <view class="title">{{item.title}}</view> |
| | | <view class="time">有效期至{{item.time}}</view> |
| | | </view> |
| | | <view class="notice"> |
| | | <image src="/static/image/ticket/notice.png" class="w-23 h-23" /> |
| | | <view class="notice-txt">预订须知</view> |
| | | <image src="/static/image/ticket/right.png" class="w-11 h-19" /> |
| | | </view> |
| | | </view> |
| | | <view class="flex flex-column a-center j-between"> |
| | | <view class="flex flex-column a-center"> |
| | | <view class="flex a-center"> |
| | | <view class="unit">¥</view> |
| | | <view class="price">{{item.price||0}}</view> |
| | | </view> |
| | | <view class="residue">剩余:{{item.residue||0}}张</view> |
| | | |
| | | </view> |
| | | <view class="book">立即预订</view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ref, reactive } from "vue"; |
| | | import { onLoad, onUnload, onShow, onReachBottom } from "@dcloudio/uni-app"; |
| | | const dateList = ref([{ date: '12-12', week: '今天' }, { date: '12-13', week: '今天' }, { date: '12-14', week: '今天' }, { date: '12-15', week: '今天' }, { date: '12-16', week: '今天' }]) |
| | | const activeDate = ref('12-13') |
| | | const timeList = ref(['08:00-08:30', '09:00-09:30', '10:00-10:30', '11:00-11:30', '12:00-12:30', '13:00-13:30']) |
| | | const activeTime = ref('09:00-09:30') |
| | | const ticketList = ref([ |
| | | { |
| | | id: 1, |
| | | title: '成人票', |
| | | time: '2025年12月31日', |
| | | price: '20.00', |
| | | residue: 209, |
| | | }, |
| | | { |
| | | id: 2, |
| | | title: '儿童票', |
| | | time: '2025年12月31日', |
| | | price: '10.00', |
| | | residue: 120, |
| | | }, |
| | | { |
| | | id: 3, |
| | | title: '老人票', |
| | | time: '2025年12月31日', |
| | | price: '15.00', |
| | | residue: 80, |
| | | }, |
| | | { |
| | | id: 4, |
| | | title: '家庭套票(2大1小)', |
| | | time: '2025年12月31日', |
| | | price: '50.00', |
| | | residue: 60, |
| | | }, |
| | | { |
| | | id: 5, |
| | | title: '夜场票', |
| | | time: '2025年12月31日', |
| | | price: '25.00', |
| | | residue: 150, |
| | | }, |
| | | { |
| | | id: 6, |
| | | title: '早鸟票', |
| | | time: '2025年12月15日', |
| | | price: '18.00', |
| | | residue: 300, |
| | | } |
| | | ]) |
| | | const changeDate = (e) => { |
| | | activeDate.value = e.date |
| | | } |
| | | const changeTime = (e) => { |
| | | activeTime.value = e |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .filter-time { |
| | | background-color: #fff; |
| | | |
| | | .date-card { |
| | | padding-left: 32rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .date-list { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .date-item { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | padding: 19rpx 0 25rpx 0; |
| | | position: relative; |
| | | |
| | | view { |
| | | font-weight: 500; |
| | | font-size: 27rpx; |
| | | color: rgba(0, 0, 0, 0.65); |
| | | line-height: 38rpx; |
| | | } |
| | | } |
| | | |
| | | .active-date { |
| | | width: 123.08rpx; |
| | | height: 115.38rpx; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | } |
| | | |
| | | .choose-date { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.25); |
| | | padding: 18rpx; |
| | | width: 102rpx; |
| | | |
| | | view { |
| | | width: 46rpx; |
| | | font-weight: 500; |
| | | font-size: 23rpx; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | line-height: 31rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .time-card { |
| | | background-color: #fff; |
| | | padding: 26rpx 0 26rpx 26rpx; |
| | | overflow-x: auto; |
| | | overflow-y: hidden; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: nowrap; |
| | | white-space: nowrap; |
| | | -webkit-overflow-scrolling: touch; |
| | | /* 隐藏滚动条 */ |
| | | scrollbar-width: none; |
| | | /* Firefox */ |
| | | -ms-overflow-style: none; |
| | | /* IE 10+ */ |
| | | |
| | | &::-webkit-scrollbar { |
| | | display: none; |
| | | /* Chrome Safari */ |
| | | } |
| | | |
| | | .time-item { |
| | | flex-shrink: 0; |
| | | width: 185rpx; |
| | | background: #F5F6F7; |
| | | border-radius: 19rpx; |
| | | padding: 11rpx 15rpx; |
| | | margin-right: 20rpx; |
| | | text-align: center; |
| | | font-size: 27rpx; |
| | | color: rgba(0, 0, 0, 0.65); |
| | | } |
| | | |
| | | .active-time { |
| | | flex-shrink: 0; |
| | | width: 185rpx; |
| | | background: #fff; |
| | | border-radius: 19rpx; |
| | | border: 2rpx solid #06C584; |
| | | margin-right: 20rpx; |
| | | text-align: center; |
| | | font-size: 27rpx; |
| | | color: #06C584; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .ticket-list { |
| | | padding: 19rpx; |
| | | |
| | | .ticket-item { |
| | | background: #FFFFFF; |
| | | border-radius: 19rpx; |
| | | margin-top: 19rpx; |
| | | padding: 30rpx 38rpx 38rpx 38rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .title { |
| | | font-weight: 600; |
| | | font-size: 46rpx; |
| | | color: #303133; |
| | | line-height: 63rpx; |
| | | margin: 5rpx 0 12rpx 0; |
| | | } |
| | | |
| | | .time { |
| | | font-weight: 500; |
| | | font-size: 27rpx; |
| | | color: rgba(22, 19, 19, 0.65); |
| | | line-height: 38rpx; |
| | | } |
| | | |
| | | .notice { |
| | | width: 317rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | background: linear-gradient(270deg, rgba(247, 252, 247, 0) 0%, #ECF8ED 100%); |
| | | border-radius: 19rpx; |
| | | padding: 9rpx 15rpx; |
| | | |
| | | .notice-txt { |
| | | font-weight: 500; |
| | | font-size: 23rpx; |
| | | color: #06C584; |
| | | line-height: 33rpx; |
| | | margin: 0 30rpx 0 17rpx; |
| | | } |
| | | } |
| | | |
| | | .unit { |
| | | font-weight: 600; |
| | | font-size: 35rpx; |
| | | color: #FF6257; |
| | | line-height: 48rpx; |
| | | } |
| | | |
| | | .price { |
| | | font-weight: 600; |
| | | font-size: 57rpx; |
| | | color: #FF6257; |
| | | line-height: 48rpx; |
| | | } |
| | | |
| | | .residue { |
| | | width: 173.08rpx; |
| | | height: 38.46rpx; |
| | | font-size: 23rpx; |
| | | color: #8C8C8C; |
| | | line-height: 38rpx; |
| | | text-align: center; |
| | | z-index: 99; |
| | | background-image: url(/static/image/ticket/numBg.png); |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | |
| | | .book { |
| | | width: 154rpx; |
| | | height: 115rpx; |
| | | margin-top: 19rpx; |
| | | background: linear-gradient(180deg, #06C584 0%, #06C584 100%); |
| | | box-shadow: 0rpx 8rpx 27rpx 0rpx rgba(6, 197, 132, 0.2); |
| | | border-radius: 19rpx; |
| | | padding: 13rpx 46rpx 17rpx 46rpx; |
| | | |
| | | font-weight: 600; |
| | | font-size: 31rpx; |
| | | color: #FFFFFF; |
| | | line-height: 42rpx; |
| | | } |
| | | } |
| | | } |
| | | </style> |