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
9cc970f0
Commit
9cc970f0
authored
Apr 23, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1a0d37df
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
566 additions
and
18 deletions
+566
-18
sortlist.js
business/pages/themeeditor/sortlist.js
+39
-2
sortlist.json
business/pages/themeeditor/sortlist.json
+2
-10
sortlist.wxml
business/pages/themeeditor/sortlist.wxml
+1
-1
index.js
components/sort-drag/index.js
+399
-0
index.json
components/sort-drag/index.json
+3
-0
index.wxml
components/sort-drag/index.wxml
+34
-0
index.wxss
components/sort-drag/index.wxss
+84
-0
index.js
src/pages/sharemoretheme/index.js
+3
-3
index.wxml
src/pages/sharemoretheme/index.wxml
+1
-2
No files found.
business/pages/themeeditor/sortlist.js
View file @
9cc970f0
import
{
unlockSubjectListGet
,
deletesubjects
}
from
'../../../service/business/common.js'
;
import
Touches
from
'../../../utilities/touchs.js'
var
app
=
getApp
();
...
...
@@ -67,8 +68,44 @@ Page({
lockSubjects
&&
this
.
setData
({
lockSubjects
})
},
itemDelete
(
e
)
{
let
lockSubjects
=
Touches
.
deleteItem
(
e
,
this
.
data
.
lockSubjects
)
lockSubjects
&&
this
.
setData
({
lockSubjects
})
const
that
=
this
;
const
{
item
,
index
}
=
e
.
currentTarget
.
dataset
;
if
(
index
==
0
){
wx
.
showToast
({
title
:
'第一关无法删除'
,
icon
:
'none'
})
return
}
wx
.
showModal
({
title
:
''
,
content
:
item
.
clockCount
>
0
?
'删除后将清空此关卡打卡内容
\
r
\
n 确定要删除吗?'
:
'确定要删除此关卡吗?'
,
confirmColor
:
'#35BAFD'
,
success
(
res
)
{
console
.
log
(
res
);
if
(
res
.
confirm
)
{
deletesubjects
({
id
:
item
.
id
,
school_id
:
that
.
data
.
sid
})
.
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
wx
.
showToast
({
title
:
"删除成功"
,
icon
:
"success"
,
duration
:
2000
});
let
lockSubjects
=
Touches
.
deleteItem
(
e
,
that
.
data
.
lockSubjects
)
lockSubjects
&&
that
.
setData
({
lockSubjects
});
}
})
.
catch
(()
=>
{});
}
}
})
}
})
\ No newline at end of file
business/pages/themeeditor/sortlist.json
View file @
9cc970f0
{
"navigationBarTitleText"
:
"调整关卡顺序"
,
"enablePullDownRefresh"
:
tru
e
,
"enablePullDownRefresh"
:
fals
e
,
"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"
"sort-drag"
:
"../../../components/sort-drag"
}
}
\ No newline at end of file
business/pages/themeeditor/sortlist.wxml
View file @
9cc970f0
...
...
@@ -13,7 +13,7 @@
</view>
<view class="box-opt">
<image class="icon-del" src="{{localImageRoot}}2b/themeeditor/icon_del.png?{{imageVersion}}"></image>
<view class="text" bindtap="itemDelete" data-index="{{index}}">删除</view>
<view class="text" bindtap="itemDelete" data-index="{{index}}"
data-item="{{item}}"
>删除</view>
</view>
</view>
</view>
...
...
components/sort-drag/index.js
0 → 100644
View file @
9cc970f0
This diff is collapsed.
Click to expand it.
components/sort-drag/index.json
0 → 100644
View file @
9cc970f0
{
"component"
:
true
}
components/sort-drag/index.wxml
0 → 100644
View file @
9cc970f0
<view class="list-box" style="height: {{ itemWrapHeight }}px;">
<view
class="list-item {{cur == index ? 'cur':''}} {{curZ == index ? 'zIndex':''}} {{itemTransition && index !== cur ? 'itemTransition':''}} {{item.fixed ? 'fixed' : ''}}"
wx:for="{{list}}"
wx:key="id"
data-key="{{item.sortKey}}"
data-index="{{index}}"
style="transform: translate3d({{index === cur ? tranX + 'px' : item.tranX}}, {{index === cur ? tranY + 'px' : item.tranY}}, 0);width: {{100 / columns}}%"
bindtap="itemClick"
bind:longpress="longPress"
catch:touchmove="{{dragging?'touchMove':''}}"
catch:touchend="{{dragging?'touchEnd':''}}">
<!-- start:请在该区域编写自己的渲染逻辑 -->
<!-- <view wx:if="{{columns === 1 && item.extraNode}}" >
<view class="cell__bd" style="height: 160rpx;">
<slot name="{{item.slot}}"></slot>
</view>
</view> -->
<slot name="slidecontent"></slot>
<!-- <view wx:elif="{{columns > 1 && item.extraNode}}" class="info">
<view class="info__item">
<slot name="{{item.slot}}"></slot>
</view>
</view>
<view wx:elif="{{columns > 1 && !item.extraNode}}" class="info">
<view class="info__item">
<image class="image" src="{{item.data.images}}"></image>
</view>
</view> -->
<!-- end:请在该区域编写自己的渲染逻辑 -->
</view>
</view>
components/sort-drag/index.wxss
0 → 100644
View file @
9cc970f0
.list-box {
position: relative;
padding: 15rpx 24rpx;
}
.list-box .list-item {
position: absolute;
width: 100%;
z-index: 1;
margin-bottom: 8rpx;
}
.list-box .list-item:last-of-type {
margin-bottom: 0;
}
.list-box .list-item.itemTransition {
transition: transform 0.3s !important;
}
.list-box .list-item.zIndex {
z-index: 2;
}
.list-box .list-item.cur {
transition: initial;
}
.list-box .list-item.fixed {
z-index: 0 !important;
}
.list-box .list-item .item-sorttitle {
font-size: 22rpx;
color: #999;
line-height: 30rpx;
padding: 16rpx 0;
}
.list-box .list-item .item-wrap {
background-color: #fff;
height: 100rpx;
position: relative;
border-radius: 20rpx;
overflow: hidden;
}
.list-box .list-item .item-info {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
z-index: 2;
transition: left 0.2s ease-in-out;
background: #fff;
padding: 0 24rpx;
}
.list-box .list-item .item-info .item-title {
font-size: 26rpx;
color: #555;
line-height: 37rpx;
}
.list-box .list-item .item-info .icon-opt {
width: 26rpx;
height: 18rpx;
}
.list-box .list-item .box-opt {
position: absolute;
top: 0;
right: 0;
width: 125rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: red;
border-radius: 0 22rpx 22rpx 0;
}
.list-box .list-item .box-opt .icon-del {
width: 30rpx;
height: 30rpx;
}
.list-box .list-item .box-opt .text {
font-size: 22rpx;
color: #fff;
padding-top: 10rpx;
}
src/pages/sharemoretheme/index.js
View file @
9cc970f0
...
...
@@ -402,12 +402,12 @@ Page({
},
previewbanner
()
{
const
that
=
this
;
if
(
!
that
.
data
.
moreTheme
.
banner
)
{
if
(
!
that
.
data
.
moreTheme
.
land_content
)
{
return
;
}
wxPreviewImage
({
urls
:
[
that
.
data
.
moreTheme
.
bann
er
],
current
:
that
.
data
.
moreTheme
.
bann
er
urls
:
[
that
.
data
.
moreTheme
.
land_content
.
cov
er
],
current
:
that
.
data
.
moreTheme
.
land_content
.
cov
er
});
},
// 视频播放相关代码
...
...
src/pages/sharemoretheme/index.wxml
View file @
9cc970f0
...
...
@@ -8,8 +8,7 @@
</btn-drag>
<view class="sharemoretheme-box">
<view class="top-img-box">
<!-- <image mode="aspectFill" src="https://cdn.img.shangjiadao.cn/source/images/dakav4/morethemeindex/unlockindex.png" class="img-box" alt="Image" /> -->
<image mode="aspectFill" src="{{filter.imagify(moreTheme.banner || 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png')}}" bindtap="previewbanner" class="img-box" alt="Image" />
<image mode="aspectFill" src="{{filter.imagify(moreTheme.land_content.cover || 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png')}}" bindtap="previewbanner" class="img-box" alt="Image" />
</view>
<view class="title-box">{{moreTheme.title}}</view>
<view class="coursecountbox">
...
...
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