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
d2bb05c6
Commit
d2bb05c6
authored
Jun 25, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
625
parent
db801704
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
26 deletions
+80
-26
App.vue
src/App.vue
+5
-5
popup_img@2x.png
src/assets/shop/popup_img@2x.png
+0
-0
buy.vue
src/components/buy/buy.vue
+43
-0
video.vue
src/components/newLesson/video.vue
+28
-17
index.js
src/service/index.js
+4
-4
No files found.
src/App.vue
View file @
d2bb05c6
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</
template
>
</
template
>
<
script
>
<
script
>
//
setSize();
setSize
();
//
addEventListener('resize',setSize);
addEventListener
(
'resize'
,
setSize
);
//
function setSize() {
function
setSize
()
{
//
document.documentElement.style.fontSize = document.documentElement.clientWidth/375*10+'px';
document
.
documentElement
.
style
.
fontSize
=
document
.
documentElement
.
clientWidth
/
375
*
10
+
'px'
;
//
}
}
export
default
{
export
default
{
name
:
'App'
,
name
:
'App'
,
mounted
(){
mounted
(){
...
...
src/assets/shop/popup_img@2x.png
0 → 100644
View file @
d2bb05c6
14 KB
src/components/buy/buy.vue
View file @
d2bb05c6
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<footer>
<div
class=
"sub-block"
>
<div
class=
"sub-block"
>
<span
v-if=
"groupDetail.goods_desc"
>
¥
{{
priceTotal
}}
</span>
<span
v-if=
"groupDetail.goods_desc"
>
¥
{{
priceTotal
}}
</span>
...
@@ -79,6 +80,20 @@
...
@@ -79,6 +80,20 @@
<addAddress
@
closeAdd=
"closeAdd"
></addAddress>
<addAddress
@
closeAdd=
"closeAdd"
></addAddress>
</div>
</div>
</transition>
</transition>
<van-popup
class=
"orderCancel"
v-model=
"orderCancel"
:overlay=
"true"
>
<div
class=
"box"
>
<img
:src=
"popup_img"
alt=
""
>
<div
class=
"content"
>
<h2>
参与未成功
</h2>
<p>
真的要放弃孩子启蒙英语的黄金机会吗?
</p>
<p
class=
"warn"
>
每天10分钟,英语启蒙很轻松!
</p>
<div
class=
"btnbox"
>
<div
@
click=
"orderCancel=false"
class=
"btn fal"
>
含泪放弃
</div>
<div
@
click=
"payOrder(orderFlag)"
class=
"btn suc"
>
报名课程
</div>
</div>
</div>
</div>
</van-popup>
<login-page
:bind-mobile=
"bindMobile"
v-if=
"groupDetail"
:groupDetail=
"groupDetail"
@
goToBuyPage=
"goToBuyPage"
></login-page>
<login-page
:bind-mobile=
"bindMobile"
v-if=
"groupDetail"
:groupDetail=
"groupDetail"
@
goToBuyPage=
"goToBuyPage"
></login-page>
</div>
</div>
</
template
>
</
template
>
...
@@ -94,6 +109,7 @@
...
@@ -94,6 +109,7 @@
import
clock
from
'../../assets/shop/clock.png'
import
clock
from
'../../assets/shop/clock.png'
import
addressImg
from
'../../assets/shop/address.png'
import
addressImg
from
'../../assets/shop/address.png'
import
leftG
from
'../../assets/shop/leftg.png'
import
leftG
from
'../../assets/shop/leftg.png'
import
popup_img
from
'../../assets/shop/popup_img@2x.png'
export
default
{
export
default
{
name
:
"buy"
,
name
:
"buy"
,
components
:{
components
:{
...
@@ -136,6 +152,8 @@
...
@@ -136,6 +152,8 @@
jsApiParameters
:
''
,
jsApiParameters
:
''
,
orderNo
:
''
,
orderNo
:
''
,
canSale
:
false
,
canSale
:
false
,
popup_img
:
popup_img
,
orderCancel
:
false
}
}
},
},
mounted
(){
mounted
(){
...
@@ -198,6 +216,7 @@
...
@@ -198,6 +216,7 @@
}
}
if
(
res
.
err_msg
===
'get_brand_wcpay_request:cancel'
)
{
if
(
res
.
err_msg
===
'get_brand_wcpay_request:cancel'
)
{
Toast
(
'取消购买'
)
Toast
(
'取消购买'
)
that
.
orderCancel
=
true
}
}
})
})
},
},
...
@@ -222,6 +241,7 @@
...
@@ -222,6 +241,7 @@
},
},
payOrder
(
flag
){
payOrder
(
flag
){
let
type
=
this
.
type
?
0
:
1
let
type
=
this
.
type
?
0
:
1
this
.
orderCancel
=
false
;
if
(
!
JSON
.
parse
(
localStorage
.
getItem
(
'userDesc'
)).
mobile
||
JSON
.
parse
(
localStorage
.
getItem
(
'userDesc'
)).
mobile
===
''
){
if
(
!
JSON
.
parse
(
localStorage
.
getItem
(
'userDesc'
)).
mobile
||
JSON
.
parse
(
localStorage
.
getItem
(
'userDesc'
)).
mobile
===
''
){
this
.
bindMobile
.
flag
=
type
;
this
.
bindMobile
.
flag
=
type
;
this
.
bindMobile
.
show
=
true
;
this
.
bindMobile
.
show
=
true
;
...
@@ -396,6 +416,29 @@
...
@@ -396,6 +416,29 @@
font-size: 14 * @toVw;
font-size: 14 * @toVw;
}
}
}
}
.orderCancel{
img{
width: 31.5rem;
}
.content{
position: absolute;
width: 31.5rem;
top: 12rem;
text-align: center;
h2{
font-size: 2.5rem;
color: #6C6C6C;
}
p{font-size: 1.4rem;color: #999999;margin: 1.5rem;}
.warn{font-size: 1.5rem;color: #EC612A;margin-bottom: 3rem;}
.btnbox{
display: flex;
.btn{width: 11.8rem;height: 4rem;line-height: 4rem;font-size: 1.4rem;color: white;border-radius: 2rem; }
.fal{background: #F8D56B;box-shadow:0px 4px 0px 0px rgba(239,147,70,0.97);}
.suc{background: #EC612A;box-shadow:0px 4px 0px 0px rgba(190,61,10,0.97);}
}
}
}
.slide-fade-leave-active {
.slide-fade-leave-active {
transition: all .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
transition: all .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
}
...
...
src/components/newLesson/video.vue
View file @
d2bb05c6
...
@@ -25,12 +25,13 @@
...
@@ -25,12 +25,13 @@
<div
class=
"video-block hp-video"
v-if=
"showObj.video[videoIndex]"
v-show=
"!share_show && !popupVisible && !star"
>
<div
class=
"video-block hp-video"
v-if=
"showObj.video[videoIndex]"
v-show=
"!share_show && !popupVisible && !star"
>
<video
:src=
"showObj.video[videoIndex].url"
@
ended=
"videoEnd"
@
play=
"videoPlay()"
controls
:poster=
"showObj.video[videoIndex].url+'?vframe/jpg/offset/3'"
></video>
<video
:src=
"showObj.video[videoIndex].url"
@
ended=
"videoEnd"
@
play=
"videoPlay()"
controls
:poster=
"showObj.video[videoIndex].url+'?vframe/jpg/offset/3'"
></video>
</div>
</div>
<div
v-if=
"showObj.video.length > 1&&!orientationchange"
class=
"age-block video"
@
click=
"videoShow = !videoShow"
>
<
!--
<
div
v-if=
"showObj.video.length > 1&&!orientationchange"
class=
"age-block video"
@
click=
"videoShow = !videoShow"
>
<div>
视频(
{{
videoIndex
+
1
}}
)
<i
class=
"playImage _154722344142123489"
></i></div>
<div>
视频(
{{
videoIndex
+
1
}}
)
<i
class=
"playImage _154722344142123489"
></i></div>
</div>
</div>
<div
class=
"age-change-block video"
v-if=
"showObj.video.length > 1 && videoShow&&!orientationchange"
>
<div
class=
"age-change-block video"
v-if=
"showObj.video.length > 1 && videoShow&&!orientationchange"
>
<div
@
click=
"videoIndex= index;videoShow=false;sendConsole('多视频选择视频')"
v-for=
"(item,index) in showObj.video"
>
视频(
{{
index
+
1
}}
)
<i
:class=
"
{'playImage _282918034425091245':index === videoIndex}" v-if="contentData.age === 1">
</i></div>
<div
@
click=
"videoIndex= index;videoShow=false;sendConsole('多视频选择视频')"
v-for=
"(item,index) in showObj.video"
>
视频(
{{
index
+
1
}}
)
<i
:class=
"
{'playImage _282918034425091245':index === videoIndex}" v-if="contentData.age === 1">
</i></div>
</div>
</div>
-->
<p
v-if=
"!orientationchange&&showObj.video.length>1"
class=
"videoTitle"
>
选集
</p>
<scroll
:class=
"
{scroll:true,disShow:showObj.video.length>1}" :data="showObj.video" v-if="!orientationchange" ref="scrollDom" :scrollX="true" :bounce="true" >
<scroll
:class=
"
{scroll:true,disShow:showObj.video.length>1}" :data="showObj.video" v-if="!orientationchange" ref="scrollDom" :scrollX="true" :bounce="true" >
<div
class=
"itemBox"
ref=
"itembox"
>
<div
class=
"itemBox"
ref=
"itembox"
>
<div
:class=
"
{item:true}" v-for="(item,index) in showObj.video" @click="scrollFn(index)" >
<div
:class=
"
{item:true}" v-for="(item,index) in showObj.video" @click="scrollFn(index)" >
...
@@ -98,15 +99,23 @@
...
@@ -98,15 +99,23 @@
},
},
orientationchange
:
false
,
orientationchange
:
false
,
testCount
:
5
,
testCount
:
5
,
videoStyle
:
'0'
videoStyle
:
'0'
,
videoWidth
:
100
}
}
},
},
props
:[
props
:[
'contentData'
,
'nowShow'
'contentData'
,
'nowShow'
],
],
created
(){
this
.
videoWidth
=
Number
(
document
.
documentElement
.
clientWidth
)
/
3.8
console
.
log
(
this
.
videoWidth
)
},
mounted
(){
mounted
(){
this
.
changeAge
(
this
.
contentData
.
age
)
this
.
changeAge
(
this
.
contentData
.
age
)
let
that
=
this
let
that
=
this
// console.log(Number(document.documentElement.clientWidth))
// console.log(Number(document.documentElement.clientWidth.replace('px','')))
window
.
addEventListener
(
'orientationchange'
,
function
(){
window
.
addEventListener
(
'orientationchange'
,
function
(){
setTimeout
(
function
(){
setTimeout
(
function
(){
let
width
=
document
.
documentElement
.
clientWidth
let
width
=
document
.
documentElement
.
clientWidth
...
@@ -122,19 +131,20 @@
...
@@ -122,19 +131,20 @@
methods
:{
methods
:{
scrollFn
(
index
){
scrollFn
(
index
){
this
.
videoStyle
=
index
this
.
videoStyle
=
index
this
.
videoIndex
=
index
let
parentwidth
=
Number
(
getComputedStyle
(
document
.
querySelector
(
'.scroll'
)).
width
.
replace
(
'px'
,
''
))
let
parentwidth
=
Number
(
getComputedStyle
(
document
.
querySelector
(
'.scroll'
)).
width
.
replace
(
'px'
,
''
))
let
itemBoxWidth
=
Number
(
getComputedStyle
(
document
.
querySelector
(
'.itemBox'
)).
width
.
replace
(
'px'
,
''
))
let
itemBoxWidth
=
Number
(
getComputedStyle
(
document
.
querySelector
(
'.itemBox'
)).
width
.
replace
(
'px'
,
''
))
console
.
log
(
itemBoxWidth
)
console
.
log
(
itemBoxWidth
)
let
difWidth
=
(
parentwidth
/
2
)
-
45
let
difWidth
=
(
parentwidth
/
2
)
-
45
if
(
index
*
90
>
difWidth
){
if
(
index
*
this
.
videoWidth
>
difWidth
){
let
indexS
=
index
-
1
let
indexS
=
index
-
1
if
((
index
*
100
-
difWidth
)
<
(
itemBoxWidth
-
parentwidth
)){
if
((
index
*
this
.
videoWidth
-
difWidth
)
<
(
itemBoxWidth
-
parentwidth
)){
this
.
$refs
.
scrollDom
.
scrollTo
(
-
((
index
*
100
)
-
difWidth
),
0
,
100
)
this
.
$refs
.
scrollDom
.
scrollTo
(
-
((
index
*
this
.
videoWidth
)
-
difWidth
),
0
,
this
.
videoWidth
)
}
else
{
}
else
{
this
.
$refs
.
scrollDom
.
scrollTo
(
-
(
itemBoxWidth
-
parentwidth
),
0
,
100
)
this
.
$refs
.
scrollDom
.
scrollTo
(
-
(
itemBoxWidth
-
parentwidth
),
0
,
this
.
videoWidth
)
}
}
}
else
{
}
else
{
this
.
$refs
.
scrollDom
.
scrollTo
(
0
,
0
,
100
)
this
.
$refs
.
scrollDom
.
scrollTo
(
0
,
0
,
this
.
videoWidth
)
}
}
},
},
swiperback
(
index
){
swiperback
(
index
){
...
@@ -239,11 +249,11 @@
...
@@ -239,11 +249,11 @@
change
:
this
.
contentData
.
content
.
change
change
:
this
.
contentData
.
content
.
change
}
}
}
}
console
.
log
(
this
.
$refs
.
itembox
)
//
console.log(this.$refs.itembox)
console
.
log
(
this
.
showObj
.
video
.
length
)
//
console.log(this.showObj.video.length)
if
(
this
.
$refs
.
itembox
&&
this
.
showObj
.
video
.
length
){
if
(
this
.
$refs
.
itembox
&&
this
.
showObj
.
video
.
length
){
this
.
$refs
.
itembox
.
style
.
width
=
this
.
showObj
.
video
.
length
*
100
+
'px'
this
.
$refs
.
itembox
.
style
.
width
=
this
.
showObj
.
video
.
length
*
this
.
videoWidth
+
'px'
console
.
log
(
this
.
$refs
.
itembox
.
style
.
w
idth
)
console
.
log
(
this
.
videoW
idth
)
}
}
}
}
},
},
...
@@ -274,6 +284,7 @@
...
@@ -274,6 +284,7 @@
.orientationchangeBox{
.orientationchangeBox{
p{text-align: center;margin-bottom: 10*@toVw;}
p{text-align: center;margin-bottom: 10*@toVw;}
}
}
.videoTitle{font-size: 14*@toVw;margin-bottom: 12*@toVw;text-indent: 6*@toVw;}
.scroll{
.scroll{
width: 310*@toVw;
width: 310*@toVw;
overflow: hidden;
overflow: hidden;
...
@@ -285,15 +296,14 @@
...
@@ -285,15 +296,14 @@
.item{
.item{
// display: inline-block;
// display: inline-block;
flex: 1;
flex: 1;
width: 10
0px
;
width: 10
rem
;
height: 10
0px
;
height: 10
rem
;
// border: 1px solid black;
// border: 1px solid black;
img{width: 9
0px;height: 60px;border-radius: 10
px;border: 3px solid transparent;}
img{width: 9
rem;height: 6rem;border-radius: 18
px;border: 3px solid transparent;}
.activity{
.activity{
border: 3px solid #40A9FF;
border: 3px solid #40A9FF;
}
}
}
}
}
}
}
}
.disShow{display: block;}
.disShow{display: block;}
...
@@ -319,9 +329,10 @@
...
@@ -319,9 +329,10 @@
}
}
.video-block{
.video-block{
margin-bottom: 16*@toVw;
margin-bottom: 16*@toVw;
border: 1*@toVw solid #666;
//
border: 1*@toVw solid #666;
border-radius: 12*@toVw;
border-radius: 12*@toVw;
padding: 8*@toVw;
padding: 8*@toVw;
background:#69C0FF ;
video{
video{
// width: 100%;
// width: 100%;
height: 171*@toVw;
height: 171*@toVw;
...
...
src/service/index.js
View file @
d2bb05c6
...
@@ -46,8 +46,8 @@ axios.interceptors.request.use(
...
@@ -46,8 +46,8 @@ axios.interceptors.request.use(
json
.
sing
=
"singsingenglish21000"
;
json
.
sing
=
"singsingenglish21000"
;
if
(
common
.
getUrlParam
().
chang_test_user_id
){
if
(
common
.
getUrlParam
().
chang_test_user_id
){
console
.
log
(
common
.
getUrlParam
())
console
.
log
(
common
.
getUrlParam
())
json
.
chang_test_user_id
=
common
.
getUrlParam
().
chang_test_user_id
//
json.chang_test_user_id = common.getUrlParam().chang_test_user_id
json
.
special_token
=
'changchangenglish'
//
json.special_token = 'changchangenglish'
}
}
if
(
process
.
env
.
NODE_ENV
===
'development'
){
if
(
process
.
env
.
NODE_ENV
===
'development'
){
config
.
params
.
special_token
=
"changchangenglish"
;
config
.
params
.
special_token
=
"changchangenglish"
;
...
@@ -73,8 +73,8 @@ axios.interceptors.request.use(
...
@@ -73,8 +73,8 @@ axios.interceptors.request.use(
json2
.
sing
=
"singsingenglish21000"
;
json2
.
sing
=
"singsingenglish21000"
;
if
(
common
.
getUrlParam
().
chang_test_user_id
){
if
(
common
.
getUrlParam
().
chang_test_user_id
){
console
.
log
(
common
.
getUrlParam
())
console
.
log
(
common
.
getUrlParam
())
json2
.
chang_test_user_id
=
common
.
getUrlParam
().
chang_test_user_id
//
json2.chang_test_user_id = common.getUrlParam().chang_test_user_id
json2
.
special_token
=
'changchangenglish'
//
json2.special_token = 'changchangenglish'
}
}
if
(
process
.
env
.
NODE_ENV
===
'development'
){
if
(
process
.
env
.
NODE_ENV
===
'development'
){
config
.
data
.
special_token
=
"changchangenglish"
;
config
.
data
.
special_token
=
"changchangenglish"
;
...
...
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