From 0b523220931d70aa752c3beaca5ed32ca85511c5 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期四, 28 三月 2024 11:36:05 +0800 Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master --- pages/personalCenter/feedBackSubmit/index.js | 71 ++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 31 deletions(-) diff --git a/pages/personalCenter/feedBackSubmit/index.js b/pages/personalCenter/feedBackSubmit/index.js index 202a52c..5536346 100644 --- a/pages/personalCenter/feedBackSubmit/index.js +++ b/pages/personalCenter/feedBackSubmit/index.js @@ -86,41 +86,50 @@ this.data.lock = false; if (this.data.userName.replace(/^\s*|\s*$/g, "")) { if (this.data.mannder.replace(/^\s*|\s*$/g, "")) { - if (this.data.content.replace(/^\s*|\s*$/g, "")) { - let submitData = { - content: this.data.content.replace(/^\s*|\s*$/g, ""), - name: this.data.userName.replace(/^\s*|\s*$/g, ""), - email: "", - phone: this.data.mannder.replace(/^\s*|\s*$/g, "") - }; - var data = { - topicIdOrRefCode: "feedback", - name: "鎰忚鍙嶉", - content: JSON.stringify(submitData), - type: "opinionFeedback", - state: "WaitAudit", - cmsTypeRefCode: "", - newDataListRequest: [] - }; - app.MG.ugc.newTopicMessage(data).then(res => { + if (!this.data.phoneError) { + if (this.data.content.replace(/^\s*|\s*$/g, "")) { + let submitData = { + content: this.data.content.replace(/^\s*|\s*$/g, ""), + name: this.data.userName.replace(/^\s*|\s*$/g, ""), + email: "", + phone: this.data.mannder.replace(/^\s*|\s*$/g, "") + }; + var data = { + topicIdOrRefCode: "feedback", + name: "鎰忚鍙嶉", + content: JSON.stringify(submitData), + type: "opinionFeedback", + state: "WaitAudit", + cmsTypeRefCode: "", + newDataListRequest: [] + }; + app.MG.ugc.newTopicMessage(data).then(res => { + this.data.lock = true; + if (res) { + wx.showToast({ + title: "鎻愪氦鎴愬姛", + icon: 'success', + duration: 1000, + success: function () { + setTimeout(function () { + wx.navigateBack(); + }, 1000) //寤惰繜鏃堕棿 + } + }) + } + }); + } else { this.data.lock = true; - if (res) { - wx.showToast({ - title: "鎻愪氦鎴愬姛", - icon: 'success', - duration: 1000, - success: function () { - setTimeout(function () { - wx.navigateBack(); - }, 1000) //寤惰繜鏃堕棿 - } - }) - } - }); + wx.showToast({ + title: "鍙嶉鍐呭涓嶈兘涓虹┖", + icon: 'none', + duration: 1000 + }) + } } else { this.data.lock = true; wx.showToast({ - title: "鍙嶉鍐呭涓嶈兘涓虹┖", + title: "鑱旂郴鏂瑰紡鏍煎紡涓嶆纭�", icon: 'none', duration: 1000 }) -- Gitblit v1.9.1