Commit 5810f23f authored by wangxuelai's avatar wangxuelai

'ss'

parent 8b96cfc4
......@@ -303,7 +303,7 @@
</view>
<view class="comment-content" wx:if="{{type!=1}}">
<view class="commen-comment-box" wx:if="{{clock.comments && clock.comments.total}}">
<view class="response-item" wx:for="{{clock.comments.list}}" wx:for-item="comment" wx:for-index="id" wx:key="{{id}}">
<view class="response-item" wx:for="{{clock.comments.list}}" wx:for-item="comment" wx:for-index="id" wx:key="id">
<text class="nickname" data-type="child" data-comment="{{comment}}" bindtap="goUserGrowthRecord">{{comment.nickname.length > 9 ? filter.slice(comment.nickname, 8) : comment.nickname}}</text>
<view class="teacher-tag" wx:if="{{comment.comment_user_type!=2}}">老师</view>
<text class="maohao" wx:if="{{!comment.comment_passive_user_id}}">:</text>
......
......@@ -120,7 +120,7 @@ Page({
this.setData({
sid: sid || 0,
my: my || 0,
id,
id: id || 0,
});
this.getClassList('init');
},
......
......@@ -3,7 +3,7 @@ import {
constants
} from '../../../constants/index.js';
import {
subjectReviewTemplate
classReviewTemplate
} from '../../../service/business/commenteditor.js';
import {
bOssAccess,
......@@ -146,7 +146,7 @@ Page({
})
},
subjectReviewTemplate (templatesList) {
subjectReviewTemplate({
classReviewTemplate({
class_id: this.data.id
}).then((res) => {
const {code, data} = res;
......@@ -209,7 +209,7 @@ Page({
},
goModifyScoreTemp () {
wx.navigateTo({
url: `/business/pages/commenteditor/modifyscoretemp?id=${this.data.id}`,
url: `/business/pages/commenteditor/modifyscoretemp?id=${this.data.id}&type=class`,
})
},
// 点评可见对象
......
......@@ -181,7 +181,7 @@
</view>
<view class="section setting-box">
<view class="setting-item">
<view class="inner-item" wx:for="{{visibieTab}}" wx:key="" data-visibiestatus="{{item.status}}" bindtap="changeVisibleStatus">
<view class="inner-item" wx:for="{{visibieTab}}" wx:key="index" data-visibiestatus="{{item.status}}" bindtap="changeVisibleStatus">
<image class="icon-radiobox" src="{{imageRoot}}2b/common/radioactive2.png?{{imageVersion}}" wx:if="{{item.status == visibieStatus}}"></image>
<image class="icon-radiobox" src="{{imageRoot}}2b/common/radiono.png?{{imageVersion}}" wx:else></image>
<view class="radiotitle">{{item.name}}</view>
......
......@@ -5,7 +5,7 @@
</view>
<view class="header-tab">
<view class="tab-item {{item.type == bigTabType?'active':''}}" wx:for="{{bigTab}}" data-type="{{item.type}}" wx:key="" bindtap="bigTabChange">{{item.name}}</view>
<view class="tab-item {{item.type == bigTabType?'active':''}}" wx:for="{{bigTab}}" data-type="{{item.type}}" wx:key="index" bindtap="bigTabChange">{{item.name}}</view>
</view>
<view class="tempRemark-box" wx:if="{{bigTabType==1}}">
<view class="temp-singlebox {{tempListExpend==bigindex? 'active': ''}}" wx:for="{{tempRemarkList}}" wx:key="bigindex" wx:for-index="bigindex">
......@@ -15,7 +15,7 @@
<image class="icon-arr {{tempListExpend==bigindex? 'active': ''}}" src="{{imageRoot}}2b/common/right.png?{{imageVersion}}"></image>
</view>
<view class="temp-list">
<text class="temp-item" wx:for="{{item.list}}" wx:key="" wx:for-item="child" bindtap="pushContent" data-pushcontent="{{child}}">{{child}}</text>
<text class="temp-item" wx:for="{{item.list}}" wx:key="index" wx:for-item="child" bindtap="pushContent" data-pushcontent="{{child}}">{{child}}</text>
</view>
</view>
</view>
......@@ -26,7 +26,7 @@
<view class="title">最近常用自动收藏您最近10次的点评文本,锁住即代表该语录不会被您新的点评文本替换</view>
</view>
<view class="memoryRemark-list" wx:if="{{memoryRemarkList.length>0}}">
<view class="memoryRemark-item" wx:for="{{memoryRemarkList}}" wx:key="">
<view class="memoryRemark-item" wx:for="{{memoryRemarkList}}" wx:key="index">
<image class="icon-lock" src="{{imageRoot}}2b/common/review_locked.png?{{imageVersion}}" wx:if="{{item.is_lock==2}}" data-id="{{item.id}}" data-togglelock='1' bindtap="memoryRemarkLock"></image>
<image class="icon-lock" src="{{imageRoot}}2b/common/review_lock.png?{{imageVersion}}" wx:else data-id="{{item.id}}" data-togglelock='2' bindtap="memoryRemarkLock"></image>
<text class="memory-item" bindtap="pushContent" data-pushcontent="{{item.word}}">{{item.word}}</text>
......
......@@ -9,7 +9,9 @@ import {
import {
subjectReviewTemplateUpdate,
subjectReviewTemplate,
tempApplyAllClass
tempApplyAllClass,
classReviewTemplate,
classReviewTemplateUpdate
} from '../../../service/business/commenteditor.js';
import {
bOssAccess,
......@@ -32,8 +34,10 @@ Page({
data: {
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
id: 0,
tid: 0,
subjecttype: 1,
type: 'subject', // class 班级点评 subject 作业点评
templates: {
// 'tmp_1': '智力分',
// 'tmp_2': '课堂表现',
......@@ -45,12 +49,17 @@ Page({
const {
tid,
subjecttype,
type,
id
} = options;
this.setData({
tid,
subjecttype
tid: tid || 0,
subjecttype: subjecttype || 1,
type: type || 'subject',
id: id || 0
})
wx.hideShareMenu()
wx.hideShareMenu();
this.subjectReviewTemplate();
},
onReady: function () { // Do something when page ready.
......@@ -80,10 +89,18 @@ Page({
title: '数据加载中...',
mask: true,
})
subjectReviewTemplate({
subject_id: this.data.tid,
subject_type: this.data.subjecttype,
}).then((res) => {
let ajax = null;
if (this.data.type == 'class') {
ajax = classReviewTemplate({
class_id: this.data.id,
})
} else if (type == 'subject') {
ajax = subjectReviewTemplate({
subject_id: this.data.tid,
subject_type: this.data.subjecttype,
})
}
ajax.then((res) => {
const {code , data} = res;
wx.hideLoading()
if (code == 200) {
......@@ -120,10 +137,19 @@ Page({
title: '保存中...',
mask: true,
})
subjectReviewTemplateUpdate({
subject_id: this.data.tid,
templates: JSON.stringify(tempArr),
}).then((res) => {
let ajax = null;
if (this.data.type == 'subject') {
ajax = subjectReviewTemplateUpdate({
subject_id: this.data.tid,
templates: JSON.stringify(tempArr),
})
} else if (this.data.type == 'class') {
ajax = classReviewTemplateUpdate({
class_id: this.data.id,
templates: JSON.stringify(tempArr),
})
}
ajax.then((res) => {
wx.hideLoading();
const { code, data } = res;
if (code == 200) {
......@@ -131,20 +157,6 @@ Page({
title:' 保存成功',
})
this.goBack();
// if (useall == 0) {
// } else if (useall == 1) {
// wx.showModal({
// title: '提示',
// content: '是否将该模板应用到该校区的所有班级',
// success(res) {
// if (res.confirm) {
// that.tempApplyAllClass();
// } else {
// that.goBack();
// }
// }
// })
// }
}
}).catch(() => {
wx.hideLoading();
......@@ -165,19 +177,4 @@ Page({
delta: 1, // 回退前 delta(默认为1) 页面
})
},
// tempApplyAllClass () {
// tempApplyAllClass({
// class_id: this.data.id
// }).then((res) => {
// const { code, data } = res;
// if (code == 200) {
// wx.showToast({
// title:'应用成功',
// })
// this.goBack();
// }
// }).catch(() => {
// })
// }
})
\ No newline at end of file
......@@ -89,15 +89,6 @@
<view class="footer" bindtap="hideNoticeDailog">知道了</view>
</view>
</view>
<!-- 底部按钮 -->
<!-- <view class="fixed-tabbar" style="background-image: url('{{imageRoot}}2b/themeindex/bottomTabbar.png?{{imageVersion}}')">
<view class="tabbar-list">
<view class="tabbar-item" bindtap="settingSubject" style="margin-left: 0">
<image class="tabbar-img" src="{{imageRoot}}2b/themeindex/tabbar_setting.png"></image>
<text class="tabbar-text">编辑关卡</text>
</view>
</view>
</view> -->
<view class="form-fixbtn" bindtap="settingSubject">编辑关卡</view>
<!-- 详情弹框 -->
<view class="modal modal-themedetail {{detailModalClass? 'hide': ''}}" hidden="{{!detailModalShow}}">
......@@ -129,43 +120,4 @@
</view>
</view>
</view>
<!-- 高级设置弹框 -->
<!-- <view class="modal modal-setup {{settingModalClass? 'hide': ''}}" hidden="{{!settingModalShow}}">
<view class="mask" bindtap="closeSettingModal"></view>
<view class="modal-content">
<view class="modal-title">
高级设置
<image class="icon-close" src="{{imageRoot}}2b/themeindex/close_icon.png" bindtap="closeSettingModal"></image>
</view>
<view class="setting-list">
<view class="setting-item" bindtap="goMembers">
<view class="left">
<view class="item-label">成员管理</view>
<view class="item-desc">已打卡学生管理、点评老师管理</view>
</view>
<view class="right">
<image class="icon-arr" src="{{imageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
<view class="setting-item" bindtap="toEdit">
<view class="left">
<view class="item-label">作业打卡设置</view>
<view class="item-desc">作业内容、作业要求、参与打卡方式等设置</view>
</view>
<view class="right">
<image class="icon-arr" src="{{imageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
<view class="setting-item">
<view class="left">
<view class="item-label">打卡营销页设置</view>
<view class="item-desc">配置此页面后可在学生加入打卡前展示,此功能可收集有意向学生的联系方式。 <text class="more-tip">了解更多</text></view>
</view>
<view class="right">
<image class="icon-arr" src="{{imageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
</view>
</view>
</view> -->
<commentClockItemShare id="shareClockItem" info="{{goShareClockItem.info}}" shareModalShow="{{goShareClockItem.shareModalShow}}" bind:closeShareModal="closeShareModal"shareModalClass="{{goShareClockItem.shareModalClass}}" />
\ No newline at end of file
......@@ -475,6 +475,7 @@ const apis = {
reviewDel: `${api}member/reviews`,
activeReviewDel: `${api}member/active/reviews`,
subjectReviewTemplate: `${api}member/subject_review_template`, // 点评打分模板
classReviewTemplate: `${api}member/class_review_template`,
tempApplyAllClass: `${api}member/subject_review_template/apply_all_class`,
memoryRemarkApi: `${api}member/classroom_review/shortword`,//课堂点评快捷短语
memoryRemarkLock: `${api}member/classroom_review/shortword/lock_short_word`,//课堂点评快捷短语加锁解锁
......
......@@ -115,6 +115,24 @@ function subjectReviewTemplate(data) {
errorresolve: 1,
})
}
function classReviewTemplate(data) {
return wxRequest({
role: '2b',
url: apis.business.commentEditor.classReviewTemplate,
data,
method: 'GET',
errorresolve: 1,
})
}
function classReviewTemplateUpdate(data) {
return wxRequest({
role: '2b',
url: apis.business.commentEditor.classReviewTemplate,
data,
method: 'POST',
errorresolve: 1,
})
}
function subjectReviewTemplateUpdate(data) {
return wxRequest({
role: '2b',
......@@ -188,4 +206,6 @@ export {
memoryRemarkLock,
tempApplyAllClass,
activeReviewsMake,
classReviewTemplate,
classReviewTemplateUpdate,
}
\ No newline at end of file
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