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
6547261b
Commit
6547261b
authored
Jul 20, 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
b3cf3c85
2ebefd8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
264 additions
and
290 deletions
+264
-290
index.vue
src/components/subject-statistics/index.vue
+144
-128
index.vue
src/pages/index/index.vue
+120
-162
No files found.
src/components/subject-statistics/index.vue
View file @
6547261b
<
template
>
<view
class=
"u-flex statis"
>
<view
class=
"u-flex top"
>
<view
class=
"u-flex avatar"
>
<view
class=
"avatar-list"
v-for=
"(item, index) in info.avatar"
:key=
"index"
><image
:src=
"item"
mode=
"scaleToFill"
/></view>
</view>
<view
class=
"notice"
>
<u-notice-bar
mode=
"horizontal"
type=
"none"
font-size=
"24"
:list=
"info.dynamic"
bg-color=
"#fff"
color=
"#2953FF"
:volume-icon=
"false"
autoplay
padding=
"0 10rpx"
></u-notice-bar>
</view>
</view>
<view
class=
"u-flex center"
>
<view
class=
"u-flex topics"
>
<view
class=
"topics-lists"
>
今日做题:
<u-count-to
:start-val=
"0"
:end-val=
"info.today"
:font-size=
"32"
color=
"#191C27"
></u-count-to>
<view
class=
"statis"
>
<image
class=
"background-image"
:src=
"meiriyilianImage"
></image>
<view
class=
"content-view"
>
<view
class=
"u-flex top"
>
<view
class=
"u-flex avatar"
>
<view
class=
"avatar-list"
v-for=
"(item, index) in info.avatar"
:key=
"index"
><image
:src=
"item"
mode=
"scaleToFill"
/></view>
</view>
<view
class=
"topics-lists"
>
累计做题:
<u-count-to
:start-val=
"0"
:end-val=
"info.total"
:font-size=
"32"
color=
"#191C27"
></u-count-to>
<view
class=
"notice"
>
<u-notice-bar
mode=
"horizontal"
type=
"none"
font-size=
"26"
:list=
"info.dynamic"
color=
"#FFFFFF"
:volume-icon=
"false"
autoplay
padding=
"0 10rpx"
></u-notice-bar>
</view>
</view>
<view
class=
"u-flex days"
>
<view
class=
"days-lists"
>
<u-count-to
:start-val=
"0"
:end-val=
"info.days"
:font-size=
"60"
color=
"#191C27"
></u-count-to>
<text
class=
"unit"
>
Days
</text>
<view
class=
"u-flex center"
>
<view
v-for=
"(value, key) in detailLabels"
:key=
"key"
class=
"item-view"
>
<view
v-if=
"key == 'total'"
class=
"line-view"
></view>
<view
class=
"left-view"
>
<view
class=
"count-view"
>
{{
info
[
key
]
}}
</view>
<view>
{{
value
}}
</view>
</view>
<view
v-if=
"key == 'total'"
class=
"line-view"
></view>
</view>
<view
class=
"days-lists"
>
累计坚持
</view>
</view>
</view>
<view
class=
"bottom"
>
<u-button
:custom-style=
"btnStyle"
type=
"primary"
shape=
"circle"
@
click=
"answer"
>
去练习
</u-button
>
<view
class=
"bottom"
>
<view
class=
"bottom-button"
type=
"primary"
shape=
"circle"
@
click=
"$u.throttle(answer, 500)"
><image
class=
"button-image"
:src=
"lianxianniuImage"
></image
>
每日一练
</view
>
</view>
</view>
</view>
</
template
>
...
...
@@ -94,25 +73,23 @@ export default {
}
},
computed
:
{
btnStyle
()
{
return
this
.
buttonDisabled
?
{
width
:
'320rpx'
,
height
:
'104rpx'
,
fontSize
:
'32rpx'
,
fontWeight
:
'bold'
,
backgroundColor
:
'#D2D5DE'
,
}
:
{
width
:
'320rpx'
,
height
:
'104rpx'
,
fontSize
:
'32rpx'
,
fontWeight
:
'bold'
,
backgroundColor
:
'#2953FF'
,
}
detailLabels
()
{
return
{
today
:
'今日做题'
,
total
:
'累计做题'
,
days
:
'累计天数'
,
}
},
buttonDisabled
()
{
return
this
.
$u
.
test
.
isEmpty
(
this
.
info
.
selected
)
avatars
()
{
return
this
.
info
.
avatar
.
length
>
4
?
this
.
info
.
avatar
.
slice
(
0
,
4
)
:
this
.
info
.
avatar
},
meiriyilianImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'meiriyilianquyu.png'
},
lianxianniuImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'lianxianniu.png'
},
},
created
()
{},
...
...
@@ -126,65 +103,104 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.statis
{
flex-flow
:
column
;
background
:
#fff
;
padding
:
30rpx
30rpx
40rpx
30rpx
;
//
flex-flow: column;
//
background: #fff;
//
padding: 30rpx 30rpx 40rpx 30rpx;
border-radius
:
24rpx
;
.top
{
width
:
100%
;
margin-left
:
6rpx
;
.avatar
{
padding-right
:
16rpx
;
.avatar-list
{
width
:
40rpx
;
height
:
40rpx
;
margin-left
:
-6rpx
;
image
{
width
:
50rpx
;
height
:
50rpx
;
border
:
2rpx
solid
#ccc
;
background
:
#fff
;
border-radius
:
50%
;
margin-right
:
1px
;
overflow
:
hidden
;
position
:
relative
;
box-shadow
:
0px
10px
16px
rgba
(
29
,
53
,
155
,
0
.2
);
margin-bottom
:
56rpx
;
z-index
:
0
;
height
:
472rpx
;
.background-image
{
position
:
absolute
;
z-index
:
-1
;
height
:
472rpx
;
width
:
702rpx
;
}
.content-view
{
padding
:
40rpx
30rpx
;
.top
{
width
:
100%
;
margin-left
:
15rpx
;
display
:
flex
;
align-items
:
center
;
.avatar
{
.avatar-list
{
margin-left
:
-15rpx
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
image
{
width
:
44rpx
;
height
:
44rpx
;
border
:
2rpx
solid
#ccc
;
background
:
#fff
;
border-radius
:
50%
;
margin-right
:
1px
;
}
}
}
.notice
{
flex
:
1
;
width
:
100%
;
}
}
.notice
{
flex
:
1
;
.center
{
width
:
100%
;
}
}
.center
{
width
:
100%
;
justify-content
:
space-around
;
padding-top
:
20rpx
;
.days
{
flex-flow
:
column
;
flex
:
1
;
.days-lists
{
color
:
#9ea5bb
;
padding
:
5rpx
0rpx
;
.unit
{
color
:
#5a6073
;
font-size
:
36rpx
;
font-weight
:
bold
;
padding-left
:
10rpx
;
justify-content
:
space-around
;
padding-top
:
56rpx
;
padding-bottom
:
66rpx
;
.item-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.left-view
{
text-align
:
center
;
color
:
#ffffff
;
font-size
:
26rpx
;
width
:
240rpx
;
.count-view
{
font-weight
:
bold
;
font-size
:
48rpx
;
margin-bottom
:
6rpx
;
}
}
.line-view
{
width
:
2rpx
;
background-color
:
#ffffff
;
height
:
70rpx
;
}
}
}
.topics
{
flex-flow
:
column
;
flex
:
1
;
border-right
:
2rpx
solid
#e8ebf3
;
.topics-lists
{
width
:
100%
;
padding
:
10rpx
0rpx
;
color
:
#9ea5bb
;
.bottom
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.bottom-button
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
position
:
relative
;
overflow
:
hidden
;
z-index
:
0
;
border-radius
:
52rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#2953ff
;
height
:
104rpx
;
width
:
400rpx
;
.button-image
{
width
:
400rpx
;
height
:
104rpx
;
position
:
absolute
;
z-index
:
-1
;
}
}
}
}
.bottom
{
margin-top
:
54rpx
;
}
}
</
style
>
src/pages/index/index.vue
View file @
6547261b
...
...
@@ -11,7 +11,6 @@
></u-navbar>
<view
class=
"content"
>
<view
class=
"exam-title-view"
@
click=
"$u.throttle(handleSelect, 500)"
>
<image
class=
"titleImage"
:src=
"imageUrl"
></image>
<text>
{{
title
}}
</text>
<u-icon
class=
"icon-view"
name=
"arrow-up-fill"
></u-icon>
</view>
...
...
@@ -19,33 +18,30 @@
<text>
您还未选择题库,请先选择题库
</text>
</view>
<view
v-else
class=
"detail-view"
>
<view
class=
"detail-item"
><image
class=
"detail-image"
:src=
"imageUrl"
></image
><text>
{{
selected
.
location
}}
</text></view
>
<view
class=
"detail-item"
><image
class=
"detail-image"
:src=
"imageUrl"
></image>
通过率:
<text
class=
"pass-text"
>
{{
selected
.
pass
}}
</text
></view
<view
v-for=
"(item, index) in detailItems"
:key=
"index"
:class=
"['detail-item',
{ 'pass-text': item.key == 'pass' }]"
>
<image
class=
"detail-image"
:style=
"item.imageStyle"
:src=
"item.image"
></image
><text
v-if=
"item.title"
class=
"detail-title"
>
{{
item
.
title
}}
</text
><text
class=
"detail-text"
>
{{
selected
[
item
.
key
]
}}
</text></view
>
</view>
<view
class=
"tip-card-view"
>
<view
class=
"tip-card-message"
>
<image
class=
"tip-image"
:src=
"imageUrl"
></image
><text>
绑卡或者购买该题库后,即可刷题或模拟考试
</text>
</view>
</view>
<SubjectStatistics
:info=
"info"
@
answer=
"handleAnswer"
></SubjectStatistics>
<view
class=
"exam-mark"
>
<view
v-for=
"(item, index) in marks"
:key=
"index"
>
<view
v-for=
"(item, index) in marks"
:key=
"index"
class=
"list-view"
>
<image
class=
"exam-image"
:src=
"item.image"
></image>
<view>
{{
item
.
name
}}
</view>
<view
class=
"exam-count"
><view>
{{
item
.
allValue
?
item
.
value
+
'/'
+
item
.
allValue
:
item
.
value
}}
</view
><view
class=
"exam-fen"
v-if=
"index == 1"
>
分
</view></view
>
<view
class=
"right-view"
>
<view>
{{
item
.
name
}}
</view>
<view
class=
"label-view"
>
{{
item
.
label
}}
</view>
</view>
</view>
<view
class=
"line-view"
></view>
</view>
...
...
@@ -62,20 +58,10 @@
<view>
{{
item
.
title
}}
</view>
</view>
</view>
<view
class=
"daily-practice"
@
click=
"$u.throttle(handleClickFile, 500)"
>
<view
class=
"daily-practice-left"
>
<image
:src=
"imageUrl"
class=
"file-image"
></image>
<text>
每日一练
</text>
</view>
<view
class=
"daily-practice-right"
>
<text>
累计打卡
{{
info
.
days
}}
天
</text>
<u-icon
class=
"arrow-right"
name=
"arrow-right"
></u-icon>
</view>
<view
class=
"bottom-view"
>
<image
class=
"bottom-image"
:src=
"mokaodashiImage"
></image>
<view>
想要轻松考过,首选模考大师
</view>
</view>
<SubjectStatistics
:info=
"info"
@
answer=
"handleAnswer"
></SubjectStatistics>
</view>
<ExperiencePop
:visible
.
sync=
"visible"
/>
</view>
...
...
@@ -93,7 +79,8 @@ export default {
selected
:
{
key
:
0
,
name
:
'熔化焊接与热切割作业'
,
location
:
'广东省试题'
,
location
:
'黑龙江省题'
,
count
:
'899'
,
pass
:
'96%'
,
},
}
...
...
@@ -108,20 +95,20 @@ export default {
noExam
()
{
return
this
.
$u
.
test
.
isEmpty
(
this
.
selected
.
name
)
},
mokaodashiImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mokaodashi.png'
},
marks
()
{
return
[
{
key
:
'all'
,
name
:
'全部试题'
,
value
:
0
,
allValue
:
999
,
image
:
this
.
imageUrl
,
label
:
'题库进阶练习'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'quanbushiti.png'
,
},
{
key
:
'moni'
,
name
:
'模拟'
,
value
:
999
,
image
:
this
.
imageUrl
,
name
:
'模拟考试'
,
label
:
'真题模拟强化'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'monishiti.png'
,
},
]
},
...
...
@@ -131,7 +118,7 @@ export default {
today
:
0
,
total
:
0
,
dynamic
:
[
'2分钟前 李**完成了“高空作业习题”练习'
],
avatar
:
[
this
.
imageUrl
,
this
.
imageUrl
,
this
.
imageUrl
],
avatar
:
[
this
.
imageUrl
,
this
.
imageUrl
,
this
.
imageUrl
,
this
.
imageUrl
],
selected
:
this
.
selected
,
}
},
...
...
@@ -141,36 +128,51 @@ export default {
pathName
:
'pages/xxx/xxx'
,
title
:
'专项练习'
,
value
:
''
,
icon
:
this
.
imageUrl
,
imageStyle
:
'width:
60rpx;height:60
rpx'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'zhuanxiang.png'
,
imageStyle
:
'width:
72rpx;height:64
rpx'
,
},
{
pathName
:
'pages/xxx/xxx'
,
title
:
'
我的错题
'
,
title
:
'
错题记录
'
,
value
:
''
,
icon
:
this
.
imageUrl
,
imageStyle
:
'width:6
0rpx;height:60
rpx'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'cuotijilu.png'
,
imageStyle
:
'width:6
2rpx;height:64
rpx'
,
},
{
pathName
:
'pages/xxx/xxx'
,
title
:
'收藏的题'
,
value
:
''
,
icon
:
this
.
imageUrl
,
imageStyle
:
'width:
60rpx;height:60
rpx'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'shoucangdeti.png'
,
imageStyle
:
'width:
76rpx;height:64
rpx'
,
},
{
pathName
:
'pages/xxx/xxx'
,
title
:
'
我的成绩
'
,
title
:
'
试题搜索
'
,
value
:
''
,
icon
:
this
.
imageUrl
,
imageStyle
:
'width:6
0rpx;height:60
rpx'
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'sousuoshiti.png'
,
imageStyle
:
'width:6
2rpx;height:64
rpx'
,
},
]
},
detailItems
()
{
return
[
{
pathName
:
'pages/xxx/xxx'
,
title
:
'搜索试题'
,
value
:
''
,
icon
:
this
.
imageUrl
,
imageStyle
:
'width:60rpx;height:60rpx'
,
title
:
''
,
key
:
'location'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'quyu.png'
,
imageStyle
:
'width:24rpx;height:28rpx'
,
},
{
title
:
'通过率:'
,
key
:
'pass'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'gailv.png'
,
imageStyle
:
'width:28rpx;height:28rpx'
,
},
{
title
:
'题目数:'
,
key
:
'count'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'timushu.png'
,
imageStyle
:
'width:28rpx;height:30rpx'
,
},
]
},
...
...
@@ -237,14 +239,14 @@ export default {
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
background-color
:
#f
8fafd
;
background-color
:
#f
7f9fc
;
background-image
:
linear-gradient
(
to
top
,
#f8fafd
0%
,
#e9f3ff
50%
);
background-size
:
100%
520rpx
;
background-repeat
:
no-repeat
;
.content
{
height
:
100%
;
overflow
:
auto
;
padding
:
16rpx
24rpx
;
padding
:
16rpx
24rpx
50rpx
24rpx
;
.exam-title-view
{
color
:
#191c27
;
font-weight
:
bold
;
...
...
@@ -269,68 +271,52 @@ export default {
margin-top
:
22rpx
;
margin-bottom
:
40rpx
;
}
.tip-card-view
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.tip-card-message
{
font-size
:
26rpx
;
color
:
#2953ff
;
border-radius
:
12rpx
12rpx
0
0
;
border-width
:
2rpx
2rpx
0
2rpx
;
border-style
:
solid
;
border-color
:
#2953ff
;
width
:
640rpx
;
line-height
:
60rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
60rpx
;
.tip-image
{
width
:
28rpx
;
height
:
28rpx
;
margin-right
:
10rpx
;
}
}
}
.detail-view
{
display
:
flex
;
align-items
:
center
;
margin-top
:
22
rpx
;
margin-bottom
:
40
rpx
;
align-items
:
flex-start
;
margin-top
:
14
rpx
;
margin-bottom
:
36
rpx
;
.detail-item
{
color
:
#9ea5bb
;
font-size
:
28rpx
;
margin-right
:
4
0rpx
;
margin-right
:
3
0rpx
;
display
:
flex
;
align-items
:
center
;
align-items
:
flex-start
;
.detail-title
{
color
:
#9ea5bb
;
}
.detail-image
{
width
:
28rpx
;
height
:
28rpx
;
margin-right
:
10rpx
;
margin-top
:
4rpx
;
}
.detail-text
{
word-break
:
break-all
;
max-width
:
140rpx
;
}
.pass-text
{
&
.pass-text
{
color
:
#2953ff
;
}
}
}
.sub-content
{
display
:
flex
;
justify-content
:
space-
around
;
justify-content
:
space-
between
;
align-items
:
center
;
margin
:
60rpx
0
;
margin
:
60rpx
0
160rpx
0
;
.sub-content-item
{
color
:
#5a6073
;
font-size
:
26rpx
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
space-between
;
flex-direction
:
column
;
align-items
:
center
;
width
:
152rpx
;
height
:
176rpx
;
background-color
:
#ffffff
;
border-radius
:
16rpx
;
padding
:
30rpx
0
;
.sub-image
{
width
:
60rpx
;
height
:
60rpx
;
margin-bottom
:
14rpx
;
margin-bottom
:
20rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
...
...
@@ -338,73 +324,45 @@ export default {
}
}
.exam-mark
{
height
:
280rpx
;
border-radius
:
24rpx
;
background-image
:
linear-gradient
(
to
top
right
,
#2953ff
0%
,
#2272ff
50%
);
box-shadow
:
0px
10px
16px
rgba
(
29
,
53
,
155
,
0
.2
);
font-size
:
28rpx
;
text-align
:
center
;
position
:
relative
;
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
color
:
#ffffff
;
padding-top
:
14rpx
;
.exam-image
{
width
:
50rpx
;
height
:
54rpx
;
margin-bottom
:
10rpx
;
}
.exam-count
{
justify-content
:
space-between
;
.list-view
{
width
:
340rpx
;
height
:
136rpx
;
border-radius
:
16rpx
;
display
:
flex
;
align-items
:
flex-end
;
font-weight
:
bold
;
margin-top
:
24rpx
;
font-size
:
52rpx
;
.exam-fen
{
font-size
:
28rpx
;
font-weight
:
400
;
padding-bottom
:
10rpx
;
padding-left
:
10rpx
;
}
}
.line-view
{
position
:
absolute
;
left
:
auto
;
right
:
auto
;
top
:
auto
;
bottom
:
auto
;
height
:
160rpx
;
width
:
2rpx
;
align-items
:
center
;
background-color
:
#ffffff
;
.exam-image
{
width
:
96rpx
;
height
:
96rpx
;
padding-left
:
24rpx
;
padding-right
:
16rpx
;
}
.right-view
{
color
:
#191c27
;
font-size
:
32rpx
;
font-weight
:
bold
;
.label-view
{
color
:
#9ea5bb
;
font-weight
:
400
;
font-size
:
26rpx
;
margin-top
:
4rpx
;
}
}
}
}
.
daily-practice
{
.
bottom-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
30rpx
;
.daily-practice-left
{
color
:
#191c27
;
font-weight
:
bold
;
font-size
:
32rpx
;
display
:
flex
;
align-items
:
center
;
.file-image
{
width
:
34rpx
;
height
:
34rpx
;
flex-shrink
:
0
;
margin-right
:
16rpx
;
}
}
.daily-practice-right
{
color
:
#191c27
;
font-size
:
26rpx
;
.arrow-right
{
color
:
#9ea5bb
;
font-size
:
28rpx
;
margin-left
:
2rpx
;
}
justify-content
:
center
;
font-size
:
26rpx
;
color
:
#adbdd4
;
.bottom-image
{
width
:
56rpx
;
height
:
56rpx
;
margin-right
:
14rpx
;
}
}
}
...
...
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