Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
respone => {
Message.success('文章发布成功')
// 如果文章信息保存成功就给父组件派发一个事件通知它刷新文章列表
self.$emit('saveArticleInformation')
},
respone => Message.error('文章发布失败')
respone => {
this.loading=false;
Message.success('文章保存成功')
// 如果文章信息保存成功就给父组件派发一个事件通知它刷新文章列表
self.$emit('saveArticleInformation')
},
respone => {
.then(resp => {
if (resp.code === 0) {
this.startqueryinstallstatus();
this.installloading = false;
this.needinstall = false;
Message.success("恭喜你已经安装成功🎉");
} else {
Message.error(resp.msg);
this.installloading = false;
this.needinstall = false;
}
})
.catch(err => {
respone => {
if(respone.body.error){
Message.error(respone.body.msg);
return;
}
Message.success('标签保存成功')
this.articleLabel.push(obj)
},
respone => Message.error('标签保存失败')
deletehost(deldata).then(resp => {
if (resp.code === 0) {
Message.success("删除成功");
this.startgethost();
} else {
Message.warning(`删除失败 ${resp.msg}`);
}
});
}
floorCreateSuccess () {
Message.success('评论成功!')
this.refresh()
//清空楼层回复中的内容
this.floorComment.content = null
},
adminchangeinfo(this.user).then((resp) => {
if (resp.code === 0) {
Message.success(`修改用户 ${name} 成功`);
this.startgetallusers();
this.is_change = false;
} else {
Message.error(`修改用户 ${name} 失败: ${resp.msg}`);
}
});
} else {
} catch (error) {
result = response;
}
if (result.code < 0 ) {
if (result.code == -2 || result.code == -10) {
Message.error({
message: result.msg
});
Promise.reject(result);
}else{
Promise.reject(result);
}
} else {
if (result.code == 2) {
Message.success({
message: result.msg
});
} else if (result.code == 3) {
Message.warning({
message: result.msg
});
} else if (result.code == 4) {
MessageBox.alert(result.msg, '提示', {
confirmButtonText: '确定',
type:'warning'
});
}
Promise.resolve(result.data);
}
},
error => {
toast : function(message,type){
let option = {
'message' : message,
'duration' : 2200
};
if(type == 'error'){
Message.error(option)
}
else if (type == "success"){
Message.success(option);
}
else if (type == "warning"){
Message.warning(option);
}
else{
Message.info(option);
}
},