Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
e59dd7f5
提交
e59dd7f5
authored
7月 11, 2019
作者:
hexi
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into bluestar
上级
8676efb7
dfe381a4
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
103 行增加
和
31 行删除
+103
-31
CourseApi.js
learnOnline/apiService/CourseApi.js
+2
-2
ScoreApi.js
learnOnline/apiService/ScoreApi.js
+2
-1
courseContent.js
learnOnline/pages/learnSystem/courseContent/courseContent.js
+13
-9
examDetail.js
.../pages/learnSystem/courseContent/examDetail/examDetail.js
+3
-3
myScore.js
learnOnline/pages/learnSystem/myScore/myScore.js
+3
-2
myScore.wxml
learnOnline/pages/learnSystem/myScore/myScore.wxml
+34
-12
myScore.wxss
learnOnline/pages/learnSystem/myScore/myScore.wxss
+46
-2
没有找到文件。
learnOnline/apiService/CourseApi.js
浏览文件 @
e59dd7f5
...
@@ -186,9 +186,9 @@ const getCourseAssess = (cid, sid, callback) => {
...
@@ -186,9 +186,9 @@ const getCourseAssess = (cid, sid, callback) => {
})
})
}
}
/* 获取试题信息 */
/* 获取试题信息 */
const
getExamDetail
=
(
eid
,
sid
,
callback
)
=>
{
const
getExamDetail
=
(
eid
,
sid
,
c
ourseid
,
c
allback
)
=>
{
util
.
requestApi
({
util
.
requestApi
({
url
:
util
.
config
.
URL_PATH1
+
'/v2/education/homeworks/'
+
sid
+
'/'
+
eid
,
url
:
util
.
config
.
URL_PATH1
+
'/v2/education/homeworks/'
+
sid
+
'/'
+
courseid
+
'/'
+
eid
,
callback
:
function
(
res
)
{
callback
:
function
(
res
)
{
callback
(
res
)
callback
(
res
)
}
}
...
...
learnOnline/apiService/ScoreApi.js
浏览文件 @
e59dd7f5
...
@@ -18,7 +18,8 @@ const getMyScore = (callback) => {
...
@@ -18,7 +18,8 @@ const getMyScore = (callback) => {
myMustStr
:
_data
.
required_credits
&&
((
_data
.
my_required_credits
*
1.0
/
_data
.
required_credits
*
100
).
toFixed
(
1
)
+
'%'
)
||
'0%'
,
myMustStr
:
_data
.
required_credits
&&
((
_data
.
my_required_credits
*
1.0
/
_data
.
required_credits
*
100
).
toFixed
(
1
)
+
'%'
)
||
'0%'
,
unmust
:
_data
.
optional_credits
,
unmust
:
_data
.
optional_credits
,
myUnmust
:
_data
.
my_optional_credits
,
myUnmust
:
_data
.
my_optional_credits
,
myUnmustStr
:
_data
.
optional_credits
&&
((
_data
.
my_optional_credits
*
1.0
/
_data
.
optional_credits
*
100
).
toFixed
(
1
)
+
'%'
)
||
'0%'
myUnmustStr
:
_data
.
optional_credits
&&
((
_data
.
my_optional_credits
*
1.0
/
_data
.
optional_credits
*
100
).
toFixed
(
1
)
+
'%'
)
||
'0%'
,
lists
:
_data
.
lists
}
}
callback
(
json
)
callback
(
json
)
}
}
...
...
learnOnline/pages/learnSystem/courseContent/courseContent.js
浏览文件 @
e59dd7f5
...
@@ -114,16 +114,20 @@ Page({
...
@@ -114,16 +114,20 @@ Page({
this
.
cid
=
options
.
id
this
.
cid
=
options
.
id
this
.
sid
=
options
.
sid
this
.
sid
=
options
.
sid
CourseApi
.
getCourseDetail
(
this
.
cid
,
this
.
sid
,
(
json
)
=>
{
if
(
this
.
cid
!=
''
&&
this
.
sid
!=
''
)
{
this
.
setData
({
'headerInfo'
:
json
.
headerInfo
})
CourseApi
.
getCourseDetail
(
this
.
cid
,
this
.
sid
,
(
json
)
=>
{
this
.
setData
({
'tabs[0].content'
:
json
.
tabs0Content
})
this
.
setData
({
'headerInfo'
:
json
.
headerInfo
})
this
.
setData
({
'tabs[1].chapterList'
:
json
.
tabs1ChapterList
})
this
.
setData
({
'tabs[0].content'
:
json
.
tabs0Content
})
json
.
tabs3richTest
&&
this
.
setData
({
'tabs[3].richText'
:
json
.
tabs3richTest
.
replace
(
/<img.*
?(
src=
[
"|'
]
.*
?[
"|'
])
.*
?
>/gi
,
'<img width="100%" $1>'
)
})
this
.
setData
({
'tabs[1].chapterList'
:
json
.
tabs1ChapterList
})
CourseApi
.
getCourseAssess
(
this
.
cid
,
this
.
sid
,
(
json1
)
=>
{
json
.
tabs3richTest
&&
this
.
setData
({
'tabs[3].richText'
:
json
.
tabs3richTest
.
replace
(
/<img.*
?(
src=
[
"|'
]
.*
?[
"|'
])
.*
?
>/gi
,
'<img width="100%" $1>'
)
})
this
.
setData
({
'tabs[3].assess'
:
json1
})
CourseApi
.
getCourseAssess
(
this
.
cid
,
this
.
sid
,
(
json1
)
=>
{
wx
.
hideLoading
()
this
.
setData
({
'tabs[3].assess'
:
json1
})
wx
.
hideLoading
()
})
})
})
})
}
else
{
wx
.
showLoading
({
title
:
'页面数据异常,请联系管理员!'
,
mask
:
true
})
}
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
...
...
learnOnline/pages/learnSystem/courseContent/examDetail/examDetail.js
浏览文件 @
e59dd7f5
...
@@ -131,7 +131,7 @@ Page({
...
@@ -131,7 +131,7 @@ Page({
if
(
wx
.
getStorageSync
(
'_homework'
))
{
if
(
wx
.
getStorageSync
(
'_homework'
))
{
this
.
setData
({
'exam'
:
this
.
updateData
(
wx
.
getStorageSync
(
'_homework'
))
})
this
.
setData
({
'exam'
:
this
.
updateData
(
wx
.
getStorageSync
(
'_homework'
))
})
}
}
CourseApi
.
getExamDetail
(
this
.
data
.
exam
.
id
,
this
.
data
.
exam
.
semester_id
,
(
res
)
=>
{
CourseApi
.
getExamDetail
(
this
.
data
.
exam
.
id
,
this
.
data
.
exam
.
semester_id
,
this
.
param
.
course_id
,
(
res
)
=>
{
let
_data
=
res
.
data
let
_data
=
res
.
data
let
json
=
_data
.
homework
let
json
=
_data
.
homework
if
(
json
)
{
if
(
json
)
{
...
@@ -214,11 +214,11 @@ Page({
...
@@ -214,11 +214,11 @@ Page({
}
}
// this.unArrRandomSort(arr)
// this.unArrRandomSort(arr)
this
.
param
.
work_contents
=
JSON
.
stringify
(
arr
)
this
.
param
.
work_contents
=
JSON
.
stringify
(
arr
)
this
.
param
.
score
=
(
score
/
total
*
100
).
toFixed
(
1
)
this
.
param
.
score
=
(
score
/
total
*
100
).
toFixed
(
1
)
;
wx
.
showLoading
({
title
:
'提交中...'
,
mask
:
true
})
wx
.
showLoading
({
title
:
'提交中...'
,
mask
:
true
})
CourseApi
.
submitExamDetail
(
this
.
param
,
(
res
)
=>
{
CourseApi
.
submitExamDetail
(
this
.
param
,
(
res
)
=>
{
if
(
res
.
data
.
status
)
{
if
(
res
.
data
.
status
)
{
CourseApi
.
getExamDetail
(
this
.
data
.
exam
.
id
,
this
.
data
.
exam
.
semester_id
,
(
res
)
=>
{
CourseApi
.
getExamDetail
(
this
.
data
.
exam
.
id
,
this
.
data
.
exam
.
semester_id
,
this
.
param
.
course_id
,
(
res
)
=>
{
let
_data
=
res
.
data
let
_data
=
res
.
data
let
json
=
_data
.
homework
let
json
=
_data
.
homework
if
(
json
)
{
if
(
json
)
{
...
...
learnOnline/pages/learnSystem/myScore/myScore.js
浏览文件 @
e59dd7f5
...
@@ -15,7 +15,8 @@ Page({
...
@@ -15,7 +15,8 @@ Page({
myMustStr
:
'0%'
,
myMustStr
:
'0%'
,
unmust
:
0
,
unmust
:
0
,
myUnmust
:
0
,
myUnmust
:
0
,
myUnmustStr
:
'0%'
myUnmustStr
:
'0%'
,
lists
:
[]
}
}
},
},
/**
/**
...
@@ -24,7 +25,7 @@ Page({
...
@@ -24,7 +25,7 @@ Page({
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
wx
.
showLoading
({
title
:
'页面加载中...'
,
mask
:
true
})
wx
.
showLoading
({
title
:
'页面加载中...'
,
mask
:
true
})
ScoreApi
.
getMyScore
((
json
)
=>
{
ScoreApi
.
getMyScore
((
json
)
=>
{
this
.
setData
({
'score'
:
json
})
this
.
setData
({
'score'
:
json
})
;
wx
.
hideLoading
()
wx
.
hideLoading
()
})
})
},
},
...
...
learnOnline/pages/learnSystem/myScore/myScore.wxml
浏览文件 @
e59dd7f5
...
@@ -6,21 +6,43 @@
...
@@ -6,21 +6,43 @@
<view class='text {{score.myTotal/score.total>0.2 ? "" : "left"}}'>{{score.myTotal}} (分)</view>
<view class='text {{score.myTotal/score.total>0.2 ? "" : "left"}}'>{{score.myTotal}} (分)</view>
</view>
</view>
</view>
</view>
<view class='col-5'>
<view class='title'>必修学分<view class='score'>{{score.must}}</view></view>
<view class="col">
<view class='pro-line must'>
<view class='col-5'>
<view class='active' style='width: {{score.myMustStr}};'>
<view class='title'>必修学分<view class='score'>{{score.must}}</view></view>
<view class='text {{score.myMust/score.must>0.4 ? "" : "left"}}'>{{score.myMust}} (分)</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>
</view>
</view>
</view>
</view>
</view
>
<view class='col-5 right'
>
<view class='col-5 right'
>
<view class='title'>选修学分<view class='score'>{{score.unmust}}</view></view
>
<view class='title'>选修学分<view class='score'>{{score.unmust}}</view></view
>
<view class='pro-line unmust'
>
<view class='pro-line unmust
'>
<view class='active' style='width: {{score.myUnmustStr}};
'>
<view class='active' style='width: {{score.myUnmustStr}};'
>
<view class='text {{score.myUnmust/score.unmust>0.4 ? "" : "left"}}'>{{score.myUnmust}} (分)</view
>
<
view class='text {{score.myUnmust/score.unmust>0.4 ? "" : "left"}}'>{{score.myUnmust}} (分)<
/view>
</view>
</view>
</view>
</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'>
<text class="col6-td1">序号</text>
<text class="col6-td2">学期</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>
</view>
</view>
</view>
learnOnline/pages/learnSystem/myScore/myScore.wxss
浏览文件 @
e59dd7f5
...
@@ -10,4 +10,48 @@
...
@@ -10,4 +10,48 @@
.my-score .pro-line.must .active { background: #8ca4cf; }
.my-score .pro-line.must .active { background: #8ca4cf; }
.my-score .pro-line.unmust .active { background: #66c6bd; }
.my-score .pro-line.unmust .active { background: #66c6bd; }
.my-score .col-5 { float: left; width: 49%; }
.my-score .col-5 { float: left; width: 49%; }
.my-score .col-5.right { float: right; }
.my-score .col-5.right { float: right; }
\ No newline at end of file
.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;
}
.my-score .list-title .col6-td1 {
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;
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论