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
bad0db76
Commit
bad0db76
authored
Feb 05, 2020
by
ltz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
de894bfc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
72 deletions
+117
-72
studentact.js
business/pages/morethemeindex/studentact.js
+102
-69
studentact.wxml
business/pages/morethemeindex/studentact.wxml
+1
-1
api.js
constants/api.js
+1
-0
morethemeindex.js
service/business/morethemeindex.js
+12
-1
index.wxss
src/pages/calendarthemeindex/index.wxss
+1
-1
No files found.
business/pages/morethemeindex/studentact.js
View file @
bad0db76
...
...
@@ -18,8 +18,12 @@ import {
}
from
'../../../utilities/index.js'
;
import
{
modeStudentDetail
}
from
'../../../service/business/morethemeindex'
modeStudentDetail
,
modeStudentClockRemove
}
from
'../../../service/business/morethemeindex'
;
import
{
getMemberMe
}
from
'../../../service/common.js'
;
function
compare
(
property
)
{
return
function
(
a
,
b
)
{
...
...
@@ -62,6 +66,7 @@ Page({
videoId
:
''
,
src
:
''
},
memberMeInfo
:
{}
},
onLoad
:
function
(
options
)
{
...
...
@@ -76,6 +81,7 @@ Page({
studentId
:
studentId
||
0
,
modeid
:
modeid
||
0
})
this
.
getMemberMeInfo
();
//报名要用到老师信息
this
.
studentInfoGet
()
},
onReady
:
function
()
{
...
...
@@ -106,6 +112,18 @@ Page({
onReachBottom
:
function
()
{
this
.
clockListGet
(
'up'
);
},
getMemberMeInfo
(){
let
that
=
this
;
getMemberMe
({
school_id
:
that
.
data
.
sid
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
that
.
setData
({
memberMeInfo
:
res
.
data
.
schoolTeacher
})
}
})
},
studentInfoGet
()
{
modeStudentDetail
({
student_id
:
this
.
data
.
studentId
,
...
...
@@ -577,69 +595,6 @@ Page({
[
`clockList[
${
listindex
}
][
${
index
}
]`
]:
curclockList
})
},
//操作
handeloperate
(
e
)
{
const
that
=
this
;
let
mySystem
=
wx
.
getSystemInfoSync
();
let
needIosWarn
=
LocalStorage
.
getItem
(
'needIosWarn'
);
let
itemList
=
[];
if
(
mySystem
.
system
&&
mySystem
.
system
.
toLowerCase
().
indexOf
(
'ios'
)
!=
-
1
&&
!
needIosWarn
)
{
itemList
=
[
'退班'
];
}
else
{
itemList
=
[
'退班'
,
'取消'
];
}
wx
.
showActionSheet
({
itemList
:
itemList
,
success
(
res
)
{
const
{
tapIndex
}
=
res
;
if
(
tapIndex
==
0
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'是否退出该班级'
,
confirmColor
:
'#65B8F4'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
const
{
courseitem
,
item
}
=
e
.
currentTarget
.
dataset
;
that
.
studentremovePost
(
item
.
id
,
courseitem
.
id
)
}
else
if
(
res
.
cancel
)
{
}
}
})
}
if
(
tapIndex
==
1
)
{
// that.delClock()
}
}
})
},
// 退班
studentremovePost
(
class_id
,
id
)
{
studentremovePost
({
student_ids
:
this
.
data
.
studentInfo
.
id
,
school_id
:
this
.
data
.
sid
,
class_id
:
class_id
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
wx
.
showToast
({
title
:
'退班成功'
,
icon
:
'success'
,
duration
:
2000
})
this
.
data
.
courselist
.
find
(
ele
=>
ele
.
id
==
id
).
classes
=
this
.
data
.
courselist
.
find
(
ele
=>
ele
.
id
==
id
).
classes
.
filter
(
ele
=>
ele
.
id
!=
class_id
);
this
.
setData
({
courselist
:
this
.
data
.
courselist
})
}
}).
catch
(
res
=>
{
})
},
caculateArrLength
(
array
)
{
let
_length
=
0
;
array
.
forEach
(
ele
=>
{
...
...
@@ -699,11 +654,89 @@ Page({
url
:
`/business/pages/studentcenter/courseeliminate?studentId=
${
this
.
data
.
studentId
}
&courseid=
${
item
.
id
}
`
})
},
// 转为在读学员 -> 学员报名
bindBuyCourse
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
;
let
url
=
item
?
`sid=
${
this
.
data
.
sid
}
&studentId=
${
this
.
data
.
studentId
}
&id=
${
item
.
id
||
0
}
`
:
`sid=
${
this
.
data
.
sid
}
&studentId=
${
this
.
data
.
studentId
}
`
wx
.
navigateTo
({
url
:
`/business/pages/studentcenter/buycourse?
${
url
}
`
let
that
=
this
;
let
studentInfo
=
that
.
data
.
studentInfo
;
erpstudentAdd
({
school_id
:
that
.
data
.
sid
,
name
:
studentInfo
.
nickname
,
gender
:
''
,
mobile
:
studentInfo
.
mobile
,
remark
:
''
,
operator_id
:
that
.
data
.
memberMeInfo
.
id
,
force
:
''
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
!=
200
){
if
(
code
==
40204
){
wx
.
showModal
({
title
:
'提示'
,
content
:
'学员姓名重复'
,
showCancel
:
false
,
confirmColor
:
'#35BAFD'
})
return
}
if
(
code
==
40203
){
that
.
getRepeatStudents
();
return
}
return
}
else
{
that
.
setData
({
newStudentInfo
:
data
,
showStudentsRepeat
:
false
})
that
.
studentRenewal
();
}
})
},
// 获取重复学员
getRepeatStudents
(){
studentsListGet
({
page
:
1
,
perPage
:
99
,
school_id
:
this
.
data
.
sid
,
extra
:
'time,recently_course'
,
keyword_any
:
this
.
data
.
studentInfo
.
mobile
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
this
.
setData
({
findStudent
:
data
.
list
,
showStudentsRepeat
:
true
})
}
}).
catch
((
e
)
=>
{
})
},
// 踢出
bindStudentClockRemove
(){
modeStudentClockRemove
({
mode_id
:
this
.
data
.
modeid
,
student_id
:
this
.
data
.
studentId
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
200
)
{
wx
.
showToast
({
title
:
'踢出成功'
,
icon
:
'success'
,
duration
:
2000
})
const
pages
=
getCurrentPages
();
const
prePages
=
pages
[
pages
.
length
-
2
];
prePages
.
setData
({
needRefresh
:
true
,
})
wx
.
navigateBack
({
delta
:
1
})
}
else
{
}
})
}
})
\ No newline at end of file
business/pages/morethemeindex/studentact.wxml
View file @
bad0db76
...
...
@@ -17,7 +17,7 @@
</view>
<view class="opt-box" wx:if="{{studentInfo.is_formal_student && studentInfo.is_formal_student}}">
<view class="btn btn-exchange" bindtap="bindBuyCourse">转化为在读学员</view>
<view class="btn btn-out">踢出</view>
<view class="btn btn-out"
bindtap="bindStudentClockRemove"
>踢出</view>
</view>
</view>
...
...
constants/api.js
View file @
bad0db76
...
...
@@ -509,6 +509,7 @@ const apis = {
unlocksubjectsituation
:
`
${
api
}
member/unlock_subject/situation`
,
//B-参与概况
unlocksubjectstudents
:
`
${
api
}
member/unlock_subject/students`
,
//B-成员列表
modeStudentDetail
:
`
${
api
}
member/unlock_subject/mode_student_detail`
,
//B-闯关个人动态详情
modeStudentClockRemove
:
`
${
api
}
member/unlock_subject/delete_unlock_clock`
,
//B-闯关 踢出学员
},
points
:
{
exchangeRecord
:
`
${
api
}
member/integral_goods/exchange`
,
//B-积分兑换记录
...
...
service/business/morethemeindex.js
View file @
bad0db76
...
...
@@ -63,11 +63,22 @@ function modeStudentDetail(data) {
errorresolve
:
1
,
})
}
//闯关 踢出学员
function
modeStudentClockRemove
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
morethemeindex
.
modeStudentClockRemove
,
data
,
method
:
'POST'
,
errorresolve
:
1
,
})
}
export
{
unlocksubjectshow
,
unlocksubjectindex
,
unlocksubjectdetail
,
unlocksubjectsituation
,
unlocksubjectstudents
,
modeStudentDetail
modeStudentDetail
,
modeStudentClockRemove
}
\ No newline at end of file
src/pages/calendarthemeindex/index.wxss
View file @
bad0db76
...
...
@@ -1267,7 +1267,7 @@ page {
width: 670rpx;
background: rgba(255, 238, 210, 1);
border-radius: 20rpx;
margin: 0 auto;
margin: 0 auto
50rpx
;
padding: 32rpx;
display: flex;
align-items: center;
...
...
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