diff --git a/jsFile/requst.js b/jsFile/requst.js index 749fb84..a2f033d 100644 --- a/jsFile/requst.js +++ b/jsFile/requst.js @@ -111,13 +111,7 @@ const request = (method, url, options) => { success: res => { console.log(`${url}返的结果===>`,res); if (res.statusCode == 200) { - if (res.data.code == 0) { - // 接口调用成功 - resolve(res.data); - } else { - // 接口返回错误信息 - checkError(res); - } + resolve(res.data); } else { // 接口返回错误信息 checkError(res); diff --git a/pagesB/settlement/settlement.vue b/pagesB/settlement/settlement.vue index b4bbdf5..91d84b2 100644 --- a/pagesB/settlement/settlement.vue +++ b/pagesB/settlement/settlement.vue @@ -55,6 +55,7 @@ // 提交 submit(){ if(this.checkEmpty() && this.flag){ + console.log(121231222) this.flag = false; let params = { sku_list: uni.getStorageSync('buyList'), @@ -69,8 +70,9 @@ uni.reLaunch({ url:`/pagesB/finish/finish?id=${res.data.id}` }) - } else { + }else{ this.$toolAll.tools.showToast(res.msg); + this.flag = true; } }) }