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
3d6a7f90
Commit
3d6a7f90
authored
Mar 13, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5a1b8956
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
366 additions
and
362 deletions
+366
-362
dev.env.js
config/dev.env.js
+2
-2
index.js
config/index.js
+1
-0
index.vue
src/components/index.vue
+316
-325
share.vue
src/components/newLesson/share.vue
+1
-1
shareTime.vue
src/components/shareTime.vue
+2
-0
common.js
src/util/common.js
+44
-34
No files found.
config/dev.env.js
View file @
3d6a7f90
...
@@ -8,7 +8,7 @@ module.exports = merge(prodEnv, {
...
@@ -8,7 +8,7 @@ module.exports = merge(prodEnv, {
// API_URL: '"https://wechat-test.changchangenglish.com/"',
// API_URL: '"https://wechat-test.changchangenglish.com/"',
MAX_FILESIZE
:
'1024*1024*10'
,
MAX_FILESIZE
:
'1024*1024*10'
,
IMAGE_URL_HEAD
:
'"http://cdn.singsingenglish.com/"'
,
IMAGE_URL_HEAD
:
'"http://cdn.singsingenglish.com/"'
,
BUY_URL
:
'"http://wechat-test.changchangenglish.com/#/buyDetail?"'
,
BUY_URL
:
'"http
s
://wechat-test.changchangenglish.com/#/buyDetail?"'
,
AUTHOR_UEL
:
'"http
://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://localhost:8085/#
/"'
,
AUTHOR_UEL
:
'"http
s://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://localhost:8085
/"'
,
REDIRECT_URL
:
'"http://localhost:8085/"'
,
REDIRECT_URL
:
'"http://localhost:8085/"'
,
});
});
config/index.js
View file @
3d6a7f90
...
@@ -19,6 +19,7 @@ module.exports = {
...
@@ -19,6 +19,7 @@ module.exports = {
},
},
// Various Dev Server settings
// Various Dev Server settings
// host: '192.168.31.242', // can be overwritten by process.env.HOST
// host: '192.168.31.242', // can be overwritten by process.env.HOST
// host: '10.1.23.97', // can be overwritten by process.env.HOST
host
:
'localhost'
,
// can be overwritten by process.env.HOST
host
:
'localhost'
,
// can be overwritten by process.env.HOST
port
:
8085
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
port
:
8085
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
false
,
autoOpenBrowser
:
false
,
...
...
src/components/index.vue
View file @
3d6a7f90
...
@@ -9,33 +9,29 @@
...
@@ -9,33 +9,29 @@
</div>
</div>
<div
class=
"btn-block"
>
<div
class=
"btn-block"
>
<div
class=
"btn"
@
click=
"showTeacher()"
>
<div
class=
"btn"
@
click=
"showTeacher()"
>
<img
:src=
"imgUrl.record"
/
>
<img
:src=
"imgUrl.record"
>
</div>
</div>
<div
class=
"btn"
@
click=
"toOld($event)"
>
<div
class=
"btn"
@
click=
"toOld($event)"
>
<img
:src=
"imgUrl.oldChange"
/
>
<img
:src=
"imgUrl.oldChange"
>
</div>
</div>
<div
class=
"btn"
@
click=
"toHear"
>
<div
class=
"btn"
@
click=
"toHear"
>
<img
:src=
"imgUrl.listen"
/
>
<img
:src=
"imgUrl.listen"
>
</div>
</div>
<div
class=
"btn"
>
<div
class=
"btn"
>
<img
:src=
"imgUrl.more"
/
>
<img
:src=
"imgUrl.more"
>
</div>
</div>
</div>
</div>
<div
class=
"class-block"
>
<div
class=
"class-block"
>
<div
class=
"title"
@
click=
"toGoodsList()"
v-if=
"lessonList.length > 0"
>
<div
class=
"title"
@
click=
"toGoodsList()"
v-if=
"lessonList.length > 0"
>
我的课程
我的课程
<img
class=
"more"
:src=
"imgUrl.indexMore"
/>
<img
class=
"more"
:src=
"imgUrl.indexMore"
>
</div>
<div
class=
"title"
v-if=
"lessonList.length
<
1
"
>
我的课程
</div>
</div>
<div
class=
"title"
v-if=
"lessonList.length
<
1
"
>
我的课程
</div>
<div
class=
"lesson-block"
>
<div
class=
"lesson-block"
>
<swiper
:options=
"swiperOption2"
ref=
"mySwiper2"
>
<swiper
:options=
"swiperOption2"
ref=
"mySwiper2"
>
<swiper-slide
v-for=
"(data,index) in lessonList"
:key=
"index"
>
<swiper-slide
v-for=
"(data,index) in lessonList"
:key=
"index"
>
<div
class=
"goods-block"
@
click=
"toMap(data)"
>
<div
class=
"goods-block"
@
click=
"toMap(data)"
>
<span
class=
"tips"
v-if=
"data.start_at"
>
<span
class=
"tips"
v-if=
"data.start_at"
>
开课时间:
{{
data
.
start_at
}}
</span>
开课时间:
{{
data
.
start_at
}}
</span>
<img
:src=
"data.imgLesson+'?imageslim'"
>
<img
:src=
"data.imgLesson+'?imageslim'"
>
</div>
</div>
</swiper-slide>
</swiper-slide>
...
@@ -49,20 +45,13 @@
...
@@ -49,20 +45,13 @@
</div>
</div>
<mt-popup
v-model=
"teacherQ2"
>
<mt-popup
v-model=
"teacherQ2"
>
<div
class=
"teacher-block"
>
<div
class=
"teacher-block"
>
<div
class=
"userNo"
>
<div
class=
"userNo"
>
学员号:
{{
user_id
}}
</div>
学员号:
{{
user_id
}}
<img
:src=
"imgUrl.teacherBg"
class=
"teacher-bg"
>
</div>
<img
:src=
"imgUrl.teacherBg"
class=
"teacher-bg"
/>
<img
:src=
"teacherDetail.qr"
class=
"qr"
v-if=
"teacherDetail"
>
<img
:src=
"teacherDetail.qr"
class=
"qr"
v-if=
"teacherDetail"
>
<img
:src=
"imgUrl.qr"
class=
"qr"
v-if=
"!teacherDetail"
>
<img
:src=
"imgUrl.qr"
class=
"qr"
v-if=
"!teacherDetail"
>
<div
class=
"content-text"
>
<div
class=
"content-text"
>
<div
class=
"title"
v-if=
"teacherDetail"
>
<div
class=
"title"
v-if=
"teacherDetail"
>
请长按识别图中二维码添加老师
</div>
请长按识别图中二维码添加老师
<div
class=
"title"
v-if=
"!teacherDetail"
>
请长按识别图中二维码关注公众号
</div>
以便我们能及时为您提供更好的学习体验
</div>
<div
class=
"title"
v-if=
"!teacherDetail"
>
请长按识别图中二维码关注公众号
</div>
以便我们能及时为您提供更好的学习体验
</div>
</div>
<div
class=
"closeBtn"
@
click=
"teacherQ2 = false"
></div>
<div
class=
"closeBtn"
@
click=
"teacherQ2 = false"
></div>
</div>
</div>
...
@@ -73,207 +62,213 @@
...
@@ -73,207 +62,213 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
guidePage
from
'./guide/index'
import
guidePage
from
"./guide/index"
;
import
'swiper/dist/css/swiper.css'
import
"swiper/dist/css/swiper.css"
;
import
{
swiper
,
swiperSlide
}
from
'vue-awesome-swiper'
import
{
swiper
,
swiperSlide
}
from
"vue-awesome-swiper"
;
import
{
getBannerListApi
,
getUserLessonApi
,
getTeacherApi
,
getNewApi
,
getRedirectApi
}
from
"../service/api"
;
import
{
import
{
IndexImage
}
from
"../util/imgUrl"
;
getBannerListApi
,
import
bottomTab
from
'./public/bottomTab'
;
getUserLessonApi
,
import
{
Toast
}
from
'mint-ui'
;
getTeacherApi
,
export
default
{
getNewApi
,
getRedirectApi
}
from
"../service/api"
;
import
{
IndexImage
}
from
"../util/imgUrl"
;
import
bottomTab
from
"./public/bottomTab"
;
import
{
Toast
}
from
"mint-ui"
;
export
default
{
name
:
"index"
,
name
:
"index"
,
components
:
{
components
:
{
swiper
,
swiper
,
swiperSlide
,
swiperSlide
,
bottomTab
,
bottomTab
,
guidePage
guidePage
},
},
data
()
{
data
()
{
let
that
=
this
;
let
that
=
this
;
return
{
return
{
bannerList
:
[],
bannerList
:
[],
teacherQ2
:
false
,
teacherQ2
:
false
,
teacherDetail
:
null
,
teacherDetail
:
null
,
imgUrl
:
IndexImage
,
imgUrl
:
IndexImage
,
user_id
:
null
,
user_id
:
null
,
newUrl
:
''
,
newUrl
:
""
,
swiperOption
:
{
swiperOption
:
{
pagination
:
{
pagination
:
{
el
:
'.swiper-pagination'
el
:
".swiper-pagination"
}
}
},
},
swiperOption2
:
{
swiperOption2
:
{
width
:
window
.
innerWidth
*
0.95
,
width
:
window
.
innerWidth
*
0.95
,
on
:
{
on
:
{
resize
:
function
()
{
resize
:
function
()
{
this
.
params
.
width
=
window
.
innerWidth
*
0.95
;
this
.
params
.
width
=
window
.
innerWidth
*
0.95
;
this
.
update
();
this
.
update
();
}
}
}
}
},
},
lessonList
:
[]
lessonList
:
[]
}
};
},
},
methods
:
{
methods
:
{
showTeacher
()
{
showTeacher
()
{
this
.
teacherQ2
=
true
this
.
teacherQ2
=
true
;
this
.
$sa
.
track
(
'buttonClick'
,
{
this
.
$sa
.
track
(
"buttonClick"
,
{
tabTitle
:
'首页'
,
tabTitle
:
"首页"
,
moduleTitle
:
'功能按钮'
,
moduleTitle
:
"功能按钮"
,
buttonType
:
'板块按钮'
,
buttonType
:
"板块按钮"
,
buttonName
:
'我的老师'
buttonName
:
"我的老师"
});
});
},
},
toOld
(
e
)
{
toOld
(
e
)
{
this
.
$sa
.
track
(
'buttonClick'
,
{
this
.
$sa
.
track
(
"buttonClick"
,
{
tabTitle
:
'首页'
,
tabTitle
:
"首页"
,
moduleTitle
:
'功能按钮'
,
moduleTitle
:
"功能按钮"
,
buttonType
:
'板块按钮'
,
buttonType
:
"板块按钮"
,
buttonName
:
'晚安电台'
buttonName
:
"晚安电台"
});
});
// this.$sa.quick('trackHeatMap',e.srcElement)
// this.$sa.quick('trackHeatMap',e.srcElement)
window
.
location
.
href
=
'https://appanqlfkth3717.h5.xiaoeknow.com/content_page/eyJ0eXBlIjozLCJyZXNvdXJjZV90eXBlIjoiIiwicmVzb3VyY2VfaWQiOiIiLCJwcm9kdWN0X2lkIjoicF81YjE0YjdjMjdjNDZiX2Rvd0xicDc1IiwiYXBwX2lkIjoiYXBwYU5RTGZrdEgzNzE3In0'
window
.
location
.
href
=
"https://appanqlfkth3717.h5.xiaoeknow.com/content_page/eyJ0eXBlIjozLCJyZXNvdXJjZV90eXBlIjoiIiwicmVzb3VyY2VfaWQiOiIiLCJwcm9kdWN0X2lkIjoicF81YjE0YjdjMjdjNDZiX2Rvd0xicDc1IiwiYXBwX2lkIjoiYXBwYU5RTGZrdEgzNzE3In0"
;
},
},
toBannerUrl
(
data
)
{
toBannerUrl
(
data
)
{
this
.
$sa
.
track
(
'adClick'
,
{
this
.
$sa
.
track
(
"adClick"
,
{
adTitle
:
data
.
title
,
adTitle
:
data
.
title
,
adID
:
data
.
link
,
adID
:
data
.
link
,
adPage
:
'首页'
adPage
:
"首页"
});
});
window
.
location
.
href
=
data
.
link
window
.
location
.
href
=
data
.
link
;
},
},
toHear
()
{
toHear
()
{
this
.
$sa
.
track
(
'buttonClick'
,
{
this
.
$sa
.
track
(
"buttonClick"
,
{
tabTitle
:
'首页'
,
tabTitle
:
"首页"
,
moduleTitle
:
'功能按钮'
,
moduleTitle
:
"功能按钮"
,
buttonType
:
'板块按钮'
,
buttonType
:
"板块按钮"
,
buttonName
:
'磨耳朵'
buttonName
:
"磨耳朵"
});
});
this
.
$router
.
push
({
name
:
'collection'
})
this
.
$router
.
push
({
name
:
"collection"
});
},
},
toNewUrl
()
{
toNewUrl
()
{
this
.
$sa
.
track
(
'buttonClick'
,
{
this
.
$sa
.
track
(
"buttonClick"
,
{
tabTitle
:
'首页'
,
tabTitle
:
"首页"
,
moduleTitle
:
'课程'
,
moduleTitle
:
"课程"
,
buttonType
:
'没课banner'
,
buttonType
:
"没课banner"
,
buttonName
:
'没有更多课程'
buttonName
:
"没有更多课程"
});
});
window
.
location
.
href
=
this
.
newUrl
window
.
location
.
href
=
this
.
newUrl
;
},
},
initPage
()
{
initPage
()
{
getRedirectApi
().
then
(
res
=>
{
getRedirectApi
().
then
(
res
=>
{
if
(
res
&&
res
!==
""
&&
res
!==
null
)
{
if
(
res
&&
res
!==
""
&&
res
!==
null
)
{
window
.
location
.
href
=
res
window
.
location
.
href
=
res
;
}
}
});
});
this
.
user_id
=
JSON
.
parse
(
localStorage
.
getItem
(
'userDesc'
)).
user_id
;
this
.
user_id
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
)).
user_id
;
getBannerListApi
().
then
(
res
=>
{
getBannerListApi
().
then
(
res
=>
{
this
.
bannerList
=
res
.
list
this
.
bannerList
=
res
.
list
;
});
});
getNewApi
().
then
(
res
=>
{
getNewApi
().
then
(
res
=>
{
this
.
newUrl
=
res
[
0
].
desc
this
.
newUrl
=
res
[
0
].
desc
;
});
});
getUserLessonApi
().
then
(
res
=>
{
getUserLessonApi
().
then
(
res
=>
{
let
is_view_course
=
'没有课程'
;
let
is_view_course
=
"没有课程"
;
if
(
res
&&
res
.
length
>
0
)
{
if
(
res
&&
res
.
length
>
0
)
{
is_view_course
=
'体验课'
;
is_view_course
=
"体验课"
;
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
if
(
res
[
i
].
course_type
===
0
)
{
if
(
res
[
i
].
course_type
===
0
)
{
is_view_course
=
'正式课'
is_view_course
=
"正式课"
;
}
}
}
}
this
.
$sa
.
track
(
'viewHomepage'
,
{
this
.
$sa
.
track
(
"viewHomepage"
,
{
is_view_course
:
is_view_course
is_view_course
:
is_view_course
})
});
}
}
this
.
lessonList
=
res
;
this
.
lessonList
=
res
;
});
});
getTeacherApi
().
then
(
res
=>
{
getTeacherApi
().
then
(
res
=>
{
if
(
res
.
id
)
{
if
(
res
.
id
)
{
this
.
teacherDetail
=
res
;
this
.
teacherDetail
=
res
;
if
(
localStorage
.
getItem
(
'qrType'
)
!==
'hidden'
)
{
if
(
localStorage
.
getItem
(
"qrType"
)
!==
"hidden"
)
{
localStorage
.
setItem
(
'qrType'
,
'hidden'
);
localStorage
.
setItem
(
"qrType"
,
"hidden"
);
if
(
window
.
innerWidth
<
window
.
innerHeight
)
{
if
(
window
.
innerWidth
<
window
.
innerHeight
)
{
this
.
teacherQ2
=
true
this
.
teacherQ2
=
true
;
}
}
}
}
}
}
})
});
},
},
toGoodsList
()
{
toGoodsList
()
{
this
.
$sa
.
track
(
'buttonClick'
,
{
this
.
$sa
.
track
(
"buttonClick"
,
{
tabTitle
:
'首页'
,
tabTitle
:
"首页"
,
moduleTitle
:
'课程'
,
moduleTitle
:
"课程"
,
buttonType
:
'板块按钮'
,
buttonType
:
"板块按钮"
,
buttonName
:
'我的课程'
buttonName
:
"我的课程"
});
});
this
.
$router
.
push
({
name
:
'myGoodsList'
})
this
.
$router
.
push
({
name
:
"myGoodsList"
});
},
},
dateParse
(
dateString
)
{
dateParse
(
dateString
)
{
let
SEPARATOR_BAR
=
"-"
;
let
SEPARATOR_BAR
=
"-"
;
let
SEPARATOR_SLASH
=
"/"
;
let
SEPARATOR_SLASH
=
"/"
;
let
SEPARATOR_DOT
=
"."
;
let
SEPARATOR_DOT
=
"."
;
let
dateArray
;
let
dateArray
;
if
(
dateString
.
indexOf
(
SEPARATOR_BAR
)
>
-
1
)
{
if
(
dateString
.
indexOf
(
SEPARATOR_BAR
)
>
-
1
)
{
dateArray
=
dateString
.
split
(
SEPARATOR_BAR
);
dateArray
=
dateString
.
split
(
SEPARATOR_BAR
);
}
else
if
(
dateString
.
indexOf
(
SEPARATOR_SLASH
)
>
-
1
)
{
}
else
if
(
dateString
.
indexOf
(
SEPARATOR_SLASH
)
>
-
1
)
{
dateArray
=
dateString
.
split
(
SEPARATOR_SLASH
);
dateArray
=
dateString
.
split
(
SEPARATOR_SLASH
);
}
else
{
}
else
{
dateArray
=
dateString
.
split
(
SEPARATOR_DOT
);
dateArray
=
dateString
.
split
(
SEPARATOR_DOT
);
}
}
return
new
Date
(
dateArray
[
0
],
dateArray
[
1
]
-
1
,
dateArray
[
2
]);
return
new
Date
(
dateArray
[
0
],
dateArray
[
1
]
-
1
,
dateArray
[
2
]);
},
},
dateCompare
(
dateString
,
compareDateString
)
{
dateCompare
(
dateString
,
compareDateString
)
{
let
dateTime
=
dateString
.
getTime
();
let
dateTime
=
dateString
.
getTime
();
let
compareDateTime
=
compareDateString
.
getTime
();
let
compareDateTime
=
compareDateString
.
getTime
();
if
(
compareDateTime
>
dateTime
)
{
if
(
compareDateTime
>
dateTime
)
{
return
1
;
return
1
;
}
else
if
(
compareDateTime
==
dateTime
)
{
}
else
if
(
compareDateTime
==
dateTime
)
{
return
0
;
return
0
;
}
else
{
}
else
{
return
-
1
;
return
-
1
;
}
}
},
},
toMap
(
data
)
{
toMap
(
data
)
{
this
.
$sa
.
track
(
'buttonClick'
,
{
this
.
$sa
.
track
(
"buttonClick"
,
{
tabTitle
:
'首页'
,
tabTitle
:
"首页"
,
moduleTitle
:
'课程'
,
moduleTitle
:
"课程"
,
buttonType
:
'课程'
,
buttonType
:
"课程"
,
buttonName
:
'进入课程'
buttonName
:
"进入课程"
});
});
if
(
this
.
dateCompare
(
new
Date
(),
this
.
dateParse
(
data
.
start_at
))
<
1
)
{
if
(
this
.
dateCompare
(
new
Date
(),
this
.
dateParse
(
data
.
start_at
))
<
1
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'map'
,
name
:
"map"
,
query
:
query
:
{
{
periods_id
:
data
.
periods_id
,
periods_id
:
data
.
periods_id
,
parent_category_id
:
data
.
parent_category_id
,
parent_category_id
:
data
.
parent_category_id
,
course_type
:
data
.
course_type
course_type
:
data
.
course_type
}
}
})
});
}
else
{
}
else
{
Toast
(
'该课程暂未开始'
)
Toast
(
"该课程暂未开始"
);
}
}
}
}
},
},
mounted
(){
this
.
initPage
()
mounted
()
{
}
this
.
initPage
();
}
}
};
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
@import "../util/public";
@import "../util/public";
.index
{
.index
{
background: #eee;
background: #eee;
padding-bottom: 50*
@toVw;
padding-bottom: 50 *
@toVw;
}
}
.banner-block
{
.banner-block
{
width: 375*
@toVw;
width: 375 *
@toVw;
height: 200*
@toVw;
height: 200 *
@toVw;
position: relative;
position: relative;
.notice
{
.notice
{
position: absolute;
position: absolute;
bottom: 0;
bottom: 0;
background: rgba(255, 238, 7, 0.8);
background: rgba(255, 238, 7, 0.8);
...
@@ -281,18 +276,17 @@
...
@@ -281,18 +276,17 @@
color: #666;
color: #666;
font-size: 14px;
font-size: 14px;
z-index: 5;
z-index: 5;
}
.banner{
width: 375*@toVw;
height: 200*@toVw;
}
}
.banner {
width: 375 * @toVw;
height: 200 * @toVw;
}
}
.teacher-block{
}
.teacher-block {
position: relative;
position: relative;
width: 74.66666667vw;
width: 74.66666667vw;
background-color: rgba(0,0,0,
0.7);
background-color: rgba(0, 0, 0,
0.7);
.userNo
{
.userNo
{
position: absolute;
position: absolute;
top: -40 * @toVw;
top: -40 * @toVw;
width: 100 * @toVw;
width: 100 * @toVw;
...
@@ -303,101 +297,98 @@
...
@@ -303,101 +297,98 @@
background: white;
background: white;
padding: 8 * @toVw;
padding: 8 * @toVw;
}
}
.teacher-bg
{
.teacher-bg
{
width: 280*
@toVw;
width: 280 *
@toVw;
}
}
.qr
{
.qr
{
width: 138*
@toVw;
width: 138 *
@toVw;
height: 138*
@toVw;
height: 138 *
@toVw;
position: absolute;
position: absolute;
top:
65 * @toVw;
top:
65 * @toVw;
left: 70 * @toVw;
left: 70 * @toVw;
}
}
.content-text
{
.content-text
{
width: 100%;
width: 100%;
text-align: center;
text-align: center;
position: absolute;
position: absolute;
top: 315 * @toVw;
top: 315 * @toVw;
font-size:
12 * @toVw;
font-size:
12 * @toVw;
font-family:
PingFang-SC-Medium;
font-family:
PingFang-SC-Medium;
font-weight:
500;
font-weight:
500;
color:rgba(153,153,153,
1);
color: rgba(153, 153, 153,
1);
line-height:
23px;
line-height:
23px;
.title
{
.title
{
color: #333;
color: #333;
font-family:
PingFang-SC-Medium;
font-family:
PingFang-SC-Medium;
font-weight:
500;
font-weight:
500;
margin-bottom: 5 * @toVw;
margin-bottom: 5 * @toVw;
font-size: 17*
@toVw;
font-size: 17 *
@toVw;
}
}
}
}
.closeBtn
{
.closeBtn
{
position: absolute;
position: absolute;
width: 30*@toVw;
width: 30 * @toVw;
height: 30*@toVw;
height: 30 * @toVw;
right: 8*@toVw;
right: 8 * @toVw;
top: 8*@toVw;
top: 8 * @toVw;
}
}
}
}
.btn-block
{
.btn-block
{
display: flex;
display: flex;
padding: 12*@toVw 8*
@toVw;
padding: 12 * @toVw 8 *
@toVw;
background: white;
background: white;
justify-content: space-around;
justify-content: space-around;
.btn
{
.btn
{
width: 68*
@toVw;
width: 68 *
@toVw;
height: 68*
@toVw;
height: 68 *
@toVw;
img
{
img
{
width: 100%;
width: 100%;
}
}
}
}
}
}
.lesson-block
{
.lesson-block
{
padding-bottom: 20px;
padding-bottom: 20px;
.goods-block
{
.goods-block
{
position: relative;
position: relative;
width: 335*
@toVw;
width: 335 *
@toVw;
.tips
{
.tips
{
display: inline-block;
display: inline-block;
font-size:
12px;
font-size:
12px;
font-family:
PingFang-SC-Bold;
font-family:
PingFang-SC-Bold;
font-weight:
normal;
font-weight:
normal;
color:rgba(255,255,255,
1);
color: rgba(255, 255, 255,
1);
line-height:
17px;
line-height:
17px;
padding: 2px 5px;
padding: 2px 5px;
position: absolute;
position: absolute;
right: 10px;
right: 10px;
top: 12px;
top: 12px;
background:rgba(245,166,35,
1);
background: rgba(245, 166, 35,
1);
border-radius:
10px;
border-radius:
10px;
}
}
img
{
img
{
width: 335*
@toVw;
width: 335 *
@toVw;
height: 236*
@toVw;
height: 236 *
@toVw;
border-radius: 8px;
border-radius: 8px;
}
}
}
}
}
}
.class-block {
.class-block{
margin-top: 10px;
margin-top: 10px;
font-family: PingFang-SC-Medium;
font-family: PingFang-SC-Medium;
font-size: 18px;
font-size: 18px;
color: #333333;
color: #333333;
text-align: center;
text-align: center;
background: white;
background: white;
.title
{
.title
{
padding: 8*
@toVw;
padding: 8 *
@toVw;
position: relative;
position: relative;
.more
{
.more
{
position: absolute;
position: absolute;
width: 30*
@toVw;
width: 30 *
@toVw;
bottom: 10px;
bottom: 10px;
right: 20px;
right: 20px;
}
}
}
}
}
}
</
style
>
</
style
>
src/components/newLesson/share.vue
View file @
3d6a7f90
...
@@ -96,8 +96,8 @@
...
@@ -96,8 +96,8 @@
});
});
},
},
shareImg
(
icon
){
shareImg
(
icon
){
let
URL
=
process
.
env
.
API_URL
+
'#/shareGoods?userID='
+
this
.
userDetail
.
user_id
;
console
.
log
(
icon
)
console
.
log
(
icon
)
let
URL
=
process
.
env
.
API_URL
+
'#/shareGoods?userID='
+
this
.
userDetail
.
user_id
;
this
.
onShare
(
URL
,
icon
);
this
.
onShare
(
URL
,
icon
);
},
},
initPage
(){
initPage
(){
...
...
src/components/shareTime.vue
View file @
3d6a7f90
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
},
},
methods
:{
methods
:{
initPage
(){
initPage
(){
debugger
let
str
=
this
.
day
.
toString
();
let
str
=
this
.
day
.
toString
();
for
(
let
i
=
0
;
i
<
str
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
str
.
length
;
i
++
){
this
.
imgList
.
push
(
str
[
i
])
this
.
imgList
.
push
(
str
[
i
])
...
@@ -79,6 +80,7 @@
...
@@ -79,6 +80,7 @@
height: 200*@toVw;
height: 200*@toVw;
text-align: center;
text-align: center;
line-height: 200*@toVw;
line-height: 200*@toVw;
font-size: 12px;
img{
img{
width:90*@toVw;
width:90*@toVw;
vertical-align: middle;
vertical-align: middle;
...
...
src/util/common.js
View file @
3d6a7f90
export
default
{
export
default
{
dateFmt
:
function
(
date
,
format
)
{
dateFmt
:
function
(
date
,
format
)
{
var
o
=
{
var
o
=
{
"M+"
:
date
.
getMonth
()
+
1
,
//month
"M+"
:
date
.
getMonth
()
+
1
,
//month
"d+"
:
date
.
getDate
(),
//day
"d+"
:
date
.
getDate
(),
//day
"h+"
:
date
.
getHours
(),
//hour
"h+"
:
date
.
getHours
(),
//hour
"m+"
:
date
.
getMinutes
(),
//minute
"m+"
:
date
.
getMinutes
(),
//minute
"s+"
:
date
.
getSeconds
(),
//second
"s+"
:
date
.
getSeconds
(),
//second
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//quarter
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//quarter
"S"
:
date
.
getMilliseconds
()
//millisecond
"S"
:
date
.
getMilliseconds
()
//millisecond
}
}
if
(
/
(
y+
)
/
.
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
if
(
/
(
y+
)
/
.
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
format
))
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]
:
RegExp
.
$1
.
length
==
1
?
o
[
k
]
:
(
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
));
(
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
));
return
format
;
return
format
;
},
},
getUrlParam
()
{
getUrlParam
()
{
var
url
=
location
.
search
;
//获取url中"?"符后的字串
var
url
=
location
.
search
;
//获取url中"?"符后的字串
var
theRequest
=
new
Object
();
var
theRequest
=
new
Object
();
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
var
str
=
url
.
substr
(
1
);
var
str
=
url
.
substr
(
1
);
var
strs
=
str
.
split
(
"&"
);
var
strs
=
str
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
theRequest
[
strs
[
i
].
split
(
"="
)[
0
]]
=
unescape
(
strs
[
i
].
split
(
"="
)[
1
]);
theRequest
[
strs
[
i
].
split
(
"="
)[
0
]]
=
unescape
(
strs
[
i
].
split
(
"="
)[
1
]);
}
}
}
}
return
theRequest
;
return
theRequest
;
},
},
toDataURL
(
src
,
callback
)
{
toDataURL
(
src
,
callback
)
{
var
xhttp
=
new
XMLHttpRequest
()
var
xhttp
=
new
XMLHttpRequest
()
xhttp
.
onload
=
function
()
{
xhttp
.
onload
=
function
()
{
var
fileReader
=
new
FileReader
()
var
fileReader
=
new
FileReader
()
...
@@ -41,5 +41,15 @@ export default{
...
@@ -41,5 +41,15 @@ export default{
xhttp
.
responseType
=
'blob'
xhttp
.
responseType
=
'blob'
xhttp
.
open
(
'GET'
,
src
,
true
)
xhttp
.
open
(
'GET'
,
src
,
true
)
xhttp
.
send
()
xhttp
.
send
()
},
getParam
(
paramName
)
{
let
paramValue
=
""
,
isFound
=
!
1
;
let
arrSource
=
[]
let
i
=
0
if
(
location
.
search
.
indexOf
(
"?"
)
==
0
&&
location
.
search
.
indexOf
(
"="
)
>
1
)
{
arrSource
=
unescape
(
location
.
search
).
substring
(
1
,
location
.
search
.
length
).
split
(
"&"
);
while
(
i
<
arrSource
.
length
&&
!
isFound
)
arrSource
[
i
].
indexOf
(
"="
)
>
0
&&
arrSource
[
i
].
split
(
"="
)[
0
].
toLowerCase
()
==
paramName
.
toLowerCase
()
&&
(
paramValue
=
arrSource
[
i
].
split
(
"="
)[
1
],
isFound
=
!
0
),
i
++
}
return
paramValue
==
""
&&
(
paramValue
=
null
),
paramValue
}
}
}
}
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