提交 052b3620 authored 作者: GOD_ZYX's avatar GOD_ZYX

update

...@@ -41,7 +41,7 @@ const getCourseList = (isMy, param, callback) => { ...@@ -41,7 +41,7 @@ const getCourseList = (isMy, param, callback) => {
status: _cur.is_enabled ? '已发布' : '未发布', status: _cur.is_enabled ? '已发布' : '未发布',
time: cur.begin_date.split(' ')[0] + ' 至 ' + cur.end_date.split(' ')[0], time: cur.begin_date.split(' ')[0] + ' 至 ' + cur.end_date.split(' ')[0],
myStatus: cur.selected != 0 ? (cur.score ? ('总成绩:' + cur.score) : '已选修') : '未选修', myStatus: cur.selected != 0 ? (cur.score ? ('总成绩:' + cur.score) : '已选修') : '未选修',
progress: cur.course_progress + '%' progress: cur.video_progress + '%'
}) })
} }
callback(json) callback(json)
...@@ -66,7 +66,7 @@ const getCourseDetail = (id, sid, callback) => { ...@@ -66,7 +66,7 @@ const getCourseDetail = (id, sid, callback) => {
arrTab: [((_cur && _cur.curriculum_credit || 0) + '学分'), str1, cur.semester_name], arrTab: [((_cur && _cur.curriculum_credit || 0) + '学分'), str1, cur.semester_name],
status: _cur.is_enabled ? '已发布' : '未发布', status: _cur.is_enabled ? '已发布' : '未发布',
time: cur.begin_date.split(' ')[0] + ' 至 ' + cur.end_date.split(' ')[0], time: cur.begin_date.split(' ')[0] + ' 至 ' + cur.end_date.split(' ')[0],
progress: cur.course_progress + '%' progress: cur.video_progress + '%'
}, },
tabs0Content: {}, tabs0Content: {},
tabs1ChapterList: {} tabs1ChapterList: {}
...@@ -160,6 +160,7 @@ const getCourseAssess = (cid, sid, callback) => { ...@@ -160,6 +160,7 @@ const getCourseAssess = (cid, sid, callback) => {
let __ = _.sections[j] let __ = _.sections[j]
tempArr.push({ tempArr.push({
name: __.title, name: __.title,
created_time: __.created_time || '暂未提交',
score: __.score || '0' score: __.score || '0'
}) })
} }
...@@ -175,6 +176,7 @@ const getCourseAssess = (cid, sid, callback) => { ...@@ -175,6 +176,7 @@ const getCourseAssess = (cid, sid, callback) => {
video: video, video: video,
homewrok: homewrok, homewrok: homewrok,
essay: { essay: {
created_time: cur.essay_evaluation.created_time || '',
status: cur.essay_evaluation.status || '暂无', status: cur.essay_evaluation.status || '暂无',
score: cur.essay_evaluation.score || '暂无' score: cur.essay_evaluation.score || '暂无'
} }
......
...@@ -50,16 +50,18 @@ ...@@ -50,16 +50,18 @@
<view class='table-title'>试题及主观题</view> <view class='table-title'>试题及主观题</view>
<view class='table'> <view class='table'>
<view class='th'> <view class='th'>
<view class='col2-td1'>章节</view> <view class='col3-td1'>章节</view>
<view class='col2-td2'>得分</view> <view class='col3-td2' style="width: 180rpx;">提交时间</view>
<view class='col3-td3' style="width: 64rpx;">得分</view>
</view> </view>
<block wx:for='{{item.assess.homewrok}}' wx:key='{{index}}' wx:for-item='item1'> <block wx:for='{{item.assess.homewrok}}' wx:key='{{index}}' wx:for-item='item1'>
<view class='tb'> <view class='tb'>
<view class='tt'>{{item1.title}}</view> <view class='tt'>{{item1.title}}</view>
<block wx:for='{{item1.arr}}' wx:key='{{index}}' wx:for-item='item2'> <block wx:for='{{item1.arr}}' wx:key='{{index}}' wx:for-item='item2'>
<view class='rd'> <view class='rd'>
<view class='col2-td1'>{{item2.name}}</view> <view class='col3-td1'>{{item2.name}}</view>
<view class='col2-td2'>{{item2.score}}</view> <view class='col3-td2' style="width: 190rpx; font-size: 18rpx;">{{item2.created_time}}</view>
<view class='col3-td3' style="width: 54rpx;">{{item2.score}}</view>
</view> </view>
</block> </block>
</view> </view>
...@@ -69,6 +71,9 @@ ...@@ -69,6 +71,9 @@
</block> </block>
</view> </view>
<view class='table-title'>大作业</view> <view class='table-title'>大作业</view>
<block wx:if='{{item.assess.essay.created_time}}'>
<view class='status-text'>提交时间:{{item.assess.essay.created_time}}</view>
</block>
<view class='status-text'>状 态:{{item.assess.essay.status}}</view> <view class='status-text'>状 态:{{item.assess.essay.status}}</view>
<view class='status-text'>得 分:{{item.assess.essay.score}}</view> <view class='status-text'>得 分:{{item.assess.essay.score}}</view>
</view> </view>
......
...@@ -350,7 +350,7 @@ Page({ ...@@ -350,7 +350,7 @@ Page({
} }
}, },
/* 增加定时器,每过2000ms,把数据存入localStorage一次 并 提交一次 */ /* 增加定时器,每过10000ms,把数据存入localStorage一次 并 提交一次 */
setHeartbeat: function () { setHeartbeat: function () {
let _data = this.data let _data = this.data
/* 页面进入时只初始化一次 */ /* 页面进入时只初始化一次 */
...@@ -361,8 +361,9 @@ Page({ ...@@ -361,8 +361,9 @@ Page({
if (this.data.initVAFlag) return; if (this.data.initVAFlag) return;
let arr = _data.ctrlBar.currentTime.split(':'), tempTime = parseInt(arr[0] * 60) + parseInt(arr[1]); let arr = _data.ctrlBar.currentTime.split(':'), tempTime = parseInt(arr[0] * 60) + parseInt(arr[1]);
this.setData({ 'ctrlBar.initial_time': tempTime }) this.setData({ 'ctrlBar.initial_time': tempTime })
wx.setStorageSync('videoCacheCtrlBar', _data.ctrlBar) /* 这里改成异步的,试一下 */
wx.setStorageSync('audioCacheCtrlBar', _data.ctrlBar) wx.setStorage('videoCacheCtrlBar', _data.ctrlBar)
wx.setStorage('audioCacheCtrlBar', _data.ctrlBar)
/* 由于 音视频相同,所以 设置方式设置成一致就可以了 */ /* 由于 音视频相同,所以 设置方式设置成一致就可以了 */
/* 提交进度请求 */ /* 提交进度请求 */
if (this.realTimeProgress) { if (this.realTimeProgress) {
...@@ -372,6 +373,6 @@ Page({ ...@@ -372,6 +373,6 @@ Page({
_rProgress.mpt = tempTime > _rProgress.mpt ? tempTime : _rProgress.mpt _rProgress.mpt = tempTime > _rProgress.mpt ? tempTime : _rProgress.mpt
ChapterApi.updateProgress(_rProgress) ChapterApi.updateProgress(_rProgress)
} }
}, 1000) }, 10000)
} }
}) })
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论