|
@@ -29,11 +29,11 @@ function initSDK (url) {
|
29
|
29
|
* @param {*} opt
|
30
|
30
|
*/
|
31
|
31
|
export function share (opt) {
|
32
|
|
- const { origin, pathname } = window.location
|
|
32
|
+ const { origin, pathname, search } = window.location
|
33
|
33
|
// const defaultLink = origin + pathname
|
34
|
34
|
const defaultImg = `${origin}${pathname}images/share.jpg`
|
35
|
35
|
|
36
|
|
- const link = window.location.href // opt.link || defaultLink
|
|
36
|
+ const link = origin + pathname + search // opt.link || defaultLink
|
37
|
37
|
const imgUrl = opt.imgUrl || defaultImg
|
38
|
38
|
|
39
|
39
|
initSDK(link)
|