diff --git a/src/main/resources/views/mobile/train/trainInfo.html b/src/main/resources/views/mobile/train/trainInfo.html index 8bddc2c..e7b6351 100644 --- a/src/main/resources/views/mobile/train/trainInfo.html +++ b/src/main/resources/views/mobile/train/trainInfo.html @@ -39,6 +39,42 @@ layout("/mobile/platform.html"){ font-size: 12px; } + .train-card { + position: relative; + overflow: hidden; + } + + .train-card-actions { + display: flex; + justify-content: flex-end; + align-items: center; + flex-wrap: wrap; + gap: 8px; + margin-top: 10px; + } + + .train-card-button { + width: 74px; + height: 28px; + } + + .train-card-status { + width: 74px; + text-align: right; + line-height: 1; + } + + .train-card-status image { + width: 52px; + height: auto; + } + + .train-list-wrapper { + /* 给底部固定 tabbar 和安全区预留空间,避免最后一张卡片被遮挡 */ + padding-bottom: calc(80px + env(safe-area-inset-bottom)); + box-sizing: border-box; + } + .train-title { color: grey; } @@ -152,6 +188,7 @@ layout("/mobile/platform.html"){ .van-tabs__nav--complete { padding: 0; } + .risk-dialog-wrapper { display: flex; flex-direction: column; @@ -166,18 +203,18 @@ layout("/mobile/platform.html"){ padding-bottom: 16px; /* 给按钮留点空间 */ } - .remark-content{ + .remark-content { width: 100%; max-width: 100%; - /* height: calc(100vh - 46px - 44px); - overflow-y: auto;*/ + /* height: calc(100vh - 46px - 44px); + overflow-y: auto;*/ } - .remark-content *{ - max-width: 100%!important; + .remark-content * { + max-width: 100% !important; } - .table-class{ + .table-class { width: 100%; margin-top: 10px; border-radius: 5px; @@ -186,14 +223,17 @@ layout("/mobile/platform.html"){ font-size: 13px; table-layout: fixed; border-collapse: collapse; + th { background-color: #f2f2f2; border: 1px solid #dddddd; } + tr { text-align: center; border-bottom: 1px solid #dddddd; } + td { border: 1px solid #dddddd; } @@ -209,24 +249,24 @@ layout("/mobile/platform.html"){ :options="activityOptions"> + + + + + - - - - - - - + - @@ -282,29 +322,33 @@ layout("/mobile/platform.html"){ v-if="o.isSign === true && tableData.wechat" style="color: #dd6363">点我查看微信群二维码 - - 我要报名 - + + + 我要报名 + - - 取消报名 - + + 取消报名 + - + + + + - - - - - + + + + + @@ -383,7 +427,8 @@ layout("/mobile/platform.html"){ - @@ -410,17 +455,21 @@ layout("/mobile/platform.html"){ --> - + - - + + - + @@ -438,10 +487,10 @@ layout("/mobile/platform.html"){ @@ -463,8 +512,12 @@ layout("/mobile/platform.html"){ - 活动报名 - 我的活动 + 活动报名 + + 我的活动 + @@ -573,24 +626,24 @@ layout("/mobile/platform.html"){ this.signUsers = data }, tabClick(name, title) { - if(this.courseType === '0' && this.activityStatus !== '1') { + if (this.courseType === '0' && this.activityStatus !== '1') { this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title) } else { this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title && o.courseType === this.courseType) } }, calcSignUpCount(o) { - if(o.reserveMode === 2) { + if (o.reserveMode === 2) { let lave = 0 let lave2 = 0 - if(o.hasRegisterNum < o.coursePeopleNumber) { + if (o.hasRegisterNum < o.coursePeopleNumber) { lave = o.coursePeopleNumber - o.hasRegisterNum lave2 = o.courseReservedNumber } else { lave = 0 lave2 = (o.coursePeopleNumber + o.courseReservedNumber) - o.hasRegisterNum } - let str = "(余" + lave +"/" + o.coursePeopleNumber + "人" + let str = "(余" + lave + "/" + o.coursePeopleNumber + "人" + ",候补余" + lave2 + "/" + o.courseReservedNumber + "人)" return str } else { @@ -598,7 +651,7 @@ layout("/mobile/platform.html"){ return "(无名额限制/已报" + o.hasRegisterNum + "人)" } else { let lave = o.coursePeopleNumber - (o.hasRegisterNum + o.courseReservedNumber) - return "(余" + lave +"/" + o.coursePeopleNumber + "人)" + return "(余" + lave + "/" + o.coursePeopleNumber + "人)" } } }, @@ -654,7 +707,7 @@ layout("/mobile/platform.html"){ clickCourseId: o.courseId, id: o.id, }) - if(resp.code === 0) { + if (resp.code === 0) { vant.Dialog.alert({message: '签到成功'}) await this.pageData() o.isAttend = true @@ -725,11 +778,11 @@ layout("/mobile/platform.html"){ reject([]) }) })*/ - geolocation.getCurrentPosition(function(status,result){ - if(status === 'complete'){ + geolocation.getCurrentPosition(function (status, result) { + if (status === 'complete') { //alert(result.position) locations = result.position - }else{ + } else { } }); }, @@ -769,13 +822,13 @@ layout("/mobile/platform.html"){ await this.getCourseTimeSelectList(o) } - if(res.code !== 0) { + if (res.code !== 0) { vant.Dialog.alert({ title: '提示', message: res.msg, confirmButtonColor: '#1867b0' }) - if(res.code !== 3) { + if (res.code !== 3) { return } } @@ -800,14 +853,14 @@ layout("/mobile/platform.html"){ this.joinPopup = true }, async getCourseTimeSelectList(o) { - const resp = await $.post('/platform/mobile/trainSignUpActivity/getCourseTimeSelectList',{courseId: o.id}) + const resp = await $.post('/platform/mobile/trainSignUpActivity/getCourseTimeSelectList', {courseId: o.id}) if (resp.code === 0) { this.courseTimeSelectList = resp.data } else { this.$toast.fail("获取时段信息失败,请联系管理员") } }, - onCourseConfirm(val){ + onCourseConfirm(val) { this.formData.activityCourseId = val.value this.$set(this.formData, "activityCourseId", val.value) this.$set(this.formData, "courseTimeName", val.text.substring(0, 12)) @@ -825,7 +878,7 @@ layout("/mobile/platform.html"){ //获取家属是多少人 let per = 0 this.dynamicColumnsData.forEach(item => { - if(item.columnCode === 'xdqsrs') { + if (item.columnCode === 'xdqsrs') { per += Number(item.columnValue) } }) @@ -834,7 +887,7 @@ layout("/mobile/platform.html"){ courseId: this.choose.id, currentFamilyNumber: per, }) - if(res.code !== 0) { + if (res.code !== 0) { vant.Dialog.alert({ title: '提示', message: res.msg, @@ -845,7 +898,7 @@ layout("/mobile/platform.html"){ let flag = this.choose.courseIsLimitApply if (flag) { - const resp = await $.post('/platform/mobile/trainSignUpActivity/validateSourceSignUp',{activityCourseId: this.formData.activityCourseId}) + const resp = await $.post('/platform/mobile/trainSignUpActivity/validateSourceSignUp', {activityCourseId: this.formData.activityCourseId}) if (resp.code !== 0) { vant.Dialog.alert({ title: '温馨提示', @@ -902,14 +955,14 @@ layout("/mobile/platform.html"){ } this.popupShow = true }, - showRemark(o){ + showRemark(o) { this.remarkShow = true this.clickCourseRemark = o this.courseRemark = o.remarks }, - remarkClick(event){ + remarkClick(event) { //如果点击的是图片 - if(event.target.tagName === 'IMG'){ + if (event.target.tagName === 'IMG') { vant.ImagePreview([event.target.src]) } }, @@ -926,7 +979,7 @@ layout("/mobile/platform.html"){ scrollWheel: true, }) - AMap.plugin('AMap.Geolocation', function() { + AMap.plugin('AMap.Geolocation', function () { geolocation = new AMap.Geolocation({ // 是否使用高精度定位,默认:true enableHighAccuracy: true, @@ -979,7 +1032,7 @@ layout("/mobile/platform.html"){ this.tableData = resp.data this.assortList = Array.from(new Set(this.tableData.courseList.map(o => o.assort).filter(o => o !== '' && o !== undefined))) this.tempArray = clone(this.tableData) - if(this.assortList.length > 0 && this.activityStatus !== '1') { + if (this.assortList.length > 0 && this.activityStatus !== '1') { this.tableData.courseList = this.tableData.courseList.filter(o => o.assort === this.assortList[0]) } const type = this.trainTypeList.find(o => o.code === this.tableData.trainType) @@ -1034,8 +1087,8 @@ layout("/mobile/platform.html"){ this.tableData.courseList = [] this.startLoading() } - if(this.assortList.length > 0 && this.activityStatus !== '1') { - if(value === '0') { + if (this.assortList.length > 0 && this.activityStatus !== '1') { + if (value === '0') { this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === this.assort) } else { this.tableData.courseList = this.tempArray.courseList.filter(item => item.courseType === value && item.assort === this.assort) @@ -1054,7 +1107,7 @@ layout("/mobile/platform.html"){ this.activity = resp.data } }, - async getUnionList(){ + async getUnionList() { const {data} = await $.get("/platform/vi/common/unions") data.forEach(v => { v.text = v.unionname