Commit 62464282 authored by wangxuelai's avatar wangxuelai

'班级详情添加作业报错'

parent df693d24
......@@ -590,11 +590,7 @@ Page({
modelHideClass: false
})
},
addTheme() {
this.setData({
modalshow: true
})
},
hidemodal() {
this.setData({
modelHideClass: true
......@@ -1199,4 +1195,26 @@ Page({
url: `/business/pages/studentmgt/list?id=${this.data.id}&sid=${this.data.sid}&from=circle&checkedIdStr=${this.data.memberIds}&courseid=${this.data.circleInfo.course.id}`
})
},
toaddTheme() {
this.setData({
modalshow: true
})
},
addTheme(e) {
// if (this.data.classList.length == 0) {
// this.warnToCreateCircle();
// return;
// }
const { createtype } = e.currentTarget.dataset;
let url = "";
// let selectClassId = this.data.circleInfo.id,
const classes = JSON.stringify([{
id: this.data.circleInfo.id,
title: this.data.circleInfo.title
}])
url = `/business/pages/themeeditor/index?tid=0&sid=${this.data.sid}&classes=${encodeURIComponent(classes)}&editType=${createtype}`;
wx.navigateTo({
url: `${url}`
});
},
})
\ No newline at end of file
......@@ -41,7 +41,7 @@
</view>
<view class="bigtab-box {{curBigTab}}">
<view class="shiftitem {{item.bigTabStatus == bigTabStatus?'active':''}}" data-bigtabtype="{{item.bigTabStatus}}" wx:for="{{bigTab}}" bindtap="bigTabShift" wx:key="">
<view class="shiftitem {{item.bigTabStatus == bigTabStatus?'active':''}}" data-bigtabtype="{{item.bigTabStatus}}" wx:for="{{bigTab}}" bindtap="bigTabShift" wx:key="index">
<view class="shiftname">{{item.tabname}}</view>
<view class="shiftline"></view>
</view>
......@@ -52,7 +52,7 @@
<block wx:if="{{bigTabStatus==1}}">
<view class="content-topbox">
<view class="tab-box">
<view class="tab-item {{item.scheduleType == scheduleType?'active':''}}" data-scheduletype="{{item.scheduleType}}" wx:for="{{scheduleTab}}" bindtap="scheduleStatusShift" wx:key="">
<view class="tab-item {{item.scheduleType == scheduleType?'active':''}}" data-scheduletype="{{item.scheduleType}}" wx:for="{{scheduleTab}}" bindtap="scheduleStatusShift" wx:key="index">
<view class="tab-itemname">{{item.tabname}}</view>
</view>
</view>
......@@ -62,7 +62,7 @@
<block class="commonlist-partwrap" wx:for="{{schedulesList}}" wx:key="bigindex" wx:for-index="bigindex">
<view class="commonlist-header">{{item.month}}</view>
<view class="commonlist-box">
<view class="commonlist-item" wx:for="{{item.statics}}" wx:key="" wx:for-item="child">
<view class="commonlist-item" wx:for="{{item.statics}}" wx:for-index="smallindex" wx:key="smallindex" wx:for-item="child">
<view class="item-titlebox">
<view class="item-title">{{filter.matchTime(child.start_time,'month')}}<text class="hour">{{filter.matchTime(child.start_time,'hour')}}-{{filter.matchTime(child.end_time,'hour')}}</text></view>
<view class="itme-statesBox">
......@@ -128,13 +128,13 @@
<block wx:if="{{bigTabStatus==3}}">
<view class="content-topbox">
<view class="tab-box">
<view class="tab-item {{item.themeStatus == themeStatus?'active':''}}" data-themestatus="{{item.themeStatus}}" wx:for="{{themeTab}}" bindtap="subjectStatusShift" wx:key="">
<view class="tab-item {{item.themeStatus == themeStatus?'active':''}}" data-themestatus="{{item.themeStatus}}" wx:for="{{themeTab}}" bindtap="subjectStatusShift" wx:key="index">
<view class="tab-itemname">{{item.tabname}}</view>
</view>
</view>
</view>
<view class="circlelist-content" wx:if="{{!emptyPage}}">
<view class="" wx:for="{{mixedthemeList}}" wx:for-item="listItem" wx:for-index="listIndex" wx:key="{{listIndex}}">
<view class="" wx:for="{{mixedthemeList}}" wx:for-item="listItem" wx:for-index="listIndex" wx:key="listIndex">
<view class="circle-item mb24 {{item.subject_type==2?'rili':''}}" wx:for="{{listItem}}" wx:for-item="item" data-theme="{{item}}" wx:key="index" catchtap="goThemeIndex">
<block wx:if="{{item.subject_type == 1}}">
<image class="taskbg assignmentbg" src="{{imageRoot}}2b/circleindex/assignment.png?{{imageVersion}}"></image>
......@@ -256,7 +256,7 @@
</view>
</view>
<view class="has-nomore" wx:if="{{!hasmore && page>1}}">没有更多了</view>
<view class="form-fixbtn" bindtap="addTheme">发布作业</view>
<view class="form-fixbtn" bindtap="toaddTheme">发布作业</view>
</block>
</view>
<go-top wx:if="{{backTopValue}}"></go-top>
......@@ -282,21 +282,21 @@
<view class="themetypeselectmodal {{modelHideClass ? 'hide' : ''}}" hidden="{{!modalshow}}">
<view class="modalmask" bindtap="hidemodal" ></view>
<view class="modalcontent">
<view class="themetypecard normal" bindtap="createNormalTheme">
<view class="themetypecard normal" bindtap="addTheme" data-createtype="1">
<image class="clocktypeicon" src="{{imageRoot}}2b/circleindex/normalclock.png?{{imageVersion}}"></image>
<view class="clocktypedesc">
<view class="clocktypetitle">作业打卡</view>
<view class="clocktypetext">老师编辑打卡主题内容,合理设置发布时间以及打卡时间段,并且还能定时通知学员打卡。</view>
</view>
</view>
<view class="themetypecard rili mb24" bindtap="createRiliTheme">
<view class="themetypecard rili mb24" bindtap="addTheme" data-createtype="2">
<image class="clocktypeicon" src="{{imageRoot}}2b/circleindex/riliclock.png?{{imageVersion}}"></image>
<view class="clocktypedesc">
<view class="clocktypetitle">日历打卡</view>
<view class="clocktypetext">只需编辑一次主题,完成设定主题打卡周期,以及每日打卡时间规则等个性化设置,系统即可每天自动发布打卡主题。</view>
</view>
</view>
<view class="themetypecard unlock" bindtap="createUnlockTheme">
<view class="themetypecard unlock" bindtap="addTheme" data-createtype="3">
<image class="clocktypeicon" src="{{imageRoot}}2b/circleindex/unlockclock.png?{{imageVersion}}"></image>
<view class="clocktypedesc">
<view class="clocktypetitle">闯关打卡</view>
......
......@@ -82,10 +82,10 @@ Page({
this.themelistGet("up");
},
addTheme(e) {
if (this.data.classList.length == 0) {
this.warnToCreateCircle();
return;
}
// if (this.data.classList.length == 0) {
// this.warnToCreateCircle();
// return;
// }
const { createtype } = e.currentTarget.dataset;
let url = "";
let selectClassId =
......
......@@ -91,7 +91,7 @@ Page({
if (this.data.type == 1) {
extra = 'class';
} else if (this.data.type == 2) {
extra = 'class, my_class';
extra = 'my_class';
}
courseList({
school_id: this.data.sid,
......
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