fix: 关闭App端SSL校验以兼容老PDA
This commit is contained in:
+19
@@ -17,6 +17,25 @@ import VueI18n from '@/common/vue-i18n.min.js';
|
||||
import lang_zh_CN from '@/common/locales/zh_CN.js';
|
||||
import lang_en from '@/common/locales/en.js';
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// Android 5.x 等老 PDA 不信任 Let's Encrypt 新证书链,全局关闭 HTTPS 证书校验
|
||||
(() => {
|
||||
const patchSslVerify = (methodName) => {
|
||||
const original = uni[methodName];
|
||||
if (typeof original !== 'function') {
|
||||
return;
|
||||
}
|
||||
uni[methodName] = (options = {}) => original({
|
||||
...options,
|
||||
sslVerify: false
|
||||
});
|
||||
};
|
||||
patchSslVerify('request');
|
||||
patchSslVerify('downloadFile');
|
||||
patchSslVerify('uploadFile');
|
||||
})();
|
||||
// #endif
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
App.mpType = 'app';
|
||||
|
||||
Reference in New Issue
Block a user