From b6c7f588b831d6fa4eb23b50ec08ea0b263a0717 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 六月 2024 20:27:56 +0800 Subject: [PATCH] 2024-06-17 --- src/api/index.js | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 09170ce..d7b2088 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -115,10 +115,10 @@ url: _url, method: 'get' }).then(res => { - if (res.oa_access_token || res.mini_access_token) { + if (res.oa_access_token) { window.GLOB.accessToken.accessTime = parseInt(new Date().getTime() / 1000) window.GLOB.accessToken.oa_access_token = res.oa_access_token - window.GLOB.accessToken.mini_access_token = res.mini_access_token + // window.GLOB.accessToken.mini_access_token = res.mini_access_token } resolve(res) }) @@ -401,7 +401,7 @@ this.getSystemConfig(param).then(res => { if (!res.status) { - reject() + reject(res.message) return } @@ -441,7 +441,7 @@ CacheUtils.updateIndexDBversion({version: res.app_version || '1.00', createDate: curTime}) - resolve() + resolve(list) }) }, () => { reject() @@ -865,8 +865,8 @@ if (script) { try { // eslint-disable-next-line - let func = new Function('axios', 'Api', 'param', 'position', 'systemType', script) - let promise = func(axios, this, param, position, window.GLOB.systemType) + let func = new Function('axios', 'Api', 'param', 'position', 'systemType', 'notification', script) + let promise = func(axios, this, param, position, window.GLOB.systemType, notification) if (promise instanceof Promise) { return promise @@ -1061,6 +1061,21 @@ }) } + /** + * @description 寰俊鏀粯閫�娆� + */ + setRefund (orderId) { + let _param = new FormData() + _param.append('out_biz_no', orderId) + + return axios({ + url: '/wxpay/wxRefund', + headers: { 'Content-Type': 'multipart/form-data' }, + method: 'post', + data: _param + }) + } + postekPrint (data) { return axios({ url: 'http://127.0.0.1:888/postek/print', @@ -1072,7 +1087,7 @@ /** * @description sql妫�楠� */ - sDebug (sql, rduri = null) { + sDebug (sql) { let param = { func: 's_debug_sql', exec_type: window.GLOB.execType || 'y', @@ -1091,6 +1106,7 @@ sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid')}'`) sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID')}'`) sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey}'`) + sql = sql.replace(/@lang@/ig, `'${sessionStorage.getItem('lang')}'`) // sql = sql.replace(/@datam@/ig, `''`) if (window.GLOB.externalDatabase !== null) { @@ -1107,10 +1123,6 @@ param = this.encryptParam(param) let url = '/webapi/dostars' - - if (rduri) { - url = rduri - } let timer = setTimeout(() => { let _param = { -- Gitblit v1.8.0