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
a008214a
Commit
a008214a
authored
Apr 22, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
baf06530
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
23 deletions
+67
-23
members.js
business/pages/themeindex/members.js
+64
-20
members.wxml
business/pages/themeindex/members.wxml
+3
-3
No files found.
business/pages/themeindex/members.js
View file @
a008214a
...
...
@@ -456,34 +456,78 @@ Page({
});
},
kickOutStudent
(
e
)
{
var
id
=
e
.
currentTarget
.
dataset
.
id
;
var
that
=
this
;
let
that
=
this
;
const
{
id
,
index
,
bigindex
}
=
e
.
currentTarget
.
dataset
;
wx
.
showModal
({
title
:
"提示"
,
content
:
"该学生将从此打卡活动
活动
中踢出,此次打卡记录也将会清除。"
,
content
:
"该学生将从此打卡活动中踢出,此次打卡记录也将会清除。"
,
confirmText
:
"踢出"
,
confirmColor
:
"#16B0FD"
,
success
(
res1
)
{
if
(
res1
.
confirm
)
{
deleteSubjectStudent
({
id
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
!=
200
)
{
}
else
{
wx
.
showToast
({
title
:
"移除成功"
,
icon
:
"success"
,
duration
:
1000
});
that
.
setData
({
studentPage
:
1
,
studentHasmore
:
true
});
that
.
getStudents
(
"init"
);
wx
.
showModal
({
title
:
"提示"
,
content
:
"该学生将从此打卡活动中踢出,是否要清除该学生在当前打卡的历史记录"
,
confirmText
:
"清除"
,
cancelText
:
"不清除"
,
confirmColor
:
"#FF3520"
,
success
(
res2
)
{
if
(
res2
.
confirm
)
{
// 清除
deleteSubjectStudent
({
id
,
type
:
1
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
!=
200
)
{
}
else
{
wx
.
showToast
({
title
:
"移除成功"
,
icon
:
"success"
,
duration
:
1000
});
let
studentList
=
that
.
data
.
studentList
[
bigindex
].
filter
(
ele
=>
ele
.
id
!=
id
);
that
.
setData
({
[
`studentList[
${
bigindex
}
]`
]:
studentList
})
if
(
that
.
caculateArrLength
(
that
.
data
.
studentList
)
==
0
)
{
that
.
setData
({
studentEmptyPage
:
true
});
}
}
});
}
else
if
(
res2
.
cancel
){
// 不清除
deleteSubjectStudent
({
id
,
type
:
2
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
!=
200
)
{
}
else
{
wx
.
showToast
({
title
:
"移除成功"
,
icon
:
"success"
,
duration
:
1000
});
let
studentList
=
that
.
data
.
studentList
[
bigindex
].
filter
(
ele
=>
ele
.
id
!=
id
);
that
.
setData
({
[
`studentList[
${
bigindex
}
]`
]:
studentList
})
if
(
that
.
caculateArrLength
(
that
.
data
.
studentList
)
==
0
)
{
that
.
setData
({
studentEmptyPage
:
true
});
}
}
});
}
}
});
})
}
else
if
(
res1
.
cancel
)
{
console
.
log
(
'取消1'
)
}
}
});
...
...
business/pages/themeindex/members.wxml
View file @
a008214a
...
...
@@ -17,15 +17,15 @@
<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" catchtap="toGrowth" data-id="{{item.school_student.id}}">
<block wx:for="{{studentList}}" wx:for-item="studentItem" wx:key="studentList"
wx:for-index="bigindex"
>
<view class="list-item" wx:for="{{studentItem}}" wx:key="index"
wx:for-index="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}}" catchtap="kickOutStudent">踢出本次打卡</view>
<view class="item-opt" data-id="{{item.id}}" catchtap="kickOutStudent"
data-index="{{index}}" data-bigindex="{{bigindex}}"
>踢出本次打卡</view>
</view>
<view class="item-textbox" wx:if="{{subject_type==3}}">
<text>已闯{{item.max_clock_count || 0}}关</text>
...
...
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