Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
walk_daka_h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
穆启卓
walk_daka_h5
Commits
39102f26
Commit
39102f26
authored
Apr 08, 2019
by
穆启卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
按钮边距
parent
19d3c513
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
60 deletions
+63
-60
ChallengeDetail.vue
src/views/ChallengeDetail.vue
+63
-60
No files found.
src/views/ChallengeDetail.vue
View file @
39102f26
...
@@ -36,125 +36,128 @@
...
@@ -36,125 +36,128 @@
</div>
</div>
</div>
</div>
<div
class=
"share-btn"
@
click=
"inviteFriend"
>
邀请好友来参赛
</div>
<div
class=
"share-btn"
@
click=
"inviteFriend"
>
邀请好友来参赛
</div>
<ShareModal
<ShareModal
v-on:close=
"closeShareModal"
v-if=
"showShareModal"
></ShareModal>
v-on:close=
"closeShareModal"
v-if=
"showShareModal"
></ShareModal>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Title
from
"@/components/Title.vue"
import
Title
from
"@/components/Title.vue"
;
import
ShareModal
from
"@/components/ShareModal.vue"
import
ShareModal
from
"@/components/ShareModal.vue"
;
import
{
dakaPay
,
shareContent
,
track
,
liinShare
}
from
"@/components/axios/api"
import
{
let
grabStartTimer
=
null
dakaPay
,
export
default
{
shareContent
,
track
,
liinShare
}
from
"@/components/axios/api"
;
let
grabStartTimer
=
null
;
export
default
{
name
:
"ChallengeDetail"
,
name
:
"ChallengeDetail"
,
components
:
{
components
:
{
Title
,
Title
,
ShareModal
ShareModal
},
},
data
()
{
data
()
{
return
{
return
{
pageData
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'ChallengeDetailData'
)),
pageData
:
JSON
.
parse
(
sessionStorage
.
getItem
(
"ChallengeDetailData"
)),
showShareModal
:
false
,
showShareModal
:
false
,
userData
:
null
,
userData
:
null
,
grabTimer
:
'--时--分--秒'
grabTimer
:
"--时--分--秒"
}
};
},
},
mounted
()
{
mounted
()
{
console
.
log
(
"this.pageType"
,
this
.
pageData
)
console
.
log
(
"this.pageType"
,
this
.
pageData
);
if
(
window
[
"userData"
])
{
if
(
window
[
"userData"
])
{
this
.
userData
=
window
[
"userData"
]
this
.
userData
=
window
[
"userData"
];
}
else
{
}
else
{
let
localUserData
=
localStorage
.
getItem
(
"walk_userData"
)
let
localUserData
=
localStorage
.
getItem
(
"walk_userData"
);
if
(
localUserData
)
{
if
(
localUserData
)
{
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
)
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
);
this
.
userData
=
window
[
"userData"
]
this
.
userData
=
window
[
"userData"
];
}
}
}
}
console
.
log
(
"userData"
,
this
.
userData
)
console
.
log
(
"userData"
,
this
.
userData
);
},
},
methods
:
{
methods
:
{
goback
()
{
goback
()
{
history
.
go
(
-
1
)
history
.
go
(
-
1
);
},
},
goOtherPage
(
pageName
)
{
goOtherPage
(
pageName
)
{
this
.
$router
.
push
({
name
:
pageName
})
this
.
$router
.
push
({
name
:
pageName
});
},
},
inviteFriend
()
{
inviteFriend
()
{
console
.
log
(
"inviteFriend"
)
console
.
log
(
"inviteFriend"
);
this
.
showShareModal
=
true
this
.
showShareModal
=
true
;
let
id
=
this
.
userData
.
id
let
id
=
this
.
userData
.
id
;
// let id = 'yijun';
// let id = 'yijun';
track
(
"free_contract_share"
)
track
(
"free_contract_share"
);
let
links
=
`
${
let
links
=
`
${
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]}
?inviter=
${
id
}
&from_type=free_contract&`
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]
}
?inviter=
${
id
}
&from_type=free_contract&`
;
shareContent
(
"free_contract"
).
then
(
res
=>
{
shareContent
(
"free_contract"
).
then
(
res
=>
{
let
result
=
res
.
data
let
result
=
res
.
data
;
console
.
log
(
"分享内容"
,
result
,
links
)
console
.
log
(
"分享内容"
,
result
,
links
);
let
option1
=
{
let
option1
=
{
title
:
result
.
title
,
// 分享标题
title
:
result
.
title
,
// 分享标题
desc
:
result
.
desc
,
// 分享描述
desc
:
result
.
desc
,
// 分享描述
link
:
links
,
// 分享链接
link
:
links
,
// 分享链接
imgUrl
:
result
.
img_url
,
// 分享图标
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
success
:
function
(
res
)
{
track
(
"free_contract_share_act"
)
track
(
"free_contract_share_act"
);
console
.
log
(
"option1Success"
,
res
)
console
.
log
(
"option1Success"
,
res
);
}
}
}
wx
.
updateAppMessageShareData
(
option1
)
};
wx
.
updateAppMessageShareData
(
option1
);
//微信分享菜单测试
//微信分享菜单测试
let
option2
=
{
let
option2
=
{
title
:
result
.
title
,
// 分享标题
title
:
result
.
title
,
// 分享标题
desc
:
result
.
desc
,
// 分享描述
desc
:
result
.
desc
,
// 分享描述
link
:
links
,
// 分享链接
link
:
links
,
// 分享链接
imgUrl
:
result
.
img_url
,
// 分享图标
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
"option2Success"
,
res
)
console
.
log
(
"option2Success"
,
res
);
}
}
}
};
let
option3
=
{
let
option3
=
{
title
:
result
.
title
,
// 分享标题
title
:
result
.
title
,
// 分享标题
desc
:
result
.
desc
,
// 分享描述
desc
:
result
.
desc
,
// 分享描述
link
:
links
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
links
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
result
.
img_url
,
// 分享图标
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// 用户点击了分享后执行的回调函数
// 用户点击了分享后执行的回调函数
track
(
"free_contract_share_act"
)
track
(
"free_contract_share_act"
);
console
.
log
(
"option3Success"
,
res
)
console
.
log
(
"option3Success"
,
res
);
},
},
fail
:
err
=>
{
fail
:
err
=>
{
console
.
log
(
"option3error"
,
err
)
console
.
log
(
"option3error"
,
err
);
}
}
}
wx
.
onMenuShareAppMessage
(
option3
)
};
wx
.
onMenuShareAppMessage
(
option3
);
let
option4
=
{
let
option4
=
{
title
:
result
.
title
,
// 分享标题
title
:
result
.
title
,
// 分享标题
link
:
links
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
links
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
result
.
img_url
,
// 分享图标
imgUrl
:
result
.
img_url
,
// 分享图标
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
"option4Success"
,
res
)
console
.
log
(
"option4Success"
,
res
);
this
.
showShareModal
=
false
this
.
showShareModal
=
false
;
},
},
fail
:
err
=>
{
fail
:
err
=>
{
console
.
log
(
"option4error"
,
err
)
console
.
log
(
"option4error"
,
err
);
this
.
showShareModal
=
false
this
.
showShareModal
=
false
;
}
}
}
};
// wx.onMenuShareTimeline(option4);
// wx.onMenuShareTimeline(option4);
console
.
log
(
"option"
,
option1
,
option2
,
option3
,
option4
)
console
.
log
(
"option"
,
option1
,
option2
,
option3
,
option4
);
})
});
},
closeShareModal
()
{
this
.
showShareModal
=
false
},
},
closeShareModal
()
{
this
.
showShareModal
=
false
;
}
}
}
}
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.partake-challenge-page
{
.partake-challenge-page
{
width
:
100%
;
width
:
100%
;
min-height
:
100vh
;
min-height
:
100vh
;
background-color
:
rgb
(
70
,
88
,
149
);
background-color
:
rgb
(
70
,
88
,
149
);
...
@@ -283,7 +286,7 @@
...
@@ -283,7 +286,7 @@
color
:
#fff
;
color
:
#fff
;
font-weight
:
bold
;
font-weight
:
bold
;
text-align
:
center
;
text-align
:
center
;
margin-top
:
1.1rem
;
margin
:
1.1rem
0
.6rem
;
}
}
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment