Commit d13af01d authored by zhangyanni's avatar zhangyanni

敏感词提示

parent 1528d50a
import api from "../api/api";
import Qs from 'qs';
let baseUrl = "/business";
export default {
tipInfo (){
tipInfo() {
return api.fetchPost('/business/tip/tipInfo');
},
//获取感兴趣字典表接口
getIntersetedDictAxios(){
getIntersetedDictAxios() {
return api.fetchLoadingPost('/business/content/selectBaseDataList');
},
//提交感兴趣领域标签
postIntersetedDictAxios(params){
return api.fetchLoadingPost('/business/content/addEmpDataLabel',params);
postIntersetedDictAxios(params) {
return api.fetchLoadingPost('/business/content/addEmpDataLabel', params);
},
//获取用户选择标签
getUserIntersetedFlagAxios(){
getUserIntersetedFlagAxios() {
return api.fetchLoadingPost('/business/content/selectEmpDataLabelList')
},
//获取项目
selectProjectAxios(params){
return api.fetchLoadingLogin('/business/search/project',params);
selectProjectAxios(params) {
return api.fetchLoadingLogin('/business/search/project', params);
},
//翻译未登录
transNoLoginAxios(params){
return api.fetchLoadingLogin(baseUrl+"/trans/commonTrans",params);
transNoLoginAxios(params) {
return api.fetchLoadingLogin(baseUrl + "/trans/commonTrans", params);
},
//获取企业列表
getBigBusinessListAxios(params){
return api.fetchLoadingLogin(baseUrl+"/search/business",params);
getBigBusinessListAxios(params) {
return api.fetchLoadingLogin(baseUrl + "/search/business", params);
},
//搜索文章
searchArticleAxios(params){
return api.fetchLoadingGet("/business/search/article?"+Qs.stringify(params));
searchArticleAxios(params) {
return api.fetchLoadingGet("/business/search/article?" + Qs.stringify(params));
},
//活动报名列表分页
getActivityListAxios(params){
return api.fetchLoadingGet("/base/channel/searchActivity?"+Qs.stringify(params));
getActivityListAxios(params) {
return api.fetchLoadingGet("/base/channel/searchActivity?" + Qs.stringify(params));
},
//为你推荐
recommendedAxios(params){
return api.fetchGet("/base/channel/searchActivityRecommend?"+Qs.stringify(params));
recommendedAxios(params) {
return api.fetchGet("/base/channel/searchActivityRecommend?" + Qs.stringify(params));
},
getChannelListAxios(){
getChannelListAxios() {
return api.fetchLoadingLogin("/business/content/selectContentChannelList");
},
//获取config
getConfigAxios(params){
return api.fetchLoadingLogin("/base/login/wxWebShare",Qs.stringify(params));
getConfigAxios(params) {
return api.fetchLoadingLogin("/base/login/wxWebShare", Qs.stringify(params));
},
getDocumentAxios(){
getDocumentAxios() {
return api.fetchLogin('/base/tools/selectBasicParams');
},
//埋点
maiDianAxios(params){
return api.fetchLogin("/business/log/activityLog",params);
maiDianAxios(params) {
return api.fetchLogin("/business/log/activityLog", params);
},
//热门搜索
hotSearchAxios(){
hotSearchAxios() {
return api.fetchGet("/business/search/getHotWords");
},
//历史搜索
historySearchAxios(params){
return api.fetchGet("/business/search/getHistoryWords?"+Qs.stringify(params));
historySearchAxios(params) {
return api.fetchGet("/business/search/getHistoryWords?" + Qs.stringify(params));
},
//删除历史搜索
deleteSearchAxios(params){
return api.fetchLogin("/business/search/mvHistoryWords?"+Qs.stringify(params))
deleteSearchAxios(params) {
return api.fetchLogin("/business/search/mvHistoryWords?" + Qs.stringify(params))
},
//获取海外国家
selectNationList (){
return api.fetchGet(baseUrl+'/geo/selectNationList');
selectNationList() {
return api.fetchGet(baseUrl + '/geo/selectNationList');
},
//获取专家评论的话题/文章/项目
selectProfessorCommentList(params){
return api.fetchLoadingLogin("/base/professor/selectProfessorCommentList",params)
selectProfessorCommentList(params) {
return api.fetchLoadingLogin("/base/professor/selectProfessorCommentList", params)
},
//用户是否关注公众号
isHasAttentionWechatCodeAxios(){
isHasAttentionWechatCodeAxios() {
return api.fetchGet("/base/emp/getUserSubscribeInfo")
},
//做完任务的提示是否送积分
hasTaskIntegralAxios(params){
return api.fetchGet("/base/integralShow/addIntegral?integralCode="+params);
hasTaskIntegralAxios(params) {
return api.fetchGet("/base/integralShow/addIntegral?integralCode=" + params);
},
//点赞送积分
hasHotIntegralAxios(params){
return api.fetchLoadingPost("/base/integralShow/addIntegralByParam",params);
}
hasHotIntegralAxios(params) {
return api.fetchLoadingPost("/base/integralShow/addIntegralByParam", params);
},
//敏感词检测
checkSensitiveContent(params) {
return api.fetchLogin('/business/sensitive/checkSensitiveContent', params);
},
}
......@@ -116,6 +116,7 @@
import api from '../../views/mobile/proFeedback/api';
import {Toast} from 'mint-ui';
import topicApi from '../../views/mobile/topic/api';
import commonApi from "../../common/commonApi";
export default {
props: {
......@@ -524,33 +525,58 @@
}, 1000)
},
//发布
handlePublish() {
if(this.textareaMap[0]){
let commentObj,discussObj;
if(this.commentType==1&&!this.isPublic) {
discussObj = {
discussContent:this.textareaMap[0],
discussUrl:this.imgList.join(","),
projectName:this.projectName,
projectIds:this.projectIds
};
}
if(this.isPublic){
commentObj = {
commentsContent:this.textareaMap[0],
commentsState:this.isPublicComment
//敏感词检测
checkIsErrorComment(content){
let params = {
content:content
}
commonApi.checkSensitiveContent(params).then((res)=>{
if(res.code==0){
let commentObj,discussObj;
if(this.commentType==1&&!this.isPublic) {
discussObj = {
discussContent:this.textareaMap[0],
discussUrl:this.imgList.join(","),
projectName:this.projectName,
projectIds:this.projectIds
};
}
if(this.isPublic){
commentObj = {
commentsContent:this.textareaMap[0],
commentsState:this.isPublicComment
}
}
if(this.disabledFlag==0){
this.disabledFlag++;
if(this.commentType==1&&!this.isPublic) this.$emit("publishComment",discussObj);
if(this.isPublic) this.$emit("publishComment",commentObj);
if(this.commentType==0&&!this.isPublic) this.$emit("publishComment",this.textareaMap[0])
this.timeoutFunc();
}else{
this.timeoutFunc();
}
}
if(this.disabledFlag==0){
this.disabledFlag++;
if(this.commentType==1&&!this.isPublic) this.$emit("publishComment",discussObj);
if(this.isPublic) this.$emit("publishComment",commentObj);
if(this.commentType==0&&!this.isPublic) this.$emit("publishComment",this.textareaMap[0])
this.timeoutFunc();
}else{
this.timeoutFunc();
else{
this.$toast({
message: res.msg,
duration: 3000,
className: 'noticeError'
})
}
}).catch((err)=>{
this.$toast({
message: err,
duration: 3000,
className: 'noticeError'
})
})
},
//发布
handlePublish() {
if(this.textareaMap[0]){
this.checkIsErrorComment(this.textareaMap[0])
}else{
this.$toast({
......
......@@ -172,6 +172,7 @@
import topicApi from '../../views/mobile/topic/api';
import $ from 'jquery';
import Clickoutside from '../../assets/js/clickoutside'
import commonApi from "../../common/commonApi";
export default {
props: {
......@@ -634,36 +635,59 @@
}, 1000)
},
//发布
handlePublish() {
if (this.textareaMap[0]) {
let commentObj, discussObj;
if (this.commentType == 1 && !this.isPublic) {
discussObj = {
discussContent: this.textareaMap[0],
discussUrl: this.imgList.join(","),
projectName: this.projectName,
projectIds: this.projectIds,
topicId:this.isTopicList?(this.currentSecondTopic?this.currentSecondTopic:this.currentFirstTopic):undefined
};
}
if (this.isPublic) {
commentObj = {
commentsContent: this.textareaMap[0],
commentsState: this.isPublicComment
//敏感词检测
checkIsErrorComment(content){
let params = {
content:content
}
commonApi.checkSensitiveContent(params).then((res)=>{
if(res.code==0){
let commentObj, discussObj;
if (this.commentType == 1 && !this.isPublic) {
discussObj = {
discussContent: this.textareaMap[0],
discussUrl: this.imgList.join(","),
projectName: this.projectName,
projectIds: this.projectIds,
topicId:this.isTopicList?(this.currentSecondTopic?this.currentSecondTopic:this.currentFirstTopic):undefined
};
}
if (this.isPublic) {
commentObj = {
commentsContent: this.textareaMap[0],
commentsState: this.isPublicComment
}
}
if (this.disabledFlag == 0) {
this.disabledFlag++;
if (this.commentType == 1 && !this.isPublic) this.$emit("publishComment", discussObj);
if (this.isPublic) this.$emit("publishComment", commentObj);
if (this.commentType == 0 && !this.isPublic) this.$emit("publishComment", this.textareaMap[0])
this.timeoutFunc();
} else {
this.timeoutFunc();
}
}
if (this.disabledFlag == 0) {
this.disabledFlag++;
if (this.commentType == 1 && !this.isPublic) this.$emit("publishComment", discussObj);
if (this.isPublic) this.$emit("publishComment", commentObj);
if (this.commentType == 0 && !this.isPublic) this.$emit("publishComment", this.textareaMap[0])
this.timeoutFunc();
} else {
this.timeoutFunc();
else{
this.$toast({
message: res.msg,
duration: 3000,
className: 'noticeError'
})
}
}).catch((err)=>{
this.$toast({
message: err,
duration: 3000,
className: 'noticeError'
})
})
},
//发布
handlePublish() {
if (this.textareaMap[0]) {
this.checkIsErrorComment(this.textareaMap[0])
} else {
this.$toast({
message: "请输入评论内容",
......
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