Commit 01255996 by 无尘

fix: 修改接口返回状态码

parent 3631a794
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-07-24 12:19:48 * @Date: 2020-07-24 12:19:48
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-07 15:24:23 * @LastEditTime: 2020-08-07 15:41:20
*/ */
import getFetch from './getFetch.js'; import getFetch from './getFetch.js';
...@@ -15,17 +15,20 @@ let api = { ...@@ -15,17 +15,20 @@ let api = {
addSelfApp: { addSelfApp: {
url: '/setting/set-secret', // 添加自建应用 url: '/setting/set-secret', // 添加自建应用
method: 'post', method: 'post',
useFormData: true useFormData: true,
useIntercept: false
}, },
editSelfApp: { editSelfApp: {
url: '/setting/set-secret', // 编辑自建应用 url: '/setting/set-secret', // 编辑自建应用
method: 'post', method: 'post',
useFormData: true useFormData: true,
useIntercept: false
}, },
delSelfApp: { delSelfApp: {
url: '/setting/del-secret', // 删除自建应用 url: '/setting/del-secret', // 删除自建应用
method: 'post', method: 'post',
useFormData: true useFormData: true,
useIntercept: false
}, },
refreshSelfApp: { refreshSelfApp: {
url: '/setting/reflush-secret', // 刷新自建应用 url: '/setting/reflush-secret', // 刷新自建应用
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author : 无尘 * @Author : 无尘
* @Date : 2020-02-13 16:13:59 * @Date : 2020-02-13 16:13:59
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-07 14:47:40 * @LastEditTime: 2020-08-07 15:38:47
* @FilePath : \haoban-4\src\components\company\add-relate.vue * @FilePath : \haoban-4\src\components\company\add-relate.vue
--> -->
<!-- <!--
...@@ -129,6 +129,11 @@ export default { ...@@ -129,6 +129,11 @@ export default {
showMsg.showmsg('解绑成功', 'success'); showMsg.showmsg('解绑成功', 'success');
that.getData(); that.getData();
that.visible = true; that.visible = true;
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(function(error) { .catch(function(error) {
...@@ -211,6 +216,11 @@ export default { ...@@ -211,6 +216,11 @@ export default {
that.loading = false; that.loading = false;
showMsg.showmsg('添加成功', 'success'); showMsg.showmsg('添加成功', 'success');
that.$emit('refreshData', that.partForm); that.$emit('refreshData', that.partForm);
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -128,6 +128,11 @@ export default { ...@@ -128,6 +128,11 @@ export default {
if (res.code == '0000') { if (res.code == '0000') {
showMsg.showmsg('解绑成功', 'success'); showMsg.showmsg('解绑成功', 'success');
that.getTableList(); that.getTableList();
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author : 无尘 * @Author : 无尘
* @Date : 2020-02-13 16:13:59 * @Date : 2020-02-13 16:13:59
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-07 14:46:34 * @LastEditTime: 2020-08-07 15:39:11
* @FilePath : j:\公司\haoban-4\src\components\company\search-select.vue * @FilePath : j:\公司\haoban-4\src\components\company\search-select.vue
--> -->
<!-- <!--
...@@ -126,6 +126,11 @@ export default { ...@@ -126,6 +126,11 @@ export default {
showMsg.showmsg('解绑成功', 'success'); showMsg.showmsg('解绑成功', 'success');
that.getData(); that.getData();
that.visible = true; that.visible = true;
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(function(error) { .catch(function(error) {
...@@ -208,6 +213,11 @@ export default { ...@@ -208,6 +213,11 @@ export default {
that.loading = false; that.loading = false;
showMsg.showmsg('添加成功', 'success'); showMsg.showmsg('添加成功', 'success');
that.$emit('refreshData', that.partForm); that.$emit('refreshData', that.partForm);
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -112,6 +112,11 @@ export default { ...@@ -112,6 +112,11 @@ export default {
showMsg.showmsg('操作成功', 'success'); showMsg.showmsg('操作成功', 'success');
that.$refs['ruleForm'].resetFields(); that.$refs['ruleForm'].resetFields();
that.$emit('submitText'); that.$emit('submitText');
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(error => { .catch(error => {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-07 14:40:27 * @LastEditTime: 2020-08-07 15:39:35
--> -->
<template> <template>
<div class="daily-set-wrap "> <div class="daily-set-wrap ">
...@@ -133,9 +133,11 @@ export default { ...@@ -133,9 +133,11 @@ export default {
}; };
refreshSelfApp(para) refreshSelfApp(para)
.then(res => { .then(res => {
that.loadApp = false; if (res.code == '0000') {
showMsg.showmsg('刷新成功', 'success'); that.loadApp = false;
that.getApp(); showMsg.showmsg('刷新成功', 'success');
that.getApp();
}
}) })
.catch(function(error) { .catch(function(error) {
that.loadApp = false; that.loadApp = false;
...@@ -167,6 +169,11 @@ export default { ...@@ -167,6 +169,11 @@ export default {
if (res.code == '0000') { if (res.code == '0000') {
showMsg.showmsg('删除成功', 'success'); showMsg.showmsg('删除成功', 'success');
that.getApp(); that.getApp();
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-10-10 14:44:45 * @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-07 15:19:42 * @LastEditTime: 2020-08-07 15:29:14
--> -->
<template> <template>
<div class="unreview-wrap common-set-wrap"> <div class="unreview-wrap common-set-wrap">
...@@ -445,7 +445,7 @@ export default { ...@@ -445,7 +445,7 @@ export default {
const that = this; const that = this;
that.$refs[formName].validate(valid => { that.$refs[formName].validate(valid => {
if (valid) { if (valid) {
that.postRefuse(); that.postRefuseData();
} else { } else {
return false; return false;
} }
...@@ -454,7 +454,7 @@ export default { ...@@ -454,7 +454,7 @@ export default {
emojiToStr(str) { emojiToStr(str) {
return unescape(escape(str).replace(/\%uD.{3}/g, '')); return unescape(escape(str).replace(/\%uD.{3}/g, ''));
}, },
postRefuse() { postRefuseData() {
const that = this; const that = this;
let para = { let para = {
auditName: that.auditName, auditName: that.auditName,
...@@ -468,6 +468,11 @@ export default { ...@@ -468,6 +468,11 @@ export default {
that.refuseVisible = false; that.refuseVisible = false;
that.$refs['ruleForm'].resetFields(); that.$refs['ruleForm'].resetFields();
that.getTableList(); that.getTableList();
}else {
that.$message({
message: res.message || '未知错误',
type: 'warning'
});
} }
}) })
.catch(function(error) { .catch(function(error) {
......
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