Merge branch 'feature/0430' into 'release/6.9.2'
fix See merge request !59
Showing
1 changed file
with
5 additions
and
5 deletions
@@ -20,7 +20,7 @@ function loadScript(url, success) { | @@ -20,7 +20,7 @@ function loadScript(url, success) { | ||
20 | 20 | ||
21 | script.type = 'text/javascript'; | 21 | script.type = 'text/javascript'; |
22 | script.onload = script.onreadystatechange = function() { | 22 | script.onload = script.onreadystatechange = function() { |
23 | - if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete" ) { | 23 | + if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete' ) { |
24 | success && success(); | 24 | success && success(); |
25 | script.onload = script.onreadystatechange = null; | 25 | script.onload = script.onreadystatechange = null; |
26 | } | 26 | } |
@@ -31,7 +31,7 @@ function loadScript(url, success) { | @@ -31,7 +31,7 @@ function loadScript(url, success) { | ||
31 | 31 | ||
32 | function jsonp(url, data = {}) { | 32 | function jsonp(url, data = {}) { |
33 | return new Promise((resolve, reject) => { | 33 | return new Promise((resolve, reject) => { |
34 | - let JSONP = document.createElement("script"); | 34 | + let JSONP = document.createElement('script'); |
35 | let query = []; | 35 | let query = []; |
36 | 36 | ||
37 | data.callback = 'jsonCallBack'; | 37 | data.callback = 'jsonCallBack'; |
@@ -43,9 +43,9 @@ function jsonp(url, data = {}) { | @@ -43,9 +43,9 @@ function jsonp(url, data = {}) { | ||
43 | resolve(result); | 43 | resolve(result); |
44 | }; | 44 | }; |
45 | 45 | ||
46 | - JSONP.type = "text/javascript"; | 46 | + JSONP.type = 'text/javascript'; |
47 | JSONP.src = `${url}?${query.join('&')}`; | 47 | JSONP.src = `${url}?${query.join('&')}`; |
48 | - const head = document.getElementsByTagName("head")[0]; | 48 | + const head = document.getElementsByTagName('head')[0]; |
49 | head.appendChild(JSONP); | 49 | head.appendChild(JSONP); |
50 | 50 | ||
51 | setTimeout(() => { | 51 | setTimeout(() => { |
@@ -61,7 +61,7 @@ function init(qs) { | @@ -61,7 +61,7 @@ function init(qs) { | ||
61 | title: shareData.title, | 61 | title: shareData.title, |
62 | summary: shareData.desc, | 62 | summary: shareData.desc, |
63 | pic: shareData.imgUrl, | 63 | pic: shareData.imgUrl, |
64 | - url: shareData.link | 64 | + url: shareData.link || location.href |
65 | }); | 65 | }); |
66 | }); | 66 | }); |
67 | } | 67 | } |
-
Please register or login to post a comment