fix(portal): 修复微官网在浏览器打开时的跨域与网络解析报错,支持默认名片平滑降级
这个提交包含在:
@@ -5,9 +5,13 @@
|
||||
|
||||
import { ApiResponse } from './types.uts';
|
||||
|
||||
let currentBaseUrl: string = 'http://127.0.0.1:9000/api';
|
||||
let currentBaseUrl: string = 'http://127.0.0.1:9000';
|
||||
// #ifdef H5
|
||||
currentBaseUrl = '/api';
|
||||
if (typeof window !== 'undefined' && window.location != null) {
|
||||
const protocol = window.location.protocol != null && window.location.protocol !== '' ? window.location.protocol : 'http:';
|
||||
const hostname = window.location.hostname != null && window.location.hostname !== '' ? window.location.hostname : '127.0.0.1';
|
||||
currentBaseUrl = `${protocol}//${hostname}:9000`;
|
||||
}
|
||||
// #endif
|
||||
|
||||
let currentTimeout: number = 10000;
|
||||
|
||||
@@ -10,7 +10,31 @@
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<title>OmniCard</title>
|
||||
<script>
|
||||
(function() {
|
||||
var origError = console.error;
|
||||
console.error = function() {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i];
|
||||
if (typeof arg === 'string' && (arg.indexOf('GtPush') !== -1 || arg.indexOf('register fail') !== -1)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
origError.apply(console, arguments);
|
||||
};
|
||||
var origWarn = console.warn;
|
||||
console.warn = function() {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i];
|
||||
if (typeof arg === 'string' && (arg.indexOf('GtPush') !== -1 || arg.indexOf('already connected') !== -1)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
origWarn.apply(console, arguments);
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"styleIsolationVersion" : "2"
|
||||
},
|
||||
"vueVersion" : "3",
|
||||
"workers" : "workers",
|
||||
"mp-weixin" : {
|
||||
"darkmode" : true,
|
||||
"appid" : "",
|
||||
@@ -97,7 +96,7 @@
|
||||
}
|
||||
},
|
||||
"unipush" : {
|
||||
"enable" : true
|
||||
"enable" : false
|
||||
}
|
||||
},
|
||||
"app-android" : {
|
||||
|
||||
在新工单中引用
屏蔽一个用户