Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
9acb83d4
提交
9acb83d4
authored
4月 14, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改我的学分和课程考核页面
上级
1ed818eb
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
780 行增加
和
141 行删除
+780
-141
CourseApi.js
learnOnline/apiService/CourseApi.js
+5
-1
ScoreApi.js
learnOnline/apiService/ScoreApi.js
+1
-0
ec-canvas.js
learnOnline/components/ec-canvas/ec-canvas.js
+250
-0
ec-canvas.json
learnOnline/components/ec-canvas/ec-canvas.json
+5
-0
ec-canvas.wxml
learnOnline/components/ec-canvas/ec-canvas.wxml
+4
-0
ec-canvas.wxss
learnOnline/components/ec-canvas/ec-canvas.wxss
+4
-0
echarts.js
learnOnline/components/ec-canvas/echarts.js
+0
-0
wx-canvas.js
learnOnline/components/ec-canvas/wx-canvas.js
+121
-0
courseAssess.wxml
.../learnSystem/courseContent/courseAssess/courseAssess.wxml
+67
-50
courseAssess.wxss
.../learnSystem/courseContent/courseAssess/courseAssess.wxss
+1
-1
courseContent.js
learnOnline/pages/learnSystem/courseContent/courseContent.js
+28
-0
courseContent.json
...Online/pages/learnSystem/courseContent/courseContent.json
+5
-3
courseContent.wxml
...Online/pages/learnSystem/courseContent/courseContent.wxml
+1
-1
myScore.js
learnOnline/pages/learnSystem/myScore/myScore.js
+9
-6
myScore.wxml
learnOnline/pages/learnSystem/myScore/myScore.wxml
+48
-31
myScore.wxss
learnOnline/pages/learnSystem/myScore/myScore.wxss
+146
-48
project.private.config.json
learnOnline/project.private.config.json
+85
-0
没有找到文件。
learnOnline/apiService/CourseApi.js
浏览文件 @
9acb83d4
...
...
@@ -57,6 +57,7 @@ const getCourseDetail = (id, sid, callback) => {
/* 课程类型 curriculum_elective_type 类型 改为 course_type 吴锚要求 */
let
_type
=
cur
.
course_type
,
str1
=
_type
==
1
?
'必修课'
:
(
_type
==
2
?
'选修课'
:
(
_type
==
3
?
'重修课'
:
''
))
let
json
=
{
course_check_type
:
cur
.
course_check_type
,
headerInfo
:
{
isStart
:
!!
cur
.
selected
,
// 是否为开始学习按钮 或者 选课按钮
id
:
cur
.
course_id
,
...
...
@@ -172,6 +173,7 @@ const getCourseAssess = (cid, sid, callback) => {
arr
:
tempArr
})
}
const
courseCheck
=
cur
.
course_check
.
filter
(
item
=>
item
.
percent
)
let
json
=
{
score
:
cur
.
course_score
,
duration
:
util
.
durationToTimeString
(
cur
.
course_duration
||
0
),
...
...
@@ -182,7 +184,9 @@ const getCourseAssess = (cid, sid, callback) => {
created_time
:
cur
.
essay_evaluation
.
created_time
||
''
,
status
:
cur
.
essay_evaluation
.
status
||
'暂无'
,
score
:
cur
.
essay_evaluation
.
score
||
'暂无'
}
},
course_check
:
courseCheck
,
course_check_pass_score
:
cur
.
course_check_pass_score
}
callback
(
json
)
}
...
...
learnOnline/apiService/ScoreApi.js
浏览文件 @
9acb83d4
...
...
@@ -10,6 +10,7 @@ const getMyScore = (callback) => {
callback
:
function
(
res
)
{
let
_data
=
res
.
data
let
json
=
{
raw
:
_data
,
total
:
_data
.
total_credits
,
myTotal
:
_data
.
my_total_credits
,
myTotalStr
:
_data
.
total_credits
&&
((
_data
.
my_total_credits
*
1.0
/
_data
.
total_credits
*
100
).
toFixed
(
1
)
+
'%'
)
||
'0%'
,
...
...
learnOnline/components/ec-canvas/ec-canvas.js
0 → 100644
浏览文件 @
9acb83d4
import
WxCanvas
from
'./wx-canvas'
;
import
*
as
echarts
from
'./echarts'
;
let
ctx
;
function
compareVersion
(
v1
,
v2
)
{
v1
=
v1
.
split
(
'.'
)
v2
=
v2
.
split
(
'.'
)
const
len
=
Math
.
max
(
v1
.
length
,
v2
.
length
)
while
(
v1
.
length
<
len
)
{
v1
.
push
(
'0'
)
}
while
(
v2
.
length
<
len
)
{
v2
.
push
(
'0'
)
}
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
const
num1
=
parseInt
(
v1
[
i
])
const
num2
=
parseInt
(
v2
[
i
])
if
(
num1
>
num2
)
{
return
1
}
else
if
(
num1
<
num2
)
{
return
-
1
}
}
return
0
}
Component
({
properties
:
{
canvasId
:
{
type
:
String
,
value
:
'ec-canvas'
},
ec
:
{
type
:
Object
},
forceUseOldCanvas
:
{
type
:
Boolean
,
value
:
false
}
},
data
:
{
isUseNewCanvas
:
false
},
ready
:
function
()
{
// Disable prograssive because drawImage doesn't support DOM as parameter
// See https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html
echarts
.
registerPreprocessor
(
option
=>
{
if
(
option
&&
option
.
series
)
{
if
(
option
.
series
.
length
>
0
)
{
option
.
series
.
forEach
(
series
=>
{
series
.
progressive
=
0
;
});
}
else
if
(
typeof
option
.
series
===
'object'
)
{
option
.
series
.
progressive
=
0
;
}
}
});
if
(
!
this
.
data
.
ec
)
{
console
.
warn
(
'组件需绑定 ec 变量,例:<ec-canvas id="mychart-dom-bar" '
+
'canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>'
);
return
;
}
if
(
!
this
.
data
.
ec
.
lazyLoad
)
{
this
.
init
();
}
},
methods
:
{
init
:
function
(
callback
)
{
const
version
=
wx
.
getSystemInfoSync
().
SDKVersion
const
canUseNewCanvas
=
compareVersion
(
version
,
'2.9.0'
)
>=
0
;
const
forceUseOldCanvas
=
this
.
data
.
forceUseOldCanvas
;
const
isUseNewCanvas
=
canUseNewCanvas
&&
!
forceUseOldCanvas
;
this
.
setData
({
isUseNewCanvas
});
if
(
forceUseOldCanvas
&&
canUseNewCanvas
)
{
console
.
warn
(
'开发者强制使用旧canvas,建议关闭'
);
}
if
(
isUseNewCanvas
)
{
// console.log('微信基础库版本大于2.9.0,开始使用<canvas type="2d"/>');
// 2.9.0 可以使用 <canvas type="2d"></canvas>
this
.
initByNewWay
(
callback
);
}
else
{
const
isValid
=
compareVersion
(
version
,
'1.9.91'
)
>=
0
if
(
!
isValid
)
{
console
.
error
(
'微信基础库版本过低,需大于等于 1.9.91。'
+
'参见:https://github.com/ecomfe/echarts-for-weixin'
+
'#%E5%BE%AE%E4%BF%A1%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82'
);
return
;
}
else
{
console
.
warn
(
'建议将微信基础库调整大于等于2.9.0版本。升级后绘图将有更好性能'
);
this
.
initByOldWay
(
callback
);
}
}
},
initByOldWay
(
callback
)
{
// 1.9.91 <= version < 2.9.0:原来的方式初始化
ctx
=
wx
.
createCanvasContext
(
this
.
data
.
canvasId
,
this
);
const
canvas
=
new
WxCanvas
(
ctx
,
this
.
data
.
canvasId
,
false
);
echarts
.
setCanvasCreator
(()
=>
{
return
canvas
;
});
// const canvasDpr = wx.getSystemInfoSync().pixelRatio // 微信旧的canvas不能传入dpr
const
canvasDpr
=
1
var
query
=
wx
.
createSelectorQuery
().
in
(
this
);
query
.
select
(
'.ec-canvas'
).
boundingClientRect
(
res
=>
{
if
(
typeof
callback
===
'function'
)
{
this
.
chart
=
callback
(
canvas
,
res
.
width
,
res
.
height
,
canvasDpr
);
}
else
if
(
this
.
data
.
ec
&&
typeof
this
.
data
.
ec
.
onInit
===
'function'
)
{
this
.
chart
=
this
.
data
.
ec
.
onInit
(
canvas
,
res
.
width
,
res
.
height
,
canvasDpr
);
}
else
{
this
.
triggerEvent
(
'init'
,
{
canvas
:
canvas
,
width
:
res
.
width
,
height
:
res
.
height
,
canvasDpr
:
canvasDpr
// 增加了dpr,可方便外面echarts.init
});
}
}).
exec
();
},
initByNewWay
(
callback
)
{
// version >= 2.9.0:使用新的方式初始化
const
query
=
wx
.
createSelectorQuery
().
in
(
this
)
query
.
select
(
'.ec-canvas'
)
.
fields
({
node
:
true
,
size
:
true
})
.
exec
(
res
=>
{
const
canvasNode
=
res
[
0
].
node
this
.
canvasNode
=
canvasNode
const
canvasDpr
=
wx
.
getSystemInfoSync
().
pixelRatio
const
canvasWidth
=
res
[
0
].
width
const
canvasHeight
=
res
[
0
].
height
const
ctx
=
canvasNode
.
getContext
(
'2d'
)
const
canvas
=
new
WxCanvas
(
ctx
,
this
.
data
.
canvasId
,
true
,
canvasNode
)
echarts
.
setCanvasCreator
(()
=>
{
return
canvas
})
if
(
typeof
callback
===
'function'
)
{
this
.
chart
=
callback
(
canvas
,
canvasWidth
,
canvasHeight
,
canvasDpr
)
}
else
if
(
this
.
data
.
ec
&&
typeof
this
.
data
.
ec
.
onInit
===
'function'
)
{
this
.
chart
=
this
.
data
.
ec
.
onInit
(
canvas
,
canvasWidth
,
canvasHeight
,
canvasDpr
)
}
else
{
this
.
triggerEvent
(
'init'
,
{
canvas
:
canvas
,
width
:
canvasWidth
,
height
:
canvasHeight
,
dpr
:
canvasDpr
})
}
})
},
canvasToTempFilePath
(
opt
)
{
if
(
this
.
data
.
isUseNewCanvas
)
{
// 新版
const
query
=
wx
.
createSelectorQuery
().
in
(
this
)
query
.
select
(
'.ec-canvas'
)
.
fields
({
node
:
true
,
size
:
true
})
.
exec
(
res
=>
{
const
canvasNode
=
res
[
0
].
node
opt
.
canvas
=
canvasNode
wx
.
canvasToTempFilePath
(
opt
)
})
}
else
{
// 旧的
if
(
!
opt
.
canvasId
)
{
opt
.
canvasId
=
this
.
data
.
canvasId
;
}
ctx
.
draw
(
true
,
()
=>
{
wx
.
canvasToTempFilePath
(
opt
,
this
);
});
}
},
touchStart
(
e
)
{
if
(
this
.
chart
&&
e
.
touches
.
length
>
0
)
{
var
touch
=
e
.
touches
[
0
];
var
handler
=
this
.
chart
.
getZr
().
handler
;
handler
.
dispatch
(
'mousedown'
,
{
zrX
:
touch
.
x
,
zrY
:
touch
.
y
});
handler
.
dispatch
(
'mousemove'
,
{
zrX
:
touch
.
x
,
zrY
:
touch
.
y
});
handler
.
processGesture
(
wrapTouch
(
e
),
'start'
);
}
},
touchMove
(
e
)
{
if
(
this
.
chart
&&
e
.
touches
.
length
>
0
)
{
var
touch
=
e
.
touches
[
0
];
var
handler
=
this
.
chart
.
getZr
().
handler
;
handler
.
dispatch
(
'mousemove'
,
{
zrX
:
touch
.
x
,
zrY
:
touch
.
y
});
handler
.
processGesture
(
wrapTouch
(
e
),
'change'
);
}
},
touchEnd
(
e
)
{
if
(
this
.
chart
)
{
const
touch
=
e
.
changedTouches
?
e
.
changedTouches
[
0
]
:
{};
var
handler
=
this
.
chart
.
getZr
().
handler
;
handler
.
dispatch
(
'mouseup'
,
{
zrX
:
touch
.
x
,
zrY
:
touch
.
y
});
handler
.
dispatch
(
'click'
,
{
zrX
:
touch
.
x
,
zrY
:
touch
.
y
});
handler
.
processGesture
(
wrapTouch
(
e
),
'end'
);
}
}
}
});
function
wrapTouch
(
event
)
{
for
(
let
i
=
0
;
i
<
event
.
touches
.
length
;
++
i
)
{
const
touch
=
event
.
touches
[
i
];
touch
.
offsetX
=
touch
.
x
;
touch
.
offsetY
=
touch
.
y
;
}
return
event
;
}
learnOnline/components/ec-canvas/ec-canvas.json
0 → 100644
浏览文件 @
9acb83d4
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
learnOnline/components/ec-canvas/ec-canvas.wxml
0 → 100644
浏览文件 @
9acb83d4
<!-- 新的:接口对其了H5 -->
<canvas wx:if="{{isUseNewCanvas}}" type="2d" class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
<!-- 旧的 -->
<canvas wx:else class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
learnOnline/components/ec-canvas/ec-canvas.wxss
0 → 100644
浏览文件 @
9acb83d4
.ec-canvas {
width: 100%;
height: 100%;
}
learnOnline/components/ec-canvas/echarts.js
0 → 100644
浏览文件 @
9acb83d4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
learnOnline/components/ec-canvas/wx-canvas.js
0 → 100644
浏览文件 @
9acb83d4
export
default
class
WxCanvas
{
constructor
(
ctx
,
canvasId
,
isNew
,
canvasNode
)
{
this
.
ctx
=
ctx
;
this
.
canvasId
=
canvasId
;
this
.
chart
=
null
;
this
.
isNew
=
isNew
if
(
isNew
)
{
this
.
canvasNode
=
canvasNode
;
}
else
{
this
.
_initStyle
(
ctx
);
}
// this._initCanvas(zrender, ctx);
this
.
_initEvent
();
}
getContext
(
contextType
)
{
if
(
contextType
===
'2d'
)
{
return
this
.
ctx
;
}
}
// canvasToTempFilePath(opt) {
// if (!opt.canvasId) {
// opt.canvasId = this.canvasId;
// }
// return wx.canvasToTempFilePath(opt, this);
// }
setChart
(
chart
)
{
this
.
chart
=
chart
;
}
attachEvent
()
{
// noop
}
detachEvent
()
{
// noop
}
_initCanvas
(
zrender
,
ctx
)
{
zrender
.
util
.
getContext
=
function
()
{
return
ctx
;
};
zrender
.
util
.
$override
(
'measureText'
,
function
(
text
,
font
)
{
ctx
.
font
=
font
||
'12px sans-serif'
;
return
ctx
.
measureText
(
text
);
});
}
_initStyle
(
ctx
)
{
var
styles
=
[
'fillStyle'
,
'strokeStyle'
,
'globalAlpha'
,
'textAlign'
,
'textBaseAlign'
,
'shadow'
,
'lineWidth'
,
'lineCap'
,
'lineJoin'
,
'lineDash'
,
'miterLimit'
,
'fontSize'
];
styles
.
forEach
(
style
=>
{
Object
.
defineProperty
(
ctx
,
style
,
{
set
:
value
=>
{
if
(
style
!==
'fillStyle'
&&
style
!==
'strokeStyle'
||
value
!==
'none'
&&
value
!==
null
)
{
ctx
[
'set'
+
style
.
charAt
(
0
).
toUpperCase
()
+
style
.
slice
(
1
)](
value
);
}
}
});
});
ctx
.
createRadialGradient
=
()
=>
{
return
ctx
.
createCircularGradient
(
arguments
);
};
}
_initEvent
()
{
this
.
event
=
{};
const
eventNames
=
[{
wxName
:
'touchStart'
,
ecName
:
'mousedown'
},
{
wxName
:
'touchMove'
,
ecName
:
'mousemove'
},
{
wxName
:
'touchEnd'
,
ecName
:
'mouseup'
},
{
wxName
:
'touchEnd'
,
ecName
:
'click'
}];
eventNames
.
forEach
(
name
=>
{
this
.
event
[
name
.
wxName
]
=
e
=>
{
const
touch
=
e
.
touches
[
0
];
this
.
chart
.
getZr
().
handler
.
dispatch
(
name
.
ecName
,
{
zrX
:
name
.
wxName
===
'tap'
?
touch
.
clientX
:
touch
.
x
,
zrY
:
name
.
wxName
===
'tap'
?
touch
.
clientY
:
touch
.
y
});
};
});
}
set
width
(
w
)
{
if
(
this
.
canvasNode
)
this
.
canvasNode
.
width
=
w
}
set
height
(
h
)
{
if
(
this
.
canvasNode
)
this
.
canvasNode
.
height
=
h
}
get
width
()
{
if
(
this
.
canvasNode
)
return
this
.
canvasNode
.
width
return
0
}
get
height
()
{
if
(
this
.
canvasNode
)
return
this
.
canvasNode
.
height
return
0
}
}
learnOnline/pages/learnSystem/courseContent/courseAssess/courseAssess.wxml
浏览文件 @
9acb83d4
<template name=
'courseAssess'
>
<view class=
'course-assess'
>
<view class=
'title'>最终成绩:{{item.assess.score && (item.assess.score + '分') || '暂无'
}}</view>
<view class=
'topic'
>
<view class=
'line'
></view>
<view class=
'tit'
>课程考核标准</view>
<template name=
"courseAssess"
>
<view class=
"course-assess"
>
<view class=
"title">最终成绩:{{ (item.assess.score && item.assess.score + '分') || '暂无'
}}</view>
<view class=
"topic"
>
<view class=
"line"
></view>
<view class=
"tit"
>课程考核标准</view>
</view>
<view class='detail'>
<rich-text class='detail-rich' nodes='{{item.richText}}'></rich-text>
<view class="detail">
<view class="h1">一、最终成绩计算</view>
<view class="p" wx:if="{{courseCheckType === 1}}">
<block wx:for="{{ item.assess.course_check }}">
<text wx:key="key">{{ index ? '+' : '' }} {{ item.name }}得分*{{ item.percent }}% </text>
</block>
= 该门课程总得分,满分100分,低于{{ item.assess.course_check_pass_score }}分为不及格,需重修此门课程。
</view>
<view class="p" wx:else>美方课程最终成绩请参考每学期初教务邮箱老师发到大家邮箱中的课程考核大纲进行计算。</view>
<view style="height: 300px;">
<ec-canvas id="mychart" canvas-id="mychart" ec="{{ ec }}"></ec-canvas>
</view>
<view class='h1'>二、具体细则</view>
<view wx:for="{{ item.assess.course_check }}" wx:key="key">
<view class="h2"> {{ item.name }}:总分{{ item.score }}分(占科目总成绩的{{ item.percent }}%) </view>
<rich-text class="detail-rich" nodes="{{ item.content }}"></rich-text>
</view>
<!-- <rich-text class="detail-rich" nodes="{{ item.richText }}"></rich-text> -->
<!-- <view class='h1'>一、最终成绩计算</view>
<view class='p'>课程表现得分*30%+每章试题得分*30%+结业大作业得分*40%=该门课程总得分,满分100分,低于60分为不及格,需重修此门课程。</view>
<image class='b1' src='../icons/courseContent/b1.png' mode='aspectFill'></image>
...
...
@@ -20,61 +36,63 @@
<view class='h2'>结业大作业:总分100分(占科目总成绩的40%)</view>
<view class='p'>结业大作业满分为100分,以助教老师给分为准。</view> -->
</view>
<view class=
'topic'
>
<view class=
'line'
></view>
<view class=
'tit'
>学习进度及成绩</view>
<view class=
"topic"
>
<view class=
"line"
></view>
<view class=
"tit"
>学习进度及成绩</view>
</view>
<view class='table-title'>课程“音视频”观看统计( 累计学习时长:{{item.assess.duration}},完成率:{{item.assess.progress}} )</view>
<view class='table'>
<view class='th'>
<view class='col3-td1'>章节</view>
<view class='col3-td2'>学习时长</view>
<view class='col3-td3'>百分比</view>
<view class="table-title"
>课程“音视频”观看统计( 累计学习时长:{{ item.assess.duration }},完成率:{{ item.assess.progress }} )</view
>
<view class="table">
<view class="th">
<view class="col3-td1">章节</view>
<view class="col3-td2">学习时长</view>
<view class="col3-td3">百分比</view>
</view>
<block wx:for=
'{{item.assess.video}}' wx:key='{{index}}' wx:for-item='item1'
>
<view class=
'tb'
>
<view class=
'tt'>{{item1.title
}}</view>
<block wx:for=
'{{item1.arr}}' wx:key='{{index}}' wx:for-item='item2'
>
<view class=
'rd'
>
<view class=
'col3-td1'>{{item2.name
}}</view>
<view class=
'col3-td2'>{{item2.time
}}</view>
<view class=
'col3-td3'>{{item2.progress
}}</view>
<block wx:for=
"{{ item.assess.video }}" wx:key="{{ index }}" wx:for-item="item1"
>
<view class=
"tb"
>
<view class=
"tt">{{ item1.title
}}</view>
<block wx:for=
"{{ item1.arr }}" wx:key="{{ index }}" wx:for-item="item2"
>
<view class=
"rd"
>
<view class=
"col3-td1">{{ item2.name
}}</view>
<view class=
"col3-td2">{{ item2.time
}}</view>
<view class=
"col3-td3">{{ item2.progress
}}</view>
</view>
</block>
</view>
</block>
<block wx:if=
'{{!item.assess.video.length}}'
>
<view style=
'width: 100%; font-size: 30rpx; margin: 40rpx auto 10rpx auto; text-align: center;'
>暂无数据</view>
<block wx:if=
"{{ !item.assess.video.length }}"
>
<view style=
"width: 100%; font-size: 30rpx; margin: 40rpx auto 10rpx auto; text-align: center"
>暂无数据</view>
</block>
</view>
<view class=
'table-title'
>试题及主观题</view>
<view class=
'table'
>
<view class=
'th'
>
<view class=
'col3-td1'
>章节</view>
<view class=
'col3-td2' style="width: 180rpx;
">提交时间</view>
<view class=
'col3-td3' style="width: 64rpx;
">得分</view>
<view class=
"table-title"
>试题及主观题</view>
<view class=
"table"
>
<view class=
"th"
>
<view class=
"col3-td1"
>章节</view>
<view class=
"col3-td2" style="width: 180rpx
">提交时间</view>
<view class=
"col3-td3" style="width: 64rpx
">得分</view>
</view>
<block wx:for=
'{{item.assess.homewrok}}' wx:key='{{index}}' wx:for-item='item1'
>
<view class=
'tb'
>
<view class=
'tt'>{{item1.title
}}</view>
<block wx:for=
'{{item1.arr}}' wx:key='{{index}}' wx:for-item='item2'
>
<view class=
'rd'
>
<view class=
'col3-td1'>{{item2.name
}}</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>
<block wx:for=
"{{ item.assess.homewrok }}" wx:key="{{ index }}" wx:for-item="item1"
>
<view class=
"tb"
>
<view class=
"tt">{{ item1.title
}}</view>
<block wx:for=
"{{ item1.arr }}" wx:key="{{ index }}" wx:for-item="item2"
>
<view class=
"rd"
>
<view class=
"col3-td1">{{ item2.name
}}</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>
</block>
</view>
</block>
<block wx:if=
'{{!item.assess.homewrok.length}}'
>
<view style=
'width: 100%; font-size: 30rpx; margin: 40rpx auto 10rpx auto; text-align: center;'
>暂无数据</view>
<block wx:if=
"{{ !item.assess.homewrok.length }}"
>
<view style=
"width: 100%; font-size: 30rpx; margin: 40rpx auto 10rpx auto; text-align: center"
>暂无数据</view>
</block>
</view>
<view class=
'table-title'
>大作业</view>
<block wx:if=
'{{item.assess.essay.created_time}}'
>
<view class=
'status-text'>提交时间:{{item.assess.essay.created_time
}}</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.score
}}</view>
<view class=
"status-text">状 态:{{ item.assess.essay.status
}}</view>
<view class=
"status-text">得 分:{{ item.assess.essay.score
}}</view>
</view>
</template>
\ No newline at end of file
</template>
learnOnline/pages/learnSystem/courseContent/courseAssess/courseAssess.wxss
浏览文件 @
9acb83d4
...
...
@@ -7,7 +7,7 @@
.course-assess .detail .b1 { display: block; margin: 50rpx auto; width: 635rpx; height: 283rpx; }
.course-assess .detail .h1 { font-size: 28rpx; font-weight: 700; color: #313131; line-height: 68rpx; }
.course-assess .detail .h2 { font-size: 26rpx; font-weight: 700; color: #313131; line-height: 60rpx; }
.course-assess .detail .p { font-size: 26rpx; color: #313131; line-height: 40rpx; text-align: justify; }
.course-assess .detail .p
,.course-assess .detail-rich
{ font-size: 26rpx; color: #313131; line-height: 40rpx; text-align: justify; }
.course-assess .detail .em { font-size: 24rpx; color: #b49441; line-height: 34rpx; text-align: justify; }
/* 统计表格 */
.course-assess .table-title { font-size: 30rpx; font-weight: 700; margin: 40rpx 26rpx 20rpx 26rpx; text-align: justify; color: #b49441; }
...
...
learnOnline/pages/learnSystem/courseContent/courseContent.js
浏览文件 @
9acb83d4
// pages/learnSystem/courseContent/courseContent.js
const
CourseApi
=
require
(
'../../../apiService/CourseApi.js'
)
const
util
=
require
(
'../../../utils/util.js'
)
import
*
as
echarts
from
'../../../components/ec-canvas/echarts'
let
chart
=
null
let
chartData
=
[]
function
initChart
(
canvas
,
width
,
height
,
dpr
)
{
chart
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
dpr
// new
});
canvas
.
setChart
(
chart
);
chart
.
setOption
({
series
:
[{
type
:
'pie'
,
radius
:
'50%'
,
label
:
{
formatter
:
'{b}: {d}%'
},
data
:
chartData
}]
})
return
chart
;
}
Page
({
/**
* 页面的初始数据
*/
data
:
{
ec
:
{
onInit
:
initChart
},
courseCheckType
:
1
,
// 1中方,2美方
latestVideo
:
{},
headerInfo
:
{
id
:
''
,
...
...
@@ -118,6 +136,7 @@ Page({
this
.
sid
=
options
.
sid
if
(
this
.
cid
!=
''
&&
this
.
sid
!=
''
)
{
CourseApi
.
getCourseDetail
(
this
.
cid
,
this
.
sid
,
(
json
)
=>
{
this
.
setData
({
courseCheckType
:
json
.
course_check_type
})
this
.
setData
({
'headerInfo'
:
json
.
headerInfo
})
this
.
setData
({
'tabs[0].content'
:
json
.
tabs0Content
})
this
.
setData
({
'tabs[1].chapterList'
:
json
.
tabs1ChapterList
})
...
...
@@ -138,6 +157,10 @@ Page({
}
json
.
tabs3richTest
&&
this
.
setData
({
'tabs[3].richText'
:
json
.
tabs3richTest
.
replace
(
/<img.*
?(
src=
[
"|'
]
.*
?[
"|'
])
.*
?
>/gi
,
'<img width="100%" $1>'
)
})
CourseApi
.
getCourseAssess
(
this
.
cid
,
this
.
sid
,
(
json1
)
=>
{
chartData
=
json1
.
course_check
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
value
:
item
.
percent
}
})
chart
&&
chart
.
setOption
({
series
:
[{
type
:
'pie'
,
radius
:
'50%'
,
label
:
{
formatter
:
'{b}: {d}%'
},
data
:
chartData
}]
})
this
.
setData
({
'tabs[3].assess'
:
json1
})
wx
.
hideLoading
()
})
...
...
@@ -171,11 +194,16 @@ Page({
wx
.
showNavigationBarLoading
();
wx
.
showLoading
({
title
:
'更新中...'
,
mask
:
true
})
CourseApi
.
getCourseDetail
(
this
.
cid
,
this
.
sid
,
(
json
)
=>
{
this
.
setData
({
courseCheckType
:
json
.
course_check_type
})
this
.
setData
({
'headerInfo'
:
json
.
headerInfo
})
this
.
setData
({
'tabs[0].content'
:
json
.
tabs0Content
})
this
.
setData
({
'tabs[1].chapterList'
:
json
.
tabs1ChapterList
})
json
.
tabs3richTest
&&
this
.
setData
({
'tabs[3].richText'
:
json
.
tabs3richTest
.
replace
(
/<img.*
?(
src=
[
"|'
]
.*
?[
"|'
])
.*
?
>/gi
,
'<img width="100%" $1>'
)
})
CourseApi
.
getCourseAssess
(
this
.
cid
,
this
.
sid
,
(
json1
)
=>
{
chartData
=
json1
.
course_check
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
value
:
item
.
percent
}
})
chart
&&
chart
.
setOption
({
series
:
[{
type
:
'pie'
,
radius
:
'50%'
,
label
:
{
formatter
:
'{b}: {d}%'
},
data
:
chartData
}]
})
this
.
setData
({
'tabs[3].assess'
:
json1
})
wx
.
hideLoading
()
// 隐藏导航栏加载框
...
...
learnOnline/pages/learnSystem/courseContent/courseContent.json
浏览文件 @
9acb83d4
...
...
@@ -2,5 +2,8 @@
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#fff"
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"MBA学习系统"
}
\ No newline at end of file
"navigationBarTitleText"
:
"MBA学习系统"
,
"usingComponents"
:
{
"ec-canvas"
:
"../../../components/ec-canvas/ec-canvas"
}
}
learnOnline/pages/learnSystem/courseContent/courseContent.wxml
浏览文件 @
9acb83d4
...
...
@@ -47,7 +47,7 @@
<view style='margin: 200rpx auto; text-align: center; font-size: 34rpx; color: #ddd;'>直接跳转到讨论页面</view>
</block>
<block wx:if='{{item.isShow && index == 3}}'>
<template is='courseAssess' data='{{item}}'></template>
<template is='courseAssess' data='{{item
, courseCheckType, ec
}}'></template>
</block>
</block>
</view>
...
...
learnOnline/pages/learnSystem/myScore/myScore.js
浏览文件 @
9acb83d4
...
...
@@ -7,6 +7,10 @@ Page({
*/
data
:
{
score
:
{
degree_score
:
83
,
average_score
:
0
,
total_credits
:
48
,
my_total_credits
:
0
,
total
:
0
,
myTotal
:
0
,
myTotalStr
:
'0%'
,
...
...
@@ -24,8 +28,8 @@ Page({
*/
onLoad
:
function
(
options
)
{
wx
.
showLoading
({
title
:
'页面加载中...'
,
mask
:
true
})
ScoreApi
.
getMyScore
(
(
json
)
=>
{
this
.
setData
({
'score'
:
json
});
ScoreApi
.
getMyScore
(
json
=>
{
this
.
setData
({
score
:
json
.
raw
})
wx
.
hideLoading
()
})
},
...
...
@@ -52,8 +56,8 @@ Page({
// 显示顶部刷新图标
wx
.
showNavigationBarLoading
()
wx
.
showLoading
({
title
:
'更新中...'
,
mask
:
true
})
ScoreApi
.
getMyScore
(
(
json
)
=>
{
this
.
setData
({
'score'
:
json
})
ScoreApi
.
getMyScore
(
json
=>
{
this
.
setData
({
score
:
json
.
raw
})
wx
.
hideLoading
()
// 隐藏导航栏加载框
wx
.
hideNavigationBarLoading
()
...
...
@@ -69,4 +73,4 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{}
})
\ No newline at end of file
})
learnOnline/pages/learnSystem/myScore/myScore.wxml
浏览文件 @
9acb83d4
<!--pages/learnSystem/myScore/myScore.wxml-->
<view class='my-score'>
<view class='title'>总计学分<view class='score'>{{score.total}}</view></view>
<view class='pro-line total'>
<view class='active' style='width: {{score.myTotalStr}};'>
<view class='text {{score.myTotal/score.total>0.2 ? "" : "left"}}'>{{score.myTotal}} (分)</view>
</view>
</view>
<view class="col">
<view class='col-5'>
<view class='title'>必修学分<view class='score'>{{score.must}}</view></view>
<view class='pro-line must'>
<view class='active' style='width: {{score.myMustStr}};'>
<view class='text {{score.myMust/score.must>0.4 ? "" : "left"}}'>{{score.myMust}} (分)</view>
<view class="my-score">
<view class="tips">注:</view>
<view class="tips">1. 每一门课程达到77分及格通过,低于77分需要重修,重修费用按照每学分1000元进行缴纳。</view>
<view class="tips">2. 所有课程全部通过,且16门必修课平均分达到83分,符合申请学位要求。</view>
<view class="progress">
<view class="progress-item">
<view class="progress-item-hd">
<view class="porgress-item-hd__title">总计学分</view>
<view class="porgress-item-hd__core">{{ score.total_credits }}</view>
</view>
<view class="progress-item-bd">
<view class="progress-bar">
<view class="progress-bar-inner" style="width:{{ (score.my_total_credits / score.total_credits) * 100 }}%">
<view class="progress-bar-text">{{ score.my_total_credits }} (分)</view>
</view>
</view>
</view>
</view>
<view class='col-5 right'>
<view class='title'>选修学分<view class='score'>{{score.unmust}}</view></view>
<view class='pro-line unmust'>
<view class='active' style='width: {{score.myUnmustStr}};'>
<view class='text {{score.myUnmust/score.unmust>0.4 ? "" : "left"}}'>{{score.myUnmust}} (分)</view>
<view class="progress-item">
<view class="progress-item-hd">
<view class="porgress-item-hd__title">综合必修平均分</view>
<view class="porgress-item-hd__core">100</view>
</view>
<view class="progress-item-bd">
<view class="progress-baseline" style="left:{{ score.degree_score }}%">
<text>{{ score.degree_score }}</text>
</view>
<view class="progress-bar">
<view class="progress-bar-inner" style="width:{{ score.average_score }}%">
<view class="progress-bar-text">{{ score.average_score }} (分)</view>
</view>
</view>
</view>
</view>
</view>
<view class="list" hover-class="none" hover-stop-propagation="false" wx:if="{{
score.lists.length
}}">
<view class=
'list-title'
>
<view class="list" hover-class="none" hover-stop-propagation="false" wx:if="{{
score.lists.length
}}">
<view class=
"list-title"
>
<text class="col6-td1">序号</text>
<text class="col6-td2">学期</text>
<text class="col6-td3" style="text-align: center
;
">课程</text>
<text class="col6-td3" style="text-align: center">课程</text>
<text class="col6-td4">状态</text>
<text class="col6-td5">学分</text>
<text class="col6-td6">成绩</text>
</view>
<view class="list-title" hover-class="none" hover-stop-propagation="false" wx:for="{{score.lists}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
<text class="col6-td1">{{idx}}</text>
<text class="col6-td2">{{itemName.semester_name}}</text>
<text class="col6-td3">{{itemName.course_name}}</text>
<text class="col6-td4">{{itemName.passed ? '通过':'未通过'}}</text>
<text class="col6-td5">{{itemName.credit}}</text>
<text class="col6-td6">{{itemName.score}}</text>
<view
class="list-title"
hover-class="none"
hover-stop-propagation="false"
wx:for="{{ score.lists }}"
wx:key="index"
>
<text class="col6-td1">{{ index }}</text>
<text class="col6-td2">{{ item.semester_name }}</text>
<text class="col6-td3">{{ item.course_name }}</text>
<text class="col6-td4">
<block wx:if="{{ item.passed == 0 }}">未通过</block>
<block wx:elif="{{ item.passed == 1 }}">通过</block>
<block wx:else>未发布</block>
</text>
<text class="col6-td5">{{ item.credit }}</text>
<text class="col6-td6">{{ item.score }}</text>
</view>
</view>
</view>
learnOnline/pages/learnSystem/myScore/myScore.wxss
浏览文件 @
9acb83d4
/* pages/learnSystem/myScore/myScore.wxss */
.my-score { padding: 30rpx 26rpx 100rpx 26rpx; overflow: hidden; }
.my-score .title { padding: 0 10rpx 0 0; width: 100%; font-size: 32rpx; line-height: 50rpx; color: #313131; box-sizing: border-box; -webkit-box-sizing: border-box; }
.my-score .title .score { float: right; color: #666666; font-size: 28rpx; }
.my-score .pro-line { position: relative; width: 100%; height: 60rpx; background: #dcdcdc; }
.my-score .pro-line .active { position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; }
.my-score .pro-line .active .text { position: absolute; right: 10rpx; line-height: 60rpx; font-size: 26rpx; color: #fff; word-break:keep-all; white-space:nowrap; }
.my-score .pro-line .active .text.left { left: 10rpx; right: none; }
.my-score .pro-line.total .active { background: #df9d75; }
.my-score .pro-line.must .active { background: #8ca4cf; }
.my-score .pro-line.unmust .active { background: #66c6bd; }
.my-score .col-5 { float: left; width: 49%; }
.my-score .col-5.right { float: right; }
.my-score .col{
height:110rpx;
overflow: hidden;
}
.my-score .list{
width: 100%;
padding-top: 30rpx;
}
.my-score .list-title{
width: 100%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
border: 1rpx solid rgb(96, 98, 102);
border-top: none;
line-height: 40rpx;
overflow: hidden;
}
.my-score .list .list-title:first-child{
border-top: 1rpx solid rgb(96, 98, 102);
.my-score {
padding: 30rpx 26rpx 100rpx 26rpx;
overflow: hidden;
}
.my-score .title {
padding: 0 10rpx 0 0;
width: 100%;
font-size: 32rpx;
line-height: 50rpx;
color: #313131;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.my-score .title .score {
float: right;
color: #666666;
font-size: 28rpx;
}
.my-score .pro-line {
position: relative;
width: 100%;
height: 60rpx;
background: #dcdcdc;
}
.my-score .pro-line .active {
position: absolute;
z-index: 1;
left: 0;
top: 0;
bottom: 0;
}
.my-score .pro-line .active .text {
position: absolute;
right: 10rpx;
line-height: 60rpx;
font-size: 26rpx;
color: #fff;
word-break: keep-all;
white-space: nowrap;
}
.my-score .pro-line .active .text.left {
left: 10rpx;
right: none;
}
.my-score .pro-line.total .active {
background: #df9d75;
}
.my-score .pro-line.must .active {
background: #8ca4cf;
}
.my-score .pro-line.unmust .active {
background: #66c6bd;
}
.my-score .col-5 {
float: left;
width: 49%;
}
.my-score .col-5.right {
float: right;
}
.my-score .col {
height: 110rpx;
overflow: hidden;
}
.my-score .list {
width: 100%;
padding-top: 30rpx;
}
.my-score .list-title {
width: 100%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
border: 1rpx solid rgb(96, 98, 102);
border-top: none;
line-height: 40rpx;
overflow: hidden;
}
.my-score .list .list-title:first-child {
border-top: 1rpx solid rgb(96, 98, 102);
}
.my-score .list-title text {
float: left;
font-size: 25rpx;
text-align: center;
float: left;
font-size: 25rpx;
text-align: center;
}
.my-score .list-title .col6-td1 {
width: 60rpx;
width: 60rpx;
}
.my-score .list-title .col6-td2 {
width: 134rpx;
}
.my-score .list-title .col6-td3 {
width: 300rpx;
text-align: left;
}
.my-score .list-title .col6-td4 {
width: 80rpx;
}
.my-score .list-title .col6-td5 {
width: 60rpx;
}
.my-score .list-title .col6-td6 {
width: 60rpx;
}
.progress {
}
.progress-item {
padding: 10rpx 0;
}
.progress-item-hd {
display: flex;
justify-content: space-between;
}
.progress-item-bd {
position: relative;
margin-top: 8rpx;
}
.progress-bar {
height: 60rpx;
background: #dcdcdc;
overflow: hidden;
}
.progress-bar-inner {
position: relative;
background-color: #8ca4cf;
}
.my-score .list-title .col6-td2{
width: 134rpx;
.progress-bar-text {
padding: 0 10rpx;
height: 60rpx;
color: #fff;
line-height: 60rpx;
text-align: right;
white-space: nowrap;
}
.my-score .list-title .col6-td3{
width: 300rpx;
text-align: left;
.progress-baseline {
position: absolute;
bottom: 60rpx;
display: inline-block;
}
.my-score .list-title .col6-td4{
width: 80rpx;
.progress-baseline::after {
position: absolute;
bottom: -60rpx;
content: '';
display: block;
width: 4px;
height: 68rpx;
background-color: #f56c6c;
margin-left: -2px;
z-index: 1;
}
.my-score .list-title .col6-td5{
width: 60rpx;
.progress-baseline text {
display: block;
transform: translateX(-50%);
padding-bottom: 8rpx;
}
.my-score .list-title .col6-td6{
width: 60rpx;
}
\ No newline at end of file
learnOnline/project.private.config.json
0 → 100644
浏览文件 @
9acb83d4
{
"setting"
:
{},
"condition"
:
{
"plugin"
:
{
"list"
:
[]
},
"game"
:
{
"list"
:
[]
},
"gamePlugin"
:
{
"list"
:
[]
},
"miniprogram"
:
{
"list"
:
[
{
"name"
:
"loginAccount"
,
"pathName"
:
"pages/login/account"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"loginPhone"
,
"pathName"
:
"pages/login/phone"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"password"
,
"pathName"
:
"pages/login/password"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"login"
,
"pathName"
:
"pages/login/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"pages/learnSystem/home/home"
,
"pathName"
:
"pages/learnSystem/home/home"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"pages/learnSystem/my/my"
,
"pathName"
:
"pages/learnSystem/my/my"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"pages/videoPlayer/show"
,
"pathName"
:
"pages/videoPlayer/show"
,
"query"
:
"cid=6549489626027917312&sid=6552021107166150656&vid=6414742983802880000&type=3"
,
"scene"
:
null
},
{
"name"
:
"pages/course/player"
,
"pathName"
:
"pages/course/player"
,
"query"
:
"semester_id=6587527700271857664&id=6438627385595133952&chapter_id=6438608301109280768"
,
"scene"
:
null
},
{
"name"
:
"我的学分"
,
"pathName"
:
"pages/learnSystem/myScore/myScore"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"pages/learnSystem/courseSquare/courseSquare"
,
"pathName"
:
"pages/learnSystem/courseSquare/courseSquare"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"pages/learnSystem/courseContent/courseContent"
,
"pathName"
:
"pages/learnSystem/courseContent/courseContent"
,
"query"
:
"id=6437333026132197376&sid=6552021107166150656"
,
"scene"
:
null
}
]
}
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论