| | |
| | | textvalue: e.detail.value |
| | | }) |
| | | }, |
| | | feedBack() { |
| | | async feedBack() { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.closeDialog() |
| | | |
| | | let content = { |
| | | source: this.data.ratevalue, |
| | | phone: this.data.inputvalue, |
| | |
| | | newDataListRequest: [] |
| | | } |
| | | |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | await app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | wx.showToast({ |
| | | title: '提交成功', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | this.closeDialog() |
| | | }) |
| | | }, |
| | | // 确定 |
| | | confirmSuggest() { |
| | | const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(this.data.inputvalue); |
| | | async confirmSuggest() { |
| | | const telephoneCheck = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ |
| | | const istelePhone = telephoneCheck.test(this.data.inputvalue) |
| | | const textvalue = this.data.textvalue.trim() |
| | | if (!this.data.ratevalue) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: '请选择评分', |
| | | }) |
| | | } else if (!this.data.inputvalue) { |
| | | } else if (!this.data.inputvalue.length) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: '请填写联系方式', |
| | | }) |
| | | } else if (!isPhoneNumber) { |
| | | } else if (!istelePhone) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: '请输入正确联系方式', |
| | | }) |
| | | } else if (!this.data.textvalue) { |
| | | } else if (!textvalue.length) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请输入反馈反馈内容', |
| | | }) |
| | | } |
| | | this.feedBack() |
| | | await this.feedBack() |
| | | } |
| | | }, |
| | | }) |