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
b7e7bf26
Commit
b7e7bf26
authored
Aug 15, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c7973a50
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
369 additions
and
47 deletions
+369
-47
app.json
app.json
+2
-1
app.wxss
app.wxss
+1
-1
index.wxss
business/pages/coursemgt/index.wxss
+2
-2
index.wxml
business/pages/datacenter/index.wxml
+1
-3
index.js
business/pages/studentcenter/index.js
+2
-2
index.wxml
business/pages/studentcenter/index.wxml
+5
-2
index.wxss
business/pages/studentcenter/index.wxss
+16
-5
index.js
business/pages/teachermgt/index.js
+10
-3
index.wxml
business/pages/teachermgt/index.wxml
+15
-10
index.wxss
business/pages/teachermgt/index.wxss
+22
-17
joinnotice.js
business/pages/teachermgt/joinnotice.js
+195
-0
joinnotice.json
business/pages/teachermgt/joinnotice.json
+6
-0
joinnotice.wxml
business/pages/teachermgt/joinnotice.wxml
+21
-0
joinnotice.wxss
business/pages/teachermgt/joinnotice.wxss
+40
-0
api.js
constants/api.js
+1
-0
index.wxs
filter/index.wxs
+17
-1
icon_notice.png
images/2b/teachermgt/icon_notice.png
+0
-0
teachermgt.js
service/business/teachermgt.js
+13
-0
No files found.
app.json
View file @
b7e7bf26
...
...
@@ -497,7 +497,8 @@
"pages"
:
[
"index"
,
"edit"
,
"selectteacher"
"selectteacher"
,
"joinnotice"
]
},
{
...
...
app.wxss
View file @
b7e7bf26
...
...
@@ -371,6 +371,6 @@ button::after{
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom:
128
rpx;
bottom:
86
rpx;
z-index: 9;
}
\ No newline at end of file
business/pages/coursemgt/index.wxss
View file @
b7e7bf26
...
...
@@ -3,7 +3,7 @@ page{
background: #F3F4F6;
}
.courselist-box{
padding: 34rpx 24rpx;
padding: 34rpx 24rpx
0
;
}
.list-item{
background: #fff;
...
...
@@ -33,7 +33,7 @@ page{
z-index: 3
}
.container {
padding-bottom:
208
rpx;
padding-bottom:
166
rpx;
}
.empty-content {
...
...
business/pages/datacenter/index.wxml
View file @
b7e7bf26
...
...
@@ -19,9 +19,7 @@
<text class="count" >{{tabAct==1?chartData.monthTotal:chartData.daysTotal}}课时</text>
</view>
</view>
<view class="line" >
</view>
<view class="line"></view>
<view class="ring-chart-box" >
<view class="title" >
<text class="bold" >课程分析</text>
...
...
business/pages/studentcenter/index.js
View file @
b7e7bf26
...
...
@@ -208,10 +208,10 @@ Page({
},
clearSearch
(
e
){
this
.
setData
({
search
:
''
,
page
:
1
,
hasmore
:
true
,
listLoading
:
false
listLoading
:
false
,
searchName
:
''
},()
=>
{
this
.
memberListGet
(
'init'
);
})
...
...
business/pages/studentcenter/index.wxml
View file @
b7e7bf26
...
...
@@ -13,7 +13,7 @@
lazy-load="false" binderror="" bindload=""></image>
<input type="text" placeholder-class="placeholderclass" class="search-input" value="{{searchName}}"
bindinput="searchinput" placeholder="搜索学员姓名/昵称"></input>
<image class="close-iocn" src="{{imageRoot}}2b/common/closeicon.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" bind
error="" bindload="" bindtap="clearsearchinput
" wx:if="{{searchName}}"></image>
<image class="close-iocn" src="{{imageRoot}}2b/common/closeicon.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" bind
tap="clearSearch
" wx:if="{{searchName}}"></image>
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="search">搜索</view>
</view>
...
...
@@ -30,10 +30,13 @@
</view>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="empty-content" wx:if="{{emptyPage}}">
<image class='empty-img' src='{{imageRoot}}2c/common/emptyimg.png?{{imageVersion}}'></image>
<
text class="empty-text">没有找到该同学哦~</text
>
<
view class="empty-text">暂无数据~</view
>
</view>
<view class="has-nomore" wx:if="{{!emptyPage && !hasmore && page>1}}">没有更多了</view>
<button class="form-fixbtn" open-type="share">新生报名</button>
</view>
...
...
business/pages/studentcenter/index.wxss
View file @
b7e7bf26
/* business/pages/studentcenter/index.wxss */
.container{
padding-bottom: 166rpx;
}
.header-box{
padding:40rpx 180rpx 34rpx 180rpx;
box-shadow:0px 2rpx 16rpx 0px rgba(0, 0, 0, 0.1);
...
...
@@ -132,6 +135,8 @@
color:rgba(255,185,122,1);
line-height:1;
}
/* 空场景 */
.empty-content {
position: absolute;
top: 50%;
...
...
@@ -141,12 +146,18 @@
flex-direction: column;
align-items: center;
line-height: 45rpx;
}
.empty-content .empty-img {
}
.empty-content .empty-img {
width: 263rpx;
height: 219rpx;
}
.empty-content .empty-text {
}
.empty-content .empty-text {
font-size: 26rpx;
color: rgba(0, 0, 0, 0.6);
}
\ No newline at end of file
}
.has-nomore{
font-size: 26rpx;
color: #9C9C9D;
padding: 75rpx 0;
text-align: center;
}
\ No newline at end of file
business/pages/teachermgt/index.js
View file @
b7e7bf26
...
...
@@ -13,6 +13,7 @@ Page({
* 页面的初始数据
*/
data
:
{
localImageRoot
:
'../../../images/'
,
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
sid
:
''
,
...
...
@@ -122,6 +123,12 @@ Page({
this
.
getTeacherList
(
'init'
);
}
},
// 老师加入通知
toJoinNotice
(){
wx
.
navigateTo
({
url
:
`/business/pages/teachermgt/joinnotice?sid=
${
this
.
data
.
sid
}
`
})
},
// 教师列表
getTeacherList
(
type
)
{
...
...
@@ -161,7 +168,7 @@ Page({
this
.
setData
({
teacherList
:
[
data
.
list
]
},
()
=>
{
if
(
data
.
tota
l
>
this
.
caculateArrLength
(
this
.
data
.
teacherList
))
{
if
(
this
.
data
.
teacherTato
l
>
this
.
caculateArrLength
(
this
.
data
.
teacherList
))
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
@@ -177,7 +184,7 @@ Page({
this
.
setData
({
teacherList
:
[
data
.
list
]
},
()
=>
{
if
(
this
.
data
.
teacherTatol
>
this
.
caculateArrLength
(
this
.
data
.
teacherList
.
length
))
{
if
(
this
.
data
.
teacherTatol
>
this
.
caculateArrLength
(
this
.
data
.
teacherList
))
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
@@ -196,7 +203,7 @@ Page({
this
.
setData
({
[
`teacherList[
${
this
.
data
.
page
-
1
}
]`
]:
data
.
list
},
()
=>
{
if
(
data
.
total
>
this
.
caculateArrLength
(
this
.
data
.
teacherList
.
length
))
{
if
(
this
.
data
.
teacherTatol
>
this
.
caculateArrLength
(
this
.
data
.
teacherList
))
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
business/pages/teachermgt/index.wxml
View file @
b7e7bf26
<wxs src="./../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="
header
">
<view class="
search-wrap
">
<view class="search-box">
<image class="icon-search" src="{{imageRoot}}2b/optimize/icon_search.png?{{imageVersion}}"></image>
<input class="search-input" type="text" value="{{search}}" placeholder="请精确输入姓名或手机号" bindinput="teacherSearch"/>
...
...
@@ -14,17 +14,22 @@
</form>
</view>
</view>
<view class="notice-box" bindtap="toJoinNotice">
<image class="icon" src="{{localImageRoot}}2b/teachermgt/icon_notice.png?{{imageVersion}}"></image>
<view class="text">老师加入通知</view>
</view>
<view class="userlist-box" wx:if="{{!emptyPage}}">
<block wx:for="{{teacherList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="list-item" wx:for="{{bigitem}}" wx:for-item="item" data-id="{{item.id}}" wx:key="{{index}}" bindtap="addOrEditTeacher">
<image class="avatar" src="{{filter.imagify(item.avatar)}}"></image>
<view class="item-content">
<view class="nickname">{{item.nickname}}</view>
</view>
</view>
</block>
<list-loading loading="{{listLoading}}"></list-loading>
<block wx:for="{{teacherList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="list-item" wx:for="{{bigitem}}" wx:for-item="item" data-id="{{item.id}}" wx:key="{{index}}" bindtap="addOrEditTeacher">
<image class="avatar" src="{{filter.imagify(item.avatar)}}"></image>
<view class="item-content">
<view class="nickname">{{item.nickname}}</view>
</view>
</view>
</block>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="empty-content" wx:if="{{emptyPage}}">
...
...
business/pages/teachermgt/index.wxss
View file @
b7e7bf26
@import '../../../style/userlist.wxss';
.container {
min-height: 100vh
;
padding-bottom: 252rpx
;
}
.header {
height: 144rpx;
padding: 0 24rpx;
.search-wrap {
padding: 36rpx 24rpx 22rpx;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 9;
}
.
header
.search-box{
.
search-wrap
.search-box{
width: 547rpx;
height: 66rpx;
background: #F3F4F6;
...
...
@@ -25,15 +20,15 @@
position: relative;
padding: 10rpx 60rpx 10rpx 30rpx;
}
.
header
.search-box .icon-search{
.
search-wrap
.search-box .icon-search{
width: 29rpx;
height: 30rpx;
margin-right: 27rpx;
}
.
header
.search-box .search-input{
.
search-wrap
.search-box .search-input{
flex: 1;
}
.
header
.search-box .icon-clear{
.
search-wrap
.search-box .icon-clear{
position: absolute;
top: 50%;
right: 20rpx;
...
...
@@ -41,7 +36,7 @@
width: 17rpx;
height: 19rpx;
}
.
header
.btn-search{
.
search-wrap
.btn-search{
width: 100rpx;
height: 56rpx;
background:rgba(101,184,244,1);
...
...
@@ -54,11 +49,21 @@
position: relative;
}
/* d当前页面设置 */
.userlist-box{
padding-top: 144rpx;
.notice-box{
display: flex;
align-items: center;
padding: 24rpx;
border-bottom: 16rpx solid #F3F4F6;
}
.notice-box .icon{
width: 66rpx;
height: 66rpx;
margin-right: 30rpx;
}
.notice-box .text{
font-size: 26rpx;
color: #000;
}
/* 空场景 */
.empty-content {
position: absolute;
...
...
business/pages/teachermgt/joinnotice.js
0 → 100644
View file @
b7e7bf26
import
{
erpTeacherInvitationList
}
from
'../../../service/business/teachermgt.js'
;
var
app
=
getApp
();
Page
({
/**
* 页面的初始数据
*/
data
:
{
localImageRoot
:
'../../../images/'
,
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
sid
:
''
,
invitationList
:
[],
invitationTatol
:
''
,
perPage
:
15
,
page
:
1
,
hasmore
:
true
,
emptyPage
:
false
,
listLoading
:
false
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
this
.
setData
({
sid
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
setData
({
page
:
1
,
hasmore
:
true
,
})
this
.
getInvitationList
(
'init'
);
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
page
:
1
,
hasmore
:
true
,
})
this
.
getInvitationList
(
'down'
);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
this
.
getInvitationList
(
'up'
);
},
// 邀请列表
getInvitationList
(
type
)
{
if
(
!
this
.
data
.
hasmore
)
{
return
;
}
if
(
this
.
data
.
listLoading
)
{
return
}
this
.
setData
({
listLoading
:
true
})
erpTeacherInvitationList
({
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
school_id
:
this
.
data
.
sid
,
status
:
''
,
//状态 1-待确认 2-接受 3-拒绝
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
wx
.
hideLoading
();
this
.
setData
({
listLoading
:
false
})
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
if
(
data
.
total
)
{
this
.
setData
({
invitationTatol
:
data
.
total
})
}
switch
(
type
)
{
case
'init'
:
//页面进来第一次加载
this
.
setData
({
invitationList
:
[
data
.
list
]
},
()
=>
{
if
(
this
.
data
.
invitationTatol
>
this
.
caculateArrLength
(
this
.
data
.
invitationList
))
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
case
'down'
:
// 页面下拉刷新
this
.
setData
({
invitationList
:
[
data
.
list
]
},
()
=>
{
if
(
this
.
data
.
invitationTatol
>
this
.
caculateArrLength
(
this
.
data
.
invitationList
))
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
wx
.
stopPullDownRefresh
();
break
;
case
'up'
:
// 页面上拉刷新
// let list = this.data.invitationList;
// let _list = list.concat(data.list);
this
.
setData
({
[
`invitationList[
${
this
.
data
.
page
-
1
}
]`
]:
data
.
list
},
()
=>
{
if
(
this
.
data
.
invitationTatol
>
this
.
caculateArrLength
(
this
.
data
.
invitationList
))
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
hasmore
:
true
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
default
:
break
;
}
if
(
this
.
caculateArrLength
(
this
.
data
.
invitationList
)
==
0
)
{
this
.
setData
({
emptyPage
:
true
})
}
else
{
this
.
setData
({
emptyPage
:
false
,
})
}
}
}).
catch
((
e
)
=>
{
this
.
setData
({
listLoading
:
false
})
})
},
caculateArrLength
(
array
)
{
let
_length
=
0
;
array
.
forEach
(
ele
=>
{
_length
=
_length
+
ele
.
length
;
})
return
_length
;
},
})
\ No newline at end of file
business/pages/teachermgt/joinnotice.json
0 → 100644
View file @
b7e7bf26
{
"navigationBarTitleText"
:
"老师加入通知"
,
"usingComponents"
:
{
"list-loading"
:
"../../../components/listloading"
}
}
\ No newline at end of file
business/pages/teachermgt/joinnotice.wxml
0 → 100644
View file @
b7e7bf26
<wxs src="./../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="userlist-box" wx:if="{{!emptyPage}}">
<block wx:for="{{invitationList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="list-item" wx:for="{{bigitem}}" wx:for-item="item" data-id="{{item.id}}" wx:key="{{index}}" bindtap="addOrEditTeacher">
<image class="avatar" src="{{filter.imagify(item.avatar)}}"></image>
<view class="item-content">
<view class="nickname">{{item.name}}</view>
</view>
<view class="item-right {{item.status==1?'c-origin':''}}">{{filter.teacherInvitationStatus(item.status)}}</view>
</view>
</block>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="empty-content" wx:if="{{emptyPage}}">
<image class='empty-img' src='{{imageRoot}}2c/rankinglist/empty.png?{{imageVersion}}'></image>
<view class="empty-text">暂无数据~</view>
</view>
<view class="has-nomore" wx:if="{{!emptyPage && !hasmore && page>1}}">没有更多了</view>
</view>
business/pages/teachermgt/joinnotice.wxss
0 → 100644
View file @
b7e7bf26
@import '../../../style/userlist.wxss';
/* 空场景 */
.userlist-box::after{
content: '';
width: 100%;
height: 1px;
background: rgba(0,0,0,.05);
position: absolute;
left: 0;
top: 0;
transform: scaleY(.5);
}
.empty-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
display: flex;
flex-direction: column;
align-items: center;
line-height: 45rpx;
}
.empty-content .empty-img {
width: 263rpx;
height: 219rpx;
}
.empty-content .empty-text {
font-size: 26rpx;
color: rgba(0, 0, 0, 0.6);
}
.has-nomore{
font-size: 26rpx;
color: #9C9C9D;
padding: 75rpx 0;
text-align: center;
}
.c-origin{
color: #FFB97A!important
}
\ No newline at end of file
constants/api.js
View file @
b7e7bf26
...
...
@@ -205,6 +205,7 @@ const apis = {
teachermgt
:
{
teachersList
:
`
${
api
}
member/teachers`
,
//(旧)老师列表
erpTeachersApi
:
`
${
api
}
member/erp/teachers`
,
//(新) 老师列表 添加 修改 详情 删除
invitationList
:
`
${
api
}
member/erp/teacher/invitations`
,
//老师邀请列表
teachersDetail
:
`
${
api
}
member/teachers`
,
teachersDelete
:
`
${
api
}
member/teachers`
,
classTeachersDelete
:
`
${
api
}
member/teacher/remove_class`
,
...
...
filter/index.wxs
View file @
b7e7bf26
...
...
@@ -256,6 +256,21 @@ function courseColor(type){
}
return text
}
function teacherInvitationStatus(status){
var text = '';
switch (status) {
case 1:
text = '待加入';
break;
case 2:
text = '已加入';
break;
case 3:
text = '拒绝加入';
break;
}
return text
}
function checkSelect (subject, subjects) {
var i = 0, _length = subjects.length;
var flag = false;
...
...
@@ -309,5 +324,6 @@ module.exports = {
checkSelect: checkSelect,
courseColor: courseColor,
matchTime: matchTime,
monthIsShow:monthIsShow
monthIsShow:monthIsShow,
teacherInvitationStatus: teacherInvitationStatus
}
\ No newline at end of file
images/2b/teachermgt/icon_notice.png
0 → 100644
View file @
b7e7bf26
1.12 KB
service/business/teachermgt.js
View file @
b7e7bf26
...
...
@@ -59,6 +59,18 @@ function erpTeacherDetail(data) {
errorresolve
:
1
,
})
}
// erp 老师邀请列表
function
erpTeacherInvitationList
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
teachermgt
.
invitationList
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
teachersDetailGet
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
...
...
@@ -127,6 +139,7 @@ export {
erpTeacherList
,
erpTeacherEdit
,
erpTeacherDetail
,
erpTeacherInvitationList
,
teachersListGet
,
teachersDetailGet
,
teachersDelete
,
...
...
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