Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
wangxuelai
wechatapp.shangjiadao.com
Commits
58ae2999
Commit
58ae2999
authored
Mar 30, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'闯关打卡分享'
parent
59a4699d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
11 deletions
+55
-11
index.js
business/pages/morethemeindex/index.js
+22
-10
lockthemelist.js
business/pages/themeeditor/lockthemelist.js
+23
-0
lockthemelist.wxml
business/pages/themeeditor/lockthemelist.wxml
+1
-1
lockthemelist.wxss
business/pages/themeeditor/lockthemelist.wxss
+9
-0
No files found.
business/pages/morethemeindex/index.js
View file @
58ae2999
...
...
@@ -196,25 +196,23 @@ Page({
this
.
clockListGet
(
this
.
data
.
oneSmallSort
,
'up'
)
},
onShareAppMessage
:
function
(
option
)
{
// return custom share data when user share.
// console.log(option)
const
{
from
,
target
}
=
option
;
let
shareObj
=
{
}
if
(
target
.
dataset
.
type
==
'share_clock'
)
{
this
.
newShare
.
onShareAppMessage
()
return
}
if
(
from
==
'menu'
)
{
shareObj
=
this
.
data
.
shareObj
;
shareObj
=
{
title
:
this
.
data
.
moreTheme
.
title
,
path
:
`/src/pages/sharemoretheme/index?tid=
${
this
.
data
.
tid
}
&id=
${
this
.
data
.
id
}
`
}
}
else
if
(
from
==
'button'
)
{
if
(
!
target
.
dataset
.
info
)
{
shareObj
=
{
title
:
`邀请您提交「
${
this
.
data
.
params
.
title
}
」作业`
,
path
:
`/src/pages/
themeindex/index?tid=
${
this
.
data
.
tid
}
&id=
${
this
.
data
.
id
}
&sid=
${
this
.
data
.
s
id
}
`
title
:
this
.
data
.
moreTheme
.
title
,
path
:
`/src/pages/
sharemoretheme/index?tid=
${
this
.
data
.
tid
}
&id=
${
this
.
data
.
id
}
`
}
}
else
{
const
{
...
...
@@ -228,16 +226,30 @@ Page({
title
:
`
${
info
.
school_student
.
nickname
}
的打卡详情`
,
path
:
`/src/pages/clockdetail/newindex?tid=
${
info
.
subject_id
}
&cid=
${
info
.
id
}
`
}
return
{
title
:
shareObj
.
title
,
path
:
shareObj
.
path
,
imageUrl
:
'https://cdn.img.shangjiadao.cn/source/images/dakav4/morethemeindex/unlockindex1.png'
,
success
:
(
res
)
=>
{
if
(
res
.
errMsg
==
'shareAppMessage:ok'
)
{
this
.
setData
({
shareObj
:
this
.
data
.
initShareObj
})
}
},
}
}
}
return
{
title
:
shareObj
.
title
,
path
:
shareObj
.
path
,
imageUrl
:
`
${
this
.
data
.
imageRoot
}
pageshare_cover/theme_share.png?
${
this
.
data
.
imageRoot
}
`
,
imageUrl
:
'https://cdn.img.shangjiadao.cn/source/images/dakav4/morethemeindex/unlockindex.png'
,
success
:
(
res
)
=>
{
// 转发成功之后的回调
if
(
res
.
errMsg
==
'shareAppMessage:ok'
)
{
this
.
data
.
shareObj
=
this
.
data
.
initShareObj
this
.
setData
({
shareObj
:
this
.
data
.
initShareObj
})
}
},
}
...
...
business/pages/themeeditor/lockthemelist.js
View file @
58ae2999
...
...
@@ -21,6 +21,7 @@ Page({
classList
:
[],
page
:
1
,
subjectCount
:
1
,
initShareObj
:
{},
lockparams
:
{
title
:
''
,
created_at
:
''
,
...
...
@@ -55,6 +56,28 @@ Page({
},
onUnload
:
function
()
{
// Do something when page close.
},
onShareAppMessage
:
function
(
option
)
{
// return custom share data when user share.
const
{
from
,
target
}
=
option
;
let
shareObj
=
{
}
return
{
title
:
this
.
data
.
lockparams
.
title
,
path
:
`/src/pages/sharemoretheme/index?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
`
,
imageUrl
:
'https://cdn.img.shangjiadao.cn/source/images/dakav4/morethemeindex/unlockindex.png'
,
success
:
(
res
)
=>
{
// 转发成功之后的回调
if
(
res
.
errMsg
==
'shareAppMessage:ok'
)
{
this
.
setData
({
shareObj
:
this
.
data
.
initShareObj
})
}
},
}
},
onPullDownRefresh
()
{
this
.
getUnlockSubject
();
...
...
business/pages/themeeditor/lockthemelist.wxml
View file @
58ae2999
...
...
@@ -22,7 +22,7 @@
</view>
<view class="btnbox">
<view class="btn" bindtap="setting">高级设置</view>
<view class="btn share">分享</view>
<view class="btn share">
<button class="sharebtn" open-type="share"></button>
分享</view>
</view>
<view class="modal modal-setup {{settingModalClass? 'hide': ''}}" hidden="{{!settingModalShow}}">
<view class="mask" bindtap="closeSettingModal"></view>
...
...
business/pages/themeeditor/lockthemelist.wxss
View file @
58ae2999
...
...
@@ -74,6 +74,15 @@
font-size: 30rpx;
letter-spacing: 2rpx;
color: #666666;
position: relative;
}
.sharebtn {
position: absolute;
opacity: 0;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.btnbox .btn.share {
background-color: #16B0FD;
...
...
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