提交 03ffa8f3 编写于 作者: chendeli's avatar chendeli

add

上级 00fdd61b
...@@ -37,12 +37,13 @@ service.interceptors.response.use( ...@@ -37,12 +37,13 @@ service.interceptors.response.use(
apiUrl时,返回200为成功 apiUrl时,返回200为成功
*/ */
if (res.code !== '000000') { if (res.code !== '000000') {
return Promise.reject('error') return Promise.reject(response.data)
} else { } else {
return response.data return response.data
} }
}, },
error => { error => {
// logger.error('err' + error) // logger.error('err' + error)
return Promise.reject(error) return Promise.reject(error)
} }
......
...@@ -210,7 +210,12 @@ export default { ...@@ -210,7 +210,12 @@ export default {
this.GET('/interaction/informConfig/getInformList',parm).then((res) => { this.GET('/interaction/informConfig/getInformList',parm).then((res) => {
if( res.code == '000000' ) { if( res.code == '000000' ) {
this.reportData = this.handelEmail(res.data,1) || [] if(res.data.length == 0){
this.reportData = [{}]
}else{
this.reportData = this.handelEmail(res.data,1) || []
}
}else{ }else{
this.$message({ this.$message({
......
...@@ -218,9 +218,9 @@ export default { ...@@ -218,9 +218,9 @@ export default {
//保存修改讨论组件详细 //保存修改讨论组件详细
subFun(){ subFun(){
///let A = ['PUT','POST']
let A = this.isEdit ? this.reType[0] : this.reType[1]; let A = this.isEdit ? this.reType[0] : this.reType[1];
//console.log(this[A]) let _this = this;
if(this.objInfo.topic.content.length == 0){ if(this.objInfo.topic.content.length == 0){
this.showError('内容不能为空!'); this.showError('内容不能为空!');
...@@ -231,13 +231,14 @@ export default { ...@@ -231,13 +231,14 @@ export default {
subject:this.objInfo.topic.subject, subject:this.objInfo.topic.subject,
content:this.objInfo.topic.content, content:this.objInfo.topic.content,
discussid:this.objInfo.topic.discussid || this.discussId, discussid:this.objInfo.topic.discussid || this.discussId,
id:this.objInfo.topic.id id:this.objInfo.topic.id || null
}, },
images:this.fileList images:this.fileList
} }
this[A]('/interaction/topic/',parm).then((res) => { this[A]('/interaction/topic/',parm).then((res) => {
// closeLoading(vm)
if( res.code == '000000' ) { if( res.code == '000000' ) {
this.$message({ this.$message({
message: '操作成功!', message: '操作成功!',
...@@ -247,8 +248,17 @@ export default { ...@@ -247,8 +248,17 @@ export default {
this.$emit('setFun',true) this.$emit('setFun',true)
},2000) },2000)
} }else{
})
this.$message({
message: res.message,
type: 'error'
});
}
}).catch(function (error) {
///console.log()
//_this.$message.error('接口异常请联系管理员');
});
} }
} }
}; };
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="search-title">查询条件</div> <div class="search-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;"> <el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;"> <el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;">
<el-col :span="6"> <!-- <el-col :span="6">
<el-form-item label="话题名称:"> <el-form-item label="话题名称:">
<el-input clearable v-model="searchParam.theme" size="mini" placeholder="请输入话题名称"></el-input> <el-input clearable v-model="searchParam.theme" size="mini" placeholder="请输入话题名称"></el-input>
</el-form-item> </el-form-item>
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col style="text-align:right;padding:0 30px 15px 0;"> <el-col style="text-align:right;padding:0 30px 15px 0;">
<el-button type="primary" size="small" @click="search">查询</el-button> <!-- <el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reseat">重置</el-button> <el-button type="default" size="small" @click="reseat">重置</el-button> -->
<el-button type="primary" size="small" @click="createTopic">新建话题</el-button> <el-button type="primary" size="small" @click="createTopic">新建话题</el-button>
</el-col> </el-col>
</el-form> </el-form>
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
//获取数据 //获取数据
getData(){ getData(){
let _this = this;
this.loading = true; this.loading = true;
let parm = { let parm = {
discussId:this.discussId, discussId:this.discussId,
...@@ -206,7 +206,11 @@ export default { ...@@ -206,7 +206,11 @@ export default {
type: 'warning' type: 'warning'
}); });
} }
}) }).catch(function (error) {
console.log(error.message)
_this.$message.error(error.message);
_this.loading = false
});
}, },
...@@ -288,7 +292,7 @@ export default { ...@@ -288,7 +292,7 @@ export default {
} }
} }
this.$confirm('确定要'+str+'该讨论吗?', '提示', { this.$confirm('确定要'+str+'该话题吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册