From e11005391b9c9fcd3548147d0f653d4fa1d02681 Mon Sep 17 00:00:00 2001
From: zmj <1493694146@qq.com>
Date: Wed, 22 May 2024 17:46:00 +0800
Subject: [PATCH] ad
---
config/app.js | 4 ++--
pages/quote/bindAccout.vue | 18 ++++++++++------
pages/quote/supplierFinancialy.vue | 6 +++++-
utils/requestSupplier.js | 34 +++++++++++-------------------
4 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/config/app.js b/config/app.js
index f42f04f..182cfb1 100644
--- a/config/app.js
+++ b/config/app.js
@@ -37,8 +37,8 @@ switch (env) {
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
// httpTwo = 'http://192.168.1.22:8546'
- httpTwo = 'http://192.168.1.13:8546'
- // httpTwo = 'https://erp.lihaink.cn'
+ // httpTwo = 'http://192.168.1.13:8546'
+ httpTwo = 'https://erp.lihaink.cn'
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
}
diff --git a/pages/quote/bindAccout.vue b/pages/quote/bindAccout.vue
index cde04df..9a0dade 100644
--- a/pages/quote/bindAccout.vue
+++ b/pages/quote/bindAccout.vue
@@ -8,7 +8,7 @@
{{form.is_own?'对公账户':'个人账户'}}
- 账户绑定
+ 账户类型
@@ -77,6 +77,9 @@
bankListApi,
amountAccountApi
} from "@/api/supplier.js"
+ import {
+ Modal
+ } from "../../libs/uniApi"
export default {
data() {
return {
@@ -153,14 +156,15 @@
this.bankList = res.data.lists
},
- submit() {
- this.form.is_own = 1
- bindCradApi({
+ async submit() {
+ await Modal('温馨提示', "确定信息无误,提交绑定")
+ this.form.is_own = this.form.is_own || 1
+ await bindCradApi({
...this.form
- }).then(res => {
- // return
- // uni.navigateBack()
})
+ this.$util.Tips({
+ title: '提交成功,等待后台审核'
+ });
}
diff --git a/pages/quote/supplierFinancialy.vue b/pages/quote/supplierFinancialy.vue
index f8b7c8f..8198ab1 100644
--- a/pages/quote/supplierFinancialy.vue
+++ b/pages/quote/supplierFinancialy.vue
@@ -75,6 +75,10 @@
amountAccountApi,
UserWithdrawApi
} from "@/api/supplier.js"
+ import {
+ Modal
+ } from "../../libs/uniApi"
+
export default {
data() {
return {
@@ -109,11 +113,11 @@
},
async submit() {
+ await Modal("温馨提示", '确认无误后,确定提现')
await UserWithdrawApi({
"merchant_bank_id": this.target_bank.id,
"amount": this.form.money
})
- return
uni.showToast({
title: '提交成功',
duration: 1500,
diff --git a/utils/requestSupplier.js b/utils/requestSupplier.js
index 508d64a..3e60ed9 100644
--- a/utils/requestSupplier.js
+++ b/utils/requestSupplier.js
@@ -17,6 +17,9 @@ import {
} from '../libs/login';
import store from '../store';
import pako from '../plugin/pako/pako.es5.min.js'
+import {
+ Tips
+} from "@/utils/util.js"
function toLogin() {
@@ -65,6 +68,8 @@ var HTTP_list = new Map();
/**
* 发送请求
*/
+let that = this
+
function baseRequest(url, method, data, {
noAuth = false,
noVerify = false,
@@ -96,31 +101,16 @@ function baseRequest(url, method, data, {
header: header,
data: data || {},
success: (res) => {
+ console.log(res.data.show)
if (res.data.code == 1) {
reslove(res.data, res);
- } else if (res.data && res.data.encode) {
- try {
- res.data = JSON.parse(decompress(res.data.data));
- } catch (e) {
- res.data = decompress(decodeURI(res.data.data));
- }
}
- if (noVerify)
- reslove(res.data, res);
- else if (res.data.status == 200)
- reslove(res.data, res);
- else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
- toLogin();
- reject(res.data);
- } else if (res.data.status == 501) {
- uni.reLaunch({
- url: '/pages/error/index'
- })
- reject(res.data);
- } else if (res.data.code == 1) {
- reject(res.data, res);
-
- } else if (res.data.code == 0) {} else {
+ if (res.data.show) {
+ uni.showToast({
+ title: res.data.msg,
+ icon: 'none'
+ });
+ } else {
reslove(res.data, res);
}
},