Commit 37bede26 authored by lvtz's avatar lvtz

fix

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