Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
702debc6
Commit
702debc6
authored
Aug 31, 2023
by
侯体倬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 删除新华优选埋点,麦贝斯优化
parent
05e4365c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
72 deletions
+3
-72
src/components/common/SWQUserSelectTag.vue
+3
-0
src/components/common/SelectGoods.vue
+0
-7
src/main.js
+0
-8
src/pages/index/index.vue
+0
-8
src/pages/login/index.vue
+0
-4
src/utils/xhyxShop.js
+0
-45
No files found.
src/components/common/SWQUserSelectTag.vue
View file @
702debc6
...
...
@@ -63,6 +63,9 @@ export default {
this
.
getStatus
();
},
onShow
()
{
if
([
"antgood"
,
"SWQ"
].
indexOf
(
this
.
mixid
)
==
-
1
)
{
return
;
}
// if (wx.getStorageSync('isThereALabelAgain')) {
this
.
tagId
=
-
1
;
this
.
getStatus
();
...
...
src/components/common/SelectGoods.vue
View file @
702debc6
...
...
@@ -389,13 +389,6 @@ export default {
title
:
'加入成功'
,
icon
:
'success'
,
})
// 新华优选埋点
if
(
app
.
trackEvent
)
{
app
.
trackEvent
(
'resourceCartClick'
,
{
resourceId
:
this
.
getProductInfos
[
0
].
productId
,
resourceName
:
this
.
getProductInfos
[
0
].
pdtName
})
}
this
.
show
=
false
;
}
else
{
wx
.
showToast
({
...
...
src/main.js
View file @
702debc6
...
...
@@ -29,7 +29,6 @@ import "@/utils/themeModule";
import
shop
from
"./api/shop"
;
import
spokesman
from
"@/api/spokesman"
;
import
live
from
"@/api/live"
import
xhyxTrack
from
'@/utils/xhyxShop.js'
Vue
.
config
.
productionTip
=
false
App
.
mpType
=
'app'
...
...
@@ -55,8 +54,6 @@ app.$mount()
// glob挂载到
let
mpApp
=
getApp
();
// 新华优选埋点
xhyxTrack
.
init
(
mpApp
);
Vue
.
prototype
.
mpApp
=
mpApp
// 初始化
mpApp
.
fenxiaoModel
=
new
fenxiaoModel
({
...
...
@@ -225,11 +222,6 @@ wx.onAppRoute(res => {
Store
.
commit
(
"setShopUserInfo"
,
res
.
data
.
data
);
wx
.
setStorageSync
(
'loginUserInfo'
,
res
.
data
.
data
?
res
.
data
.
data
:
{})
userId
=
res
.
data
.
data
?
res
.
data
.
data
.
userId
:
''
// 新华优选埋点
if
(
mpApp
.
trackLogin
)
{
const
mobilePhone
=
res
.
data
.
data
&&
res
.
data
.
data
.
mobilephone
;
mpApp
.
trackLogin
(
mobilePhone
);
}
}
})
...
...
src/pages/index/index.vue
View file @
702debc6
...
...
@@ -184,10 +184,6 @@ export default {
key
:
"openid"
,
data
:
res1
.
data
.
data
});
// 新华优选埋点
if
(
app
.
trackSetOpenid
)
{
app
.
trackSetOpenid
(
res1
.
data
.
data
);
}
}
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
this
.
withoutScene
=
true
;
...
...
@@ -324,10 +320,6 @@ export default {
key
:
"openid"
,
data
:
res1
.
data
.
data
});
// 新华优选埋点
if
(
app
.
trackSetOpenid
)
{
app
.
trackSetOpenid
(
res1
.
data
.
data
);
}
log
.
info
(
'判断是否登录过=登陆过直接调用..未登录过需要授权头像昵称信息。'
)
if
(
wx
.
getStorageSync
(
'sessionid'
))
{
log
.
info
(
'已登陆了'
)
...
...
src/pages/login/index.vue
View file @
702debc6
...
...
@@ -956,10 +956,6 @@ export default {
key
:
"openid"
,
data
:
res1
.
data
.
data
});
// 新华优选埋点
if
(
app
.
trackSetOpenid
)
{
app
.
trackSetOpenid
(
res1
.
data
.
data
);
}
}
})
},
...
...
src/utils/xhyxShop.js
deleted
100644 → 0
View file @
05e4365c
import
compass
from
"mayi-front-tools/compass"
const
TRACK_NAME
=
'compass'
function
trackSetOpenid
(
openid
)
{
compass
.
setOpenid
(
openid
);
}
function
trackEvent
(
eventName
,
payload
)
{
compass
.
track
(
eventName
,
payload
);
}
function
trackLogin
(
phoneNumber
)
{
compass
.
login
(
phoneNumber
)
}
export
default
{
init
(
mpApp
)
{
if
(
!
[
'xhyx_uat'
,
'xhyx_prod'
].
includes
(
process
.
env
.
NODE_ENV
))
return
;
if
(
!
mpApp
[
TRACK_NAME
])
{
// 配置初始化参数
compass
.
init
({
name
:
'compass'
,
server_url
:
'https://track.hebeijiaoyu.cn/api/trackminimessage?productId=xinhuayouxuan'
,
// 全埋点控制开关
autoTrack
:{
appLaunch
:
true
,
// 默认为 true,false 则关闭 $MPLaunch 事件采集
appShow
:
true
,
// 默认为 true,false 则关闭 $MPShow 事件采集
appHide
:
true
,
// 默认为 true,false 则关闭 $MPHide 事件采集
pageShow
:
true
,
// 默认为 true,false 则关闭 $MPViewScreen 事件采集
pageShare
:
true
,
// 默认为 true,false 则关闭 $MPShare 事件采集
mpClick
:
false
,
// 默认为 false,true 则开启 $MPClick 事件采集
mpFavorite
:
true
,
// 默认为 true,false 则关闭 $MPAddFavorites 事件采集
pageLeave
:
false
// 默认为 false, true 则开启 $MPPageLeave事件采集
},
// 是否允许控制台打印查看埋点数据(建议开启查看)
show_log
:
true
});
mpApp
[
TRACK_NAME
]
=
compass
;
mpApp
.
trackSetOpenid
=
trackSetOpenid
;
mpApp
.
trackEvent
=
trackEvent
;
mpApp
.
trackLogin
=
trackLogin
;
}
}
}
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