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
f2c0df2d
Commit
f2c0df2d
authored
May 06, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
84f5231a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
559 additions
and
311 deletions
+559
-311
index.js
business/pages/circleindex/index.js
+18
-3
index.wxml
business/pages/circleindex/index.wxml
+47
-29
index.wxss
business/pages/circleindex/index.wxss
+38
-0
index.wxml
business/pages/organizationalmgt/index.wxml
+2
-2
index.js
business/pages/rolechange/index.js
+1
-1
index.js
business/pages/schoolclasslist/index.js
+72
-129
index.wxml
business/pages/schoolclasslist/index.wxml
+54
-29
index.wxss
business/pages/schoolclasslist/index.wxss
+88
-2
api.js
constants/api.js
+2
-1
normalclock.png
images/2b/circleindex/normalclock.png
+0
-0
right.png
images/2b/circleindex/right.png
+0
-0
riliclock.png
images/2b/circleindex/riliclock.png
+0
-0
arrowwhite.png
images/2b/common/arrowwhite.png
+0
-0
project.config.json
project.config.json
+29
-1
mytask.js
service/customer/mytask.js
+10
-1
index.js
src/pages/exchangebusiness/index.js
+31
-3
index.js
src/pages/mineclass/index.js
+5
-1
index.js
src/pages/mytask/index.js
+11
-5
index.js
src/pages/schoolindex/index.js
+1
-1
index.js
ucenter/index.js
+143
-70
index.wxml
ucenter/index.wxml
+7
-33
No files found.
business/pages/circleindex/index.js
View file @
f2c0df2d
...
...
@@ -66,7 +66,8 @@ Page({
selectedtheme
:
''
,
//选中的主题
schoolInfo
:
''
,
from
:
0
,
// 1 机构首页 2 班级列表
permission
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
permission
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
],
subjectType
:
2
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
{
...
...
@@ -136,6 +137,18 @@ Page({
})
},
onTabItemTap
(
item
)
{},
subjectTypeShift
(
e
)
{
const
{
dataset
}
=
e
.
currentTarget
;
this
.
setData
({
subjectType
:
dataset
.
subjecttype
,
hasmore
:
true
,
page
:
1
,
themeTotal
:
0
,
themeList
:
[]
},
()
=>
{
this
.
themeListGet
(
'init'
)
})
},
getCircleDetail
()
{
circleDetail
({
id
:
this
.
data
.
id
,
...
...
@@ -184,7 +197,8 @@ Page({
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
class_id
:
this
.
data
.
id
,
school_id
:
this
.
data
.
sid
school_id
:
this
.
data
.
sid
,
subject_type
:
this
.
data
.
subjectType
}).
then
((
res
)
=>
{
const
{
code
,
...
...
@@ -256,6 +270,7 @@ Page({
default
:
break
;
}
console
.
log
(
this
.
data
.
themeList
,
'this.data.themeList'
)
if
(
this
.
data
.
themeList
.
length
==
0
)
{
this
.
setData
({
emptyPage
:
true
...
...
@@ -471,7 +486,7 @@ Page({
classListGet
({
page
:
this
.
data
.
circlepage
,
perPage
:
this
.
data
.
circleperPage
,
school_id
:
this
.
data
.
sid
school_id
:
this
.
data
.
sid
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
wx
.
hideLoading
();
...
...
business/pages/circleindex/index.wxml
View file @
f2c0df2d
...
...
@@ -105,13 +105,13 @@
</view>
</view>
<view class="shiftbox" hover-class="none" hover-stop-propagation="false">
<view class="shiftitem
active
" hover-class="none" hover-stop-propagation="false">
<view class="shiftitem
{{subjectType == 2 ? 'active' : ''}}" data-subjecttype="2" bindtap="subjectTypeShift
" hover-class="none" hover-stop-propagation="false">
<view class="shiftname" hover-class="none" hover-stop-propagation="false">
日历打卡
</view>
<view class="shiftline" hover-class="none" hover-stop-propagation="false"></view>
</view>
<view class="shiftitem" hover-class="none" hover-stop-propagation="false">
<view class="shiftitem
{{subjectType == 1 ? 'active' : ''}}" data-subjecttype="1" bindtap="subjectTypeShift
" hover-class="none" hover-stop-propagation="false">
<view class="shiftname" hover-class="none" hover-stop-propagation="false">
作业打卡
</view>
...
...
@@ -120,36 +120,48 @@
</view>
<view class="content" hover-class="none" hover-stop-propagation="false">
<view class="circlelist-content" hover-class="none" hover-stop-propagation="false" wx:if="{{!emptyPage}}">
<view class="circle-item rili mb24" hover-class="none" hover-stop-propagation="false">
<image class="rilibg" src="{{localImageRoot}}2b/circleindex/rili.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="circlename" hover-class="none" hover-stop-propagation="false">是多少少时诵诗书所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所少时诵诗书所</view>
<view class="static-box" hover-class="none" hover-stop-propagation="false">
<text class="" selectable="false" space="false" decode="false">共100天</text>
<text class="divideline" selectable="false" space="false" decode="false">|</text>
<text class="" selectable="false" space="false" decode="false">未打卡5人</text>
</view>
<view class="clockstatus wait" hover-class="none" hover-stop-propagation="false">
<image class="dianpinicon" src="{{localImageRoot}}2b/circleindex/dianpin.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="clockstatic" selectable="false" space="false" decode="false">待点评3</text>
</view>
<view class="progress-box" hover-class="none" hover-stop-propagation="false">
<view class="progress" hover-class="none" hover-stop-propagation="false"></view>
<view class="progressdesc" hover-class="none" hover-stop-propagation="false">
<view class="current" hover-class="none" hover-stop-propagation="false">第10天</view>
<image class="locate" src="{{localImageRoot}}2b/circleindex/locate.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{subjectType == 2}}">
<view class="circle-item rili mb24" hover-class="none" hover-stop-propagation="false" wx:for="{{themeList}}" wx:key="{{index}}">
<image class="rilibg" src="{{localImageRoot}}2b/circleindex/rili.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="circlename" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
<view class="static-box" hover-class="none" hover-stop-propagation="false">
<text class="" selectable="false" space="false" decode="false">共{{item.today_days}}天</text>
<text class="divideline" selectable="false" space="false" decode="false">|</text>
<text class="" selectable="false" space="false" decode="false">未打卡{{item.no_clock}}人</text>
</view>
<view class="clockstatus wait" hover-class="none" hover-stop-propagation="false" wx:if="{{item.no_review > 0}}">
<image class="dianpinicon" src="{{localImageRoot}}2b/circleindex/dianpin.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="clockstatic" selectable="false" space="false" decode="false">待点评{{item.no_review}}</text>
</view>
<view class="clockstatus success" hover-class="none" hover-stop-propagation="false" wx:if="{{item.no_review == 0}}">
<image class="dianpinicon" src="{{localImageRoot}}2b/circleindex/right.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="clockstatic" selectable="false" space="false" decode="false">已全部点评</text>
</view>
<view class="progress-box" hover-class="none" hover-stop-propagation="false">
<view class="progress" hover-class="none" hover-stop-propagation="false"></view>
<view class="progressdesc" hover-class="none" hover-stop-propagation="false">
<view class="current" hover-class="none" hover-stop-propagation="false">第10天</view>
<image class="locate" src="{{localImageRoot}}2b/circleindex/locate.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
</view>
</view>
</view>
<view class="circle-item mb24" hover-class="none" hover-stop-propagation="false">
<view class="circlename" hover-class="none" hover-stop-propagation="false">是多少少时诵诗书所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所少时诵诗书所</view>
<view class="static-box" hover-class="none" hover-stop-propagation="false">
<text class="" selectable="false" space="false" decode="false">共10学员</text>
<text class="divideline" selectable="false" space="false" decode="false">|</text>
<text class="" selectable="false" space="false" decode="false">未提交5人</text>
</view>
<view class="clockstatus wait" hover-class="none" hover-stop-propagation="false">
<image class="dianpinicon" src="{{localImageRoot}}2b/circleindex/dianpin.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="clockstatic" selectable="false" space="false" decode="false">待点评3</text>
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{subjectType == 1}}">
<view class="circle-item mb24" hover-class="none" hover-stop-propagation="false" wx:for="{{themeList}}" wx:key="{{index}}">
<view class="circlename" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
<view class="static-box" hover-class="none" hover-stop-propagation="false">
<text class="" selectable="false" space="false" decode="false">共{{item.student_total}}学员</text>
<text class="divideline" selectable="false" space="false" decode="false">|</text>
<text class="" selectable="false" space="false" decode="false">未提交{{item.no_clock}}人</text>
</view>
<view class="clockstatus wait" hover-class="none" hover-stop-propagation="false" wx:if="{{item.no_review > 0}}">
<image class="dianpinicon" src="{{localImageRoot}}2b/circleindex/dianpin.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="clockstatic" selectable="false" space="false" decode="false">待点评{{item.no_review}}</text>
</view>
<view class="clockstatus success" hover-class="none" hover-stop-propagation="false" wx:if="{{item.no_review == 0}}">
<image class="dianpinicon" src="{{localImageRoot}}2b/circleindex/right.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="clockstatic" selectable="false" space="false" decode="false">已全部点评</text>
</view>
</view>
</view>
<list-loading loading="{{listLoading}}"></list-loading>
...
...
@@ -203,5 +215,11 @@
</view>
</view>
</view>
<view class="themetypeselectmodal" hover-class="none" hover-stop-propagation="false">
<view class="modalmask" hover-class="none" hover-stop-propagation="false"></view>
<view class="modalcontent" hover-class="none" hover-stop-propagation="false">
</view>
</view>
</view>
</view>
\ No newline at end of file
business/pages/circleindex/index.wxss
View file @
f2c0df2d
...
...
@@ -451,4 +451,42 @@
}
.circle-name-txt{
width: 560rpx;
}
.themetypeselectmodal {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 200;
}
.themetypeselectmodal .modalmask {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 1;
background-color: rgba(0,0,0,0.5);
}
.themetypeselectmodal .modalcontent {
position: absolute;
left: 0;
bottom: 0;
z-index: 2;
background-color: #fff;
height: 600rpx;
width: 100%;
border-radius: 30rpx 30rpx 0px 0px;
padding: 42rpx 24rpx 0;
}
.themetypecard {
border-radius: 20rpx;
padding: 40rpx 0 40rpx 40rpx;
}
.themetypecard.rili {
background-color: #2AACFA;
}
.themetypecard.normal {
background-color: #FFA922;
}
\ No newline at end of file
business/pages/organizationalmgt/index.wxml
View file @
f2c0df2d
...
...
@@ -49,14 +49,14 @@
</view>
</view>
</view>
<view class="handle-area" hover-class="none" hover-stop-propagation="false" bindtap='gotask' wx:if="{{waitJob.apply_number+waitJob.customer_number+waitJob.noReviews > 0}}">
<
!-- <
view class="handle-area" hover-class="none" hover-stop-propagation="false" bindtap='gotask' wx:if="{{waitJob.apply_number+waitJob.customer_number+waitJob.noReviews > 0}}">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<view class="red-dot" hover-class="none" hover-stop-propagation="false"></view>
<text class="handle-text">待处理</text>
<text class="handle-number">{{waitJob.apply_number+waitJob.customer_number+waitJob.noReviews}}</text>
</view>
</view>
-->
</view>
<view class="content" hover-class="none" hover-stop-propagation="false">
<view class="content-item" hover-class="none" hover-stop-propagation="false" bindtap='gocampusmgt' wx:if="{{permission[1]&&allTotal>1}}">
...
...
business/pages/rolechange/index.js
View file @
f2c0df2d
...
...
@@ -81,7 +81,7 @@ Page({
},
goUcenter
()
{
wx
.
switchTab
({
wx
.
reLaunch
({
url
:
'/ucenter/index'
,
})
},
...
...
business/pages/schoolclasslist/index.js
View file @
f2c0df2d
...
...
@@ -7,11 +7,6 @@ import {
themeList
}
from
'../../../service/business/circleindex.js'
;
import
{
sharePosteCanvas
}
from
'../../../utilities/generatePoster.js'
;
import
{
generateCustomerQrcode
,
posterLog
,
classListGet
,
schoolDetailGet
}
from
'../../../service/business/common.js'
...
...
@@ -66,17 +61,18 @@ Page({
selectedtheme
:
''
,
//选中的主题
schoolInfo
:
''
,
from
:
0
,
// 1 机构首页 2 班级列表
permission
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
permission
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
],
subjectType
:
2
,
classList
:
[],
classTotal
:
0
,
selectedClass
:
{},
classesShow
:
false
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
{
id
,
from
,
sid
}
=
options
;
this
.
setData
({
id
,
from
:
from
||
0
,
sid
});
// wx.hideShareMenu()
...
...
@@ -88,7 +84,6 @@ Page({
permission
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
]
})
}
},
onShow
:
function
()
{
// Do something when page show.
this
.
getCircleDetail
();
...
...
@@ -98,7 +93,7 @@ Page({
circlepage
:
1
,
circlehasmore
:
true
,
})
this
.
themeListGet
(
'init'
);
this
.
classListGet
(
);
// let user = LocalStorage.getItem('user');
let
dakarole
=
LocalStorage
.
getItem
(
'dakarole'
);
if
(
dakarole
==
2
)
{
...
...
@@ -136,6 +131,42 @@ Page({
})
},
onTabItemTap
(
item
)
{},
subjectTypeShift
(
e
)
{
const
{
dataset
}
=
e
.
currentTarget
;
this
.
setData
({
subjectType
:
dataset
.
subjecttype
,
hasmore
:
true
,
page
:
1
,
themeTotal
:
0
,
themeList
:
[]
},
()
=>
{
this
.
themeListGet
(
'init'
)
})
},
selectClass
()
{
this
.
setData
({
classesShow
:
!
this
.
data
.
classesShow
})
},
sureSelect
(
e
)
{
const
{
classitem
}
=
e
.
currentTarget
.
dataset
;
if
(
classitem
.
id
==
this
.
data
.
id
)
{
this
.
setData
({
classesShow
:
false
})
return
;
}
this
.
setData
({
hasmore
:
true
,
page
:
1
,
themeTotal
:
0
,
themeList
:
[],
id
:
classitem
.
id
,
classesShow
:
false
},
()
=>
{
this
.
themeListGet
(
'init'
)
})
},
getCircleDetail
()
{
circleDetail
({
id
:
this
.
data
.
id
,
...
...
@@ -184,7 +215,8 @@ Page({
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
class_id
:
this
.
data
.
id
,
school_id
:
this
.
data
.
sid
school_id
:
this
.
data
.
sid
,
subject_type
:
this
.
data
.
subjectType
}).
then
((
res
)
=>
{
const
{
code
,
...
...
@@ -301,12 +333,6 @@ Page({
url
:
`/business/pages/themeindex/index?id=
${
this
.
data
.
id
}
&tid=
${
dataset
.
tid
}
&sid=
${
this
.
data
.
sid
}
`
})
},
goConsumerCircleIndex
()
{
getApp
().
mtj
.
trackEvent
(
'b_share_circle'
,
{});
wxNavigateToMiniProgram
({
path
:
`/src/pages/circleindex/index?id=
${
this
.
data
.
id
}
&pagefrom=businesscircle&sid=
${
this
.
data
.
sid
}
`
,
})
},
goPotentialCustomer
()
{
getApp
().
mtj
.
trackEvent
(
'clients'
,
{});
wx
.
navigateTo
({
...
...
@@ -328,116 +354,6 @@ Page({
posterBoxShow
:
false
})
},
prmoteInstitution
()
{
// 推广机构
const
that
=
this
;
getApp
().
mtj
.
trackEvent
(
'b_gene_circle_poster'
,
{});
// posterLog({
// poster_type: 2,
// type: 1,
// clock_circle_id: this.data.id
// })
if
(
this
.
data
.
qrcodeGenerating
)
{
return
}
this
.
setData
({
qrcodeGenerating
:
true
})
wx
.
showLoading
({
title
:
'正在生成海报...'
,
mask
:
true
,
})
generateCustomerQrcode
({
scene
:
`i=
${
this
.
data
.
id
}
&p=2`
,
page
:
`src/pages/circleindex/index`
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
const
qrcode
=
imagify
(
data
.
url
);
let
posterData
=
{
qrcode
,
circleName
:
this
.
data
.
circleInfo
.
title
,
shopLogo
:
this
.
data
.
schoolInfo
.
logo
?
imagify
(
this
.
data
.
schoolInfo
.
logo
)
:
'https://cdn.img.shangjiadao.cn/source/images/daka2b/default/logo.png'
,
shopName
:
this
.
data
.
schoolInfo
.
title
,
createdAt
:
(
Date
.
parse
(
this
.
data
.
circleInfo
.
created_at
.
replace
(
/-/g
,
"/"
)))
/
1000
,
fingureUpTotal
:
this
.
data
.
circleInfo
.
like_count
?
this
.
data
.
circleInfo
.
like_count
:
0
,
clockTotal
:
this
.
data
.
circleInfo
.
good_record_count
?
this
.
data
.
circleInfo
.
good_record_count
:
0
,
}
screenshot
({
data
:
posterData
,
size
:
{
w
:
1500
,
h
:
2668
},
urlpath
:
'/postertemplate/business/circlev2.html'
}).
then
((
res
)
=>
{
wx
.
hideLoading
();
const
{
code
,
data
}
=
res
;
that
.
setData
({
canvasShow
:
false
,
canvasImagePath
:
data
.
src
,
posterBoxShow
:
true
,
qrcodeGenerating
:
false
})
}).
catch
((
e
)
=>
{
wx
.
hideLoading
();
})
}
}).
catch
(()
=>
{
wx
.
hideLoading
();
this
.
setData
({
qrcodeGenerating
:
false
})
})
},
// 海报生成相关代码
sharecallback
()
{
this
.
goConsumerCircleIndex
()
},
//动画
doAnimation
()
{
var
attentionAnim
=
wx
.
createAnimation
({
duration
:
150
,
timingFunction
:
'ease'
,
delay
:
0
})
//设置循环动画
this
.
attentionAnim
=
attentionAnim
var
next
=
true
;
this
.
timer
=
setInterval
(
function
()
{
if
(
next
)
{
//根据需求实现相应的动画
this
.
attentionAnim
.
rotate
(
3
).
step
()
next
=
!
next
;
}
else
{
this
.
attentionAnim
.
rotate
(
-
3
).
step
()
next
=
!
next
;
}
this
.
setData
({
//导出动画到指定控件animation属性
attentionAnim
:
attentionAnim
.
export
()
})
}.
bind
(
this
),
150
)
},
// 动画还原
didAnimation
()
{
clearInterval
(
this
.
timer
)
var
attentionAnim
=
wx
.
createAnimation
({
duration
:
150
,
timingFunction
:
'ease'
,
delay
:
0
})
this
.
attentionAnim
=
attentionAnim
this
.
attentionAnim
.
rotate
(
0
).
step
()
this
.
setData
({
attentionAnim
:
attentionAnim
.
export
()
})
},
// 隐藏引导
guideHide
(){
this
.
setData
({
...
...
@@ -456,6 +372,33 @@ Page({
this
.
setData
({
showcopybox
:
false
})
},
// 加载班级
classListGet
(
type
)
{
classListGet
({
page
:
1
,
perPage
:
100
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
this
.
setData
({
classList
:
data
.
list
,
classTotal
:
data
.
total
})
if
(
this
.
data
.
classList
.
length
>
0
)
{
this
.
setData
({
selectedClass
:
this
.
data
.
classList
[
0
],
id
:
this
.
data
.
classList
[
0
].
id
})
this
.
themeListGet
(
'init'
);
}
}
}).
catch
((
e
)
=>
{
})
},
// 加载班级
clrcleListGet
(
type
)
{
...
...
business/pages/schoolclasslist/index.wxml
View file @
f2c0df2d
This diff is collapsed.
Click to expand it.
business/pages/schoolclasslist/index.wxss
View file @
f2c0df2d
.container {
padding: 0 24rpx;
}
.circle-index-container {
padding: 104rpx 24rpx 0;
}
.select-class {
background-color: #35BAFD;
display: flex;
align-items: center;
justify-content: center;
padding: 51rpx 0 22rpx;
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 100;
}
@keyframes modalshow {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.classselectedmodal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 99;
animation: modalshow 0.1s linear;
}
.classselectedmodal .modalmask {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0,0,0,0.5);
}
.classselectedmodal .classbox {
position: relative;
z-index: 1;
max-height: 600rpx;
overflow: auto;
background-color: #fff;
top: 106rpx;
}
.classitem {
position: relative;
border-bottom: 2rpx solid rgba(0,0,0,0.05);
}
.classselectedmodal .classbox .classitemname {
max-width: 600rpx;
margin: 0 auto;
text-align: center;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
line-height: 88rpx;
}
.classselectedmodal .classbox .selecticon {
display: block;
width: 33rpx;
height: 33rpx;
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
}
.select-class .class-name {
font-size: 26rpx;
color: #fff;
max-width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.select-class .arrowwhite {
width: 28rpx;
height: 16rpx;
margin-left: 12rpx;
transition: all 0.2s;
}
.select-class .arrowwhite.down {
transform: rotate(180deg);
}
.shiftbox {
display: flex;
...
...
@@ -155,5 +241,5 @@
margin-left: -133rpx;
padding: 0;
box-shadow:0rpx 8rpx 18rpx 0rpx rgba(101,184,244,0.56);
z-index:
100
;
z-index:
95
;
}
\ No newline at end of file
constants/api.js
View file @
f2c0df2d
...
...
@@ -97,7 +97,8 @@ const apis = {
},
mytask
:
{
subjectList
:
`
${
api
}
student/clock/subject`
,
// 我的打卡-获取学校对应主题(个人打过卡的)
schoolList
:
`
${
api
}
student/clock/school`
,
// 我的打卡-学校(个人打过卡的)
schoolList
:
`
${
api
}
student/clock/school`
,
// 我的打卡-学校(个人打过卡的)
clockClasses
:
`
${
api
}
student/clock/clock_classes`
,
},
mynews
:
{
noticesubject
:
`
${
api
}
student/subject/notice_subject`
,
// 主题发布通知
...
...
images/2b/circleindex/normalclock.png
0 → 100644
View file @
f2c0df2d
19.2 KB
images/2b/circleindex/right.png
View replaced file @
84f5231a
View file @
f2c0df2d
3.05 KB
|
W:
|
H:
4.54 KB
|
W:
|
H:
2-up
Swipe
Onion skin
images/2b/circleindex/riliclock.png
0 → 100644
View file @
f2c0df2d
15.6 KB
images/2b/common/arrowwhite.png
0 → 100644
View file @
f2c0df2d
469 Bytes
project.config.json
View file @
f2c0df2d
...
...
@@ -41,7 +41,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
11
2
,
"current"
:
11
6
,
"list"
:
[
{
"id"
:
0
,
...
...
@@ -833,6 +833,34 @@
"pathName"
:
"business/pages/schoolclasslist/index"
,
"query"
:
"id=1&sid=1"
,
"scene"
:
null
},
{
"id"
:
113
,
"name"
:
"课程列表"
,
"pathName"
:
"src/pages/mineclass/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"班级首页"
,
"pathName"
:
"business/pages/circleindex/index"
,
"query"
:
"sid=16&id=52"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"创建日历打卡"
,
"pathName"
:
"business/pages/calendarthemeeditor/index"
,
"query"
:
"tid=0&id=52"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"商家班级列表"
,
"pathName"
:
"business/pages/schoolclasslist/index"
,
"query"
:
"sid=16"
,
"scene"
:
null
}
]
}
...
...
service/customer/mytask.js
View file @
f2c0df2d
...
...
@@ -19,7 +19,16 @@ function schoolList(data) {
errorresolve
:
1
,
})
}
function
clockClasses
(
data
)
{
return
wxRequest
({
url
:
apis
.
customer
.
mytask
.
clockClasses
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
export
{
subjectList
,
schoolList
schoolList
,
clockClasses
}
\ No newline at end of file
src/pages/exchangebusiness/index.js
View file @
f2c0df2d
// from 1来自机构首页 2 来自个人中心ucenter
import
{
getClassInfo
,
}
from
'../../../service/customer/schoolindex.js'
;
...
...
@@ -22,6 +23,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
from
}
=
options
;
this
.
setData
({
from
})
wx
.
showLoading
({
title
:
'数据加载中'
})
...
...
@@ -92,8 +97,31 @@ Page({
const
{
item
}
=
e
.
currentTarget
.
dataset
;
wx
.
reLaunch
({
url
:
`/src/pages/schoolindex/index?sid=
${
item
.
id
}
`
,
})
switch
(
Number
(
this
.
data
.
from
))
{
case
1
:
wx
.
reLaunch
({
url
:
`/src/pages/schoolindex/index?sid=
${
item
.
id
}
`
,
})
break
;
case
2
:
// let pages = getCurrentPages();
// console.log(pages, 'pages')
// let currPage = null; //当前页面
// let prevPage = null; //上一个页面
// if (pages.length >= 2) {
// currPage = pages[pages.length - 1]; //当前页面
// prevPage = pages[pages.length - 2]; //上一个页面
// }
// prevPage.setData({
// sid: item.id
// });
// wx.navigateBack({})
wx
.
reLaunch
({
url
:
`/ucenter/index?sid=
${
item
.
id
}
`
,
})
break
;
default
:
break
;
}
}
})
\ No newline at end of file
src/pages/mineclass/index.js
View file @
f2c0df2d
...
...
@@ -31,7 +31,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
this
.
setData
({
sid
})
},
/**
...
...
@@ -104,6 +107,7 @@ Page({
mineClassList
({
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
school_id
:
this
.
data
.
sid
// consumer_id: visitor && visitor.id,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
...
...
src/pages/mytask/index.js
View file @
f2c0df2d
// business/pages/mytask/index.js
import
{
subjectList
,
schoolList
clockClasses
}
from
'../../../service/customer/mytask.js'
;
import
{
formIdCreate
...
...
@@ -26,13 +26,18 @@ Page({
schoolList
:
[],
themeList
:
[],
perPage
:
5
,
emptyPage
:
false
emptyPage
:
false
,
sid
:
0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
this
.
setData
({
sid
})
wx
.
hideShareMenu
();
},
...
...
@@ -85,9 +90,10 @@ Page({
},
schoolListGet
()
{
const
that
=
this
;
schoolList
({
clockClasses
({
page
:
1
,
perPage
:
999
perPage
:
999
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
code
,
...
...
@@ -123,7 +129,7 @@ Page({
},
themeListGet
(
id
,
title
)
{
subjectList
({
school
_id
:
id
,
class
_id
:
id
,
sort
:
3
}).
then
((
res
)
=>
{
const
{
...
...
src/pages/schoolindex/index.js
View file @
f2c0df2d
...
...
@@ -206,7 +206,7 @@ Page({
},
goExchange
()
{
wx
.
reLaunch
({
url
:
`/src/pages/exchangebusiness/index`
,
url
:
`/src/pages/exchangebusiness/index
?from=1
`
,
})
},
goClassIndex
(
e
){
...
...
ucenter/index.js
View file @
f2c0df2d
...
...
@@ -8,6 +8,9 @@ import {
import
{
schoolList
}
from
'../service/business/ucenter.js'
;
import
{
userShow
,
}
from
'../service/customer/themeindex.js'
;
import
{
noticecount
,
}
from
'../service/customer/mynews.js'
;
...
...
@@ -16,7 +19,10 @@ import {
}
from
'../service/business/common.js'
import
{
formIdCreate
}
from
'../service/common.js'
}
from
'../service/common.js'
;
import
{
getClassInfo
,
}
from
'../service/customer/schoolindex.js'
;
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -26,70 +32,83 @@ Page({
isAuth
:
false
,
schoolList
:
[],
schoolTotal
:
0
,
waitJob
:{},
noticecount
:{
1
:
0
,
2
:
0
,
3
:
0
,
4
:
0
}
cSchoolList
:
[],
cSchoolTotal
:
0
,
waitJob
:
{},
noticecount
:
{
1
:
0
,
2
:
0
,
3
:
0
,
4
:
0
},
sid
:
0
,
noUserinfo
:
false
,
userInfo
:
{}
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
{
sid
}
=
options
;
this
.
setData
({
sid
:
sid
||
0
,
schoolId
:
sid
||
0
})
},
onReady
:
function
()
{
// Do something when page ready.
onReady
:
function
()
{
// Do something when page ready.
},
onShow
:
function
()
{
// Do something when page show.
onShow
:
function
()
{
// Do something when page show.
if
(
this
.
data
.
sid
)
{
this
.
userShow
();
}
let
user
=
LocalStorage
.
getItem
(
'user'
);
let
dakarole
=
LocalStorage
.
getItem
(
'dakarole'
);
if
(
dakarole
==
1
)
{
// 有B端登录状态下并且角色是校长的情况
wx
.
showLoading
({
title
:
'数据加载中'
})
schoolList
({
page
:
1
,
perPage
:
100
}).
then
((
res
)
=>
{
wx
.
hideLoading
();
if
(
res
.
code
==
200
)
{
this
.
setData
({
schoolList
:
res
.
data
.
list
,
schoolTotal
:
res
.
data
.
total
})
this
.
setData
({
isAuth
:
res
.
data
.
total
>
0
?
true
:
false
})
}
}).
catch
(()
=>
{
wx
.
hideLoading
();
})
}
else
if
(
dakarole
==
2
)
{
// 角色是老师的情况下
schoolList
({
page
:
1
,
perPage
:
100
}).
then
((
res
)
=>
{
wx
.
hideLoading
();
if
(
res
.
code
==
200
)
{
this
.
setData
({
schoolList
:
res
.
data
.
list
,
schoolTotal
:
res
.
data
.
total
})
this
.
setData
({
isAuth
:
res
.
data
.
total
>
0
?
true
:
false
})
}
}).
catch
(()
=>
{
wx
.
hideLoading
();
})
}
this
.
noticecountGet
();
},
onHide
:
function
()
{
// Do something when page hide.
},
onUnload
:
function
()
{
// Do something when page close.
},
onPullDownRefresh
:
function
()
{
// Do something when pull down.
},
onReachBottom
:
function
()
{
// Do something when page reach bottom.
title
:
'数据加载中'
})
schoolList
({
page
:
1
,
perPage
:
100
}).
then
((
res
)
=>
{
wx
.
hideLoading
();
if
(
res
.
code
==
200
)
{
this
.
setData
({
schoolList
:
res
.
data
.
list
,
schoolTotal
:
res
.
data
.
total
})
this
.
setData
({
isAuth
:
res
.
data
.
total
>
0
?
true
:
false
})
}
}).
catch
(()
=>
{
wx
.
hideLoading
();
})
}
else
if
(
dakarole
==
2
)
{
// 角色是老师的情况下
schoolList
({
page
:
1
,
perPage
:
100
}).
then
((
res
)
=>
{
wx
.
hideLoading
();
if
(
res
.
code
==
200
)
{
this
.
setData
({
schoolList
:
res
.
data
.
list
,
schoolTotal
:
res
.
data
.
total
})
this
.
setData
({
isAuth
:
res
.
data
.
total
>
0
?
true
:
false
})
}
}).
catch
(()
=>
{
wx
.
hideLoading
();
})
}
this
.
getStudentClassList
();
// this.noticecountGet();
},
onHide
:
function
()
{
// Do something when page hide.
},
onUnload
:
function
()
{
// Do something when page close.
},
onPullDownRefresh
:
function
()
{
// Do something when pull down.
},
onReachBottom
:
function
()
{
// Do something when page reach bottom.
},
onShareAppMessage
:
function
()
{
// return custom share data when user share.
return
{
...
...
@@ -97,15 +116,65 @@ Page({
path
:
`/ucenter/index`
}
},
onPageScroll
:
function
()
{
// Do something when page scroll
onPageScroll
:
function
()
{
// Do something when page scroll
},
onTabItemTap
(
item
)
{
},
// Event handler.
viewTap
:
function
()
{
viewTap
:
function
()
{
},
bindGetUserInfo
(
e
)
{
},
getStudentClassList
()
{
getClassInfo
({
page
:
1
,
perPage
:
100
}).
then
((
res
)
=>
{
wx
.
hideLoading
();
if
(
res
.
code
==
200
)
{
this
.
setData
({
cSchoolList
:
res
.
data
.
list
,
cSchoolTotal
:
res
.
data
.
total
})
if
(
this
.
data
.
sid
==
0
)
{
this
.
setData
({
sid
:
res
.
data
.
list
[
0
].
id
},
()
=>
{
this
.
userShow
();
})
}
}
}).
catch
(()
=>
{
wx
.
hideLoading
();
})
},
userShow
()
{
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
userShow
({
school_id
:
this
.
data
.
sid
,
consumer_id
:
visitor
&&
visitor
.
id
||
0
}).
then
((
res
)
=>
{
const
{
data
,
code
}
=
res
;
if
(
code
==
30005
)
{
this
.
setData
({
noUserinfo
:
true
})
}
if
(
code
==
200
)
{
if
(
data
)
{
this
.
setData
({
userInfo
:
data
,
noUserinfo
:
false
,
})
}
else
{
this
.
setData
({
noUserinfo
:
true
})
}
}
}).
then
(()
=>
{
})
},
bindGetUserInfo
(
e
)
{},
// 待处理
getCommonwaitJob
()
{
commonwaitjobGet
({
...
...
@@ -119,12 +188,12 @@ Page({
}).
then
(()
=>
{
})
},
roleselect
()
{
roleselect
()
{
wx
.
navigateTo
({
url
:
'/business/pages/roleselect/index'
})
},
goOrganizationalmgt
(){
goOrganizationalmgt
()
{
let
user
=
LocalStorage
.
getItem
(
'user'
);
let
teacher
=
LocalStorage
.
getItem
(
'teacher'
);
if
(
!
user
&&
!
teacher
)
{
...
...
@@ -142,7 +211,6 @@ Page({
})
}
}
},
noticecountGet
()
{
noticecount
({
...
...
@@ -164,29 +232,34 @@ Page({
formId
})
},
gomineClass
(){
gomineClass
()
{
wx
.
navigateTo
({
url
:
'/src/pages/mineclass/index'
url
:
`/src/pages/mineclass/index?sid=
${
this
.
data
.
sid
}
`
})
},
goNotice
()
{
goNotice
()
{
wx
.
navigateTo
({
url
:
'/src/pages/mynews/index'
,
})
},
goMyLikes
()
{
goMyLikes
()
{
wx
.
navigateTo
({
url
:
'/src/pages/mylikes/index'
,
})
},
goMytask
()
{
wx
.
navigateTo
({
url
:
`/src/pages/mytask/index`
,
url
:
`/src/pages/mytask/index
?sid=
${
this
.
data
.
sid
}
`
,
})
},
goFeedback
()
{
wx
.
navigateTo
({
url
:
`/src/pages/feedback/index`
,
})
},
exchangeSchool
()
{
wx
.
navigateTo
({
url
:
`/src/pages/exchangebusiness/index?from=2`
,
})
}
})
\ No newline at end of file
ucenter/index.wxml
View file @
f2c0df2d
...
...
@@ -2,24 +2,24 @@
<view class="ucenter-container" hover-class="none" hover-stop-propagation="false">
<view class="headerbox" hover-class="none" hover-stop-propagation="false">
<image class="bg" src="{{localImageRoot}}2c/ucenter/bg.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="exchangebusiness" hover-class="none" hover-stop-propagation="false">
<view class="exchangebusiness" hover-class="none" hover-stop-propagation="false"
wx:if="{{cSchoolTotal > 0}}" bindtap="exchangeSchool"
>
<text class="exchangetext" selectable="false" space="false" decode="false">切换机构</text>
<image class="arrowright" src="{{localImageRoot}}2c/ucenter/arrowright.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
</view>
<view class="menubox" hover-class="none" hover-stop-propagation="false">
<view class="userbox" hover-class="none" hover-stop-propagation="false">
<image class="avatar" src="
https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83epWrHaxIQIQNTcWj5eskVzACGMdtSjRLfnOjYmOKYV8EERgeO4uSevOAkjBiblTCy7ly5sqCsdYc0A/132
" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="nickname" selectable="false" space="false" decode="false">
汪雪来汪雪来汪雪来汪雪来汪雪来
</text>
<image class="avatar" src="
{{userInfo.avatar}}
" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="nickname" selectable="false" space="false" decode="false">
{{userInfo.nickname}}
</text>
</view>
<view class="menu linea" hover-class="none" hover-stop-propagation="false">
<view class="menu-item" hover-class="none" hover-stop-propagation="false">
<view class="menu-item" hover-class="none" hover-stop-propagation="false"
bindtap="goMytask"
>
<view class="menuicon" hover-class="none" hover-stop-propagation="false">
<image class="myclock" src="{{localImageRoot}}2c/ucenter/myclock.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<text class="menuname" selectable="false" space="false" decode="false">我的打卡</text>
</view>
<view class="menu-item" hover-class="none" hover-stop-propagation="false">
<view class="menu-item" hover-class="none" hover-stop-propagation="false"
bindtap="gomineClass"
>
<view class="menuicon" hover-class="none" hover-stop-propagation="false">
<image class="myclass" src="{{localImageRoot}}2c/ucenter/myclass.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
...
...
@@ -35,35 +35,9 @@
<view class="menuicon" hover-class="none" hover-stop-propagation="false">
<image class="myachievenment" src="{{localImageRoot}}2c/ucenter/myachievenment.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<text class="menuname" selectable="false" space="false" decode="false">我的
打卡
</text>
<text class="menuname" selectable="false" space="false" decode="false">我的
成就
</text>
</view>
</view>
<!-- <view class="menu" hover-class="none" hover-stop-propagation="false">
<view class="menu-item" hover-class="none" hover-stop-propagation="false">
<view class="menuicon" hover-class="none" hover-stop-propagation="false">
<image class="myclock" src="{{localImageRoot}}2c/ucenter/myclock.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<text class="menuname" selectable="false" space="false" decode="false">我的打卡</text>
</view>
<view class="menu-item" hover-class="none" hover-stop-propagation="false">
<view class="menuicon" hover-class="none" hover-stop-propagation="false">
<image class="myclass" src="{{localImageRoot}}2c/ucenter/myclass.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<text class="menuname" selectable="false" space="false" decode="false">我的班级</text>
</view>
<view class="menu-item" hover-class="none" hover-stop-propagation="false">
<view class="menuicon" hover-class="none" hover-stop-propagation="false">
<image class="mylike" src="{{localImageRoot}}2c/ucenter/mylike.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<text class="menuname" selectable="false" space="false" decode="false">我的赞</text>
</view>
<view class="menu-item" hover-class="none" hover-stop-propagation="false">
<view class="menuicon" hover-class="none" hover-stop-propagation="false">
<image class="myachievenment" src="{{localImageRoot}}2c/ucenter/myachievenment.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<text class="menuname" selectable="false" space="false" decode="false">我的打卡</text>
</view>
</view> -->
</view>
<view class="divideline" hover-class="none" hover-stop-propagation="false"></view>
<view class="listitem advice" hover-class="none" hover-stop-propagation="false" bindtap="goFeedback">
...
...
@@ -98,7 +72,7 @@
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="border-b-1px" hover-class="none" hover-stop-propagation="false"></view>
<view class="listitem managerenter" hover-class="none" hover-stop-propagation="false" bindtap="go
Feedback
">
<view class="listitem managerenter" hover-class="none" hover-stop-propagation="false" bindtap="go
Organizationalmgt
">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
...
...
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