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
d6c6d172
Commit
d6c6d172
authored
Dec 27, 2018
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
神策埋点
parent
6390d9fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
22 deletions
+41
-22
index.vue
src/components/buy/index.vue
+6
-3
index.vue
src/components/map/index.vue
+35
-19
No files found.
src/components/buy/index.vue
View file @
d6c6d172
...
...
@@ -118,7 +118,6 @@
import
{
getwechatParam
,
getGoodsDetailApi
,
getGroupDetailApi
,
getStatusWechatApi
,
getUserDetailApi
}
from
"../../service/api"
;
import
refBg
from
'../../assets/refBg.png'
import
moreUrl
from
'../../assets/moreIcon.png'
import
refIcon
from
'../../assets/refIcon.png'
import
weChatIcon
from
'../../assets/wechatIcon.png'
import
weChatQrUrl
from
'../../assets/weChatCode.png'
import
closeUrl
from
'../../assets/closemy.png'
...
...
@@ -383,14 +382,18 @@
_this
.
groupDetail
.
share_desc
.
refImg
[
0
].
url
=
avatarUrl
;
});
}
let
invite
=
this
.
$route
.
query
.
invite_code
;
this
.
$sa
.
track
(
'viewCourseDetail'
,{
goodsID
:
this
.
groupDetail
.
id
,
courseCate
:
this
.
groupDetail
.
course_type
===
1
?
'体验课'
:
'正式课'
,
lessonNumber
:
this
.
groupDetail
.
watch_num
,
goodsName
:
this
.
groupDetail
.
name
,
coursePrice
:
this
.
groupDetail
.
original_price
/
100
,
discountPrice
:
this
.
groupDetail
.
current_price
/
100
discountPrice
:
this
.
groupDetail
.
current_price
/
100
,
courseID
:
this
.
groupDetail
.
course_id
,
courseName
:
''
,
salesType
:
invite
?
invite
.
split
(
'-'
)[
1
]:
'null'
,
salesID
:
invite
?
invite
.
split
(
'-'
)[
2
]:
0
});
if
(
this
.
groupDetail
.
goods_type
===
2
){
if
(
localStorage
.
getItem
(
'cc_token'
)){
...
...
src/components/map/index.vue
View file @
d6c6d172
...
...
@@ -174,6 +174,9 @@
return
{
shopType
:
this
.
$route
.
query
.
course_type
,
diaBGI
:
diaBGI
,
course_id
:
''
,
push_time
:
''
,
course_name
:
''
,
nextUnitUrl
:
nextUnitUrl
,
periods_id
:
this
.
$route
.
query
.
periods_id
,
parent_category_id
:
this
.
$route
.
query
.
parent_category_id
,
...
...
@@ -193,7 +196,6 @@
slideChangeTransitionStart
:
function
(){
if
(
this
.
activeIndex
>=
that
.
swiper
.
slides
.
length
-
4
&&
that
.
more
){
that
.
swiper
.
slidePrev
();
}
},
resize
:
function
()
{
...
...
@@ -293,6 +295,13 @@
},
// 进入课程
goDetail
(){
// 神策埋点 选择课时
this
.
$sa
.
track
(
'StartCourse'
,{
elementID
:
this
.
thisLesson
.
id
.
toString
(),
is_view_today
:
''
});
if
(
this
.
thisLesson
.
content
.
tips
){
let
query
=
{
periods_id
:
this
.
periods_id
,
...
...
@@ -312,23 +321,16 @@
course_type
:
this
.
$route
.
query
.
course_type
,
type
:
'1'
};
this
.
$router
.
push
({
name
:
'lesson'
,
query
:
query
})
//
this.$router.push({name:'lesson',query:query})
}
},
// 切换主题
changeCateGory
(
data
,
flag
){
// 神策埋点
// 神策埋点
选择主题
this
.
$sa
.
track
(
'selectCategory'
,{
themeID
:
data
.
category_id
,
themeName
:
data
.
category_name
,
courseID
:
''
,
courseCate
:
this
.
$route
.
query
.
course_type
==
0
?
'正式课'
:
'体验课'
,
lessonNumber
:
''
,
courseTitle
:
''
,
periodID
:
''
,
periodName
:
''
,
teacherID
:
''
,
teacherName
:
''
themeID
:
data
.
category_id
.
toString
(),
themeName
:
data
.
category_name
.
toString
(),
courseID
:
this
.
course_id
.
toString
(),
});
if
(
!
flag
){
this
.
parent_category_id
=
data
.
category_id
;
...
...
@@ -342,10 +344,18 @@
getLessonDetailApi
(
this
.
periods_id
,
data
.
id
,
data
.
ele_id
).
then
(
res
=>
{
res
.
content
=
JSON
.
parse
(
res
.
content
);
this
.
thisLesson
=
res
;
this
.
thisLesson
.
id
=
data
.
id
;
this
.
thisLesson
.
id
=
data
.
ele_id
.
toString
()
;
this
.
thisLesson
.
domTitle
=
data
.
name
;
this
.
thisLesson
.
day
=
i
;
this
.
popupVisible
=
true
;
this
.
push_time
=
data
.
push_time
;
// 神策埋点 选择课时
this
.
$sa
.
track
(
'selectElement'
,{
elementID
:
data
.
ele_id
.
toString
(),
elementName
:
data
.
name
.
toString
(),
themeID
:
this
.
parent_category_id
.
toString
(),
courseID
:
this
.
course_id
.
toString
()
});
})
}
else
{
Toast
(
'课程还未开始哦'
)
...
...
@@ -358,6 +368,7 @@
this
.
getUnitList
()
}
},
// 获取列表
getUnitList
(){
getCourseListApi
(
this
.
periods_id
).
then
(
res
=>
{
this
.
unitList
=
[];
...
...
@@ -391,15 +402,20 @@
})
})
},
// 获取课程
getLessonList
(
data
){
getLessonListApi
(
this
.
periods_id
+
'/v2'
,{
category_id
:
this
.
parent_category_id
}).
then
(
res
=>
{
if
(
this
.
course_id
!==
res
.
periods_info
.
course_id
){
this
.
course_id
=
res
.
periods_info
.
course_id
;
this
.
course_name
=
res
.
periods_info
.
title
;
// 神策埋点 进入课程
this
.
$sa
.
track
(
'EnterCourse'
,{
courseID
:
this
.
course_id
});
}
this
.
lessonList
=
[];
this
.
hpLessonList
=
[];
if
(
res
.
list
.
length
<
1
){
this
.
noLesson
=
true
}
else
{
this
.
noLesson
=
false
}
this
.
noLesson
=
!!
res
.
list
.
length
<
1
;
let
list
=
[];
let
x
=
0
;
for
(
let
i
=
0
;
i
<
res
.
list
.
length
;
i
++
){
...
...
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