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
47367233
Commit
47367233
authored
Mar 28, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'闯关打卡新建关卡时添加关卡'
parent
b9f49751
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
6 deletions
+54
-6
index.js
business/pages/themeeditor/index.js
+17
-3
index.wxml
business/pages/themeeditor/index.wxml
+2
-3
index.wxss
business/pages/themeeditor/index.wxss
+35
-0
No files found.
business/pages/themeeditor/index.js
View file @
47367233
...
...
@@ -240,7 +240,8 @@ Page({
radioList
:
[
],
radioname
:
''
,
confirmId
:
0
confirmId
:
0
,
// has_subjects_count: 0
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
that
=
this
;
...
...
@@ -355,7 +356,6 @@ Page({
this
.
setData
({
subjecSort
:
bigArr
,
})
console
.
log
(
bigArr
,
'bigArr'
);
},
onReady
:
function
()
{
// Do something when page ready.
...
...
@@ -1966,6 +1966,9 @@ Page({
if
(
value
>
199
)
{
value
=
199
;
}
if
(
value
==
0
)
{
value
=
1
;
}
this
.
setData
({
copySubjectCount
:
Number
(
value
)
})
...
...
@@ -1984,6 +1987,13 @@ Page({
},
sureChangePsd
()
{
const
lockSubjects
=
this
.
data
.
lockSubjects
;
if
(
this
.
data
.
copySubjectCount
==
0
)
{
wx
.
showToast
({
title
:
'关卡数不能为0'
,
icon
:
'none'
})
return
;
}
if
(
this
.
data
.
copySubjectCount
>=
this
.
data
.
lockparams
.
subject_count
)
{
for
(
let
i
=
0
;
i
<
this
.
data
.
copySubjectCount
-
this
.
data
.
lockparams
.
subject_count
;
i
++
)
{
lockSubjects
.
push
({
...
...
@@ -2044,7 +2054,9 @@ Page({
const
{
item
,
index
,
}
=
e
.
currentTarget
.
dataset
;
const
sort
=
this
.
data
.
currentSortIndex
*
10
+
index
+
1
;
let
addSort
=
0
;
// 是否是新增的主题
if
(
this
.
id
>
0
&&
sort
>
this
.
lockparams
.
subject_count
)
{
console
.
log
(
this
.
data
.
lockparams
.
has_subjects_count
,
'this.data.lastSubjectCount'
);
console
.
log
(
sort
,
'sort'
);
if
(
this
.
data
.
tid
>
0
&&
sort
>
this
.
data
.
lockparams
.
has_subjects_count
)
{
addSort
=
1
;
}
wx
.
navigateTo
({
...
...
@@ -2361,7 +2373,9 @@ Page({
push_status
:
data
.
push_status
,
push_time
:
data
.
push_time
,
sign_up_status
:
data
.
sign_up_status
,
has_subjects_count
:
data
.
has_subjects_count
,
},
lastSubjectCount
:
Number
(
data
.
subject_count
),
radioname
:
data
.
sign_up_content
?
data
.
sign_up_content
.
radioname
:
''
,
radioList
:
data
.
sign_up_content
?
data
.
sign_up_content
.
radioList
:
''
,
lockSubjects
:
lockSubjects
,
...
...
business/pages/themeeditor/index.wxml
View file @
47367233
...
...
@@ -321,7 +321,6 @@
</view>
</view>
<view class="locksubjectlist">
<!-- <view class="locksubjectitem" wx:for="{{lockSubjects.slice(currentSortIndex * 10,currentSortIndex * 10 + 10)}}" wx:key="index"> -->
<view class="locksubjectitem" wx:for="{{lockSubjectLists}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="goModifyClockSubject">
<view class="topbox">
<view class="sorttitle">第{{currentSortIndex * 10 + index + 1}}关</view>
...
...
@@ -340,8 +339,8 @@
<view class="modal-dialog" wx:if="{{changesubjectCountInputShow}}">
<view class="modal-mask"></view>
<view class="modal-box">
<input type="number" placeholder="请输入闯关打卡关卡总数" value="{{copySubjectCount}}" bindinput="subjectCountInput" />
<view>
<input type="number" placeholder="请输入闯关打卡关卡总数"
class="inputPsd"
value="{{copySubjectCount}}" bindinput="subjectCountInput" />
<view
class="modal-btn-box"
>
<view class="modal-btn" bindtap="hideChangePsd">关闭</view>
<view class="modal-btn" bindtap="sureChangePsd">确定</view>
</view>
...
...
business/pages/themeeditor/index.wxss
View file @
47367233
...
...
@@ -961,4 +961,39 @@ page{
justify-content: center;
margin: 0 auto;
margin-top: 46rpx;
}
.modal-btn-box {
display: flex;
align-items: center;
}
.modal-dialog .modal-box .modal-btn{
width: 100%;
height: 100rpx;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
border-top: 1px solid rgba(0,0,0,.05);
font-size: 30rpx;
color: #434343;
font-weight: bold;
}
.modal-dialog .modal-box .inputPsd {
width: 420rpx;
height: 78rpx;
border-radius: 38rpx;
background:rgba(238,238,237,1);
display: block;
margin: 80rpx auto;
text-align: center;
padding: 0 30rpx;
}
.modal-dialog .modal-box .modal-btn:first-child {
border-right: 1px solid rgba(0,0,0,.05);
}
.modal-dialog .modal-box .modal-btn:last-child {
color: #65B8F4;
}
.borderbottom1px {
border-bottom: 1px solid #F1F2F3;
}
\ 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