From 6188622e7c89205810e8348ba97476c89b2bf99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Thu, 26 Dec 2024 17:48:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8C=89=E9=92=AE=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8D=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/api.js | 15 +++++++++------ framework/11-api.js | 2 +- pages/hindex/index.vue | 15 ++++++++++++++- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/common/js/api.js b/common/js/api.js index 720bf29..ba55e66 100644 --- a/common/js/api.js +++ b/common/js/api.js @@ -42,7 +42,7 @@ export default { return uni.api.post("user/subopeninvoicefixed", data); }, szzpyfailccho(data) { //开票审核失败回显 - return uni.api.post("szzpy/failccho", data,false); + return uni.api.post("szzpy/failccho", data, false); }, storeinvoicingrecordsthatneed(data) { //开票记录(固定开票) return uni.api.post("store/invoicingrecordsthatneed", data); @@ -86,7 +86,7 @@ export default { szzpyhurl(data) { return uni.api.post("szzpy/h5url", data); }, - szzpygetprovinceno(data) {//地区 + szzpygetprovinceno(data) { //地区 return uni.api.post("szzpy/getprovinceno", data); }, storebindinginvopush(data) { @@ -107,7 +107,7 @@ export default { hfivegetstoreinfo(data) { return uni.api.post("hfive/getstoreinfo", data, false); }, - storestoreinfo(data) {//固定开票的接口上传 + storestoreinfo(data) { //固定开票的接口上传 return uni.api.post("store/storeinfo", data); }, @@ -148,13 +148,13 @@ export default { return uni.api.post("hfive/setdefault", data); }, invoicedorderlist(data) { //订单列表 - return uni.api.post("hfive/invoicedorderlist", data,false); + return uni.api.post("hfive/invoicedorderlist", data, false); }, hfivestatuslist(data) { //订单列表 return uni.api.post("hfive/statuslist", data); }, invoicingrecordsthatneed(data) { //审核开票记录 - return uni.api.post("hfive/invoicingrecordsthatneed", data,false); + return uni.api.post("hfive/invoicingrecordsthatneed", data, false); }, newissuedbyliststatus(data) { //开票人列表(带状态) return uni.api.post("hfive/newissuedbyliststatus", data); @@ -190,6 +190,9 @@ export default { return uni.api.post("user/judgeuseridentity", data); }, getrulelist(data) { //菜单列表 - return uni.api.post("store/getrulelist", data,false); + return uni.api.post("store/getrulelist", data, false); + }, + checkqrcodestatus(data) { //检查二维码状态 + return uni.api.post("user/checkqrcodestatus", data); }, } \ No newline at end of file diff --git a/framework/11-api.js b/framework/11-api.js index 59be2be..13b7766 100644 --- a/framework/11-api.js +++ b/framework/11-api.js @@ -9,7 +9,7 @@ uni.pro.interceptor('request', { return options }, success(res) { - if (res.code >= 400) { + if (res.data.code == 1) { return res.data } else { return res.data diff --git a/pages/hindex/index.vue b/pages/hindex/index.vue index 6d42fab..848b761 100644 --- a/pages/hindex/index.vue +++ b/pages/hindex/index.vue @@ -94,7 +94,8 @@ 微信抬头一键导入 - 确定 + 确定 @@ -110,6 +111,7 @@ data() { return { showtext: 0, + disabled: false, subCategoryList: [], form: { user_type: 2, @@ -163,6 +165,14 @@ this.showtitle = true this.form.open_id = uni.cache.get('open_id') // #endif + let RES = await this.api.checkqrcodestatus({ + id: this.form.id + }) + if (RES.code == 1) { + this.disabled = true + } else { + this.disabled = false + } // 开票失败的回显 if (e.view_type == 'fail') { this.form.view_type = e.view_type; @@ -335,6 +345,9 @@ }); }, async saveMerchantBaseInfo() { + if (!this.disabled) { + return false; + } if (this.form.user_name == null || this.form.user_name == '') { uni.showToast({ title: '请输入名称',