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
30aa7fae
Commit
30aa7fae
authored
Apr 02, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'新增班级流程添加'
parent
90e1caa4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
13 deletions
+66
-13
index.js
business/pages/circleeditor/index.js
+4
-0
index.js
business/pages/clockdetail/index.js
+3
-3
chooseclass.js
business/pages/themeeditor/chooseclass.js
+33
-3
chooseclass.wxml
business/pages/themeeditor/chooseclass.wxml
+2
-1
lockthemelist.js
business/pages/themeeditor/lockthemelist.js
+7
-5
setting.js
business/pages/themeeditor/setting.js
+17
-1
No files found.
business/pages/circleeditor/index.js
View file @
30aa7fae
...
...
@@ -336,6 +336,10 @@ Page({
wx
.
redirectTo
({
url
:
`/business/pages/circleindex/index?id=
${
res
.
data
.
id
}
&sid=
${
this
.
data
.
sid
}
&from=2`
})
}
else
if
(
this
.
data
.
from
==
4
){
wx
.
navigateBack
({
delta
:
1
,
// 回退前 delta(默认为1) 页面
})
}
else
{
wx
.
redirectTo
({
url
:
`/business/pages/classservice/classdetail?id=
${
res
.
data
.
id
}
&sid=
${
this
.
data
.
sid
}
`
...
...
business/pages/clockdetail/index.js
View file @
30aa7fae
...
...
@@ -250,17 +250,17 @@ Page({
switch
(
thisSubject
.
subject_type
)
{
case
1
:
wx
.
navigateTo
({
url
:
`/business/pages/themeindex/index?
id=
${
this
.
data
.
id
}
&
tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
`
url
:
`/business/pages/themeindex/index?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
`
})
break
;
case
2
:
wx
.
navigateTo
({
url
:
`/business/pages/calendarthemeindex/index?
id=
${
this
.
data
.
id
}
&
tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
`
url
:
`/business/pages/calendarthemeindex/index?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
`
})
break
;
case
3
:
wx
.
navigateTo
({
url
:
`/business/pages/morethemeindex/index?
id=
${
this
.
data
.
id
}
&tid=
${
thisSubject
.
unlock_mode_
id
}
&sid=
${
this
.
data
.
sid
}
`
url
:
`/business/pages/morethemeindex/index?
mid=
${
this
.
data
.
clock
.
unlock_mode_id
}
&tid=
${
thisSubject
.
id
}
&sid=
${
this
.
data
.
sid
}
`
})
break
;
default
:
...
...
business/pages/themeeditor/chooseclass.js
View file @
30aa7fae
...
...
@@ -46,12 +46,12 @@ Page({
sid
,
classes
:
!
class_ids
?
[]
:
JSON
.
parse
(
decodeURIComponent
(
class_ids
)),
});
this
.
getMyRoleInfo
()
},
onReady
:
function
()
{
// Do something when page ready.
},
onShow
:
function
()
{
// Do something when page show.
this
.
getMyRoleInfo
()
},
onHide
:
function
()
{
// Do something when page hide.
...
...
@@ -101,9 +101,22 @@ Page({
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
const
chooseClasses
=
[];
data
.
list
.
forEach
((
course
)
=>
{
course
.
classes
&&
course
.
classes
.
forEach
((
classes
)
=>
{
if
(
this
.
data
.
classes
.
indexOf
(
classes
.
id
)
!=
-
1
)
{
chooseClasses
.
push
({
title
:
classes
.
title
,
id
:
classes
.
id
});
}
})
})
this
.
setData
({
courseList
:
data
.
list
courseList
:
data
.
list
,
chooseClasses
,
})
console
.
log
(
chooseClasses
,
'chooseClasses'
);
}
else
{
}
...
...
@@ -114,6 +127,7 @@ Page({
const
{
classes
,
chooseClasses
}
=
this
.
data
;
const
classesIndex
=
classes
.
indexOf
(
item
.
id
);
const
chooseClassesIndex
=
chooseClasses
.
findIndex
(
ele
=>
ele
.
id
==
item
.
id
);
console
.
log
(
chooseClassesIndex
,
'chooseClassesIndex'
);
if
(
classesIndex
==
-
1
)
{
classes
.
push
(
item
.
id
);
}
else
{
...
...
@@ -125,8 +139,10 @@ Page({
id
:
item
.
id
,
});
}
else
{
chooseClasses
.
splice
(
classesIndex
,
1
);
chooseClasses
.
splice
(
c
hooseC
lassesIndex
,
1
);
}
console
.
log
(
classes
,
'classes'
);
console
.
log
(
chooseClasses
,
'chooseClasses'
);
this
.
setData
({
classes
,
chooseClasses
,
...
...
@@ -136,6 +152,15 @@ Page({
const
curPages
=
getCurrentPages
();
let
currPage
=
null
;
//当前页面
let
prevPage
=
null
;
//上一个页面
console
.
log
(
this
.
data
.
chooseClasses
,
'this.data.chooseClasses'
);
// return;
if
(
this
.
data
.
chooseClasses
.
length
==
0
)
{
wx
.
showToast
({
title
:
'请选择班级'
,
icon
:
'none'
,
})
return
;
}
if
(
curPages
.
length
>=
2
)
{
currPage
=
curPages
[
curPages
.
length
-
1
];
//当前页面
prevPage
=
curPages
[
curPages
.
length
-
2
];
//上一个页面
...
...
@@ -146,5 +171,10 @@ Page({
wx
.
navigateBack
({
delta
:
1
})
},
toAddClass
()
{
wx
.
navigateTo
({
url
:
`/business/pages/circleeditor/index?sid=
${
this
.
data
.
sid
}
&id=0&from=4`
,
})
}
})
\ No newline at end of file
business/pages/themeeditor/chooseclass.wxml
View file @
30aa7fae
...
...
@@ -24,5 +24,6 @@
</view>
</block>
<empty-content text="暂无数据~" emptyimg="" wx:else></empty-content>
<view class="savebtn" hover-class="none" hover-stop-propagation="false" bindtap="saveClass">保存</view>
<view class="savebtn" hover-class="none" hover-stop-propagation="false" bindtap="saveClass" wx:if="{{courseList.length > 0}}">保存</view>
<view class="savebtn" hover-class="none" hover-stop-propagation="false" bindtap="toAddClass" wx:if="{{courseList.length == 0}}">新增班级</view>
</view>
business/pages/themeeditor/lockthemelist.js
View file @
30aa7fae
...
...
@@ -155,11 +155,7 @@ Page({
},
goThemeDetail
(
e
)
{
const
{
index
,
item
}
=
e
.
currentTarget
.
dataset
;
if
(
item
.
id
>
0
)
{
wx
.
navigateTo
({
url
:
`/business/pages/morethemeindex/index?mid=
${
this
.
data
.
tid
}
&tid=
${
item
.
id
}
&sid=
${
this
.
data
.
sid
}
`
,
})
}
else
{
if
(
index
>=
1
)
{
if
(
this
.
data
.
lockSubjects
[
index
-
1
].
id
==
0
)
{
wx
.
showModal
({
title
:
'提示'
,
...
...
@@ -168,6 +164,12 @@ Page({
})
return
;
}
}
if
(
item
.
id
>
0
)
{
wx
.
navigateTo
({
url
:
`/business/pages/morethemeindex/index?mid=
${
this
.
data
.
tid
}
&tid=
${
item
.
id
}
&sid=
${
this
.
data
.
sid
}
`
,
})
}
else
{
wx
.
navigateTo
({
url
:
`/business/pages/themeeditor/subjecteditor?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&addSort=0&sort=
${
index
+
1
}
&id=
${
item
.
id
}
&index=
${
index
}
¤tSortIndex=0&from=index`
,
})
...
...
business/pages/themeeditor/setting.js
View file @
30aa7fae
...
...
@@ -311,7 +311,23 @@ Page({
editType
,
max_clock_count
,
unlock_limit
,
}
=
this
.
data
}
=
this
.
data
;
if
(
join_rule_type
==
3
&&
join_secret
==
''
)
{
wx
.
showToast
({
title
:
'请输入密码'
,
icon
:
'none'
})
return
;
}
if
((
join_rule_type
==
2
||
join_rule_type
==
4
)
&&
classes
.
length
==
0
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
`当前选择的参与打卡模式为
${
join_rule_type
==
2
?
'【任何人都可参与(指定班级学生收到通知)】'
:
''
}${
join_rule_type
==
4
?
'【指定班级学生参与】'
:
''
}
,请选择班级`
,
showCancel
:
false
,
})
return
;
}
console
.
log
()
let
currPage
=
null
;
//当前页面
let
prevPage
=
null
;
//上一个页面
if
(
pages
.
length
>=
2
)
{
...
...
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