From b37df06e6e0006eba6bc4f7e9e0948ec10edc607 Mon Sep 17 00:00:00 2001 From: marvzhang Date: Sun, 22 Mar 2020 10:23:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/i18n/zh.js | 1 + frontend/src/views/feedback/Feedback.vue | 56 +++++++++++++++++++++++- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/frontend/src/i18n/zh.js b/frontend/src/i18n/zh.js index c3bf1e12..80685504 100644 --- a/frontend/src/i18n/zh.js +++ b/frontend/src/i18n/zh.js @@ -317,6 +317,7 @@ export default { 'Feedbacks': '反馈', 'Wechat': '微信', 'Content': '内容', + 'Rating': '评分', // 用户 'Super Admin': '超级管理员', diff --git a/frontend/src/views/feedback/Feedback.vue b/frontend/src/views/feedback/Feedback.vue index ef621235..28d7d053 100644 --- a/frontend/src/views/feedback/Feedback.vue +++ b/frontend/src/views/feedback/Feedback.vue @@ -4,6 +4,22 @@ + + + + + + +
import axios from 'axios' +import { + mapState +} from 'vuex' export default { name: 'Feedback', @@ -69,11 +98,17 @@ export default { form: { email: '', wechat: '', - content: '' + content: '', + rating: 0 }, isLoading: false } }, + computed: { + ...mapState('lang', [ + 'lang' + ]) + }, methods: { submit () { this.$refs['form'].validate(async valid => { @@ -86,6 +121,7 @@ export default { email: this.form.email, wechat: this.form.wechat, content: this.form.content, + rating: this.form.rating, v: sessionStorage.getItem('v') }) if (res && res.data.error) { @@ -95,7 +131,8 @@ export default { this.form = { email: '', wechat: '', - content: '' + content: '', + rating: 0 } this.$message.success(this.$t('Submitted successfully')) } catch (e) { @@ -118,4 +155,19 @@ export default { .actions { text-align: right; } + + .rating >>> .el-form-item__content { + display: flex; + align-items: center; + height: 40px; + } + + .notice { + margin-bottom: 20px; + } + + .notice >>> .el-alert__description { + line-height: 24px; + font-size: 16px; + }