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
8c1ce6d3
Commit
8c1ce6d3
authored
Jul 20, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页弹窗
parent
2ebefd8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
179 additions
and
4 deletions
+179
-4
index.vue
src/components/pop-view/index.vue
+3
-0
index.vue
src/components/toast-pop/index.vue
+158
-0
index.vue
src/pages/index/index.vue
+18
-4
No files found.
src/components/pop-view/index.vue
View file @
8c1ce6d3
...
...
@@ -105,6 +105,9 @@ export default {
padding
:
48rpx
40rpx
;
min-height
:
520rpx
;
position
:
relative
;
background-image
:
linear-gradient
(
to
top
,
#f8fafd
0%
,
#e9f3ff
50%
);
background-size
:
100%
240rpx
;
background-repeat
:
no-repeat
;
.pop-title
{
font-size
:
40rpx
;
margin-bottom
:
30rpx
;
...
...
src/components/toast-pop/index.vue
0 → 100644
View file @
8c1ce6d3
<
template
>
<u-popup
border-radius=
"12"
v-model=
"visible"
safe-area-inset-bottom
mode=
"center"
width=
"654rpx"
:mask-close-able=
"false"
>
<view
class=
"toast-pop"
>
<view
class=
"pop-title"
>
<text>
{{
title
}}
</text>
</view>
<view
class=
"pop-message"
>
<text>
{{
message
}}
</text>
</view>
<view
class=
"pop-btn-view"
>
<view
class=
"line-view"
>
</view>
<view
class=
"content-view"
>
<view
class=
"cancel-button"
@
click=
"handleClickCancel"
>
取消
</view>
<view
class=
"line-view-v"
/>
<view
class=
"sure-button"
@
click=
"$u.throttle(handleClickSure, 500)"
>
{{
buttonText
}}
</view>
</view>
</view>
</view>
</u-popup>
</
template
>
<
script
>
export
default
{
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
title
:
{
type
:
String
,
default
:
'温馨提示'
,
},
message
:
{
type
:
String
,
default
:
''
,
},
buttonText
:
{
// 确定按钮
type
:
String
,
default
:
'去选择'
,
},
},
data
()
{
return
{}
},
computed
:
{
customStyleCancel
()
{
return
{
width
:
'264rpx'
,
height
:
'80rpx'
,
color
:
'#9EA5BB'
,
fontWeight
:
'bold'
,
fontSize
:
'32rpx'
,
}
},
customStyleSave
()
{
return
{
backgroundColor
:
'#2953FF'
,
width
:
'264rpx'
,
height
:
'80rpx'
,
color
:
'#ffffff'
,
fontWeight
:
'bold'
,
fontSize
:
'32rpx'
,
}
},
},
methods
:
{
changeVisibleValue
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
},
handleClickCancel
()
{
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'cancel'
)
},
handleClickSure
()
{
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'submit'
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.toast-pop
{
min-height
:
480rpx
;
position
:
relative
;
background-image
:
linear-gradient
(
to
top
,
#ffffff
0%
,
#e9f3ff
50%
);
background-size
:
100%
240rpx
;
background-repeat
:
no-repeat
;
text-align
:
center
;
.pop-title
{
font-size
:
40rpx
;
text-align
:
center
;
color
:
#9ea5bb
;
font-weight
:
bold
;
padding-top
:
40rpx
;
}
.pop-message
{
font-size
:
32rpx
;
text-align
:
center
;
color
:
#191c27
;
font-weight
:
bold
;
padding
:
90rpx
30rpx
80rpx
30rpx
;
}
.pop-btn-view
{
position
:
absolute
;
bottom
:
0rpx
;
left
:
0rpx
;
right
:
0rpx
;
height
:
112rpx
;
.line-view
{
background-color
:
#e8ebf3
;
height
:
2rpx
;
width
:
100%
;
}
.content-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.cancel-button
{
width
:
50%
;
color
:
#9ea5bb
;
font-size
:
32rpx
;
font-weight
:
bold
;
text-align
:
center
;
height
:
112rpx
;
line-height
:
112rpx
;
}
.line-view-v
{
width
:
2rpx
;
background-color
:
#e8ebf3
;
height
:
112rpx
;
}
.sure-button
{
width
:
50%
;
color
:
#2953ff
;
font-size
:
32rpx
;
font-weight
:
bold
;
text-align
:
center
;
height
:
112rpx
;
line-height
:
112rpx
;
}
}
}
}
</
style
>
src/pages/index/index.vue
View file @
8c1ce6d3
...
...
@@ -63,19 +63,27 @@
<view>
想要轻松考过,首选模考大师
</view>
</view>
</view>
<ExperiencePop
:visible
.
sync=
"visible"
/>
<view
class=
"experience-pop-view"
>
<ExperiencePop
:visible
.
sync=
"visible"
/>
</view>
<ToastPop
:visible
.
sync=
"show"
message=
"为了您能更好的使用“模考大师”小程序请先选择题库"
/>
</view>
</
template
>
<
script
>
import
SubjectStatistics
from
'@/components/subject-statistics'
import
ExperiencePop
from
'@/components/experience-pop'
import
ToastPop
from
'@/components/toast-pop'
export
default
{
components
:
{
SubjectStatistics
,
ExperiencePop
},
components
:
{
SubjectStatistics
,
ExperiencePop
,
ToastPop
},
data
()
{
return
{
visible
:
false
,
show
:
false
,
selected
:
{
key
:
0
,
name
:
'熔化焊接与热切割作业'
,
...
...
@@ -200,7 +208,13 @@ export default {
// this.$u.route({ url: 'pages/login/index' })
// }
},
handleAnswer
()
{},
// 每日一练
handleAnswer
()
{
if
(
this
.
selected
)
{
}
else
{
this
.
show
=
true
}
},
handleClick
(
path
)
{
// if (this.vuex_token) {
this
.
$u
.
route
({
...
...
@@ -215,7 +229,7 @@ export default {
</
script
>
<
style
lang=
"scss"
>
.
page-index
{
.
experience-pop-view
{
.u-countdown-colon
{
margin-left
:
6rpx
;
margin-right
:
6rpx
;
...
...
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