From 93b205e8e9ebfd2c1e8e8f2fde4ebc5eccedade9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 16 九月 2022 17:46:08 +0800 Subject: [PATCH] 2022-09-16 --- public/options.json | 5 +++-- src/index.js | 7 ++++--- src/api/index.js | 30 ++++++++++++++++++++++++------ src/tabviews/zshare/actionList/normalbutton/index.jsx | 1 + public/README.txt | 9 +++++---- 5 files changed, 37 insertions(+), 15 deletions(-) diff --git a/public/README.txt b/public/README.txt index b3f88fd..b01eb22 100644 --- a/public/README.txt +++ b/public/README.txt @@ -4,15 +4,16 @@ appkey -- 浜戠鐢熸垚鐨勫簲鐢ㄥ瘑閽� mainSystemApi -- 涓氬姟绯荤粺鐨勫崟鐐圭櫥褰曢摼鎺ュ湴鍧�锛屽紑鍙戠郴缁熷湴鍧�涓篽ttp://sso.mk9h.cn/cloud/webapi/dostars锛岀敓浜х郴缁熼渶瑕佷緷鎹惌寤虹殑鍗曠偣鐧诲綍绯荤粺鑷淇敼閰嶇疆 systemType -- 绯荤粺绫诲瀷锛屾寮忕郴缁熸槸濉玴roduction锛屽紑鍙戠郴缁熶负绌猴紝寮�鍙戠郴缁熶細鏈変竴閮ㄥ垎鐨勬暟鎹ā绯婂寲 -externalDatabase -- 澶栬仈搴擄紝涓嶄娇鐢ㄦ椂榛樿涓篺alse +externalDatabase -- 澶栬仈搴擄紝涓嶄娇鐢ㄦ椂榛樿涓� false lineColor -- 鐧诲綍椤靛垎鍓茬嚎棰滆壊 -filter -- 椤甸潰婊ら暅锛屽�间负"true"鏃讹紝椤甸潰鏄剧ず涓洪粦鐧借壊锛涘綋璁剧疆涓烘棩鏈熸椂锛圷YYY-MM-DD锛夛紝鎴鍒板綋鍓嶆棩鏈燂紝椤甸潰鏄剧ず涓洪粦鐧借壊 +filter -- 椤甸潰婊ら暅锛屽�间负 true 鏃讹紝椤甸潰鏄剧ず涓洪粦鐧借壊锛涘綋璁剧疆涓烘棩鏈熸椂锛圷YYY-MM-DD锛夛紝鎴鍒板綋鍓嶆棩鏈燂紝椤甸潰鏄剧ず涓洪粦鐧借壊 defaultApp -- 榛樿搴旂敤锛岀郴缁熼粯璁ゆ墦寮�鏌愪釜瀛愬簲鐢ㄦ椂闇�濉啓搴旂敤缂栫爜 defaultLang -- 鎵撳紑鐨勫瓙搴旂敤璇█绫诲瀷锛岄粯璁や负zh-CN WXAppID -- 浣跨敤鍏紬鍙锋椂锛岀粦瀹氱殑鍏紬鍙稩D WXminiAppID -- 浣跨敤寰俊灏忕▼搴忔椂锛岀粦瀹氱殑灏忕▼搴廔D -debugger -- 鍊间负true鏃跺紑鍚皟璇曟ā寮忥紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴 +debugger -- 鍊间负 true 鏃跺紑鍚皟璇曟ā寮忥紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴 licenseKey -- 璁稿彲瀵嗛挜锛屽湪鍐呴儴缃戠粶涓娇鐢ㄧ郴缁熸椂锛屼細璺宠繃epc楠岃瘉 probation -- 璇曠敤鏈燂紙YYYY-MM-DD锛夛紝鍦ㄦ寮忕郴缁熶腑锛岃瘯鐢ㄦ湡鍐呰皟鐢ㄧ郴缁熸帴鍙g殑鑴氭湰浼氳褰曚笅鏉� -keepPassword -- 璁颁綇瀵嗙爜锛岄粯璁ゅ紑鍚紝褰撳�间负"false"鏃剁鐢� +transfer -- 鏄惁浣跨敤杞帴鍙o紝浣跨敤杞帴鍙f椂璇疯缃负 true +keepPassword -- 璁颁綇瀵嗙爜锛岄粯璁ゅ紑鍚紝褰撳�间负 false 鏃剁鐢� platforms -- 绉诲姩绔彲浣跨敤鐨勫钩鍙扮被鍨嬶紝榛樿涓� ["H5", "wechat", "android", "ios", "wxMiniProgram"] 鍒嗗埆浠h〃H5椤甸潰銆佸井淇″叕浼楀彿銆佸畨鍗揂PP銆佽嫻鏋淎PP銆佸井淇″皬绋嬪簭 \ No newline at end of file diff --git a/public/options.json b/public/options.json index f2e53ff..f16a974 100644 --- a/public/options.json +++ b/public/options.json @@ -8,11 +8,12 @@ "filter": "false", "defaultApp": "", "defaultLang": "zh-CN", - "WXAppID": "", + "WXAppID": "wxa5dd6f28cae613fc", "WXminiAppID": "", - "debugger": false, + "debugger": "false", "licenseKey": "", "probation": "", + "transfer": "true", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], "host": "https://css-test.positecgroup.com", diff --git a/src/api/index.js b/src/api/index.js index d726b02..9921ebc 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -806,11 +806,18 @@ param.appkey = window.GLOB.appkey || '' let url = '/webapi/dostars' - // positecgroup - // if (param.rduri && /\/dostars/.test(param.rduri) && param.func !== 'webapi_ChangeUser') { // 鍒囨崲鐢ㄦ埛闇�瑕侀�氳繃鏈湴 - // url = param.rduri - // delete param.rduri - // } + + if (param.rduri && /\s|\n/.test(param.rduri)) { + param.rduri = param.rduri.replace(/\s|\n/g, '') + if (!param.rduri) { + delete param.rduri + } + } + + if (param.rduri && !window.GLOB.transfer && /\/dostars/.test(param.rduri) && param.func !== 'webapi_ChangeUser') { // 鍒囨崲鐢ㄦ埛闇�瑕侀�氳繃鏈湴 + url = param.rduri + delete param.rduri + } param = this.encryptParam(param) @@ -889,8 +896,19 @@ param = this.encryptParam(param) let url = '/webapi/SaveBase64Image' + if (param.rduri) { - url = param.rduri.replace(/webapi(.*)$/, 'webapi/SaveBase64Image') + param.rduri = param.rduri.replace(/webapi(.*)$/, 'webapi/SaveBase64Image') + if (/\s|\n/.test(param.rduri)) { + param.rduri = param.rduri.replace(/\s|\n/g, '') + if (!param.rduri) { + delete param.rduri + } + } + } + + if (param.rduri && !window.GLOB.transfer) { + url = param.rduri delete param.rduri } diff --git a/src/index.js b/src/index.js index 0528488..909a4bf 100644 --- a/src/index.js +++ b/src/index.js @@ -70,14 +70,15 @@ GLOB.lineColor = config.lineColor || '' GLOB.licenseKey = config.licenseKey || '' GLOB.probation = false - GLOB.watermark = config.watermark !== false - GLOB.keepKey = config.keepPassword !== 'false' + GLOB.watermark = config.watermark + '' !== 'false' + GLOB.transfer = config.transfer + '' === 'true' + GLOB.keepKey = config.keepPassword + '' !== 'false' GLOB.WXAppID = config.WXAppID || '' GLOB.WXminiAppID = config.WXminiAppID || '' GLOB.accessToken = {} GLOB.mkHS = false - if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { + if (config.externalDatabase + '' !== 'false' && config.externalDatabase !== undefined) { GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' } else { GLOB.externalDatabase = null diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index d6cceab..af088f7 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -1633,6 +1633,7 @@ } Api.genericInterface(result).then(res => { + if (!res) return // LoginError鏃朵腑鏂姹� this.outerCallbackRequest(params, res, record, outParam, _resolve) }, () => { this.outerCallbackRequest(params, {status: false, message: 500, ErrCode: 'E', ErrMesg: 500}, record, outParam, _resolve) -- Gitblit v1.8.0