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
0fe67afa
Commit
0fe67afa
authored
Feb 24, 2020
by
sujie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
4152a441
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
10 deletions
+112
-10
index.js
business/pages/classhourlist/index.js
+44
-5
index.wxml
business/pages/classhourlist/index.wxml
+10
-1
index.wxss
business/pages/classhourlist/index.wxss
+55
-1
index.js
src/pages/websiteindex/index.js
+3
-3
No files found.
business/pages/classhourlist/index.js
View file @
0fe67afa
...
...
@@ -33,7 +33,8 @@ Page({
classhourList
:
''
,
selectClassShow
:
false
,
delDailogShow
:
false
,
delKey
:
''
delKey
:
''
,
addSubDialogS
:
false
},
onLoad
:
function
(
options
)
{
const
{
...
...
@@ -154,8 +155,33 @@ Page({
},
// 课时添加
unlockSubjectAdd
:
function
(
e
)
{
let
classhourListTotal
=
this
.
data
.
classhourList
.
length
+
this
.
data
.
unlockSubjectList
.
length
;
if
(
classhourListTotal
>=
200
){
const
that
=
this
;
const
{
unlockSubjectList
,
moreTheme
}
=
this
.
data
;
if
(
!
unlockSubjectList
[
moreTheme
.
subject_count
-
1
]){
wx
.
showToast
({
icon
:
'none'
,
title
:
'请先编辑上一个关卡'
})
return
}
// let classhourListTotal = this.data.classhourList.length + this.data.unlockSubjectList.length;
// if(classhourListTotal>=200){
// wx.showToast({
// title: '最多添加199关卡',
// icon: 'none',
// duration: 2000
// })
// return false;
// }
// wx.navigateTo({
// url: `/business/pages/morethemeindex/index?id=${this.data.id}&tid=${this.data.tid}&sid=${this.data.sid}&sort=${this.data.allsubject_count+1}&sub=0`
// })
this
.
setData
({
addSubDialogS
:
true
})
},
goAddSub
(){
if
(
this
.
data
.
moreTheme
.
subject_count
>
199
)
{
wx
.
showToast
({
title
:
'最多添加199关卡'
,
icon
:
'none'
,
...
...
@@ -163,11 +189,24 @@ Page({
})
return
false
;
}
if
(
this
.
data
.
moreTheme
.
max_student_clock_count
==
this
.
data
.
moreTheme
.
subject_count
){
wx
.
showToast
({
title
:
'已有学生全部通关,不能添加关卡'
,
icon
:
'none'
,
duration
:
2000
})
return
false
;
}
this
.
addSubDialogHide
();
wx
.
navigateTo
({
url
:
`/business/pages/morethemeindex/index?id=
${
this
.
data
.
id
}
&tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&sort=
${
this
.
data
.
allsubject_count
+
1
}
&sub=0`
url
:
`/business/pages/themeeditorlock/subjecteditor?id=
${
this
.
data
.
id
}
&tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&sort=
${
this
.
data
.
moreTheme
.
subject_count
+
1
}
&sub=0&addSub=1`
})
},
addSubDialogHide
(){
this
.
setData
({
addSubDialogS
:
false
})
},
// 课时编辑
unlockSubjectEdit
(){
const
actSub
=
this
.
data
.
actSub
;
...
...
business/pages/classhourlist/index.wxml
View file @
0fe67afa
...
...
@@ -77,4 +77,13 @@
</view>
</view>
</view>
\ No newline at end of file
<view class="addSub-dialog" wx:if="{{addSubDialogS}}">
<view class="addSub-dialog-content">
<view class="title">提示</view>
<view class="content">确认新增额外关卡?</view>
<view class="footer">
<view class="btn" bindtap="addSubDialogHide">取消</view>
<view class="btn right" bindtap="goAddSub">确定</view>
</view>
</view>
</view>
\ No newline at end of file
business/pages/classhourlist/index.wxss
View file @
0fe67afa
...
...
@@ -357,4 +357,58 @@
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
}
.addSub-dialog{
width: 100%;
height: 100%;
position: fixed;
background:rgba(0,0,0,.5);
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
}
.addSub-dialog .addSub-dialog-content{
width:599rpx;
background:rgba(255,255,255,1);
border-radius:20rpx;
}
.addSub-dialog .addSub-dialog-content .title{
padding-top: 48rpx;
font-size:32rpx;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(0,0,0,1);
line-height: 1;
text-align: center;
}
.addSub-dialog .addSub-dialog-content .content{
padding: 92rpx 0;
text-align: center;
font-size:26rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,1);
line-height:1;
}
.addSub-dialog .addSub-dialog-content .footer{
height: 95rpx;
border-top: 1px solid rgba(0,0,0,.05);
display: flex;
}
.addSub-dialog .addSub-dialog-content .footer .btn{
flex: 1;
text-align: center;
font-size:30rpx;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(67,67,67,1);
line-height:1;
line-height: 85rpx;
}
.addSub-dialog .addSub-dialog-content .footer .right{
color:rgba(101,184,244,1);
border-left:1px solid rgba(0,0,0,.05);
}
\ No newline at end of file
src/pages/websiteindex/index.js
View file @
0fe67afa
...
...
@@ -1591,17 +1591,17 @@ Page({
switch
(
item
.
source_type
)
{
case
1
:
wx
.
navigateTo
({
url
:
`/src/pages/themeindex/index?id=
${
item
.
class_id
}
&tid=
${
item
.
id
}
`
url
:
`/src/pages/themeindex/index?id=
${
item
.
class_id
}
&tid=
${
item
.
source_
id
}
`
})
break
;
case
2
:
wx
.
navigateTo
({
url
:
`/src/pages/calendarthemeindex/index?id=
${
item
.
class_id
}
&tid=
${
item
.
id
}
`
url
:
`/src/pages/calendarthemeindex/index?id=
${
item
.
class_id
}
&tid=
${
item
.
source_
id
}
`
})
break
;
case
3
:
wx
.
navigateTo
({
url
:
`/src/pages/sharemoretheme/index?tid=
${
item
.
id
}
`
url
:
`/src/pages/sharemoretheme/index?tid=
${
item
.
source_
id
}
`
})
break
;
default
:
...
...
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