From 925e4a4ba94a82e2fa7890e7d8c071f0e9b8aeae Mon Sep 17 00:00:00 2001 From: zmt Date: Fri, 25 Feb 2022 11:29:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nxTemp/config/requestConfig.js | 4 +-- nxTemp/request/core/request.js | 5 ++-- pages/event/event_grade.vue | 63 ++++++++++++++++++++++++++---------------- pages/event/event_list.vue | 21 +++++++++++++- pages/login/login.vue | 27 ++++++++---------- 5 files changed, 76 insertions(+), 44 deletions(-) diff --git a/nxTemp/config/requestConfig.js b/nxTemp/config/requestConfig.js index d6fdd03..6e92ec0 100644 --- a/nxTemp/config/requestConfig.js +++ b/nxTemp/config/requestConfig.js @@ -183,7 +183,7 @@ $http.dataFactory = async function(res) { // 返回错误的结果(catch接受数据) return Promise.reject({ statusCode: 0, - errMsg: "【request】" + (httpData.info || httpData.msg), + errMsg: "请求失败:" + (httpData.info || httpData.msg), data: res.data }); } else if (httpData.code == "401") { // token失效 @@ -211,7 +211,7 @@ $http.dataFactory = async function(res) { // 返回错误的结果(catch接受数据) return Promise.reject({ statusCode: 0, - errMsg: "【request】" + (httpData.info || httpData.msg|| httpData.message), + errMsg: "请求失败:" + (httpData.info || httpData.msg|| httpData.message), data: res.data }); } diff --git a/nxTemp/request/core/request.js b/nxTemp/request/core/request.js index f6c8912..d995207 100644 --- a/nxTemp/request/core/request.js +++ b/nxTemp/request/core/request.js @@ -88,9 +88,10 @@ export default class request { changekeys.forEach(key => { requestInfo[key] = requestStart[key]; }); - } else { + } else { + console.log("【request】请求开始拦截器未通过"); throw { - errMsg: "【request】请求开始拦截器未通过", + errMsg: "请重试", statusCode: 0, data: requestInfo.data, method: requestInfo.method, diff --git a/pages/event/event_grade.vue b/pages/event/event_grade.vue index 73f288c..04a2cb9 100644 --- a/pages/event/event_grade.vue +++ b/pages/event/event_grade.vue @@ -24,14 +24,14 @@ - + {{u.member_name}} - 已打分 - 打分 - 数据 + 已打分 + 打分 + 数据 @@ -52,14 +52,14 @@ - + {{u.member_name}} - 已打分 - 打分 - 数据 + 已打分 + 打分 + 数据 @@ -97,11 +97,14 @@ {{match_name}}数据 {{gradeDataRank.user.member_name}}分数录入 - - - {{si.rank_param_name}} - - + + + + {{si.rank_param_name}} + + + + - 请输入成员该赛程最终得分,非累计 + 数据录入会累计到用户原有数据中 保存 @@ -144,11 +147,11 @@ pageList:[], gradeData:{//打分弹窗数据 user:"", - score:0 + score:"" }, gradeDataRank:{//入围数据录入 user:"", - score:0, + score:"", list:"" }, brand_id:"", @@ -176,7 +179,7 @@ methods: { //更新页面列表 updatePage() { - if(this.listLoadFinished)return this.$tools.showNone("已加载完毕") + if(this.listLoadFinished)return console.log("已加载完毕") getPostAPI(this)(this.postData).then(res => { this.pageList.push(...res.list) this.match_name = res.match_name @@ -224,7 +227,9 @@ }, saveGrade() {//保存分数 let {score} = this.gradeData - let {order_no,schedule_son_id,id:schedule_id} = this.gradeData.user + score = parseFloat(score) + let {order_no,schedule_son_id} = this.gradeData.user + let {id:schedule_id} = this.gradeData.item if(score<=0)return this.$tools.showNone("请输入分数"); getPostAPI(this)(getPostData(this)).then(res => { this.$tools.showNone("已保存"); @@ -241,25 +246,31 @@ return [{order_no,schedule_son_id,schedule_id,score},{order_no,score,brand_id}][that.headIndex] } }, - openGrade(user) { + openGrade(item,user) { this.showGrade = true this.gradeData.user = user - this.gradeData.score = "" - console.log('open',JSON.stringify(user)); + this.gradeData.score = user.score //测试要求回显 + this.gradeData.item = item + console.log('open',item,JSON.stringify(user)); }, closeGrade() { this.showGrade = false + this.resetPostData() + this.updatePage() console.log('closeGrade'); }, - async openGradeRank(user) { + async openGradeRank(item,user) { this.gradeDataRank.user = user - this.gradeDataRank.score = "" + this.gradeDataRank.score = user.score //测试要求回显 + this.gradeDataRank.item = item let res = await this.updateRankList() this.showGradeRank = true console.log('openGradeRank',res); }, closeGradeRank() { this.showGradeRank = false + this.resetPostData() + this.updatePage() console.log('closeGradeRank'); }, saveRank(){ @@ -279,12 +290,13 @@ function getRankData(that){ return that.gradeDataRank.list.map((item)=>{ let {id,val} = item + val = parseFloat(val) return {id,val} }) } function checkData(list){ return list.every((e)=>{ - return parseInt(e.val)>0 + return parseFloat(e.val)>0 }) } }, @@ -480,6 +492,9 @@ padding-left:72rpx; padding-right: 80rpx; .g-input-box{ + .scroll-Y{ + height: 300rpx; + } .b-item{ margin-top: 20rpx; > text{ diff --git a/pages/event/event_list.vue b/pages/event/event_list.vue index be82f9f..9266841 100644 --- a/pages/event/event_list.vue +++ b/pages/event/event_list.vue @@ -15,7 +15,7 @@ 前报名 - + {{i.match_status_text}} @@ -138,6 +138,25 @@ page{ height: 224rpx; background-color: lightgray; } + .img_tag{ + position: absolute; + left: 40rpx; + top: 120rpx; + z-index: 99; + width: 100rpx; + height: 40rpx; + background: #009874; + border-radius: 6rpx; + font-size: 24rpx; + color: #FFFFFF; + font-weight: border; + text-align: center; + line-height: 40rpx; + } + .img_tag_white{ + background: #FFFFFF; + color: #9A9A9D; + } .info{ width: 350rpx; font-size: 36rpx; diff --git a/pages/login/login.vue b/pages/login/login.vue index 4a68c52..2d58e84 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -8,7 +8,9 @@ - 手机号码格式错误,请重新填写 + + 手机号码格式错误,请重新填写 + @@ -21,7 +23,9 @@ {{count}}s - 验证码错误,请重新填写 + + 验证码错误,请重新填写 + @@ -56,7 +60,7 @@ data() { return { sended:false,//是否发送验证码 - count:5, + count:60, code:"", agreed:false,//是否同意协议 login: {//后台让先写死 @@ -139,7 +143,7 @@ } postSendSMS({mobile}).then(res => { this.$tools.showNone("发送成功"); - this.login.ticket = res.data||"" + this.login.ticket = res||"" setButtonCount(this) }); function setButtonCount(that){//激活验证码交互 @@ -160,7 +164,7 @@ if(!this.agreed){ return this.$tools.showNone("请确认已阅读并同意隐私协议"); } - if(e.detail.errMsg!=="getPhoneNumber:ok")return this.$tools.showNone(e.detail.errMsg) + if(e.detail.errMsg!=="getPhoneNumber:ok")return this.$tools.showNone("该操作需要您的手机号码信息") this.$tools.showNone("解析数据...") const accountInfo = uni.getAccountInfoSync(); @@ -211,22 +215,15 @@ } .list { - display: flex; - flex-direction: column; padding-top: 130rpx; padding-left: 70rpx; padding-right: 70rpx; - position: relative; .tips{ - // position: absolute; - // left: 10rpx; - text-align: left; + height: 50rpx; + padding-top: 10rpx; width: 100%; - margin-bottom: 20rpx; - margin-top: 10rpx; color: #EA5061; - margin-left: -20rpx; - } + } } .list-call {