...
|
...
|
@@ -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(() => {
|
...
|
...
|
@@ -58,10 +58,10 @@ function init(qs) { |
|
|
if (/QQ/i.test(navigator.userAgent)) {
|
|
|
loadScript('//qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js', function() {
|
|
|
window.setShareInfo && window.setShareInfo({
|
|
|
title: shareData.title,
|
|
|
summary: shareData.desc,
|
|
|
pic: shareData.imgUrl,
|
|
|
url: shareData.link
|
|
|
title: shareData.title,
|
|
|
summary: shareData.desc,
|
|
|
pic: shareData.imgUrl,
|
|
|
url: shareData.link || location.href
|
|
|
});
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -73,12 +73,12 @@ function init(qs) { |
|
|
}).then(res => {
|
|
|
if (window.wx) {
|
|
|
window.wx.config({
|
|
|
debug: false,
|
|
|
appId: res.appId,
|
|
|
timestamp: res.timestamp,
|
|
|
nonceStr: res.nonceStr,
|
|
|
signature: res.signature,
|
|
|
jsApiList: jsApiList
|
|
|
debug: false,
|
|
|
appId: res.appId,
|
|
|
timestamp: res.timestamp,
|
|
|
nonceStr: res.nonceStr,
|
|
|
signature: res.signature,
|
|
|
jsApiList: jsApiList
|
|
|
});
|
|
|
}
|
|
|
})
|
...
|
...
|
|