mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 12:56:43 +08:00
添加动态事件
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import apiQa from '@/api/modules/qa.js';
|
||||
import imageUpload from '@/components/ImageUpload/index.vue';
|
||||
import agreement from '@/components/Portal/agreement.vue'
|
||||
@@ -59,6 +60,9 @@
|
||||
}
|
||||
},
|
||||
components:{imageUpload,agreement},
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
methods:{
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
@@ -85,6 +89,20 @@
|
||||
if (res.status == 200) {
|
||||
if(res.message=='服务处理成功'){
|
||||
this.$message.success("发布问题成功")
|
||||
let event = {
|
||||
key: "PulishQuestion",//后台的事件key 发布文章且审核通过
|
||||
title: "发布问题",//事件的标题
|
||||
parameters:"",//用户自定义参数 name:value,name:value
|
||||
content: "在问答中发布一个问题",//事件的内容
|
||||
objId: res.result.id,//关联的id
|
||||
objType: "4",//关联的类型
|
||||
objInfo: "问答",
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
|
||||
}
|
||||
if(res.message.indexOf('审核')!=-1){
|
||||
this.$message.warning("发布失败,因包含敏感词,请等待人工审核")
|
||||
|
||||
Reference in New Issue
Block a user