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
73189b94
Commit
73189b94
authored
Sep 03, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
92
parent
24800ee8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
41 deletions
+27
-41
index.vue
src/components/index.vue
+18
-30
logistics.vue
src/components/logistics.vue
+0
-1
main.js
src/main.js
+9
-10
No files found.
src/components/index.vue
View file @
73189b94
...
@@ -60,8 +60,8 @@
...
@@ -60,8 +60,8 @@
</div>
</div>
</div>
</div>
<div
class=
"triangle"
>
<div
class=
"triangle"
>
<span
v-if=
"
bannerData.start_periods_id
>0"
>
已开课
</span>
<span
v-if=
"
userCourse.periods_list[0].is_start_course
>0"
>
已开课
</span>
<span
v-if=
"
bannerData.start_periods_id==0
"
>
待开课
</span>
<span
v-if=
"
!userCourse.periods_list[0].is_start_course
"
>
待开课
</span>
</div>
</div>
<img
class=
"bgimg canvas"
v-if=
"canvasData"
:src=
"canvasData"
alt
/>
<img
class=
"bgimg canvas"
v-if=
"canvasData"
:src=
"canvasData"
alt
/>
</div>
</div>
...
@@ -83,13 +83,13 @@
...
@@ -83,13 +83,13 @@
<div
<div
class=
"triangle"
class=
"triangle"
style=
"background:transparent;"
style=
"background:transparent;"
v-if=
"userCourse.
start_periods_id
"
>
v-if=
"userCourse.
periods_list[0].is_start_course
"
>
<span>
已开课
</span>
<span>
已开课
</span>
</div>
</div>
<div
<div
class=
"triangle"
class=
"triangle"
style=
"background:transparent;"
style=
"background:transparent;"
v-if=
"!userCourse.
start_periods_id
"
>
v-if=
"!userCourse.
periods_list[0].is_start_course
"
>
<span>
待开课
</span>
<span>
待开课
</span>
</div>
</div>
</div>
</div>
...
@@ -403,13 +403,9 @@
...
@@ -403,13 +403,9 @@
<
script
>
<
script
>
import
{
import
{
bannerListApi
,
bannerListApi
,
getUserLessonApi
,
getTeacherApi
,
getCourseInfoApi
,
getCourseInfoApi
,
getOrderListApi
,
getOrderListApi
,
getCouponListApi
,
getCouponListApi
,
getAutomationCouponApi
,
getUserDetailApi
}
from
"../service/api"
;
}
from
"../service/api"
;
import
{
IndexImage
}
from
"../util/imgUrl"
;
import
{
IndexImage
}
from
"../util/imgUrl"
;
import
localStorageFn
from
"../util/localStorage"
;
import
localStorageFn
from
"../util/localStorage"
;
...
@@ -484,9 +480,10 @@ export default {
...
@@ -484,9 +480,10 @@ export default {
});
});
},
},
mounted
()
{
mounted
()
{
// window.scrollTo(0,0);
let
that
=
this
;
let
that
=
this
;
//课前预习点击提示
this
.
unlook
=
localStorage
.
getItem
(
"unlook"
);
this
.
unlook
=
localStorage
.
getItem
(
"unlook"
);
//处理横屏banner二维码渲染
if
(
document
.
body
.
clientWidth
>
700
)
{
if
(
document
.
body
.
clientWidth
>
700
)
{
that
.
orientationchange
=
true
;
that
.
orientationchange
=
true
;
}
}
...
@@ -608,14 +605,12 @@ export default {
...
@@ -608,14 +605,12 @@ export default {
}
}
}
}
this
.
$sa
.
track
(
"viewHomepage"
,
{});
this
.
$sa
.
track
(
"viewHomepage"
,
{});
// debugger
this
.
getBannerListApi
();
this
.
getBannerListApi
();
let
course
=
res
;
let
course
=
res
;
// 无老师带用户
// 无老师带用户
if
(
!
res
.
periods_list
)
{
if
(
!
res
.
periods_list
)
{
// 优惠券
// 优惠券
getCouponListApi
(
course
.
goods_id
).
then
(
res
=>
{
getCouponListApi
(
course
.
goods_id
).
then
(
res
=>
{
// debugger
if
(
res
.
length
)
{
if
(
res
.
length
)
{
this
.
couponInfo
=
res
[
0
];
this
.
couponInfo
=
res
[
0
];
this
.
$sa
.
track
(
"view61index"
,
{});
this
.
$sa
.
track
(
"view61index"
,
{});
...
@@ -626,7 +621,6 @@ export default {
...
@@ -626,7 +621,6 @@ export default {
}
}
}
}
if
(
this
.
$store
.
state
.
couponShadow
)
{
if
(
this
.
$store
.
state
.
couponShadow
)
{
// debugger
this
.
couponShadow
=
true
;
this
.
couponShadow
=
true
;
this
.
$sa
.
track
(
"view61tipshadow"
,
{});
this
.
$sa
.
track
(
"view61tipshadow"
,
{});
this
.
$store
.
dispatch
(
"setCouponShadow"
,
false
);
this
.
$store
.
dispatch
(
"setCouponShadow"
,
false
);
...
@@ -647,7 +641,6 @@ export default {
...
@@ -647,7 +641,6 @@ export default {
if
(
if
(
Date
.
parse
(
new
Date
())
>
Date
.
parse
(
new
Date
(
"2019/6/4 00:00:00"
))
Date
.
parse
(
new
Date
())
>
Date
.
parse
(
new
Date
(
"2019/6/4 00:00:00"
))
)
{
)
{
// debugger
this
.
liuyuActivity
=
false
;
this
.
liuyuActivity
=
false
;
localStorageFn
.
set
(
"liuyi"
,
1
);
localStorageFn
.
set
(
"liuyi"
,
1
);
}
}
...
@@ -659,18 +652,16 @@ export default {
...
@@ -659,18 +652,16 @@ export default {
this
.
$refs
.
bottomTab
.
setBtn
();
this
.
$refs
.
bottomTab
.
setBtn
();
}
else
{
}
else
{
if
(
res
.
start_periods_id
!=
undefined
&&
res
.
start_periods_id
>
0
)
{
if
(
res
.
start_periods_id
!=
undefined
&&
res
.
start_periods_id
>
0
)
{
// debugger
// 已开课
// 已开课
if
(
res
.
teacher_qr
)
{
if
(
res
.
teacher_qr
)
{
this
.
bannerData
.
qr
=
res
.
teacher_qr
;
this
.
bannerData
.
qr
=
res
.
teacher_qr
;
}
}
this
.
bannerData
.
start_at
=
res
.
periods_list
[
0
].
start_at
;
this
.
bannerData
.
start_at
=
res
.
periods_list
[
0
].
start_at
;
this
.
bannerData
.
active_start_at
=
this
.
bannerData
.
active_start_at
=
res
.
periods_list
[
0
].
active_start_at
;
res
.
periods_list
[
0
].
active_start_at
;
this
.
bannerData
.
is_start_active
=
res
.
is_start_active
;
this
.
bannerData
.
is_start_active
=
res
.
is_start_active
;
this
.
bannerData
.
start_periods_id
=
res
.
start_periods_id
;
this
.
bannerData
.
start_periods_id
=
res
.
start_periods_id
;
this
.
$refs
.
bottomTab
.
setBtn
();
this
.
$refs
.
bottomTab
.
setBtn
();
// debugger
let
ownDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
let
ownDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
if
(
ownDetail
.
family_user
!=
1
)
{
if
(
ownDetail
.
family_user
!=
1
)
{
if
(
if
(
...
@@ -678,7 +669,6 @@ export default {
...
@@ -678,7 +669,6 @@ export default {
this
.
bannerData
.
start_periods_id
this
.
bannerData
.
start_periods_id
)
{
)
{
sessionStorage
.
setItem
(
"frist"
,
true
);
sessionStorage
.
setItem
(
"frist"
,
true
);
// debugger
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"map"
,
name
:
"map"
,
query
:
{
query
:
{
...
@@ -746,7 +736,6 @@ export default {
...
@@ -746,7 +736,6 @@ export default {
this
.
$refs
.
bottomTab
.
setBtn
();
this
.
$refs
.
bottomTab
.
setBtn
();
}
else
if
(
res
.
automation_id
.
length
)
{
}
else
if
(
res
.
automation_id
.
length
)
{
// 自化课
// 自化课
// debugger
this
.
bannerData
=
res
;
this
.
bannerData
=
res
;
let
ownDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
let
ownDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
if
(
ownDetail
.
family_user
!=
1
)
{
if
(
ownDetail
.
family_user
!=
1
)
{
...
@@ -770,18 +759,17 @@ export default {
...
@@ -770,18 +759,17 @@ export default {
if
(
!
sessionStorage
.
getItem
(
"orderShadow"
))
{
if
(
!
sessionStorage
.
getItem
(
"orderShadow"
))
{
this
.
pt
=
true
;
this
.
pt
=
true
;
}
}
if
(
if
(
el
.
group_info
){
new
Date
(
el
.
group_info
.
deadline
.
replace
(
/-/g
,
"/"
)).
getTime
()
>=
if
(
new
Date
(
el
.
group_info
.
deadline
.
replace
(
/-/g
,
"/"
)).
getTime
()
>=
new
Date
().
getTime
())
{
new
Date
().
getTime
()
el
.
goods_desc
=
JSON
.
parse
(
el
.
goods_desc
);
)
{
arr
.
push
(
el
);
el
.
goods_desc
=
JSON
.
parse
(
el
.
goods_desc
);
let
Interval
=
setInterval
(
function
()
{
arr
.
push
(
el
);
that
.
countTime
=
commom
.
leftTimer
(
let
Interval
=
setInterval
(
function
()
{
new
Date
(
el
.
group_info
.
deadline
.
replace
(
/-/g
,
"/"
)),
that
.
countTime
=
commom
.
leftTimer
(
Interval
new
Date
(
el
.
group_info
.
deadline
.
replace
(
/-/g
,
"/"
)),
);
Interval
},
1000
);
);
}
},
1000
);
}
}
}
}
});
});
...
...
src/components/logistics.vue
View file @
73189b94
<
template
>
<
template
>
<div>
<div>
<div
class=
"no-result"
v-if=
"!list.length"
>
<div
class=
"no-result"
v-if=
"!list.length"
>
<div
class=
"content"
>
<div
class=
"content"
>
<img
src=
"~@/assets/logistics.png"
>
<img
src=
"~@/assets/logistics.png"
>
...
...
src/main.js
View file @
73189b94
...
@@ -13,6 +13,7 @@ import scroll from "./base/scroll/scroll"
...
@@ -13,6 +13,7 @@ import scroll from "./base/scroll/scroll"
import
{
Popup
,
Lazyload
,
Button
,
Dialog
,
Toast
}
from
'vant'
;
import
{
Popup
,
Lazyload
,
Button
,
Dialog
,
Toast
}
from
'vant'
;
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
//神策埋点
Vue
.
prototype
.
$sa
=
sa
;
Vue
.
prototype
.
$sa
=
sa
;
Vue
.
prototype
.
$sa
.
init
({
Vue
.
prototype
.
$sa
.
init
({
server_url
:
'http://47.107.250.38:8106/sa?project='
+
(
process
.
env
.
NODE_ENV
===
'production'
?
"production"
:
"default"
),
// 替换成自己的神策地址
server_url
:
'http://47.107.250.38:8106/sa?project='
+
(
process
.
env
.
NODE_ENV
===
'production'
?
"production"
:
"default"
),
// 替换成自己的神策地址
...
@@ -26,21 +27,19 @@ Vue.prototype.$sa.init({
...
@@ -26,21 +27,19 @@ Vue.prototype.$sa.init({
is_track_single_page
:
true
is_track_single_page
:
true
});
});
Vue
.
prototype
.
$sa
.
quick
(
'autoTrack'
)
Vue
.
prototype
.
$sa
.
quick
(
'autoTrack'
)
//神策埋点
Vue
.
use
(
VueClipboard
);
Vue
.
use
(
VueClipboard
);
Vue
.
use
(
Popup
).
use
(
Lazyload
).
use
(
Button
).
use
(
Dialog
).
use
(
Toast
);
Vue
.
use
(
Popup
).
use
(
Lazyload
).
use
(
Button
).
use
(
Dialog
).
use
(
Toast
);
Vue
.
component
(
'scroll'
,
scroll
);
Vue
.
component
(
'scroll'
,
scroll
);
// 全局错误日志
/* eslint-disable no-new */
const
errorHandler
=
(
error
,
vm
)
=>
{
// Vue.prototype.testAttr = 'testAttr'
Vue
.
prototype
.
$post
(
`api/client/report/errors/log`
,{
'routes_url'
:
vm
.
$route
.
name
,
'result_text'
:
error
.
toString
()})
// if (process.env.NODE_ENV == 'production') {
}
const
errorHandler
=
(
error
,
vm
)
=>
{
Vue
.
config
.
errorHandler
=
errorHandler
;
Vue
.
prototype
.
$post
(
`api/client/report/errors/log`
,{
'routes_url'
:
vm
.
$route
.
name
,
'result_text'
:
error
.
toString
()})
Vue
.
prototype
.
$throw
=
(
error
)
=>
errorHandler
(
error
,
this
);
}
Vue
.
config
.
errorHandler
=
errorHandler
;
Vue
.
prototype
.
$throw
=
(
error
)
=>
errorHandler
(
error
,
this
);
// }
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$common
=
common
//VConsole关闭屏蔽代码
if
(
process
.
env
.
NODE_ENV
!=
'production'
)
{
if
(
process
.
env
.
NODE_ENV
!=
'production'
)
{
new
VConsole
();
new
VConsole
();
}
}
...
...
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