From bc89495336ca85a70c724c67e2dfe23eef48b86e Mon Sep 17 00:00:00 2001 From: chenteng <17864191895@163.com> Date: Wed, 5 Aug 2020 17:20:56 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9=20=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E8=B5=84=E6=96=99=E5=A7=93=E5=90=8D=20=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=90=B9=E5=93=A8=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=BF=87=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/topics/talents/index.js | 37 ++++++++++++++++++++++++------ pages/topics/talents/index.wxml | 4 ++-- pages/topics/talents/index.wxss | 3 ++- pages/user/myInfo/index.js | 40 +++++++++++++++++++++++++++------ pages/user/myInfo/index.wxml | 2 +- 5 files changed, 68 insertions(+), 18 deletions(-) diff --git a/pages/topics/talents/index.js b/pages/topics/talents/index.js index 3fea50f..a8e06ec 100644 --- a/pages/topics/talents/index.js +++ b/pages/topics/talents/index.js @@ -89,11 +89,18 @@ Component({ }) }, bindTextAreaInput(e) { - this.setData({ - messageDetail: e.detail.value - }) + if(this.data.messageDetail.length <= 200){ + this.setData({ + messageDetail: e.detail.value + }) + }else{ + wx.showToast({ + title: '超过字数', + icon: 'none', + duration: 2000, + }) + } }, - uplaodFile(files) { console.log('upload files', files) // 文件上传的函数,返回一个promise @@ -144,6 +151,21 @@ Component({ }) return } + if (this.data.messageDetail.length >200){ + let th = this + wx.showModal({ + title: '提示', + content: '问题超过字数,请重新输入', + showCancel:false, + success: function (res) { + console.log(res); + setTimeout(function(){th.setData({ + messageDetail: '' + })},500) + }, + }) + return + } //判断是否选择街道 if (this.data.streetID === ''){ wx.showModal({ @@ -165,7 +187,7 @@ Component({ },()=>{ wx.showModal({ title: '提交成功', - content: '问题已收到,我们会尽快给您答复的!', + content: '问题已收到!', cancelText:'知道了', confirmText:'查看进度', success (res) { @@ -192,8 +214,9 @@ Component({ }) } }) - - + this.setData({ + streetsIndex: 0, + }) } }, diff --git a/pages/topics/talents/index.wxml b/pages/topics/talents/index.wxml index a75d4cd..bed296e 100644 --- a/pages/topics/talents/index.wxml +++ b/pages/topics/talents/index.wxml @@ -6,10 +6,10 @@ -