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
5e6c4d73
Commit
5e6c4d73
authored
May 21, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c6a6f6a2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
949 additions
and
416 deletions
+949
-416
index.js
business/pages/circleindex/index.js
+211
-95
index.wxml
business/pages/circleindex/index.wxml
+37
-34
index.wxss
business/pages/circleindex/index.wxss
+19
-5
index.js
business/pages/classhourlist/index.js
+144
-14
index.json
business/pages/classhourlist/index.json
+4
-1
index.wxml
business/pages/classhourlist/index.wxml
+18
-14
index.wxss
business/pages/classhourlist/index.wxss
+9
-1
index.js
business/pages/schoolclasslist/index.js
+211
-106
index.wxml
business/pages/schoolclasslist/index.wxml
+29
-27
index.wxss
business/pages/schoolclasslist/index.wxss
+15
-5
index.js
business/pages/unlockclocksituation/index.js
+13
-32
index.wxml
business/pages/unlockclocksituation/index.wxml
+2
-2
api.js
constants/api.js
+5
-2
assignment.png
images/2b/circleindex/assignment.png
+0
-0
rili.png
images/2b/circleindex/rili.png
+0
-0
unlock.png
images/2b/circleindex/unlock.png
+0
-0
unlock_n.png
images/2b/classhour/unlock_n.png
+0
-0
circleindex.js
service/business/circleindex.js
+10
-0
common.js
service/business/common.js
+11
-1
themeindex.js
service/business/themeindex.js
+12
-1
common.js
service/common.js
+10
-0
index.js
src/pages/pointsexchangerecord/index.js
+142
-20
index.wxml
src/pages/pointsexchangerecord/index.wxml
+9
-6
index.wxss
src/pages/pointsexchangerecord/index.wxss
+23
-12
index.js
src/pages/unlockranklist/index.js
+13
-32
index.json
src/pages/unlockranklist/index.json
+1
-2
index.wxml
src/pages/unlockranklist/index.wxml
+1
-4
No files found.
business/pages/circleindex/index.js
View file @
5e6c4d73
This diff is collapsed.
Click to expand it.
business/pages/circleindex/index.wxml
View file @
5e6c4d73
This diff is collapsed.
Click to expand it.
business/pages/circleindex/index.wxss
View file @
5e6c4d73
...
...
@@ -160,7 +160,7 @@ page{
}
.shiftitem .shiftname {
color: #000000;
font-size:
30
rpx;
font-size:
28
rpx;
line-height: 1;
margin-bottom: 24rpx;
}
...
...
@@ -172,7 +172,7 @@ page{
}
.shiftitem.active .shiftname {
color: #65B8F4;
font-size: 3
4
rpx;
font-size: 3
0
rpx;
font-weight: 700;
}
.shiftitem.active .shiftline {
...
...
@@ -199,13 +199,23 @@ page{
/* padding-bottom: 64rpx; */
height: 245rpx;
}
.circle-item .rilibg {
width: 138rpx;
height: 100rpx;
.circle-item .taskbg{
position: absolute;
right: 10rpx;
top: 74rpx;
}
.circle-item .rilibg {
width: 112rpx;
height: 92rpx;
}
.circle-item .assignmentbg {
width: 104rpx;
height: 88rpx;
}
.circle-item .unlockbg {
width: 107rpx;
height: 87rpx;
}
.circle-item .circlename {
font-size: 30rpx;
color: #545454;
...
...
@@ -218,6 +228,10 @@ page{
margin-bottom: 20rpx;
line-height: 1;
}
.circle-item.item-mask .circlename,
.circle-item.item-mask .static-box text{
opacity: .5;
}
.progress-box {
position: absolute;
width: 100%;
...
...
business/pages/classhourlist/index.js
View file @
5e6c4d73
import
{
unlockSubjectListGet
,
classListGet
,
}
from
'../../../service/business/common.js'
;
import
{
formIdCreate
}
from
'../../../service/common.js'
;
var
app
=
getApp
();
Page
({
data
:
{
id
:
0
,
sid
:
0
,
id
:
8
,
sid
:
8
,
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
'../../../images/'
,
classhourlist
:
[
unlockSubjectListMock
:
[
{
id
:
1
,
title
:
"熟悉英语音标"
,
clocknum
:
20
,
reviewnum
:
2
,
unlockstatus
:
1
,
editstatus
:
1
},
{
id
:
2
,
title
:
"掌握英语音标至关重要,同学们加油"
,
clocknum
:
10
,
reviewnum
:
5
,
unlockstatus
:
1
,
editstatus
:
1
},
{
id
:
3
,
title
:
"掌握英语音标至关重要,同学们加油"
,
clocknum
:
9
,
reviewnum
:
5
,
unlockstatus
:
1
,
editstatus
:
1
},
{
id
:
4
,
title
:
"熟悉英语音标"
,
clocknum
:
10
,
reviewnum
:
5
,
unlockstatus
:
0
,
editstatus
:
1
},
{
id
:
4
,
title
:
"熟悉英语音标"
,
clocknum
:
10
,
reviewnum
:
5
,
unlockstatus
:
0
,
editstatus
:
1
},
{
id
:
4
,
title
:
"熟悉英语音标"
,
clocknum
:
10
,
reviewnum
:
5
,
unlockstatus
:
0
,
editstatus
:
0
}
]
],
page
:
1
,
perPage
:
10
,
unlockSubjectList
:
[],
classTatol
:
''
,
hasmore
:
true
,
emptyPage
:
false
},
onLoad
:
function
(
options
)
{
if
(
options
.
sid
)
{
this
.
setData
({
id
:
options
.
sid
});
}
},
onReady
:
function
()
{
},
onShow
:
function
()
{
this
.
setData
({
page
:
1
,
hasmore
:
true
,
})
this
.
getUnlockSubject
(
'init'
);
},
onHide
:
function
()
{
...
...
@@ -32,11 +53,15 @@ Page({
},
onPullDownRefresh
:
function
()
{
this
.
setData
({
hasmore
:
true
,
page
:
1
,
})
this
.
getUnlockSubject
(
'down'
)
},
onReachBottom
:
function
()
{
this
.
getUnlockSubject
(
'up'
)
},
/**
...
...
@@ -45,13 +70,118 @@ Page({
onShareAppMessage
:
function
()
{
},
classhourAdd
:
function
(
e
)
{
console
.
log
(
"新增"
)
getUnlockSubject
(
type
)
{
if
(
!
this
.
data
.
hasmore
)
{
return
;
}
if
(
this
.
data
.
listLoading
)
{
return
}
this
.
setData
({
listLoading
:
true
})
unlockSubjectListGet
({
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
wx
.
hideLoading
();
this
.
setData
({
listLoading
:
false
})
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
if
(
data
.
total
)
{
this
.
setData
({
classTatol
:
data
.
total
})
}
switch
(
type
)
{
case
'init'
:
//页面进来第一次加载
this
.
setData
({
unlockSubjectList
:
data
.
list
||
[]
},
()
=>
{
if
(
data
.
total
>
this
.
data
.
unlockSubjectList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
case
'down'
:
// 页面下拉刷新
this
.
setData
({
unlockSubjectList
:
data
.
list
||
[]
},
()
=>
{
if
(
data
.
total
>
this
.
data
.
unlockSubjectList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
wx
.
stopPullDownRefresh
();
break
;
case
'up'
:
// 页面上拉刷新
let
list
=
this
.
data
.
unlockSubjectList
;
let
_list
=
list
.
concat
(
data
.
list
);
this
.
setData
({
unlockSubjectList
:
_list
},
()
=>
{
if
(
this
.
data
.
classTatol
>
this
.
data
.
unlockSubjectList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
default
:
break
;
}
if
(
this
.
data
.
unlockSubjectList
.
length
==
0
)
{
this
.
setData
({
emptyPage
:
true
})
}
else
{
this
.
setData
({
emptyPage
:
false
,
})
}
}
}).
catch
((
e
)
=>
{
this
.
setData
({
listLoading
:
false
})
})
},
unlockSubjectAdd
:
function
(
e
)
{
console
.
log
(
"新增"
);
// wx.navigateTo({
// url: ''
// })
},
classhourEdit
:
function
(
e
)
{
unlockSubjectEdit
:
function
(
e
)
{
let
id
=
e
.
currentTarget
.
dataset
.
info
.
id
;
console
.
log
(
id
)
console
.
log
(
"编辑"
);
wx
.
navigateTo
({
url
:
''
})
//
wx.navigateTo({
//
url: ''
//
})
}
})
\ No newline at end of file
business/pages/classhourlist/index.json
View file @
5e6c4d73
{
"navigationBarTitleText"
:
"全部课时"
,
"usingComponents"
:
{}
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"empty-content"
:
"../../../components/emptycontent"
}
}
\ No newline at end of file
business/pages/classhourlist/index.wxml
View file @
5e6c4d73
<view class="container">
<view class="classhour-box">
<view class="classhour-item {{item.editstatus==0?'item-label-dark':''}}" wx:for="{{
classhourl
ist}}" wx:key="">
<
block wx:if="{{item.editstatus==1}}"
>
<view class="item-label">课时{{item.
id
}}</view>
<view class="classhour-item {{item.editstatus==0?'item-label-dark':''}}" wx:for="{{
unlockSubjectL
ist}}" wx:key="">
<
!-- <block wx:if="{{item.clock_people==0}}"> --
>
<view class="item-label">课时{{item.
sort+1
}}</view>
<view class="item-line">
<view class="item-left"></view>
<view class="item-right"
bindtap="classhour
Edit">
<view class="item-right"
data-info="{{item}}" bindtap="unlockSubject
Edit">
<image class="edit-icon" src="{{localImageRoot}}2b/classhour/edit.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class='edit-text'>重新编辑</text>
</view>
...
...
@@ -17,29 +17,33 @@
</view>
<view class="item-line">
<view class="item-left">
<block wx:if="{{item.
unlockstatus==1
}}">
<view class="count">已打卡{{item.clock
num
}}人</view>
<view class="count">已点评{{item.review
num
}}人</view>
<block wx:if="{{item.
clock_people>0
}}">
<view class="count">已打卡{{item.clock
_people
}}人</view>
<view class="count">已点评{{item.review
_clock_record_count
}}人</view>
</block>
</view>
<view class="item-right">
<block wx:if='{{item.
unlockstatus==1
}}'>
<block wx:if='{{item.
clock_people>0
}}'>
<image class="status-icon" src="{{localImageRoot}}2b/classhour/unlock_y.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="status-text">已解锁</text>
</block>
<block wx:el
if='{{item.unlockstatus==0}}'
>
<block wx:el
se
>
<image class="status-icon" src="{{localImageRoot}}2b/classhour/unlock_n.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="status-text">未解锁</text>
</block>
</view>
</view>
</block>
<
!-- <
/block>
<block wx:else>
<view class="item-label">课时{{item.
id
}}</view>
<view class="item-label">课时{{item.
sort
}}</view>
<view class="unedit-tip">该课时还未编辑~</view>
<view class="item-edit" bindtap="
classhour
Edit">去编辑课时</view>
</block>
<view class="item-edit" bindtap="
unlockSubject
Edit">去编辑课时</view>
</block>
-->
</view>
<view class="empty-content-box"wx:if="{{unlockSubjectList.length==0}}">
<empty-content></empty-content>
</view>
<view class="nomore" wx:if="{{!hasmore}}">没有更多数据~</view>
</view>
<view class="classhour-add" bindtap="
classhour
Add">新增课时</view>
<view class="classhour-add" bindtap="
unlockSubject
Add">新增课时</view>
</view>
business/pages/classhourlist/index.wxss
View file @
5e6c4d73
...
...
@@ -2,7 +2,7 @@
padding-bottom: 120rpx;
}
.classhour-box{
padding:
0
30rpx;
padding: 30rpx;
font-size: 28rpx;
}
.classhour-item{
...
...
@@ -134,4 +134,12 @@
text-align: center;
line-height: 60rpx;
margin-bottom: 8rpx;
}
.nomore {
text-align: center;
text-align: center;
font-size: 26rpx;
color: rgba(0, 0, 0, 0.5);
padding: 30rpx 0;
}
\ No newline at end of file
business/pages/schoolclasslist/index.js
View file @
5e6c4d73
This diff is collapsed.
Click to expand it.
business/pages/schoolclasslist/index.wxml
View file @
5e6c4d73
This diff is collapsed.
Click to expand it.
business/pages/schoolclasslist/index.wxss
View file @
5e6c4d73
...
...
@@ -102,7 +102,7 @@ page{
}
.shiftitem .shiftname {
color: #000000;
font-size:
30
rpx;
font-size:
28
rpx;
line-height: 1;
margin-bottom: 24rpx;
font-weight: 700;
...
...
@@ -116,7 +116,7 @@ page{
}
.shiftitem.active .shiftname {
color: #000;
font-size: 3
4
rpx;
font-size: 3
0
rpx;
font-weight: 700;
opacity: 1;
}
...
...
@@ -142,13 +142,23 @@ page{
/* padding-bottom: 64rpx; */
height: 245rpx;
}
.circle-item .rilibg {
width: 138rpx;
height: 100rpx;
.circle-item .taskbg{
position: absolute;
right: 10rpx;
top: 74rpx;
}
.circle-item .rilibg {
width: 112rpx;
height: 92rpx;
}
.circle-item .assignmentbg {
width: 104rpx;
height: 88rpx;
}
.circle-item .unlockbg {
width: 107rpx;
height: 87rpx;
}
.circle-item .circlename {
font-size: 30rpx;
color: #545454;
...
...
business/pages/unlockclocksituation/index.js
View file @
5e6c4d73
var
app
=
getApp
();
import
{
themeDetail
,
c
lockMemberList
,
unlockC
lockMemberList
,
}
from
'../../../service/business/themeindex.js'
;
import
{
formIdCreate
...
...
@@ -45,26 +45,19 @@ Page({
{
id
:
6
,
name
:
"让人"
,
time
:
"09-20 10:30"
,
unlocknum
:
2
,
unlocknumtotal
:
30
}
],
memberLoading
:
false
,
activeDay
:
"2019-05-2"
,
clockTotal
:
0
,
clockMemberList
:
[],
memberTotal
:
0
,
emptyPage
:
false
,
emptyMemberPage
:
false
,
shareObj
:
{},
initShareObj
:
{},
unlocktype
:
2
mode_id
:
0
},
onLoad
:
function
(
options
)
{
let
that
=
this
;
const
{
id
,
tid
,
sid
}
=
options
;
this
.
setData
({
id
,
tid
,
sid
,
const
{
tid
}
=
options
;
that
.
setData
({
mode_id
:
tid
})
console
.
log
(
that
.
id
,
that
.
tid
,
that
.
sid
)
},
onReady
:
function
()
{
let
dakarole
=
LocalStorage
.
getItem
(
'dakarole'
);
...
...
@@ -80,7 +73,7 @@ Page({
page
:
1
,
hasmore
:
true
,
})
this
.
clockMemberListGet
(
this
.
data
.
unlocktype
,
'init'
);
this
.
clockMemberListGet
(
'init'
);
let
dakarole
=
LocalStorage
.
getItem
(
'dakarole'
);
if
(
dakarole
==
2
)
{
that
.
teachersPermission
();
...
...
@@ -92,10 +85,10 @@ Page({
mPage
:
1
,
hasmore
:
true
,
})
this
.
clockMemberListGet
(
this
.
data
.
unlocktype
,
'down'
);
this
.
clockMemberListGet
(
'down'
);
},
onReachBottom
:
function
()
{
this
.
clockMemberListGet
(
this
.
data
.
unlocktype
,
'up'
);
this
.
clockMemberListGet
(
'up'
);
},
// 分享?待改
onShareAppMessage
:
function
(
option
)
{
...
...
@@ -146,7 +139,7 @@ Page({
},
}
},
clockMemberListGet
(
unlocktype
,
type
)
{
clockMemberListGet
(
type
)
{
if
(
!
this
.
data
.
hasmore
)
{
return
}
...
...
@@ -156,13 +149,10 @@ Page({
this
.
setData
({
memberLoading
:
true
})
clockMemberList
({
subject_id
:
this
.
data
.
tid
,
type
:
2
,
unlockClockMemberList
({
mode_id
:
this
.
data
.
mode_id
,
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
school_id
:
this
.
data
.
sid
,
date
:
this
.
data
.
activeDay
,
keyword
:
this
.
data
.
searchName
?
this
.
data
.
searchName
:
''
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
...
...
@@ -172,19 +162,11 @@ Page({
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
if
(
data
.
had_clock_total
)
{
this
.
setData
({
hadClockTotal
:
data
.
had_clock_total
||
0
,
})
}
if
(
data
.
total
)
{
this
.
setData
({
memberTotal
:
data
.
total
||
0
,
})
}
this
.
setData
({
allMemberTotal
:
data
.
total_count
||
0
})
switch
(
type
)
{
case
'init'
:
//页面进来第一次加载
this
.
setData
({
...
...
@@ -296,8 +278,7 @@ Page({
page
:
1
,
hasmore
:
true
,
},
()
=>
{
console
.
log
(
222
)
this
.
clockMemberListGet
(
this
.
data
.
type
,
'down'
);
this
.
clockMemberListGet
(
'down'
);
})
},
clearsearchinput
()
{
...
...
@@ -306,7 +287,7 @@ Page({
page
:
1
,
hasmore
:
true
,
},
()
=>
{
this
.
clockMemberListGet
(
this
.
data
.
type
,
'init'
);
this
.
clockMemberListGet
(
'init'
);
})
},
})
\ No newline at end of file
business/pages/unlockclocksituation/index.wxml
View file @
5e6c4d73
...
...
@@ -17,13 +17,13 @@
<image class="avator" src="{{item.avatar}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<view class="namebox">
<view class="name">{{item.nickname}}</view>
<view class="time">
03:20 15:20
</view>
<view class="time">
{{item.max_time}}
</view>
</view>
</view>
</view>
<view class="right">
<text>已解锁</text>
<text class="static">
5
</text>
<text class="static">
{{item.record_count}}
</text>
<text>个课时</text>
</view>
</view>
...
...
constants/api.js
View file @
5e6c4d73
...
...
@@ -176,7 +176,7 @@ const apis = {
allschoolclassesM
:
`
${
api
}
member/all_school_classes`
,
classteacherList
:
`
${
api
}
common/class_teacher`
,
notCommentThemeListGet
:
`
${
api
}
member/subjectRecord`
,
signadcustomer
:
`
${
api
}
member/ad_customer/sign_ad_customer`
,
//消息已读上报
signadcustomer
:
`
${
api
}
member/ad_customer/sign_ad_customer`
,
//消息已读上报
},
shopeditor
:
{
infoGet
:
`
${
api
}
member/clock/address/get`
,
...
...
@@ -206,6 +206,7 @@ const apis = {
},
circleIndex
:
{
themeApi
:
`
${
api
}
member/subject`
,
unlockthemeList
:
`
${
api
}
member/unlock_subject/mode_list`
,
themeDetail
:
`
${
api
}
member/clock/subject/show`
,
},
themeIndex
:
{
...
...
@@ -213,6 +214,7 @@ const apis = {
themeDetail
:
`
${
api
}
member/clock/subject/show`
,
clockList
:
`
${
api
}
common/clock`
,
clockMemberList
:
`
${
api
}
common/clock_statistics`
,
unlockClockMemberList
:
`
${
api
}
member/unlock_subject/situation`
,
clockDel
:
`
${
api
}
member/clocks`
,
commentsList
:
`
${
api
}
member/clock/comment/index`
,
newLikeIndex
:
`
${
api
}
member/clock/record/newLikeIndex`
,
...
...
@@ -274,7 +276,8 @@ const apis = {
likeWeekList
:
`
${
api
}
consumer/clock/rank/like_week_index`
,
likeDailyList
:
`
${
api
}
consumer/clock/rank/like_daily_index`
,
rankrecord
:
`
${
api
}
common/rank/record`
,
calendarClockRank
:
`
${
api
}
common/rank/calendar_clock_rank`
,
calendarClockRank
:
`
${
api
}
common/rank/calendar_clock_rank`
,
unlockClockRank
:
`
${
api
}
common/rank/unlocks`
,
//解锁主题排行榜
ranklike
:
`
${
api
}
common/rank/like`
,
},
staticCenter
:
{
...
...
images/2b/circleindex/assignment.png
0 → 100644
View file @
5e6c4d73
5.03 KB
images/2b/circleindex/rili.png
0 → 100644
View file @
5e6c4d73
5.74 KB
images/2b/circleindex/unlock.png
0 → 100644
View file @
5e6c4d73
4.13 KB
images/2b/classhour/unlock_n.png
View replaced file @
c6a6f6a2
View file @
5e6c4d73
704 Bytes
|
W:
|
H:
676 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
service/business/circleindex.js
View file @
5e6c4d73
...
...
@@ -20,7 +20,17 @@ function themeList (data) {
errorresolve
:
1
,
})
}
function
unlockthemeList
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
circleIndex
.
unlockthemeList
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
export
{
themeList
,
unlockthemeList
,
circleDetail
}
\ No newline at end of file
service/business/common.js
View file @
5e6c4d73
...
...
@@ -271,6 +271,15 @@ function signadcustomer(data) {
errorresolve
:
2
,
})
}
function
unlockSubjectListGet
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
themeIndex
.
unlockSubjectList
,
method
:
'GET'
,
data
,
errorresolve
:
1
,
})
}
export
{
nicknameGet
,
bOssAccess
,
...
...
@@ -298,5 +307,6 @@ export {
allSchoolClassesM
,
classteacherList
,
notCommentThemeListGet
,
signadcustomer
signadcustomer
,
unlockSubjectListGet
}
\ No newline at end of file
service/business/themeindex.js
View file @
5e6c4d73
...
...
@@ -110,6 +110,16 @@ function unlockSubjectDetail (data) {
errorresolve
:
1
,
})
}
// b端解锁模式参与概况
function
unlockClockMemberList
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
themeIndex
.
unlockClockMemberList
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
export
{
themeDetail
,
clockList
,
...
...
@@ -122,5 +132,6 @@ export {
reviewDel
,
unlockSubjectShow
,
unlockSubjectList
,
unlockSubjectDetail
unlockSubjectDetail
,
unlockClockMemberList
}
\ No newline at end of file
service/common.js
View file @
5e6c4d73
...
...
@@ -217,6 +217,15 @@ function calendarClockRank (data) {
errorresolve
:
1
,
})
}
// 解锁模式排行榜
function
unlockClockRank
(
data
)
{
return
wxRequest
({
url
:
apis
.
business
.
rankingList
.
unlockClockRank
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
baseUserShow
(
data
)
{
return
wxRequest
({
url
:
apis
.
customer
.
common
.
baseUserShow
,
...
...
@@ -255,6 +264,7 @@ export {
rankrecord
,
ranklike
,
calendarClockRank
,
unlockClockRank
,
baseUserShow
,
activityLog
}
\ No newline at end of file
src/pages/pointsexchangerecord/index.js
View file @
5e6c4d73
import
{
unlockClockRank
}
from
'../../../service/common.js'
;
import
{
constants
}
from
'../../../constants/index.js'
;
var
app
=
getApp
();
Page
({
data
:
{
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
'../../../images/'
,
recoldList
:
[
imageVersion
:
app
.
globalData
.
imageVersion
,
recordList
:
[],
recordTotal
:
0
,
page
:
1
,
perPage
:
10
,
hasmore
:
true
,
emptyPage
:
false
,
listLoading
:
false
,
sid
:
0
,
recordList
:
[
{
id
:
'1'
,
imgurl
:
'2b/rulesrecord/record_checked.png'
,
title
:
'狐狸玩偶'
,
status
:
1
,
point_num
:
2200
},
{
id
:
'2'
,
imgurl
:
'2b/rulesrecord/record_checked.png'
,
title
:
'小象啊花瓣,你值得拥有,速来兑换!我擦点鞍山西安市'
,
status
:
0
,
point_num
:
2200
},
{
id
:
'3'
,
imgurl
:
'2b/rulesrecord/record_checked.png'
,
title
:
'小象啊花瓣,你值得拥有,速来兑换!'
,
status
:
1
,
point_num
:
2200
},
]
},
onLoad
:
function
(
options
)
{
},
onReady
:
function
()
{
},
onShow
:
function
()
{
},
onHide
:
function
()
{
},
onUnload
:
function
()
{
this
.
setData
({
// tid: options.tid,
sid
:
options
.
sid
||
0
,
});
this
.
setData
({
page
:
1
,
hasmore
:
true
,
})
// this.pointsExchangeRecordGet('init')
},
onPullDownRefresh
:
function
()
{
this
.
setData
({
hasmore
:
true
,
page
:
1
,
})
this
.
pointsExchangeRecordGet
(
'down'
)
},
onReachBottom
:
function
()
{
this
.
pointsExchangeRecordGet
(
'up'
)
},
pointsExchangeRecordGet
(
type
)
{
if
(
!
this
.
data
.
hasmore
)
{
return
;
}
if
(
this
.
data
.
listLoading
)
{
return
}
this
.
setData
({
listLoading
:
true
})
unlockClockRank
({
sid
:
this
.
data
.
sid
,
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
this
.
setData
({
listLoading
:
false
})
if
(
code
!=
200
)
{
// 失败的处理
onShareAppMessage
:
function
()
{
}
else
{
if
(
data
.
total
)
{
this
.
setData
({
recordTotal
:
data
.
total
})
}
switch
(
type
)
{
case
'init'
:
//页面进来第一次加载
this
.
setData
({
recordList
:
data
.
list
||
[]
},
()
=>
{
if
(
this
.
data
.
recordTotal
>
this
.
data
.
recordList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
case
'down'
:
// 页面下拉刷新
this
.
setData
({
recordList
:
data
.
list
||
[]
},
()
=>
{
if
(
this
.
data
.
recordTotal
>
this
.
data
.
recordList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
wx
.
stopPullDownRefresh
();
break
;
case
'up'
:
// 页面上拉刷新
let
list
=
this
.
data
.
recordList
;
let
_list
=
list
.
concat
(
data
.
list
);
this
.
setData
({
recordList
:
_list
},
()
=>
{
if
(
this
.
data
.
recordTotal
>
this
.
data
.
recordList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
default
:
break
;
}
if
(
this
.
data
.
recordList
.
length
==
0
)
{
this
.
setData
({
emptyPage
:
true
})
}
else
{
this
.
setData
({
emptyPage
:
false
})
}
}
}).
catch
((
e
)
=>
{
this
.
setData
({
listLoading
:
false
})
})
},
// 核销 没有操作
toCheckRecord
(
e
)
{
let
that
=
this
;
// const {id,status} = e.currentTarget.dataset.info;
// if(status==0){//已核销,不做其他操作
// return
// }
// wx.showModal({
// })
// this.data.recordList.find(item => item.id == id).status = !status;
// that.setData({
// recordList: this.data.recordList
// })
}
})
\ No newline at end of file
src/pages/pointsexchangerecord/index.wxml
View file @
5e6c4d73
<view class="container points-exchange-record">
<view class="record-list">
<view class="record-item" wx:for="{{reco
ldList}}" wx:key="item.i
d">
<view class="record-item" wx:for="{{reco
rdList}}" wx:key="" data-info="{{item}}" bindtap="toCheckRecor
d">
<image class="item-points-pic" src="{{localImageRoot}}{{item.imgurl}}?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
<view class="item-content-box">
<view class="item-title">{{item.title}}</view>
<view class="item-points">-{{item.point_num}}积分</view>
<view class="item-status">
<image wx:if="{{item.status==1}}" src="{{localImageRoot}}2b/rulesrecord/record_checked.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
<text wx:else>待核销</text>
<view class="item-top">
<view class="item-title">{{item.title}}</view>
<view class="item-points">{{item.point_num}}积分</view>
</view>
<view class="item-checkperson">
<view class="checkpeople">兑换人: 历史</view>
<view wx:if="{{item.status==0}}" class="checkstatus">待核销</view>
</view>
<image class="checkstatus-icon" wx:if="{{item.status==1}}" src="{{localImageRoot}}2b/rulesrecord/record_checked.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
</view>
</view>
</view>
...
...
src/pages/pointsexchangerecord/index.wxss
View file @
5e6c4d73
...
...
@@ -13,24 +13,28 @@ page{
width: 100%;
height: 170rpx;
background: rgba(255,255,255,1);
border-radius: 20px;
border-radius: 20
r
px;
box-sizing: border-box;
display: flex;
align-items: center;
position: relative;
margin-bottom: 25rpx;
padding: 17rpx;
padding: 17rpx
30rpx 17rpx 17rpx
;
}
.record-item .item-points-pic{
width: 157rpx;
min-width: 157rpx;
height: 137rpx;
line-height: 36rpx;
border-radius: 20rpx;
}
.record-item .item-content-box{
flex: 1;
height: 100%;
padding-left: 25rpx;
line-height: 36rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.record-item .item-content-box .item-title{
font-size: 26rpx;
...
...
@@ -41,18 +45,25 @@ page{
color: #878787;
padding-top: 8rpx;
}
.record-item .item-content-box .item-status{
.record-item .item-content-box .item-checkperson{
font-size: 22rpx;
color: #878787;
display: flex;
align-items: center;
justify-content: space-between;
}
.record-item .item-content-box .item-checkperson .checkpeople{
font-size: 22rpx;
color:#878787;
}
.record-item .item-content-box .item-checkperson .checkstatus{
font-size: 26rpx;
color: #65B8F4;
}
.record-item .item-content-box .checkstatus-icon{
position: absolute;
right: 34rpx;
bottom: 8rpx;
}
.record-item .item-content-box .item-status text{
font-size: 24rpx;
color: #FF5E15;
line-height: 36rpx;
padding: 9rpx 13rpx;
}
.record-item .item-content-box .item-status image{
width: 90rpx;
height: 90rpx;
}
...
...
src/pages/unlockranklist/index.js
View file @
5e6c4d73
import
{
calendarClockRank
,
formIdCreate
unlockClockRank
}
from
'../../../service/common.js'
;
import
{
constants
}
from
'../../../constants/index.js'
;
var
app
=
getApp
();
Page
({
/**
* 页面的初始数据
*/
data
:
{
imageRoot
:
app
.
globalData
.
imageRoot
,
localImageRoot
:
'../../../images/'
,
...
...
@@ -22,42 +18,32 @@ Page({
emptyPage
:
false
,
listLoading
:
false
,
sid
:
0
,
activitySid
:
constants
.
activity
.
sid
,
mode_id
:
1
,
consumer_id
:
1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
setData
({
tid
:
options
.
tid
,
sid
:
options
.
sid
||
0
sid
:
options
.
sid
||
0
,
mode_id
:
options
.
mode_id
||
1
,
consumer_id
:
options
.
consumer_id
||
1
});
this
.
setData
({
page
:
1
,
hasmore
:
true
,
})
this
.
calendar
ClockRankGet
(
'init'
)
this
.
unlock
ClockRankGet
(
'init'
)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
hasmore
:
true
,
page
:
1
,
})
this
.
calendar
ClockRankGet
(
'down'
)
this
.
unlock
ClockRankGet
(
'down'
)
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
this
.
calendar
ClockRankGet
(
'up'
)
this
.
unlock
ClockRankGet
(
'up'
)
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
return
{
title
:
'解锁打卡排行榜'
,
...
...
@@ -65,13 +51,7 @@ Page({
imageUrl
:
'https://cdn.img.shangjiadao.cn/source/images/dakav3/2c/rankinglist/sharebg.png'
}
},
formIdCreate
(
e
)
{
const
{
formId
}
=
e
.
detail
;
formIdCreate
({
formId
})
},
calendarClockRankGet
(
type
)
{
unlockClockRankGet
(
type
)
{
if
(
!
this
.
data
.
hasmore
)
{
return
;
}
...
...
@@ -81,10 +61,11 @@ Page({
this
.
setData
({
listLoading
:
true
})
calendarClockRank
({
unlockClockRank
({
mode_id
:
this
.
data
.
mode_id
,
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
subject_id
:
this
.
data
.
t
id
consumer_id
:
this
.
data
.
consumer_
id
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
this
.
setData
({
...
...
src/pages/unlockranklist/index.json
View file @
5e6c4d73
...
...
@@ -3,7 +3,6 @@
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"empty-content"
:
"../../../components/emptycontent"
,
"list-loading"
:
"../../../components/listloading"
,
"activity-bar"
:
"../../../components/activitybar"
"list-loading"
:
"../../../components/listloading"
}
}
\ No newline at end of file
src/pages/unlockranklist/index.wxml
View file @
5e6c4d73
...
...
@@ -17,7 +17,7 @@
</view>
<view class="right" hover-class="none" hover-stop-propagation="false">
<text class="" selectable="false" space="false" decode="false">已解锁</text>
<text class="static" selectable="false" space="false" decode="false">{{item.
record_days
}}</text>
<text class="static" selectable="false" space="false" decode="false">{{item.
unlock_count
}}</text>
<text class="" selectable="false" space="false" decode="false">个课时</text>
</view>
</view>
...
...
@@ -34,7 +34,4 @@
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{emptyPage}}">
<empty-content></empty-content>
</view>
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{sid==activitySid}}">
<activity-bar pageName="themeranklist"></activity-bar>
</view>
</view>
\ No newline at end of file
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