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
Hide 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
<
template
>
<
template
>
<div>
<div>
<van-actionsheet
<van-actionsheet
v-model=
"actionsheetShow"
v-model=
"actionsheetShow"
:actions=
"actions"
:actions=
"actions"
@
select=
"onSelect"
@
select=
"onSelect"
/>
/>
<div
class=
"unit-block"
>
<div
class=
"unit-block"
>
<div
class=
"course_title"
@
click=
"actionsheetShow=true"
>
{{
secActions
.
name
}}
<i
class=
"iconfont icon-below-s"
></i></div>
<div
class=
"course_title"
@
click=
"actionsheetShow=true"
>
{{
secActions
.
name
}}
<i
class=
"iconfont icon-below-s"
></i></div>
<!--竖屏 主题栏-->
<!--竖屏 主题栏-->
...
@@ -27,12 +27,12 @@
...
@@ -27,12 +27,12 @@
<span
style=
"color: #cccccc"
>
敬请期待
</span>
<span
style=
"color: #cccccc"
>
敬请期待
</span>
</div>
</div>
</swiper-slide>
</swiper-slide>
<swiper-slide
v-for=
"a in 3-unitList.length > 0 ? 3-unitList.length : 0"
:key=
"a*10"
>
<swiper-slide
v-for=
"a in 3-unitList.length > 0 ? 3-unitList.length : 0"
:key=
"a*10"
>
<div
class=
"unit-li"
>
<div
class=
"unit-li"
>
<div>
<div>
</div>
</div>
</div>
</div>
</swiper-slide>
</swiper-slide>
</swiper>
</swiper>
<!--横屏主题栏-->
<!--横屏主题栏-->
<!--
<div
class=
"btn-conntent banner-left"
v-if=
"shopType==0&&unitList.length>0"
>
<!--
<div
class=
"btn-conntent banner-left"
v-if=
"shopType==0&&unitList.length>0"
>
...
@@ -105,23 +105,23 @@
...
@@ -105,23 +105,23 @@
<!--横屏 课程-->
<!--横屏 课程-->
<div
class=
"lesson-block-hp"
v-if=
"lessonList.length>0"
>
<div
class=
"lesson-block-hp"
v-if=
"lessonList.length>0"
>
<swiper
:options=
"swiperOptionLesson"
class=
"lesson-sw"
ref=
"mySwiperLesson"
>
<swiper
:options=
"swiperOptionLesson"
class=
"lesson-sw"
ref=
"mySwiperLesson"
>
<swiper-slide
v-for=
"(item,x) in hpLessonList"
:key=
"x"
style=
"width: 50vh"
>
<swiper-slide
v-for=
"(item,x) in hpLessonList"
:key=
"x"
style=
"width: 50vh"
>
<div
class=
"lesson-content-hp"
@
click=
"showDia(item)"
>
<div
class=
"lesson-content-hp"
@
click=
"showDia(item)"
>
<div
class=
"clock-hp"
v-if=
"item.push_time === '0000-00-00'"
>
<div
class=
"clock-hp"
v-if=
"item.push_time === '0000-00-00'"
>
等待开课
等待开课
</div>
</div>
<div
class=
"lesson-day-hp"
>
{{
item
.
dayText
}}
</div>
<div
class=
"lesson-day-hp"
>
{{
item
.
dayText
}}
</div>
<div
class=
"lesson-img-hp"
><img
:src=
"item.cover"
></div>
<div
class=
"lesson-img-hp"
><img
:src=
"item.cover"
></div>
<div
class=
"lesson-name-hp"
>
<div
class=
"lesson-name-hp"
>
{{
item
.
sub_title
}}
{{
item
.
sub_title
}}
</div>
<div
class=
"star-block"
>
<img
class=
"star-img"
:src=
"star_act"
v-for=
"s in item.star_num"
>
<img
class=
"star-img"
:src=
"star_def"
v-for=
"s in 3-item.star_num"
>
</div>
<i
class=
"map money"
v-if=
"item.push_time !== '0000-00-00' && ((hpLessonList[x+1] && hpLessonList[x+1].push_time === '0000-00-00' || (shopType == 0 && findUnit(parent_category_id) && findUnit(parent_category_id).status === 2 || shopType ==1 ) && x===hpLessonList.length-1 ))"
></i>
</div>
</div>
<div
class=
"star-block"
>
</swiper-slide>
<img
class=
"star-img"
:src=
"star_act"
v-for=
"s in item.star_num"
>
<img
class=
"star-img"
:src=
"star_def"
v-for=
"s in 3-item.star_num"
>
</div>
<i
class=
"map money"
v-if=
"item.push_time !== '0000-00-00' && ((hpLessonList[x+1] && hpLessonList[x+1].push_time === '0000-00-00' || (shopType == 0 && findUnit(parent_category_id) && findUnit(parent_category_id).status === 2 || shopType ==1 ) && x===hpLessonList.length-1 ))"
></i>
</div>
</swiper-slide>
</swiper>
</swiper>
</div>
</div>
<div
class=
"unStart"
v-if=
"!secActions.is_start_course&&!teacher_alias"
>
<div
class=
"unStart"
v-if=
"!secActions.is_start_course&&!teacher_alias"
>
...
@@ -306,7 +306,7 @@
...
@@ -306,7 +306,7 @@
}
}
},
},
swiperLesson
()
{
swiperLesson
()
{
return
this
.
$refs
.
mySwiperLesson
.
swiper
return
this
.
$refs
.
mySwiperLesson
.
swiper
},
},
splitContent
(){
splitContent
(){
let
arr
=
[];
let
arr
=
[];
...
@@ -334,11 +334,11 @@
...
@@ -334,11 +334,11 @@
this
.
userCourse
=
this
.
$common
.
deepCopy
(
res
)
this
.
userCourse
=
this
.
$common
.
deepCopy
(
res
)
localStorage
.
setItem
(
'userCourse'
,
JSON
.
stringify
(
res
));
localStorage
.
setItem
(
'userCourse'
,
JSON
.
stringify
(
res
));
this
.
setCourse
()
this
.
setCourse
()
})
})
}
else
{
}
else
{
if
(
localStorage
.
getItem
(
"userCourse"
)){
if
(
localStorage
.
getItem
(
"userCourse"
)){
this
.
userCourse
=
JSON
.
parse
(
localStorage
.
getItem
(
"userCourse"
));
this
.
userCourse
=
JSON
.
parse
(
localStorage
.
getItem
(
"userCourse"
));
this
.
setCourse
()
this
.
setCourse
()
}
else
{
}
else
{
getCourseInfoApi
().
then
(
res
=>
{
getCourseInfoApi
().
then
(
res
=>
{
localStorage
.
setItem
(
'userCourse'
,
''
);
localStorage
.
setItem
(
'userCourse'
,
''
);
...
@@ -365,7 +365,7 @@
...
@@ -365,7 +365,7 @@
this
.
actionsheetShow
=
false
this
.
actionsheetShow
=
false
this
.
shopType
=
item
.
course_type
this
.
shopType
=
item
.
course_type
if
(
item
.
id
==
'x'
){
if
(
item
.
id
==
'x'
){
this
.
$router
.
replace
({
this
.
$router
.
replace
({
name
:
"secMap"
,
name
:
"secMap"
,
query
:
{
query
:
{
}
}
...
@@ -383,7 +383,7 @@
...
@@ -383,7 +383,7 @@
})
})
if
(
item
.
is_start_course
){
if
(
item
.
is_start_course
){
if
(
this
.
secActions
.
course_type
==
0
){
if
(
this
.
secActions
.
course_type
==
0
){
this
.
getUnitList
()
this
.
getUnitList
()
}
else
{
}
else
{
this
.
getLessonList
();
this
.
getLessonList
();
}
}
...
@@ -622,17 +622,17 @@
...
@@ -622,17 +622,17 @@
if
(
res
.
list
[
i
].
push_time
!==
'0000-00-00'
){
if
(
res
.
list
[
i
].
push_time
!==
'0000-00-00'
){
x
++
x
++
}
}
if
(
res
.
list
[
i
].
name
.
indexOf
(
'Day1'
)
>-
1
&&
list
.
length
>
0
){
if
(
res
.
list
[
i
].
name
.
indexOf
(
'Day1'
)
>-
1
&&
list
.
length
>
0
){
this
.
lessonList
.
push
(
list
);
this
.
lessonList
.
push
(
list
);
list
=
[];
list
=
[];
list
.
push
(
res
.
list
[
i
]);
list
.
push
(
res
.
list
[
i
]);
}
else
{
}
else
{
list
.
push
(
res
.
list
[
i
]);
list
.
push
(
res
.
list
[
i
]);
if
(
i
==
res
.
list
.
length
-
1
){
if
(
i
==
res
.
list
.
length
-
1
){
this
.
lessonList
.
push
(
list
);
this
.
lessonList
.
push
(
list
);
}
}
}
}
res
.
list
[
i
].
dayText
=
'DAY '
+
list
.
length
;
res
.
list
[
i
].
dayText
=
'DAY '
+
list
.
length
;
this
.
hpLessonList
.
push
(
res
.
list
[
i
])
this
.
hpLessonList
.
push
(
res
.
list
[
i
])
}
}
if
(
!
data
){
if
(
!
data
){
...
@@ -643,21 +643,21 @@
...
@@ -643,21 +643,21 @@
}
else
if
(
this
.
$route
.
query
.
category_id
){
}
else
if
(
this
.
$route
.
query
.
category_id
){
}
}
if
(
this
.
$route
.
query
.
category_id
){
if
(
this
.
$route
.
query
.
category_id
){
let
dom
=
document
.
getElementsByClassName
(
'cid'
+
this
.
$route
.
query
.
category_id
);
let
dom
=
document
.
getElementsByClassName
(
'cid'
+
this
.
$route
.
query
.
category_id
);
if
(
dom
.
length
>
0
&&
dom
[
0
].
style
.
display
!==
'none'
){
if
(
dom
.
length
>
0
&&
dom
[
0
].
style
.
display
!==
'none'
){
this
.
scroll_to
(
dom
[
0
].
offsetTop
);
this
.
scroll_to
(
dom
[
0
].
offsetTop
);
let
data
=
null
;
let
data
=
null
;
let
index
=
0
;
let
index
=
0
;
this
.
lessonList
.
forEach
(
i
=>
{
this
.
lessonList
.
forEach
(
i
=>
{
i
.
forEach
((
x
,
i
)
=>
{
i
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
id
==
this
.
$route
.
query
.
category_id
){
if
(
x
.
id
==
this
.
$route
.
query
.
category_id
){
data
=
x
;
data
=
x
;
index
=
i
+
1
index
=
i
+
1
}
}
})
})
});
});
this
.
showDia
(
data
,
index
)
this
.
showDia
(
data
,
index
)
}
}
}
else
if
(
this
.
$route
.
query
.
back_id
){
}
else
if
(
this
.
$route
.
query
.
back_id
){
setTimeout
(()
=>
{
setTimeout
(()
=>
{
let
dom
=
document
.
getElementsByClassName
(
'cid'
+
this
.
$route
.
query
.
back_id
);
let
dom
=
document
.
getElementsByClassName
(
'cid'
+
this
.
$route
.
query
.
back_id
);
...
@@ -706,16 +706,16 @@
...
@@ -706,16 +706,16 @@
if
(
this
.
userCourse
.
periods_list
){
if
(
this
.
userCourse
.
periods_list
){
// 有其他课
// 有其他课
// debugger
// debugger
this
.
userCourse
.
periods_list
.
forEach
(
el
=>
{
this
.
userCourse
.
periods_list
.
forEach
(
el
=>
{
el
.
name
=
el
.
course_title
el
.
name
=
el
.
course_title
this
.
actions
.
push
(
el
)
this
.
actions
.
push
(
el
)
if
(
this
.
$route
.
query
.
item
){
if
(
this
.
$route
.
query
.
item
){
this
.
secActions
=
this
.
$route
.
query
.
item
this
.
secActions
=
this
.
$route
.
query
.
item
}
else
{
}
else
{
if
(
this
.
userCourse
.
start_periods_id
!=
null
&&
this
.
userCourse
.
start_periods_id
==
0
){
if
(
this
.
userCourse
.
start_periods_id
!=
null
&&
this
.
userCourse
.
start_periods_id
==
0
){
this
.
secActions
=
this
.
userCourse
.
periods_list
[
0
]
this
.
secActions
=
this
.
userCourse
.
periods_list
[
0
]
}
else
if
(
this
.
userCourse
.
start_periods_id
!=
null
&&
el
.
id
==
this
.
userCourse
.
start_periods_id
){
}
else
if
(
this
.
userCourse
.
start_periods_id
!=
null
&&
el
.
id
==
this
.
userCourse
.
start_periods_id
){
this
.
secActions
=
el
this
.
secActions
=
el
}
}
}
}
})
})
...
@@ -821,12 +821,12 @@
...
@@ -821,12 +821,12 @@
}
}
}
}
.shake{
.shake{
-webkit-animation-name: swing;
-webkit-animation-name: swing;
-webkit-animation-duration: 0.8s;
-webkit-animation-duration: 0.8s;
-webkit-transform-origin:50% 50%;
-webkit-transform-origin:50% 50%;
-webkit-animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-webkit-animation-timing-function: linear;
}
}
.adSmall{width: 96*@toVw;height: 115*@toVw;position: fixed;top: 314*@toVw;left: 267*@toVw;background: red;}
.adSmall{width: 96*@toVw;height: 115*@toVw;position: fixed;top: 314*@toVw;left: 267*@toVw;background: red;}
// 主题列表
// 主题列表
.noLesson{
.noLesson{
...
...
src/components/map/promptTime.vue
View file @
730e1a07
...
@@ -14,16 +14,14 @@
...
@@ -14,16 +14,14 @@
</div>
</div>
</div>
</div>
<div
class=
"preservation"
@
click=
"preservationClick"
>
保存
</div>
<div
class=
"preservation"
@
click=
"preservationClick"
>
保存
</div>
<div
class=
"bottom-top"
>
<van-popup
v-model=
"dateShow"
position=
"bottom"
>
<van-popup
v-model=
"dateShow"
position=
"bottom"
>
<van-datetime-picker
@
confirm=
"dateConfirm"
@
cancel=
"dateConfirmNo"
v-model=
"currentTime"
type=
"time"
/>
<van-datetime-picker
:min-hour=
"minHour"
:max-hour=
"maxHour"
@
confirm=
"dateConfirm"
@
cancel=
"dateConfirmNo"
v-model=
"currentTime"
type=
"time"
/>
</van-popup>
</van-popup>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
postNotifySettingApi
,
getNotifyApi
}
from
"../../service/api"
;
import
{
postNotifySettingApi
}
from
"../../service/api"
;
import
{
DatetimePicker
,
Popup
,
Toast
}
from
'vant'
;
import
{
DatetimePicker
,
Popup
,
Toast
}
from
'vant'
;
import
tishiTimer
from
'../../assets/evaluate/tishi_timer.png'
import
tishiTimer
from
'../../assets/evaluate/tishi_timer.png'
import
youjiantou
from
'../../assets/evaluate/youjiantou.png'
import
youjiantou
from
'../../assets/evaluate/youjiantou.png'
...
@@ -32,9 +30,7 @@
...
@@ -32,9 +30,7 @@
name
:
"promptTime"
,
name
:
"promptTime"
,
data
()
{
data
()
{
return
{
return
{
currentTime
:
'07:00'
,
currentTime
:
''
,
minHour
:
7
,
maxHour
:
22
,
dateVal
:
''
,
dateVal
:
''
,
dateShow
:
false
,
dateShow
:
false
,
selectedValue
:
''
,
selectedValue
:
''
,
...
@@ -46,18 +42,10 @@
...
@@ -46,18 +42,10 @@
[
DatetimePicker
.
name
]:
DatetimePicker
,
[
DatetimePicker
.
name
]:
DatetimePicker
,
[
Popup
.
name
]:
Popup
,
[
Popup
.
name
]:
Popup
,
},
},
watch
:
{
dateShow
(
val
)
{
if
(
!
val
)
{
this
.
contentFn
()
}
}
},
methods
:
{
methods
:
{
dateShowClick
()
{
dateShowClick
()
{
this
.
dateShow
=
true
;
this
.
dateShow
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
document
.
querySelectorAll
(
'.van-picker__confirm'
)[
0
].
innerText
=
'完成'
document
.
querySelectorAll
(
'.van-picker-column'
)[
1
].
style
.
display
=
'none'
;
document
.
querySelectorAll
(
'.van-picker-column'
)[
1
].
style
.
display
=
'none'
;
let
oLi
=
document
.
querySelectorAll
(
'.van-picker-column'
)[
0
].
querySelectorAll
(
'li'
);
let
oLi
=
document
.
querySelectorAll
(
'.van-picker-column'
)[
0
].
querySelectorAll
(
'li'
);
for
(
var
i
=
0
;
i
<
oLi
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
oLi
.
length
;
i
++
)
{
...
@@ -81,61 +69,36 @@
...
@@ -81,61 +69,36 @@
}
}
},
},
preservationClick
()
{
preservationClick
()
{
let
pushAtData
=
{
time
:
this
.
currentTime
,
periods_id
:
this
.
$route
.
query
.
periods_id
}
if
(
this
.
currentTime
)
{
postNotifySettingApi
(
pushAtData
).
then
(
res
=>
{
let
pushAtData
=
{
time
:
this
.
currentTime
}
Toast
(
"时间设定完成"
);
postNotifySettingApi
(
pushAtData
).
then
(
res
=>
{
this
.
$router
.
go
(
-
1
);
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
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../util/public";
@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 {
.van-picker {
color: #333333;
border-radius: 30 * @toVw 30 * @toVw 0 0;
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 {
.van-picker-column__item {
color: #666666;
color: #666666;
font-size: 17
* @toVw;
font-size: 20
* @toVw;
}
}
.van-picker-column__item--selected {
.van-picker-column__item--selected {
color: #40A9FF;
color: #40A9FF;
font-size: 21 * @toVw;
font-size: 26 * @toVw;
}
}
}
.prompt-time {
.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