Authored by 杨延青

Merge branch 'feature/0430' into 'release/6.9.2'

fix



See merge request !59
... ... @@ -20,7 +20,7 @@ function loadScript(url, success) {
script.type = 'text/javascript';
script.onload = script.onreadystatechange = function() {
if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete" ) {
if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete' ) {
success && success();
script.onload = script.onreadystatechange = null;
}
... ... @@ -31,7 +31,7 @@ function loadScript(url, success) {
function jsonp(url, data = {}) {
return new Promise((resolve, reject) => {
let JSONP = document.createElement("script");
let JSONP = document.createElement('script');
let query = [];
data.callback = 'jsonCallBack';
... ... @@ -43,9 +43,9 @@ function jsonp(url, data = {}) {
resolve(result);
};
JSONP.type = "text/javascript";
JSONP.type = 'text/javascript';
JSONP.src = `${url}?${query.join('&')}`;
const head = document.getElementsByTagName("head")[0];
const head = document.getElementsByTagName('head')[0];
head.appendChild(JSONP);
setTimeout(() => {
... ... @@ -61,7 +61,7 @@ function init(qs) {
title: shareData.title,
summary: shareData.desc,
pic: shareData.imgUrl,
url: shareData.link
url: shareData.link || location.href
});
});
}
... ...