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
6963461c
Commit
6963461c
authored
Jul 20, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页每日一练弹窗
parent
ba416460
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
157 additions
and
1 deletion
+157
-1
index.vue
src/components/experience-pop/index.vue
+137
-0
index.vue
src/pages/index/index.vue
+20
-1
No files found.
src/components/experience-pop/index.vue
0 → 100644
View file @
6963461c
<
template
>
<u-popup
v-model=
"visible"
mode=
"center"
safe-area-inset-bottom
width=
"690rpx"
:mask-close-able=
"flase"
close-icon-color=
"#FFFFFF"
height=
"86%"
>
<view
class=
"pop-view"
>
<image
mode=
"widthFix"
class=
"image-view"
:src=
"backgroundImage"
></image>
<view
class=
"head-view"
>
<view
class=
"pop-title"
>
<text>
恭喜您获得
</text>
</view>
</view>
<view
class=
"pop-content"
>
<view>
您已获得1次答题体验机会
</view>
<view
class=
"label-view"
>
每日一练,轻松完成课程练习
</view>
</view>
<u-button
:custom-style=
"customStyle"
shape=
"circle"
type=
"primary"
@
click=
"handleClick"
>
立即练习
</u-button>
</view>
<view
class=
"colse-view"
>
<image
class=
"image-view"
:src=
"closeImage"
@
click=
"$u.throttle(handleClose, 500)"
></image>
</view>
</u-popup>
</
template
>
<
script
>
export
default
{
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{}
},
computed
:
{
closeImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'dianjiquxiao.png'
},
backgroundImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'zigetanchaung.png'
},
customStyle
()
{
return
{
backgroundColor
:
'#2953FF'
,
width
:
'360rpx'
,
height
:
'96rpx'
,
color
:
'#ffffff'
,
fontWeight
:
'bold'
,
fontSize
:
'32rpx'
,
}
},
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'update:visible'
,
false
)
},
handleClick
()
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'click'
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pop-view
{
margin-top
:
80rpx
;
padding
:
48rpx
24rpx
;
position
:
relative
;
text-align
:
center
;
background-color
:
#ffffff
;
z-index
:
1
;
border-radius
:
24rpx
;
overflow
:
hidden
;
.head-view
{
width
:
100%
;
height
:
432
;
padding-top
:
10rpx
;
padding-bottom
:
300rpx
;
.pop-title
{
font-size
:
48rpx
;
text-align
:
center
;
color
:
#ffffff
;
font-weight
:
bold
;
}
}
.image-view
{
width
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
-1
;
}
.pop-content
{
margin-bottom
:
60rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
color
:
#191c27
;
margin-top
:
80rpx
;
.label-view
{
font-size
:
28rpx
;
color
:
#9ea5bb
;
margin-top
:
20rpx
;
font-weight
:
400
;
}
}
}
.colse-view
{
height
:
80rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
30rpx
;
.image-view
{
width
:
60rpx
;
height
:
60rpx
;
}
}
</
style
>
src/pages/index/index.vue
View file @
6963461c
...
...
@@ -77,15 +77,19 @@
@
answer=
"handleAnswer"
></SubjectStatistics>
</view>
<ExperiencePop
:visible
.
sync=
"visible"
/>
</view>
</
template
>
<
script
>
import
SubjectStatistics
from
'@/components/subject-statistics'
import
ExperiencePop
from
'@/components/experience-pop'
export
default
{
components
:
{
SubjectStatistics
},
components
:
{
SubjectStatistics
,
ExperiencePop
},
data
()
{
return
{
visible
:
false
,
selected
:
{
key
:
0
,
name
:
'熔化焊接与热切割作业'
,
...
...
@@ -183,6 +187,8 @@ export default {
},
methods
:
{
handleSelect
()
{
this
.
visible
=
true
return
// if (this.vuex_token) {
var
str
=
this
.
selected
?
'selectedList'
:
'addExam'
this
.
$u
.
route
({
...
...
@@ -206,6 +212,19 @@ export default {
}
</
script
>
<
style
lang=
"scss"
>
.page-index
{
.u-countdown-colon
{
margin-left
:
6rpx
;
margin-right
:
6rpx
;
}
.u-mode-center-box
{
background-color
:
transparent
!
important
;
padding-top
:
40rpx
;
}
}
</
style
>
<
style
lang=
"scss"
scope
>
::-webkit-scrollbar
{
width
:
0
;
...
...
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