Commit 9cc970f0 authored by lvtz's avatar lvtz

fix

parent 1a0d37df
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
{
"navigationBarTitleText": "调整关卡顺序",
"enablePullDownRefresh": true,
"enablePullDownRefresh": false,
"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
......@@ -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>
......
This diff is collapsed.
<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>
.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;
}
......@@ -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.banner],
current: that.data.moreTheme.banner
urls: [that.data.moreTheme.land_content.cover],
current: that.data.moreTheme.land_content.cover
});
},
// 视频播放相关代码
......
......@@ -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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment