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
f39bfc69
Commit
f39bfc69
authored
Mar 27, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'三种打卡编辑提交'
parent
0ca43638
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
250 additions
and
2 deletions
+250
-2
chooseclass copy.js
business/pages/themeeditor/chooseclass copy.js
+130
-0
chooseclass copy.json
business/pages/themeeditor/chooseclass copy.json
+14
-0
chooseclass copy.wxml
business/pages/themeeditor/chooseclass copy.wxml
+21
-0
chooseclass copy.wxss
business/pages/themeeditor/chooseclass copy.wxss
+79
-0
index.js
business/pages/themeeditor/index.js
+4
-0
index.wxml
business/pages/themeeditor/index.wxml
+2
-2
No files found.
business/pages/themeeditor/chooseclass copy.js
0 → 100644
View file @
f39bfc69
/*
time: 2018-10-31
author: wxl
*/
import
{
themeEditor
}
from
'../../../service/business/themeeditor.js'
;
import
{
themeDetail
}
from
'../../../service/business/themeindex.js'
;
import
{
audioorigin
,
formatDate
,
getDateInfo
,
LocalStorage
,
deepCopy
}
from
'../../../utilities/index.js'
;
import
{
erpClassListGet
,
}
from
'../../../service/business/common.js'
;
var
app
=
getApp
();
Page
({
data
:
{
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
'../../../images/'
,
sid
:
0
,
classes
:
[],
chooseClasses
:
[],
classList
:
[],
page
:
1
,
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
that
=
this
;
const
{
sid
,
class_ids
,
}
=
options
;
this
.
setData
({
sid
,
classes
:
!
class_ids
?
[]
:
JSON
.
parse
(
decodeURIComponent
(
class_ids
)),
});
this
.
getClassList
();
},
onReady
:
function
()
{
// Do something when page ready.
},
onShow
:
function
()
{
// Do something when page show.
},
onHide
:
function
()
{
// Do something when page hide.
},
onUnload
:
function
()
{
// Do something when page close.
},
// 切换选择班级 start
getClassList
()
{
let
dakarole
=
LocalStorage
.
getItem
(
'dakarole'
);
erpClassListGet
({
page
:
this
.
data
.
page
,
// perPage: this.data.circlePerpage,
perPage
:
200
,
//重新选择问题,所以这里暂不分页了
school_id
:
this
.
data
.
sid
,
// my: dakarole==2 ? 1: this.data.my
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
this
.
setData
({
classList
:
data
.
list
,
});
const
{
chooseClasses
}
=
this
.
data
;
this
.
data
.
classes
.
forEach
((
ele
)
=>
{
const
item
=
data
.
list
.
find
(
e
=>
e
.
id
==
ele
);
if
(
item
)
{
chooseClasses
.
push
({
title
:
item
.
title
,
id
:
item
.
id
})
}
})
this
.
setData
({
chooseClasses
})
}
}).
catch
((
e
)
=>
{
})
},
chooseClass
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
;
const
{
classes
,
chooseClasses
}
=
this
.
data
;
const
classesIndex
=
classes
.
indexOf
(
item
.
id
);
const
chooseClassesIndex
=
chooseClasses
.
findIndex
(
ele
=>
ele
.
id
==
item
.
id
);
if
(
classesIndex
==
-
1
)
{
classes
.
push
(
item
.
id
);
}
else
{
classes
.
splice
(
classesIndex
,
1
);
}
if
(
chooseClassesIndex
==
-
1
)
{
chooseClasses
.
push
({
title
:
item
.
title
,
id
:
item
.
id
,
});
}
else
{
chooseClasses
.
splice
(
classesIndex
,
1
);
}
this
.
setData
({
classes
,
chooseClasses
,
});
},
saveClass
()
{
const
curPages
=
getCurrentPages
();
let
currPage
=
null
;
//当前页面
let
prevPage
=
null
;
//上一个页面
if
(
curPages
.
length
>=
2
)
{
currPage
=
curPages
[
curPages
.
length
-
1
];
//当前页面
prevPage
=
curPages
[
curPages
.
length
-
2
];
//上一个页面
}
prevPage
.
setData
({
classes
:
this
.
data
.
chooseClasses
});
wx
.
navigateBack
({
delta
:
1
})
}
})
\ No newline at end of file
business/pages/themeeditor/chooseclass copy.json
0 → 100644
View file @
f39bfc69
{
"navigationBarTitleText"
:
"新建作业打卡"
,
"usingComponents"
:
{
"sjd-media-editor"
:
"../../../components/newsjdmediaeditor"
,
"sound-recording"
:
"../../../components/soundrecording"
,
"w-switch"
:
"/dist/w-switch/index"
,
"w-button"
:
"/dist/w-button/index"
,
"w-cell"
:
"/dist/w-cell/index"
,
"w-cell-group"
:
"/dist/w-cell-group/index"
,
"w-checkbox"
:
"/dist/w-checkbox/index"
,
"w-pane"
:
"/dist/w-pane/index"
,
"expiredTip"
:
"../../components/expiredTip"
}
}
\ No newline at end of file
business/pages/themeeditor/chooseclass copy.wxml
0 → 100644
View file @
f39bfc69
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="themetypebox">
<view class="themetab">
<view class="themetypeitem active">全部班级</view>
<view class="themetypeitem ">只看我的</view>
</view>
</view>
<view class="listbox">
<view class="listitem" hover-class="none" hover-stop-propagation="false" wx:for="{{classList}}" wx:key="id" data-item="{{item}}" bindtap="chooseClass">
<view class="classtitle">{{item.title}}</view>
<view class="rightbox">
<view class="teachername">
<text wx:for="{{item.school_teachers}}" wx:key="id" wx:for-item="teacher">{{teacher.nickname}}</text>
</view>
<image class="selectedicon" src="{{imageRoot}}2b/common/{{filter.indexOf(classes, item.id) == -1 ? 'notselect' : 'select'}}.png"></image>
</view>
</view>
</view>
<view class="savebtn" hover-class="none" hover-stop-propagation="false" bindtap="saveClass">保存</view>
</view>
business/pages/themeeditor/chooseclass copy.wxss
0 → 100644
View file @
f39bfc69
.themetypebox {
/* margin-bottom: 20px; */
background-color: #fff;
padding: 20rpx 0;
}
.themetab {
display: flex;
align-items: center;
justify-content: center;
/* margin-bottom: 34rpx; */
/* border: 1px solid #16B0FD; */
}
.themetab .themetypeitem {
width: 210rpx;
height: 60rpx;
/* border-bottom: 1px solid #16B0FD;
border-top: 1px solid #16B0FD; */
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #16B0FD;
text-align: center;
border: 1px solid #16B0FD;
}
.themetab .themetypeitem.active {
background-color: #16B0FD;
color: #FFFFFF;
}
.selectedicon {
width: 38rpx;
height: 38rpx;
display: block;
}
.listitem {
display: flex;
align-items: center;
justify-content: space-between;
}
.classtitle {
max-width: 370rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rightbox {
display: flex;
align-items: center;
justify-content: center;
}
.listbox {
padding: 0 20rpx;
}
.listitem {
padding: 28rpx 0;
border-top: 1px solid #F1F2F3;
}
.teachername {
max-width: 230rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 10rpx;
}
.savebtn {
width:630rpx;
height:90rpx;
background:rgba(22,176,253,1);
border-radius:49rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
letter-spacing: 2rpx;
position: fixed;
bottom: 20rpx;
left: 60rpx;
}
\ No newline at end of file
business/pages/themeeditor/index.js
View file @
f39bfc69
...
...
@@ -1769,6 +1769,10 @@ Page({
wx
.
setNavigationBarTitle
({
title
:
'新建闯关打卡'
})
this
.
setData
({
lockSubjectLists
:
this
.
data
.
lockSubjects
.
slice
(
this
.
data
.
currentSortIndex
*
10
,
this
.
data
.
currentSortIndex
*
10
+
10
),
})
this
.
getSubjectSort
();
}
this
.
setData
({
editType
:
type
,
...
...
business/pages/themeeditor/index.wxml
View file @
f39bfc69
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container" style="display: {{videostatus.videoShow ? 'none' : 'block'}}">
<view class="theme-editor-container clearfix {{showWarn ? 'opacitybody' : ''}}">
<view class="themetypebox">
<view class="themetypebox"
wx:if="{{tid == 0}}"
>
<view class="themetab">
<view class="themetypeitem {{editType == 1 ? 'active' : ''}}" data-type="1" bindtap="editTypeChange">作业打卡</view>
<view class="themetypeitem {{editType == 1 ? 'active' : ''}}" data-type="1" bindtap="editTypeChange">作业打卡
{{tid}}
</view>
<view class="themetypeitem {{editType == 2 ? 'active' : ''}}" data-type="2" bindtap="editTypeChange">日历打卡</view>
<view class="themetypeitem {{editType == 3 ? 'active' : ''}}" data-type="3" bindtap="editTypeChange">闯关打卡</view>
</view>
...
...
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