Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
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
new-sing
h5-base
Commits
730e1a07
Commit
730e1a07
authored
Sep 18, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui
parent
9c2f7c50
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
128 deletions
+91
-128
index.vue
src/components/map/index.vue
+66
-66
promptTime.vue
src/components/map/promptTime.vue
+25
-62
No files found.
src/components/map/index.vue
View file @
730e1a07
src/components/map/promptTime.vue
View file @
730e1a07
...
...
@@ -14,16 +14,14 @@
</div>
</div>
<div
class=
"preservation"
@
click=
"preservationClick"
>
保存
</div>
<div
class=
"bottom-top"
>
<van-popup
v-model=
"dateShow"
position=
"bottom"
>
<van-datetime-picker
:min-hour=
"minHour"
:max-hour=
"maxHour"
@
confirm=
"dateConfirm"
@
cancel=
"dateConfirmNo"
v-model=
"currentTime"
type=
"time"
/>
<van-datetime-picker
@
confirm=
"dateConfirm"
@
cancel=
"dateConfirmNo"
v-model=
"currentTime"
type=
"time"
/>
</van-popup>
</div>
</div>
</
template
>
<
script
>
import
{
postNotifySettingApi
,
getNotifyApi
}
from
"../../service/api"
;
import
{
postNotifySettingApi
}
from
"../../service/api"
;
import
{
DatetimePicker
,
Popup
,
Toast
}
from
'vant'
;
import
tishiTimer
from
'../../assets/evaluate/tishi_timer.png'
import
youjiantou
from
'../../assets/evaluate/youjiantou.png'
...
...
@@ -32,9 +30,7 @@
name
:
"promptTime"
,
data
()
{
return
{
currentTime
:
'07:00'
,
minHour
:
7
,
maxHour
:
22
,
currentTime
:
''
,
dateVal
:
''
,
dateShow
:
false
,
selectedValue
:
''
,
...
...
@@ -46,18 +42,10 @@
[
DatetimePicker
.
name
]:
DatetimePicker
,
[
Popup
.
name
]:
Popup
,
},
watch
:
{
dateShow
(
val
)
{
if
(
!
val
)
{
this
.
contentFn
()
}
}
},
methods
:
{
dateShowClick
()
{
this
.
dateShow
=
true
;
this
.
$nextTick
(()
=>
{
document
.
querySelectorAll
(
'.van-picker__confirm'
)[
0
].
innerText
=
'完成'
document
.
querySelectorAll
(
'.van-picker-column'
)[
1
].
style
.
display
=
'none'
;
let
oLi
=
document
.
querySelectorAll
(
'.van-picker-column'
)[
0
].
querySelectorAll
(
'li'
);
for
(
var
i
=
0
;
i
<
oLi
.
length
;
i
++
)
{
...
...
@@ -81,61 +69,36 @@
}
},
preservationClick
()
{
let
pushAtData
=
{
time
:
this
.
currentTime
,
periods_id
:
this
.
$route
.
query
.
periods_id
}
if
(
this
.
currentTime
)
{
let
pushAtData
=
{
time
:
this
.
currentTime
}
postNotifySettingApi
(
pushAtData
).
then
(
res
=>
{
Toast
(
"时间设定完成"
);
this
.
$router
.
go
(
-
1
);
})
}
else
{
Toast
(
"请先设定时间"
);
this
.
$refs
.
timeSetting
.
style
.
borderBottom
=
'1px solid red'
}
}
},
mounted
()
{
getNotifyApi
(
this
.
$route
.
query
.
periods_id
).
then
(
res
=>
{
if
(
res
.
time
)
this
.
currentTime
=
res
.
time
.
split
(
':'
)[
0
]
+
':'
+
res
.
time
.
split
(
':'
)[
1
]
})
}
}
</
script
>
<
style
lang=
"less"
>
@import "../../util/public";
.bottom-top {
.van-picker {
border-radius: 30 * @toVw 30 * @toVw 0 0;
}
.van-picker__toolbar::after {
content: '';
border: none;
}
.van-picker__confirm {
color: #333333;
font-size: 15 * @toVw;
margin: 0;
padding-right: 30 * @toVw;
}
.van-picker__frame, .van-picker__loading .van-loading {
height: 54px!important;
}
.van-picker__cancel {
color: #333333;
font-size: 15 * @toVw;
margin: 0;
padding-left: 30 * @toVw;
}
.van-picker-column__item {
color: #666666;
font-size: 17
* @toVw;
font-size: 20
* @toVw;
}
.van-picker-column__item--selected {
color: #40A9FF;
font-size: 21 * @toVw;
}
font-size: 26 * @toVw;
}
.prompt-time {
...
...
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