更新判断在线与否的外部js

This commit is contained in:
xiaoqi.cxq 2022-11-12 17:17:07 +08:00
parent 2b45a94879
commit 5eb2b2e67a
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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,