Commit 79d1377a by 高浩杰

意见修改反馈和投诉举报

parent bdd8e00d
......@@ -9,7 +9,7 @@
</div>
<div>
<yun-icon name="message" fontSize="10px" vertical="top"></yun-icon>
<span>官方邮箱:yundingshuyuan@163.com</span>
<span>官方邮箱:beyonndclouds@163.com</span>
</div>
</div>
<div class="footer-center-section1-center">
......
......@@ -33,18 +33,18 @@
@cancelCheck="phoneErrMsg = ''"
@keyup.enter.native="handleFeedback"
></login-input>
<login-input
style="width: 334px;"
:error-message="verifyErrMsg"
:isCount="isCount"
placeholder="请输入验证码"
input-type="3"
v-model="verifyCode"
@sendSms="checkVerification"
@handleCheck="checkVerifyCode"
@cancelCheck="verifyErrMsg = ''"
@keyup.enter.native="handleFeedback"
></login-input>
<!--<login-input-->
<!--style="width: 334px;"-->
<!--:error-message="verifyErrMsg"-->
<!--:isCount="isCount"-->
<!--placeholder="请输入验证码"-->
<!--input-type="3"-->
<!--v-model="verifyCode"-->
<!--@sendSms="checkVerification"-->
<!--@handleCheck="checkVerifyCode"-->
<!--@cancelCheck="verifyErrMsg = ''"-->
<!--@keyup.enter.native="handleFeedback"-->
<!--&gt;</login-input>-->
</div>
</div>
<div class="feedback-container__submit">
......@@ -80,42 +80,42 @@ export default {
checkMobile() {
this.phoneErrMsg = checkPhone(this.mobile);
},
checkVerifyCode() {
this.verifyErrMsg = checkVerification(this.verifyCode);
},
// 检测验证码
checkVerification() {
this.isCount = false;
this.phoneErrMsg = checkPhone(this.mobile);
if (this.phoneErrMsg === '') {
this.getSms();
this.verifyErrMsg = '';
this.isCount = true;
setTimeout(() => {
this.isCount = false;
}, 60000);
}
},
// checkVerifyCode() {
// this.verifyErrMsg = checkVerification(this.verifyCode);
// },
// // 检测验证码
// checkVerification() {
// this.isCount = false;
// this.phoneErrMsg = checkPhone(this.mobile);
// if (this.phoneErrMsg === '') {
// this.getSms();
// this.verifyErrMsg = '';
// this.isCount = true;
// setTimeout(() => {
// this.isCount = false;
// }, 60000);
// }
// },
// 发送短信
async getSms() {
let smsResponse = await this.$axios.$get(config.api.get.Sms.send, {
params: {
mobile: this.mobile
}
});
if (smsResponse.code === 0) {
this.$message({
type: 'success',
message: '短信发送成功!'
});
} else {
this.verifyErrMsg = smsResponse.msg;
this.$message({
type: 'info',
message: smsResponse.msg
});
}
},
// async getSms() {
// let smsResponse = await this.$axios.$get(config.api.get.Sms.send, {
// params: {
// mobile: this.mobile
// }
// });
// if (smsResponse.code === 0) {
// this.$message({
// type: 'success',
// message: '短信发送成功!'
// });
// } else {
// this.verifyErrMsg = smsResponse.msg;
// this.$message({
// type: 'info',
// message: smsResponse.msg
// });
// }
// },
handleFeedback() {
if (this.typePicked === '') {
this.$message({
......@@ -130,13 +130,18 @@ export default {
message: '请填写反馈内容'
});
return false
} else if (this.phoneErrMsg !== '') {
this.$message({
type: 'warning',
message: '请检查联系方式'
});
return false
}
this.$axios.$post(config.api.post.Feedback.feedback, {
content: this.feedbackContent,
feedbackReason: this.typePicked,
link: this.feedLink,
mobile: this.mobile,
verifyCode: this.verifyCode
mobile: this.mobile
}).then(res => {
if (res.code === 0) {
this.$message({
......
......@@ -37,7 +37,15 @@
<textarea class="report-header" placeholder="想要举报内容的链接" v-model="reportLink"></textarea>
<textarea class="report-content" placeholder="请填写详细的举报内容" v-model="reportContent"></textarea>
<div class="main-footer">
<input type="text" placeholder="联系方式" maxlength="18" v-model="mobile">
<login-input
style="width: 334px;"
:error-message="phoneErrMsg"
placeholder="联系方式"
v-model="mobile"
@handleCheck="checkMobile"
@cancelCheck="phoneErrMsg = ''"
@keyup.enter.native="handleReport"
></login-input>
</div>
</div>
<div class="report-container__submit">
......@@ -50,18 +58,21 @@
<script>
import CardContainer from "../../components/pc/cardContainer";
import congfig from '../../action/config';
import LoginInput from "../../components/pc/loginCard/loginInput";
import config from '../../action/config';
import {checkPhone, checkVerification} from '../users/checkfrom';
export default {
name: "report",
components: {CardContainer},
components: {CardContainer, LoginInput},
data() {
return {
typePicked: '',
reportLink: '',
reportContent: '',
contact: '',
mobile: ''
phoneErrMsg: '',
mobile: '',
}
},
......@@ -73,8 +84,18 @@
},
methods: {
checkMobile() {
this.phoneErrMsg = checkPhone(this.mobile);
},
handleReport() {
this.$axios.$post(congfig.api.post.Feedback.report, {
if (this.phoneErrMsg !== '' || this.mobile === '') {
this.$message({
type: 'warning',
message: '请检查联系方式'
});
return false
}
this.$axios.$post(config.api.post.Feedback.report, {
content: this.reportContent,
feedbackReason: this.typePicked,
link: this.reportLink,
......
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