|
|
@@ -156,12 +156,12 @@
|
|
|
Page
|
|
|
},
|
|
|
computed: {
|
|
|
-// messageBoard () {
|
|
|
-// return this.$store.state.messageBoard.information.data
|
|
|
-// },
|
|
|
-// user () {
|
|
|
-// return this.$store.state.messageBoardIsLogin.login.data
|
|
|
-// },
|
|
|
+ messageBoardInfo () {
|
|
|
+ return this.$store.state.messageBoard.information.data
|
|
|
+ },
|
|
|
+ logged () {
|
|
|
+ return this.$store.state.option.user.logged
|
|
|
+ },
|
|
|
user () {
|
|
|
return this.$store.state.option.user.data
|
|
|
},
|
|
|
@@ -214,24 +214,61 @@
|
|
|
this.isEmail = (/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/).test(this.messageBoard.email)
|
|
|
},
|
|
|
confirm () {
|
|
|
- this.$store.dispatch('uploadMessageBoardInformation', {question: this.messageBoard.question, role: this.messageBoard.role, submitTitle: '【优软商城】IC电子元器件现货采购交易平台商城', submitUrl: window.location.href, type: this.messageBoard.type, imgs: this.dialogImageUrl, userTel: '13333333333'})
|
|
|
- if (this.messageBoard) {
|
|
|
+ if (!this.logged) {
|
|
|
if (!this.messageBoard.question) {
|
|
|
this.$message.info('您还没有填写反馈内容')
|
|
|
} else if (!this.messageBoard.role) {
|
|
|
this.$message.info('请选择您的身份信息')
|
|
|
} else if (!this.messageBoard.type) {
|
|
|
this.$message.info('请选择一种反馈类型')
|
|
|
- } else if (!this.user) {
|
|
|
- if (!this.messageBoard.userTel && !this.messageBoard.email) {
|
|
|
- this.$message.info('请填写任意一种联系方式')
|
|
|
+ } else if (!this.messageBoard.userTel && !this.messageBoard.email) {
|
|
|
+ this.$message.info('请填写任意一种联系方式')
|
|
|
+ } else {
|
|
|
+ console.log(this.isMobile)
|
|
|
+ console.log(this.isEmail)
|
|
|
+ if (this.isMobile === false) {
|
|
|
+ this.$message.info('请输入正确的手机号码')
|
|
|
+ } else if (this.isEmail === false) {
|
|
|
+ this.$message.info('请输入正确的邮箱')
|
|
|
+ } else {
|
|
|
+ this.$store.dispatch('uploadMessageBoardInformation', {
|
|
|
+ question: this.messageBoard.question,
|
|
|
+ role: this.messageBoard.role,
|
|
|
+ submitTitle: '【优软商城】IC电子元器件现货采购交易平台商城',
|
|
|
+ submitUrl: window.location.href,
|
|
|
+ type: this.messageBoard.type,
|
|
|
+ imgs: this.dialogImageUrl,
|
|
|
+ userTel: this.messageBoard.userTel ? this.messageBoard.userTel : '',
|
|
|
+ email: this.messageBoard.email ? this.messageBoard.email : ''
|
|
|
+ })
|
|
|
+ this.isOpendMessage()
|
|
|
+ this.$message.info('感谢您的宝贵意见')
|
|
|
+ this.messageBoard = {}
|
|
|
}
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!this.messageBoard.question) {
|
|
|
+ this.$message.info('您还没有填写反馈内容')
|
|
|
+ } else if (!this.messageBoard.role) {
|
|
|
+ this.$message.info('请选择您的身份信息')
|
|
|
+ } else if (!this.messageBoard.type) {
|
|
|
+ this.$message.info('请选择一种反馈类型')
|
|
|
} else {
|
|
|
- this.$store.dispatch('uploadMessageBoardInformation', {question: this.messageBoard.question, role: this.messageBoard.role, submitTitle: '【优软商城】IC电子元器件现货采购交易平台商城', submitUrl: window.location.href, type: this.messageBoard.type, imgs: this.dialogImageUrl, userTel: '13333333333'})
|
|
|
- this.isOpendMessage()
|
|
|
- this.$message.info('感谢您的宝贵意见')
|
|
|
-// window.location.reload()
|
|
|
- this.messageBoard = {}
|
|
|
+ this.$store.dispatch('uploadMessageBoardInformation', {
|
|
|
+ question: this.messageBoard.question,
|
|
|
+ role: this.messageBoard.role,
|
|
|
+ submitTitle: '【优软商城】IC电子元器件现货采购交易平台商城',
|
|
|
+ submitUrl: window.location.href,
|
|
|
+ type: this.messageBoard.type,
|
|
|
+ imgs: this.dialogImageUrl
|
|
|
+ })
|
|
|
+ if (this.messageBoardInfo.question) {
|
|
|
+ this.isOpendMessage()
|
|
|
+ this.$message.info('感谢您的宝贵意见')
|
|
|
+ this.messageBoard = {}
|
|
|
+ } else {
|
|
|
+ this.$message.info('联系方式不可为空,请填写任意一种联系方式')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|