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
881923cf
Commit
881923cf
authored
Apr 02, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
fad32794
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
236 additions
and
17 deletions
+236
-17
lockthemelist.js
business/pages/themeeditor/lockthemelist.js
+6
-2
members.js
business/pages/themeindex/members.js
+145
-5
members.wxml
business/pages/themeindex/members.wxml
+35
-4
members.wxss
business/pages/themeindex/members.wxss
+46
-2
constants.js
constants/constants.js
+4
-4
No files found.
business/pages/themeeditor/lockthemelist.js
View file @
881923cf
...
...
@@ -141,7 +141,8 @@ Page({
subject_creator
:
{
nickname
:
data
.
subject_creator
&&
data
.
subject_creator
.
nickname
,
id
:
data
.
subject_creator
&&
data
.
subject_creator
.
id
,
}
},
}
})
this
.
getUnlockSubject
();
...
...
@@ -195,8 +196,11 @@ Page({
})
},
goMembers
()
{
// wx.navigateTo({
// url: `/business/pages/unlockclocksituation/index?tid=${this.data.tid}&sid=${this.data.sid}`
// })
wx
.
navigateTo
({
url
:
`/business/pages/
unlockclocksituation/index?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
`
url
:
`/business/pages/
themeindex/members?subject_id=
${
this
.
data
.
tid
}
&subject_type=3&sid=
${
this
.
data
.
sid
}
&title=
${
this
.
data
.
lockparams
.
title
}
`
,
})
},
goEditLandcontent
(
e
)
{
...
...
business/pages/themeindex/members.js
View file @
881923cf
...
...
@@ -6,6 +6,12 @@ import {
deleteSubjectTeacher
,
deleteSubjectStudent
}
from
"../../../service/business/themeindex.js"
;
import
{
unlockSubjectListGet
,
}
from
'../../../service/business/common.js'
;
import
{
unlockSubjectShow
}
from
'../../../service/business/themeindex'
;
Page
({
data
:
{
imageRoot
:
app
.
globalData
.
imageRoot
,
...
...
@@ -38,7 +44,14 @@ Page({
teacherLoading
:
false
,
teacherHasmore
:
true
,
teacherEmptyPage
:
false
,
needRefresh
:
false
needRefresh
:
false
,
subjectCount
:
0
,
//关卡总数
student_count
:
0
,
//学生数
lockSubjects
:
[],
//已设置关卡
selectSubject
:
{
id
:
0
,
title
:
"全部关卡"
},
modalSubjectList
:
false
,
modelSubjectListAnimate
:
false
,
},
onLoad
:
function
(
options
)
{
...
...
@@ -49,7 +62,11 @@ Page({
sid
,
title
});
this
.
getStudents
(
"init"
);
if
(
subject_type
==
3
){
this
.
unlockSubjectShow
()
}
else
{
this
.
getStudents
(
"init"
);
}
},
onShow
:
function
()
{
...
...
@@ -85,6 +102,12 @@ Page({
path
:
`/src/pages/calendarthemeindex/landpage?tid=
${
this
.
data
.
subject_id
}
&sid=
${
this
.
data
.
sid
}
`
,
imageUrl
:
`
${
this
.
data
.
imageRoot
}
pageshare_cover/theme_share.png`
,
}
}
else
if
(
this
.
data
.
subject_type
==
3
)
{
return
{
title
:
`邀请您参加
${
this
.
data
.
title
}
打卡`
,
path
:
`/src/pages/sharemoretheme/index?tid=
${
this
.
data
.
subject_id
}
&sid=
${
this
.
data
.
sid
}
`
,
imageUrl
:
`
${
this
.
data
.
imageRoot
}
pageshare_cover/theme_share.png`
,
}
}
},
onPullDownRefresh
:
function
()
{
...
...
@@ -163,12 +186,13 @@ Page({
this
.
setData
({
studentLoading
:
true
});
subjectStudents
({
let
otherParam
=
this
.
data
.
subject_type
==
3
?{
checkpoint_id
:
this
.
data
.
selectSubject
.
id
}:
''
subjectStudents
(
Object
.
assign
(
otherParam
,{
page
:
this
.
data
.
studentPage
,
perPage
:
this
.
data
.
studentPerPage
,
subject_id
:
this
.
data
.
subject_id
,
subject_type
:
this
.
data
.
subject_type
})
})
)
.
then
(
res
=>
{
const
{
code
,
data
}
=
res
;
this
.
setData
({
...
...
@@ -457,5 +481,121 @@ Page({
}
}
});
}
},
unlockSubjectShow
()
{
wx
.
showLoading
({
title
:
'数据加载中...'
});
unlockSubjectShow
({
id
:
this
.
data
.
subject_id
,
school_id
:
this
.
data
.
sid
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
wx
.
hideLoading
();
this
.
setData
({
subjectCount
:
data
.
subject_count
,
student_count
:
data
.
student_count
})
this
.
getUnlockSubject
();
}
}).
catch
(()
=>
{
wx
.
showToast
({
icon
:
'none'
,
title
:
'内容加载失败'
})
})
},
getUnlockSubject
()
{
unlockSubjectListGet
({
page
:
1
,
perPage
:
201
,
id
:
this
.
data
.
subject_id
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
const
lockSubjects
=
data
.
list
;
const
count
=
this
.
data
.
subjectCount
-
data
.
total
;
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
lockSubjects
.
push
({
id
:
0
,
title
:
''
,
content
:
[],
force_status
:
2
,
force_num
:
0
,
text_require_status
:
2
,
text_require_num
:
0
,
image_require_status
:
2
,
image_require_num
:
0
,
video_require_status
:
2
,
video_require_num
:
0
,
audio_require_status
:
2
,
audio_require_num
:
0
,
})
}
this
.
setData
({
lockSubjects
:
lockSubjects
,
})
this
.
getStudents
(
"init"
)
}
else
{
}
}).
catch
((
e
)
=>
{
})
},
bindSublectListModal
(
e
)
{
const
{
from
,
item
}
=
e
.
currentTarget
.
dataset
;
console
.
log
(
item
,
'item'
);
if
(
from
&&
from
==
"modal"
){
if
(
item
){
if
(
item
.
id
==
0
){
wx
.
showToast
({
title
:
'关卡待完善~'
,
icon
:
'none'
})
return
}
else
if
(
item
.
id
>
0
){
this
.
setData
({
selectSubject
:
item
,
studentPage
:
1
,
studentHasmore
:
true
,
modelSubjectListAnimate
:
true
});
this
.
getStudents
(
"init"
);
setTimeout
(()
=>
{
this
.
setData
({
modalSubjectList
:
false
,
modelSubjectListAnimate
:
false
});
},
200
);
}
}
else
{
this
.
setData
({
modelSubjectListAnimate
:
true
});
setTimeout
(()
=>
{
this
.
setData
({
modalSubjectList
:
false
,
modelSubjectListAnimate
:
false
});
},
200
);
}
}
else
{
this
.
setData
({
modalSubjectList
:
true
});
}
},
toGrowth
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
;
if
(
this
.
data
.
subject_type
!=
3
){
return
}
wx
.
navigateTo
({
url
:
`/business/pages/morethemeindex/studentact?sid=
${
this
.
data
.
sid
}
&studentId=
${
id
}
&modeid=
${
this
.
data
.
subject_id
}
`
})
},
});
business/pages/themeindex/members.wxml
View file @
881923cf
...
...
@@ -9,24 +9,29 @@
</view>
</view>
</view>
<view class="select-box" bindtap="bindSublectListModal" hidden='{{currentTabsIndex != 0}}'>
<view class="title">{{ selectSubject.title }} <block wx:if="{{selectSubject.id==0}}">({{subjectCount}})</block></view>
<image class="icon-arr {{modalSubjectList? 'active': ''}}" src="{{imageRoot}}2c/shopindex/arrowdown.png?{{imageVersion}}"></image>
</view>
<view class='list-wrap' hidden='{{currentTabsIndex != 0}}'>
<empty-content wx:if='{{studentEmptyPage}}' text="暂无打卡学生" emptyimg="common/empty/empty_no.png" />
<view wx:else class="list-box">
<block wx:for="{{studentList}}" wx:for-item="studentItem" wx:key="studentList">
<view class="list-item" wx:for="{{studentItem}}" wx:key="index">
<view class="list-item" wx:for="{{studentItem}}" wx:key="index"
catchtap="toGrowth" data-id="{{item.school_student.id}}"
>
<view class="left">
<image class="item-avatar" src="{{filter.imagify(item.avatar? item.avatar:item.school_student.avatar)}}" wx:if="{{item.avatar}}"></image>
<image class="item-avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="info-box">
<view class="name-box">
<view class="item-name">{{item.school_student && item.school_student.nickname ? item.school_student.nickname: item.name }}</view>
<view class="item-opt" data-id="{{item.id}}"
bind
tap="kickOutStudent">踢出本次打卡</view>
<view class="item-opt" data-id="{{item.id}}"
catch
tap="kickOutStudent">踢出本次打卡</view>
</view>
<view class="item-mobile">{{item.mobile}}</view>
<view class="item-textbox" wx:if="{{subject_type==3}}"><text>已闯{{item.max_clock_count || 0}}关</text> <text>分享{{item.share_count || 0}}次</text> <text>{{item.share_uv || 0}}人访问</text></view>
<view class="item-mobile">手机号: {{item.mobile? item.mobile: '-'}}</view>
</view>
</view>
<view class="right" data-phone="{{item.mobile}}"
bind
tap="callphone">
<view class="right" data-phone="{{item.mobile}}"
catch
tap="callphone">
<image class="icon-mobile" src="{{imageRoot}}2b/themeindex/call_phone.png"></image>
</view>
</view>
...
...
@@ -67,4 +72,30 @@
</view>
</view>
<view class="modal modal-setup {{modelSubjectListAnimate? 'hide': ''}}" hidden="{{!modalSubjectList}}">
<view class="mask" bindtap="bindSublectListModal" data-from="modal"></view>
<view class="modal-content">
<view class="modal-title">
全部学生({{student_count}})人
<image class="icon-close" src="{{imageRoot}}2b/themeindex/close_icon.png" data-from="modal" bindtap="bindSublectListModal"></image>
</view>
<view class="setting-list">
<view class="setting-item" wx:for="{{lockSubjects}}" wx:key="index" data-from="modal" bindtap="bindSublectListModal" data-item="{{item}}">
<view class="left">
<block wx:if="{{item.id}}">
<view class="item-label">第{{index+1}}关:{{item.title}}</view>
<view class="item-desc">已打卡 {{item.clock_people}}人</view>
</block>
<block wx:else>
<view class="item-label">第{{index+1}}关:待完善</view>
</block>
</view>
<view class="right">
<image class="icon-arr" src="{{imageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
business/pages/themeindex/members.wxss
View file @
881923cf
...
...
@@ -35,7 +35,7 @@
}
.list-wrap .list-box .list-item {
display: flex;
align-items:
center
;
align-items:
flex-start
;
justify-content: space-between;
border-bottom: 2rpx solid #f1f2f3;
padding: 24rpx 0;
...
...
@@ -43,7 +43,7 @@
.list-wrap .list-box .list-item .right,
.list-wrap .list-box .list-item .left {
display: flex;
align-items:
center
;
align-items:
flex-start
;
}
.list-wrap .list-box .list-item .item-avatar {
width: 72rpx;
...
...
@@ -70,6 +70,17 @@
color: rgba(22, 176, 253, 1);
line-height: 32rpx;
}
.list-wrap .list-box .list-item .item-textbox{
display: flex;
align-items: center;
margin-top: 5rpx;
}
.list-wrap .list-box .list-item .item-textbox text{
font-size: 22rpx;
color: rgba(153, 153, 153, 1);
line-height: 32rpx;
padding-right: 24rpx;
}
.list-wrap .list-box .list-item .item-mobile {
font-size: 22rpx;
font-weight: 500;
...
...
@@ -118,3 +129,36 @@
background: transparent;
border-radius: 0;
}
@import "../../style/themeindex.wxss";
.setting-list{
max-height: 800rpx;
overflow: auto;
}
/* 打卡列表筛选 类型选择 */
.select-box{
width: 100%;
padding: 20rpx;
display: flex;
align-items: center;
position: relative;
border-bottom: 2rpx solid #ebedf0;
min-height: 70rpx;
}
.select-box .title{
font-size: 22rpx;
color:#16B0FD;
line-height: 32rpx;
width: 90%;
}
.select-box .icon-arr{
width: 22rpx;
height: 12rpx;
position: absolute;
right: 30rpx;
top: 29rpx;
}
.select-box .icon-arr.active{
transform: rotate(180deg);
}
\ No newline at end of file
constants/constants.js
View file @
881923cf
export
default
{
imageRoot
:
'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/'
,
host
:
'https://qxapi.qingxiao.online/daka'
,
host2
:
'https://wx.m.shangjiadao.cn'
,
//
host: 'https://qxapi.qingxiao.online/daka',
//
host2: 'https://wx.m.shangjiadao.cn',
storageVersion
:
'5.0'
,
imageVersion
:
'20200326'
,
//
host: 'https://clock.wp53.cn',
//
host2: 'https://test.wp53.cn',
host
:
'https://clock.wp53.cn'
,
host2
:
'https://test.wp53.cn'
,
appId
:
'wxc1246ea029394785'
,
miniProgram
:
{
clock
:
'wxdeee20e52a1fd7ee'
...
...
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