Commit a3775936 authored by LiZongLin's avatar LiZongLin

Merge branch 'dev' of http://gitlab.91isoft.com:90/wyf/tjty-app into dev

parents 1e655978 31bf300b
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
</uni-card> </uni-card>
<view class="newMedia-button-view"> <view class="newMedia-button-view">
<button style="background-color: #3B7CDE;" class="newMedia-button" @click="submitForm">提交</button> <button style="background-color: #3B7CDE;" :disabled="disabledFag" class="newMedia-button" @click="submitForm">提交</button>
</view> </view>
...@@ -50,8 +50,9 @@ ...@@ -50,8 +50,9 @@
export default { export default {
data() { data() {
return { return {
// 对输入的内容进行校验的标志
contentFlag: false, disabledFag: false,//避免重复提交的校验标志
contentFlag: false,// 对输入的内容进行校验的标志
url: '', url: '',
personnel: { personnel: {
consultType: '', consultType: '',
...@@ -139,7 +140,7 @@ ...@@ -139,7 +140,7 @@
methods: { methods: {
// 提交按钮 // 提交按钮
submitForm() { submitForm() {
console.log("咨询内容--->", this.personnel) // this.disabledFag = true
if (this.personnel.consultContent && this.personnel.consultContent.length > 0) { if (this.personnel.consultContent && this.personnel.consultContent.length > 0) {
let reg = /^\s*$/ let reg = /^\s*$/
if (reg.test(this.personnel.consultContent)) { if (reg.test(this.personnel.consultContent)) {
...@@ -148,15 +149,14 @@ ...@@ -148,15 +149,14 @@
} }
} }
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
console.log("留言咨询内容--->:", this.personnel) console.log("留言咨询内容--->:", this.personnel)
submitConsultAxios(this.personnel).then(response => { submitConsultAxios(this.personnel).then(response => {
console.log("提交咨询:", response) console.log("提交咨询:", response)
if (response.code == 200) { if (response.code == 200) {
// 打开弹窗 // 打开弹窗
this.$refs.popup.open('center') this.$refs.popup.open('center')
} else { } else {
// this.disabledFag = false
uni.showToast({ uni.showToast({
title: '咨询提交失败,请您稍后在试', title: '咨询提交失败,请您稍后在试',
duration: 1000, duration: 1000,
......
...@@ -80,13 +80,6 @@ ...@@ -80,13 +80,6 @@
current: index, current: index,
urls: photoList urls: photoList
}) })
// wx.previewImage({
// urls: [imgUrl], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
// current: '', // 当前显示图片的http链接,默认是第一个
// success: function(res) {},
// fail: function(res) {},
// complete: function(res) {},
// })
}, },
setVote() { setVote() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment