|
@@ -35,10 +35,11 @@ function initSDK (url) {
|
35
|
35
|
export function share (opt = {}) {
|
36
|
36
|
const { origin, pathname } = window.location
|
37
|
37
|
|
38
|
|
- const defaultImg = `${origin}${pathname}img/share.jpg`
|
|
38
|
+ const url=origin+pathname
|
|
39
|
+ const defaultImg = `${url}img/share.jpg`
|
39
|
40
|
|
40
|
41
|
const link = origin + pathname
|
41
|
|
- const imgUrl = opt.imgUrl || defaultImg
|
|
42
|
+ const imgUrl = defaultImg
|
42
|
43
|
|
43
|
44
|
initSDK(link)
|
44
|
45
|
|
|
@@ -47,10 +48,10 @@ export function share (opt = {}) {
|
47
|
48
|
const fn = window.wx[apiName]
|
48
|
49
|
if (typeof fn === 'function') {
|
49
|
50
|
fn({
|
50
|
|
- title: opt.title || '为岸线圆梦,摩天轮圆满大作战!',
|
|
51
|
+ title:'为岸线圆梦,摩天轮圆满大作战!',
|
51
|
52
|
link,
|
52
|
53
|
imgUrl,
|
53
|
|
- desc: opt.desc || '快来助力华侨城欢乐滨江摩天轮挂轿厢'
|
|
54
|
+ desc: '快来助力华侨城欢乐滨江摩天轮挂轿厢'
|
54
|
55
|
})
|
55
|
56
|
}
|
56
|
57
|
})
|