Commit 37bede26 authored by lvtz's avatar lvtz

fix

parents 881923cf 60b9b4de
......@@ -1212,6 +1212,7 @@ Page({
id: this.data.circleInfo.id,
title: this.data.circleInfo.title
}])
console.log(classes, 'classes');
url = `/business/pages/themeeditor/index?tid=0&sid=${this.data.sid}&classes=${encodeURIComponent(classes)}&editType=${createtype}`;
wx.navigateTo({
url: `${url}`
......
......@@ -123,7 +123,6 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
},
......@@ -132,7 +131,7 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
this.setData({
audioStorage: {
}
......
......@@ -1083,7 +1083,8 @@ Page({
let audioStorage = this.data.audioStorage;
if (audioStorage[value] && audioStorage[value].play) { // 如果当前是播放状态 删除录音的操作要把录音销毁掉
delete audioStorage[value]
this.innerAudioContext.pause();
// this.innerAudioContext.pause();
this.resetAudiosPlayStatus();
clearInterval(this.data.voiceInterval);
}
this.setData({
......
......@@ -95,12 +95,11 @@ Page({
},
onHide: function() { // Do something when page hide.
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
},
onUnload: function() { // Do something when page close.
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
this.setData({
audioStorage: {
}
......
......@@ -151,7 +151,7 @@ Page({
},
doodleStart(e) {
this.lineWidth = 6;
this.lineWidth = 3;
this.lineColor = this.data.colors[this.data.ActColorIndex];
this.doodleStartX = e.touches[0].x
this.doodleStartY = e.touches[0].y
......@@ -185,7 +185,7 @@ Page({
{
x,
y,
lineWidth: 6,
lineWidth: 3,
color: this.lineColor,
}
)
......
......@@ -153,7 +153,7 @@
}
.color-box {
width: 100%;
height:140rpx;
/* height:140rpx; */
background:linear-gradient(0deg,rgba(20,20,20,.3) 0%,rgba(20,20,20,0) 100%);
position: absolute;
left: 0;
......@@ -170,12 +170,12 @@
justify-content: center;
}
.color-box .content .color-item{
width:80rpx;
height:80rpx;
width:60rpx;
height:60rpx;
border:3rpx solid rgba(255,255,255,1);
border-radius:50%;
box-sizing: border-box;
margin-right: 10rpx;
margin-right: 26rpx;
}
.color-box .content .act-color-item{
border:7rpx solid rgba(255,255,255,1);
......
......@@ -118,13 +118,12 @@ Page({
},
onHide: function () {
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
},
onUnload: function () {
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
this.setData({
audioStorage: {}
})
......
......@@ -170,12 +170,10 @@ Page({
}
},
onHide: function() { // Do something when page hide.
// this.innerAudioContext.pause();
this.resetAudiosPlayStatus();
clearInterval(this.data.voiceInterval);
},
onUnload: function() { // Do something when page close.
// this.innerAudioContext.pause();
this.resetAudiosPlayStatus();
this.setData({
audioStorage: {}
......
......@@ -97,13 +97,12 @@ Page({
}
},
onHide: function () {
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
this.data.showRefresh = false;
},
onUnload: function () {
this.innerAudioContext.pause();
this.resetAudiosPlayStatus();
this.setData({
audioStorage: {}
})
......@@ -478,19 +477,8 @@ Page({
that.setData({
audioStorage,
})
// setTimeout((e)=>{
// this.data.audioStorage[value].isWaiting = false;
// this.setData({
// audioStorage: this.data.audioStorage
// })
// },5000)
})
// audioStorage[value].innerAudioContext.onPlay((e) => {
// console.log('dasdad');
// that.voiceIntervalPlay(value);
// })
audioStorage[value].innerAudioContext.onTimeUpdate((e) => {
console.log('sss');
const { actPalyaudioValue, audioStorage} = this.data
if (audioStorage[value].isWaiting) {
clearInterval(that.data.voiceInterval);
......
......@@ -108,12 +108,10 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide: function() { // Do something when page hide.
// this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
},
onUnload: function() { // Do something when page close.
// this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
this.setData({
audioStorage: {
......
......@@ -278,26 +278,33 @@ Page({
}
this.setData({
classes: currentclasses,
'params.join_rule_type': currentclasses.length > 0 ? 4 : 1
'params.join_rule_type': currentclasses.length > 0 ? 4 : 1,
'params.class_ids': currentclasses.map(ele => ele.id).join(',')
})
console.log(this.data.params, 'params');
console.log(this.data.classes, 'classes');
} else if (editType == 2) {
wx.setNavigationBarTitle({
title: '新建日历打卡'
})
this.setData({
classes: currentclasses,
'calendarparams.join_rule_type': currentclasses.length > 0 ? 4 : 1
'calendarparams.join_rule_type': currentclasses.length > 0 ? 4 : 1,
'calendarparams.class_ids': currentclasses.map(ele => ele.id).join(',')
})
console.log(this.data.calendarparams, 'calendarparams');
console.log(this.data.classes, 'classes');
} else if (editType == 3) {
wx.setNavigationBarTitle({
title: '新建闯关打卡'
})
this.setData({
lockSubjectLists: this.data.lockSubjects.slice(that.data.currentSortIndex * 10, that.data.currentSortIndex * 10 + 10),
lockSubjectLists: this.data.lockSubjects.slice(that.data.currentSortIndex * 5, that.data.currentSortIndex * 5 + 5),
})
this.setData({
classes: currentclasses,
'lockparams.join_rule_type': currentclasses.length > 0 ? 4 : 1
'lockparams.join_rule_type': currentclasses.length > 0 ? 4 : 1,
'lockparams.class_ids': currentclasses.map(ele => ele.id).join(',')
})
this.getSubjectSort();
}
......@@ -358,7 +365,7 @@ Page({
let smallArr = [];
let subject_count = this.data.lockparams.subject_count;
for (let i = 1; i < subject_count + 1; i ++) {
if (i%10 == 0) {
if (i%5 == 0) {
smallArr.push(i);
bigArr.push(smallArr);
smallArr = [];
......@@ -1823,7 +1830,7 @@ Page({
title: '新建闯关打卡'
})
this.setData({
lockSubjectLists: this.data.lockSubjects.slice(this.data.currentSortIndex * 10, this.data.currentSortIndex * 10 + 10),
lockSubjectLists: this.data.lockSubjects.slice(this.data.currentSortIndex * 5, this.data.currentSortIndex * 5 + 5),
})
this.getSubjectSort();
}
......@@ -2063,7 +2070,7 @@ Page({
'lockparams.subject_count': this.data.copySubjectCount,
copySubjectCount: 0,
lockSubjects: lockSubjects,
lockSubjectLists: lockSubjects.slice(this.data.currentSortIndex * 10, this.data.currentSortIndex * 10 + 10),
lockSubjectLists: lockSubjects.slice(this.data.currentSortIndex * 5, this.data.currentSortIndex * 5 + 5),
})
this.getSubjectSort();
} else {
......@@ -2073,13 +2080,17 @@ Page({
content: `您当前设置的关卡数${that.data.copySubjectCount}关小于设置前的关卡数${that.data.lockparams.subject_count}关,会丢失最后${that.data.lockparams.subject_count - that.data.copySubjectCount}关,您确定吗?`,
success: (res) => {
if (res.confirm) {
if (this.data.currentSortIndex > Math.floor(that.data.copySubjectCount / 5)) {
that.data.currentSortIndex = Math.floor(that.data.copySubjectCount / 5)
}
lockSubjects.splice(that.data.copySubjectCount);
that.setData({
changesubjectCountInputShow: false,
'lockparams.subject_count': that.data.copySubjectCount,
copySubjectCount: 0,
lockSubjects,
lockSubjectLists: lockSubjects.slice(that.data.currentSortIndex * 10, that.data.currentSortIndex * 10 + 10),
currentSortIndex: that.data.currentSortIndex,
lockSubjectLists: lockSubjects.slice(that.data.currentSortIndex * 5, that.data.currentSortIndex * 5 + 5),
})
that.getSubjectSort();
}
......@@ -2091,13 +2102,13 @@ Page({
const { index, item } = e.currentTarget.dataset;
this.setData({
currentSortIndex: index,
lockSubjectLists: this.data.lockSubjects.slice(index * 10, index * 10 + 10),
lockSubjectLists: this.data.lockSubjects.slice(index * 5, index * 5 + 5),
})
},
// 去编辑关卡内容
goModifyClockSubject (e) {
const { item, index, } = e.currentTarget.dataset;
const sort = this.data.currentSortIndex * 10 + index + 1;
const sort = this.data.currentSortIndex * 5 + index + 1;
let addSort = 0; // 是否是新增的主题
let lockSubjectLists = this.data.lockSubjects;
if (sort >= 2) {
......@@ -2446,7 +2457,7 @@ Page({
id: (data.land_content && data.land_content.id) || 0,
title: (data.land_content && data.land_content.title) || ''
},
lockSubjectLists: lockSubjects.slice(this.data.currentSortIndex * 10, this.data.currentSortIndex * 10 + 10)
lockSubjectLists: lockSubjects.slice(this.data.currentSortIndex * 5, this.data.currentSortIndex * 5 + 5)
})
this.getSubjectSort();
......
......@@ -73,6 +73,7 @@
{{params.startDate}} {{params.startTime}}
</picker>
</view>
<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"/>
</view>
</view>
</view>
......@@ -87,6 +88,7 @@
{{params.endDate}} {{params.endTime}}
</picker>
</view>
<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"/>
</view>
</view>
</view>
......@@ -172,6 +174,7 @@
{{calendarparams.startDate}} {{calendarparams.startTime}}
</picker>
</view>
<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"/>
</view>
</view>
</view>
......@@ -186,6 +189,7 @@
{{calendarparams.endDate}} {{calendarparams.endTime}}
</picker>
</view>
<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"/>
</view>
</view>
</view>
......@@ -312,7 +316,7 @@
<view class="locksubjectlist">
<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>
<view class="sorttitle">第{{currentSortIndex * 5 + index + 1}}关</view>
<view class="editbtn">编辑</view>
</view>
<view class="subjecttitle">{{item.title || '未设置'}}</view>
......
......@@ -200,7 +200,7 @@ page{
}
.section-item{
/* border-radius: 20rpx; */
padding: 40rpx 21rpx;
padding: 40rpx 24rpx;
background: #fff;
}
.section-tip{
......@@ -245,7 +245,7 @@ page{
margin-bottom: 30rpx;
}
.section-item .form-item.time {
justify-content: flex-start;
/* justify-content: flex-start; */
}
.section-item .form-item.time .item-r {
margin-left: 24rpx;
......
......@@ -270,6 +270,8 @@ Page({
wx.navigateTo({
url: `/business/pages/themeeditor/chooseclass?sid=${this.data.sid}&class_ids=${encodeURIComponent(JSON.stringify(class_ids))}`,
})
} else {
}
if (this.data.join_rule_type == type) {
return;
......@@ -305,13 +307,15 @@ Page({
push_status,
join_rule_type,
join_secret,
class_ids,
classes,
// class_ids,
// classes,
supplement_num,
editType,
max_clock_count,
unlock_limit,
} = this.data;
let class_ids = this.data.class_ids;
let classes = this.data.classes;
if (join_rule_type == 3 && join_secret == '') {
wx.showToast({
title: '请输入密码',
......@@ -327,7 +331,10 @@ Page({
})
return;
}
console.log()
if (join_rule_type == 1 || join_rule_type == 3) {
class_ids = '';
classes = [];
}
let currPage = null; //当前页面
let prevPage = null; //上一个页面
if (pages.length >= 2) {
......
......@@ -165,12 +165,10 @@ Page({
}
},
onHide: function() { // Do something when page hide.
// this.innerAudioContext.pause();
this.resetAudiosPlayStatus();
clearInterval(this.data.voiceInterval);
},
onUnload: function() { // Do something when page close.
// this.innerAudioContext.pause();
this.resetAudiosPlayStatus();
this.setData({
audioStorage: {}
......
......@@ -132,8 +132,8 @@
<view class="tip">学校首页</view>
</view>
<!-- 没有手机号 需要授权-->
<button class="btn btn-clock" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{studentMobile=='' && !hadAuthMobile}}">加入打卡</button>
<view class="btn btn-clock" bindtap="goClock">{{themeSelect.is_join==1 ? (themeSelect.is_clock ? '已打卡' : '去打卡') : '加入打卡'}}</view>
<button class="btn btn-clock" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{ studentMobile=='' && !hadAuthMobile}}">加入打卡</button>
<view class="btn btn-clock" bindtap="goClock" wx:else>{{themeSelect.is_join==1 ? (themeSelect.is_clock ? '已打卡' : '去打卡') : '加入打卡'}}</view>
</view>
</view>
......
......@@ -591,6 +591,7 @@ page {
color: #fff;
letter-spacing: 4rpx;
box-shadow: 0 0 20rpx rgba(254, 169, 23, 0.8);
line-height: 90rpx;
}
.clock-trouble {
display: flex;
......
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