Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Damon
study
Commits
15ea1c0a
Commit
15ea1c0a
authored
Aug 02, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0
parents
b7e5dd2e
ed85eaa7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
146 deletions
+45
-146
upload.js
src/common/upload.js
+25
-25
record.vue
src/pages/learn/record.vue
+5
-113
score.vue
src/pages/learn/score.vue
+15
-8
No files found.
src/common/upload.js
View file @
15ea1c0a
...
@@ -40,33 +40,33 @@ function openSetting() {
...
@@ -40,33 +40,33 @@ function openSetting() {
//吊起设备原生相机相册取得文件,并自动上传七牛,返回七牛key,domain,本地file信息
//吊起设备原生相机相册取得文件,并自动上传七牛,返回七牛key,domain,本地file信息
function
getPhoto
(
type
,
token
)
{
function
getPhoto
(
type
,
token
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
hasPermissionOfCamera
().
then
((
r
)
=>
{
// hasPermissionOfCamera().then((r) => {
if
(
!
r
)
{
// if (!r) {
reject
(
false
)
// reject(false)
}
// }
let
sourceType
=
type
==
1
?
[
'album'
]
:
[
'album'
,
'camera'
]
let
sourceType
=
type
==
1
?
[
'album'
]
:
[
'album'
,
'camera'
]
uni
.
chooseImage
({
uni
.
chooseImage
({
count
:
1
,
//默认9
count
:
1
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
sourceType
,
//从相册选择
sourceType
:
sourceType
,
//从相册选择
success
:
function
(
res
)
{
success
:
function
(
res
)
{
//上传七牛
//上传七牛
let
filePath
=
res
.
tempFiles
[
0
].
path
//为需要上传的文件
let
filePath
=
res
.
tempFiles
[
0
].
path
//为需要上传的文件
upload
(
filePath
,
token
)
upload
(
filePath
,
token
)
.
then
((
msg
)
=>
{
.
then
((
msg
)
=>
{
//最后七牛返回的key
//最后七牛返回的key
resolve
({
resolve
({
key
:
msg
,
key
:
msg
,
files
:
res
.
tempFiles
,
files
:
res
.
tempFiles
,
})
})
})
.
catch
((
msg
)
=>
{
})
console
.
error
(
msg
)
.
catch
((
msg
)
=>
{
reject
(
msg
)
console
.
error
(
msg
)
}
)
reject
(
msg
)
},
})
}
)
}
,
})
})
// })
})
})
}
}
...
...
src/pages/learn/record.vue
View file @
15ea1c0a
...
@@ -82,7 +82,10 @@
...
@@ -82,7 +82,10 @@
canvasId=
"scroll-viewid"
canvasId=
"scroll-viewid"
:pageScrollTop=
"pageScrollTop"
:pageScrollTop=
"pageScrollTop"
background=
"none"
background=
"none"
:opts=
"
{enableScroll:true,xAxis:{scrollShow:true,itemCount:4,disableGrid:true}}"
:opts=
"
{
enableScroll: true,
xAxis: { scrollShow: true, itemCount: 4, disableGrid: true },
}"
:ontouch="true"
:ontouch="true"
:disableScroll="true"
:disableScroll="true"
/>
/>
...
@@ -191,86 +194,10 @@ export default {
...
@@ -191,86 +194,10 @@ export default {
// }, 500)
// }, 500)
})
})
}
}
this
.
chartInit
(
)
this
.
studyRecord
(
this
.
nearlySevenDays
()
)
this
.
queryExamRecord
()
this
.
queryExamRecord
()
},
},
methods
:
{
methods
:
{
chartInit
()
{
// this.chartData.series = [
// {
// name: '答题数',
// pointShape: 'circle',
// legendShape: 'circle',
// data: [
// [10000, 55], // 【日期, 数值】
// [30000, 25],
// [50000, 55],
// [70000, 25],
// [90000, 55],
// ],
// },
// {
// name: '正确数',
// pointShape: 'circle',
// legendShape: 'circle',
// data: [
// [0, 25],
// [20000, 55],
// [40000, 25],
// [60000, 55],
// [80000, 25],
// ],
// },
// ]
this
.
chartData
.
categories
=
[
'2013/1/24'
,
'2013/1/25'
,
'2013/1/28'
,
'2013/1/29'
,
'2013/1/30'
,
'2013/1/31'
,
'2013/2/1'
,
'2013/2/4'
,
'2013/2/5'
,
]
this
.
chartData
.
series
=
[
{
name
:
'成交量1'
,
pointShape
:
'circle'
,
legendShape
:
'circle'
,
data
:
[
15
,
20
,
45
,
37
,
43
,
15
,
20
,
45
,
37
,
],
},
{
name
:
'成交量2'
,
pointShape
:
'circle'
,
legendShape
:
'circle'
,
data
:
[
20
,
45
,
37
,
43
,
15
,
20
,
45
,
37
,
43
,
],
},
]
//this.studyRecord(this.nearlySevenDays())
},
// 每日一练统计
// 每日一练统计
everyTaskList
(
year
,
month
)
{
everyTaskList
(
year
,
month
)
{
var
params
=
{
var
params
=
{
...
@@ -300,48 +227,13 @@ export default {
...
@@ -300,48 +227,13 @@ export default {
this
.
$u
.
api
this
.
$u
.
api
.
studyRecord
(
this
.
questionWarehouseId
,
params
)
.
studyRecord
(
this
.
questionWarehouseId
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
'----------studyRecord------------'
,
res
)
this
.
chartData
.
series
[
0
].
data
=
[]
this
.
chartData
.
series
[
0
].
data
=
[]
this
.
chartData
.
series
[
1
].
data
=
[]
this
.
chartData
.
series
[
1
].
data
=
[]
this
.
chartData
.
categories
=
[]
this
.
chartData
.
categories
=
[]
for
(
var
item
in
res
)
{
for
(
var
item
in
res
)
{
// this.chartData.series[0].data.push([20210801, res[item].totalCount])
// this.chartData.series[0].data.push([20210802, res[item].totalCount])
// this.chartData.series[0].data.push([20210805, res[item].totalCount])
// this.chartData.series[0].data.push([20210804, res[item].totalCount])
// this.chartData.series[0].data.push([20210806, res[item].totalCount])
// this.chartData.series[0].data.push([20210807, res[item].totalCount])
// this.chartData.series[0].data.push([20210808, res[item].totalCount])
// this.chartData.series[0].data.push([20210809, res[item].totalCount])
// this.chartData.series[0].data.push([20210810, res[item].totalCount])
// this.chartData.series[1].data.push([20210801, res[item].rightCount])
// this.chartData.series[1].data.push([20210802, res[item].rightCount])
// this.chartData.series[1].data.push([20210803, res[item].rightCount])
// this.chartData.series[1].data.push([20210804, res[item].rightCount])
// this.chartData.series[1].data.push([20210805, res[item].rightCount])
// this.chartData.series[1].data.push([20210806, res[item].rightCount])
// this.chartData.series[1].data.push([20210807, res[item].rightCount])
// this.chartData.series[1].data.push([20210808, res[item].rightCount])
// this.chartData.series[1].data.push([20210809, res[item].rightCount])
this
.
chartData
.
categories
.
push
(
item
.
replace
(
/
\-
/g
,
'.'
))
this
.
chartData
.
categories
.
push
(
item
.
replace
(
/
\-
/g
,
'.'
))
// this.chartData.categories.push(item.replace(/\-/g, '.'))
// this.chartData.categories.push(item.replace(/\-/g, '.'))
// this.chartData.categories.push(item.replace(/\-/g, '.'))
// this.chartData.categories.push(item.replace(/\-/g, '.'))
this
.
chartData
.
series
[
0
].
data
.
push
(
res
[
item
].
totalCount
)
this
.
chartData
.
series
[
0
].
data
.
push
(
res
[
item
].
totalCount
)
// this.chartData.series[0].data.push(res[item].totalCount)
// this.chartData.series[0].data.push(res[item].totalCount)
// this.chartData.series[0].data.push(res[item].totalCount)
// this.chartData.series[0].data.push(res[item].totalCount)
this
.
chartData
.
series
[
1
].
data
.
push
(
res
[
item
].
rightCount
)
this
.
chartData
.
series
[
1
].
data
.
push
(
res
[
item
].
rightCount
)
// this.chartData.series[1].data.push(res[item].rightCount)
// this.chartData.series[1].data.push(res[item].rightCount)
// this.chartData.series[1].data.push(res[item].rightCount)
// this.chartData.series[1].data.push(res[item].totalCount)
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
...
...
src/pages/learn/score.vue
View file @
15ea1c0a
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<CircleProgress
<CircleProgress
class=
"progress-view"
class=
"progress-view"
active-color=
"#FFFFFF"
active-color=
"#FFFFFF"
:percent=
"
info.score
"
:percent=
"
(info.score / info.pageTotalPoint) * 100
"
inactive-color=
"rgba(255, 255, 255, 0.3)"
inactive-color=
"rgba(255, 255, 255, 0.3)"
width=
"240"
width=
"240"
border-width=
"8"
border-width=
"8"
...
@@ -127,10 +127,10 @@ export default {
...
@@ -127,10 +127,10 @@ export default {
}
}
},
},
isFull
()
{
isFull
()
{
return
this
.
info
.
score
>=
100
return
this
.
info
.
score
>=
this
.
info
.
pageTotalPoint
},
},
isPass
()
{
isPass
()
{
return
this
.
info
.
score
>=
60
return
this
.
info
.
score
>=
this
.
info
.
pageTotalPoint
*
0.6
},
},
resultText
()
{
resultText
()
{
return
this
.
isPass
?
'合格'
:
'不合格'
return
this
.
isPass
?
'合格'
:
'不合格'
...
@@ -162,11 +162,17 @@ export default {
...
@@ -162,11 +162,17 @@ export default {
var
random
=
[
94
,
99
]
var
random
=
[
94
,
99
]
if
(
this
.
info
.
score
<
60
)
{
if
(
this
.
info
.
score
<
60
)
{
random
=
[
55
,
65
]
random
=
[
55
,
65
]
}
else
if
(
this
.
info
.
score
>=
60
&&
this
.
info
.
score
<
80
)
{
}
else
if
(
this
.
info
.
score
>=
this
.
info
.
pageTotalPoint
*
0.6
&&
this
.
info
.
score
<
this
.
info
.
pageTotalPoint
*
0.8
)
{
random
=
[
66
,
85
]
random
=
[
66
,
85
]
}
else
if
(
this
.
info
.
score
>=
80
&&
this
.
info
.
score
<
90
)
{
}
else
if
(
this
.
info
.
score
>=
this
.
info
.
pageTotalPoint
*
0.8
&&
this
.
info
.
score
<
this
.
info
.
pageTotalPoint
*
0.9
)
{
random
=
[
86
,
93
]
random
=
[
86
,
93
]
}
else
if
(
this
.
info
.
score
>=
90
)
{
}
else
if
(
this
.
info
.
score
>=
this
.
info
.
pageTotalPoint
*
0.9
)
{
random
=
[
94
,
99
]
random
=
[
94
,
99
]
}
}
...
@@ -176,7 +182,7 @@ export default {
...
@@ -176,7 +182,7 @@ export default {
onShareAppMessage
(
res
)
{
onShareAppMessage
(
res
)
{
return
{
return
{
title
:
'模考大师'
,
title
:
'模考大师'
,
path
:
`/pages/learn/score?id=
${
this
.
id
}
`
path
:
`/pages/learn/score?id=
${
this
.
id
}
`
,
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -186,7 +192,7 @@ export default {
...
@@ -186,7 +192,7 @@ export default {
let
option
=
wx
.
getLaunchOptionsSync
()
let
option
=
wx
.
getLaunchOptionsSync
()
this
.
id
=
option
.
query
.
id
this
.
id
=
option
.
query
.
id
}
}
if
(
!
this
.
id
)
{
if
(
!
this
.
id
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/index/index'
,
url
:
'pages/index/index'
,
...
@@ -213,6 +219,7 @@ export default {
...
@@ -213,6 +219,7 @@ export default {
image
:
echoMap
.
studentId
.
avatarPath
,
image
:
echoMap
.
studentId
.
avatarPath
,
score
:
res
.
point
,
score
:
res
.
point
,
time
:
res
.
endDatetime
,
time
:
res
.
endDatetime
,
pageTotalPoint
:
res
.
pageTotalPoint
,
category
:
echoMap
.
questionWarehouseId
.
title
,
category
:
echoMap
.
questionWarehouseId
.
title
,
type
:
'模拟考试'
,
type
:
'模拟考试'
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment