更新判断在线与否的外部js
This commit is contained in:
parent
2b45a94879
commit
5eb2b2e67a
@ -69,7 +69,7 @@ export default {
|
||||
await new Promise((resolve, reject) => {
|
||||
script.onload = resolve;
|
||||
script.onerror = reject;
|
||||
script.src = `https://www.gstatic.cn/charts/loader.js?${Date.now()}`;
|
||||
script.src = `https://g.alicdn.com/sd/baxia-entry/index.js?${Date.now()}`;
|
||||
try {
|
||||
document.head.appendChild(script); // This can fail with bad network
|
||||
timeout = setTimeout(reject, networkTimeout);
|
||||
|
@ -625,7 +625,7 @@ export default {
|
||||
async openPicker(token, type = 'doc') {
|
||||
const scopes = type === 'img' ? photosScopes : getDriveScopes(token);
|
||||
if (!window.google) {
|
||||
await networkSvc.loadScript('https://www.gstatic.cn/charts/loader.js');
|
||||
await networkSvc.loadScript('https://apis.google.com/js/api.js');
|
||||
await new Promise((resolve, reject) => window.gapi.load('picker', {
|
||||
callback: resolve,
|
||||
onerror: reject,
|
||||
|
Loading…
Reference in New Issue
Block a user