From b49b83a7cffc55a48d1d14052d7159ed59867d0b Mon Sep 17 00:00:00 2001 From: nisen Date: Fri, 1 Sep 2023 15:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E8=8A=82=E5=BB=BA=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/grateful.js | 15 +++++++++++++++ src/views/grateful/GratefulHomePage.vue | 11 ++++++++++- vue.config.js | 6 ++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/api/modules/grateful.js diff --git a/src/api/modules/grateful.js b/src/api/modules/grateful.js new file mode 100644 index 00000000..fae4da82 --- /dev/null +++ b/src/api/modules/grateful.js @@ -0,0 +1,15 @@ +// import ajax from '@/utils/xajax.js' +import ajax from '../ajax'; +const baseURL = '/activityApi'; + +//notice新增 +const saveOpinion=function (data){ + return ajax.postJson(baseURL,'/xboe/m/boe/opinion/save',data); +} + + + + +export { + saveOpinion +} diff --git a/src/views/grateful/GratefulHomePage.vue b/src/views/grateful/GratefulHomePage.vue index 3b36df70..4545ccd0 100644 --- a/src/views/grateful/GratefulHomePage.vue +++ b/src/views/grateful/GratefulHomePage.vue @@ -147,7 +147,7 @@
取消 - 确认 + 确认
@@ -164,6 +164,7 @@ import interactBar from "@/components/Portal/interactBar.vue"; import courseImage from "@/components/Course/courseImage.vue"; import { toScore, formatUserNumber } from "@/utils/tools.js"; import apiIndex from "@/api/phase2/index.js"; +import { saveOpinion } from '@/api/modules/grateful.js' export default { name: "Grateful", components: { @@ -197,10 +198,18 @@ export default { }, }, methods: { + submitNotice() { + if (!this.form.textarea) return this.$message({ message: '请输入内容', type: 'error' }) + saveOpinion({ content: this.form.textarea }).then(() => { + this.$message({ message: '提交成功', type: 'success' }) + this.closeDlg() + }) + }, getPic(index) { return this.webBaseUrl + "/images/listblue0" + (index + 1) + ".png"; }, closeDlg() { + this.form.textarea = '' this.gratefulVisible = false }, toCourseDetail(item) { diff --git a/vue.config.js b/vue.config.js index 4bfcc671..c0d9a7f8 100644 --- a/vue.config.js +++ b/vue.config.js @@ -192,6 +192,12 @@ module.exports = { changeOrigin: true, secure: false, }, + '/activityApi': { + // 目标代理服务器地址 + target: 'https://u-pre.boe.com', + changeOrigin: true, + secure: false, + }, }, },