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, + }, }, },