Commit a11b2f1f by yanju

Merge branch 'master' of coding.yundingshuyuan.com:pigbigbig/beyond-clouds-front

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