所有页面res.code替换为res.success

This commit is contained in:
mabo
2021-05-17 16:04:36 +08:00
parent a4f2fc1381
commit eeb2e94d52
49 changed files with 82 additions and 84 deletions

View File

@@ -125,7 +125,7 @@ function getTokenDebounce() {
lock = true
let oldRefreshToken = getStore("refreshToken");
handleRefreshToken(oldRefreshToken).then(res => {
if (res.code === 200) {
if (res.success) {
let {
accessToken,
refreshToken

View File

@@ -133,7 +133,7 @@ export default {
pageClientType: "PC",
};
API_floor.getHomeList(params).then((res) => {
if (res.code == 200) {
if (res.success) {
this.templateList = res.result.records;
}
});
@@ -142,7 +142,7 @@ export default {
releaseTemplate(id) {
//发布模板
API_floor.releasePageHome(id).then((res) => {
if (res.code === 200) {
if (res.success) {
this.$Message.success("发布模板成功");
this.getTemplateList();
}
@@ -155,7 +155,7 @@ export default {
content: "<p>确定删除该模板吗?</p>",
onOk: () => {
API_floor.removePageHome(id).then((res) => {
if (res.code === 200) {
if (res.success) {
this.$Message.success("删除模板成功");
this.getTemplateList();
}

View File

@@ -153,7 +153,7 @@ export default {
pageClientType: "PC",
};
API_floor.getHomeList(params).then((res) => {
if (res.code == 200) {
if (res.success) {
this.list = res.result.records;
this.list.forEach(e => {
if (e.pageShow === 'OPEN') {
@@ -169,7 +169,7 @@ export default {
releaseTemplate(id) {
//发布模板
API_floor.releasePageHome(id).then((res) => {
if (res.code === 200) {
if (res.success) {
this.$Message.success("发布模板成功");
this.getTemplateList();
}
@@ -178,7 +178,7 @@ export default {
delTemplate(id) {
API_floor.removePageHome(id).then((res) => {
if (res.code === 200) {
if (res.success) {
this.$Message.success("删除模板成功");
this.getTemplateList();
}

View File

@@ -51,7 +51,7 @@ export default {
pageData:modelForm,
}
API_floor.updateHome(this.$route.query.id, data).then(res=> {
if(res.code === 200) {
if(res.success) {
this.$Message.success('保存模板成功');
} else {
this.$Message.error(res.message)
@@ -63,7 +63,7 @@ export default {
},
getTemplateItem(id){ // 获取模板数据
API_floor.getHomeData(id).then(res => {
if (res.code === 200) {
if (res.success) {
let pageData = res.result.pageData;
if(pageData) {
pageData = JSON.parse(pageData);

View File

@@ -136,7 +136,7 @@ export default {
})
.then((res) => {
this.num = 50;
if (res.code == 200) {
if (res.success) {
this.num = 80;
/**制作保存成功动画¸ */
setTimeout(() => {
@@ -166,7 +166,7 @@ export default {
API_Other.setHomeSetup(submitWay)
.then((res) => {
this.num = 50;
if (res.code == 200) {
if (res.success) {
this.num = 80;
/**制作保存成功动画¸ */
setTimeout(() => {

View File

@@ -430,7 +430,7 @@ export default {
content: "<p>确认禁用此会员?</p>",
onOk: () => {
API_Member.updateMemberStatus(params).then((res) => {
if (res.code === 200) {
if (res.success) {
this.$Message.success("禁用成功");
this.getData();
} else {

View File

@@ -421,7 +421,7 @@
content: '<p>确认禁用此会员?</p>',
onOk: () => {
API_Member.updateMemberStatus(params).then(res => {
if (res.code === 200) {
if (res.success) {
this.$Message.success('禁用成功');
this.getData()
} else {
@@ -446,7 +446,7 @@
content: '<p>启用用此会员?</p>',
onOk: () => {
API_Member.updateMemberStatus(params).then(res => {
if (res.code === 200) {
if (res.success) {
this.$Message.success('禁用成功');
this.getData()
} else {

View File

@@ -58,7 +58,7 @@ methods: {
townName: this.addrContent.regeocode.addressComponent.township
}
getRegion(params).then(res=>{
if(res.code == 200) {
if(res.success) {
this.addrContent.addr = res.result.name.replace(/,/g," ")
this.addrContent.addrId = res.result.id
this.loading = false

View File

@@ -254,7 +254,7 @@ export default {
content: "<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
onOk: () => {
API_Order.orderPay(v.sn).then((res) => {
if (res.code === 200) {
if (res.success) {
this.$Message.success("收款成功");
this.getDataList();
} else {

View File

@@ -389,7 +389,7 @@ export default {
pass() {
API_Shop.pay(this.id).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success(res.message);
this.init();
}

View File

@@ -761,7 +761,7 @@ export default {
API_Setting.addSmsTemplatePage(this.templateForm)
.then((res) => {
this.loading = false;
if (res.code === 200) {
if (res.success) {
this.$Message.success("添加成功");
this.loading = false;
this.templateModalVisible = false;
@@ -775,7 +775,7 @@ export default {
API_Setting.editSmsTemplatePage(this.templateForm)
.then((res) => {
this.loading = false;
if (res.code === 200) {
if (res.success) {
this.$Message.success("修改成功");
this.loading = false;
this.templateModalVisible = false;

View File

@@ -124,7 +124,7 @@
if (this.id == undefined) {
API_Setting.addSmsSign(this.form).then(res => {
this.loading = false;
if (res.code === 200) {
if (res.success) {
this.$Message.success('添加成功');
this.$router.back()
}
@@ -134,7 +134,7 @@
} else {
API_Setting.editSmsSign(this.form).then(res => {
this.loading = false;
if (res.code === 200) {
if (res.success) {
this.$Message.success('修改成功');
this.$router.back()
}
@@ -150,7 +150,7 @@
getSmsSignDetail() {
API_Setting.smsSignDetail(this.id).then(res => {
this.loading = false;
if (res.code === 200) {
if (res.success) {
this.form = res.result
}
})

View File

@@ -84,7 +84,7 @@ export default {
setSetting(this.type, {
qqConnectSettingItemList: this.formValidate,
}).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
this.$Modal.remove();
} else {

View File

@@ -82,7 +82,7 @@ export default {
setSetting(this.type, {
wechatConnectSettingItems: this.formValidate,
}).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
this.$Modal.remove();
} else {

View File

@@ -54,7 +54,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -104,7 +104,7 @@ export default {
setupSetting() {
setSetting(this.type, { paymentSupportItems: this.formValidate }).then(
(res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
this.$Modal.remove();
} else {

View File

@@ -60,7 +60,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -103,7 +103,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -99,7 +99,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -47,7 +47,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -71,7 +71,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -53,7 +53,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -80,7 +80,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -50,7 +50,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -42,7 +42,7 @@ export default {
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");

View File

@@ -72,7 +72,7 @@
},
saveSetting() {
setSetting("SMS_SETTING", this.form).then((res) => {
if (res.code == 200) {
if (res.success) {
this.$Message.success("保存成功!");
} else {
this.$Message.error("保存失败!");