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
e542680b
Commit
e542680b
authored
Jul 13, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add behavior
parent
4a38c85b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
src/App.vue
+6
-0
src/main.js
+5
-0
static/mayi.mpBehavior.js
+0
-0
No files found.
src/App.vue
View file @
e542680b
...
@@ -147,6 +147,12 @@ export default {
...
@@ -147,6 +147,12 @@ export default {
getShopInfo
({
mixid
})
{
getShopInfo
({
mixid
})
{
shop
.
getShopInfo
({
shopMixId
:
mixid
}).
then
((
res
)
=>
{
shop
.
getShopInfo
({
shopMixId
:
mixid
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
// 收集用户数据
this
.
$mpBehavior
.
init
(
"mayi-moblie-shop-mp"
,
res
.
data
.
data
.
id
,
{
mode
:
process
.
env
.
NODE_ENV
,
gid
:
res
.
data
.
data
.
groupId
})
let
mpApp
=
getApp
();
let
mpApp
=
getApp
();
// 商城基本数据
// 商城基本数据
mpApp
.
shopCallBack
&&
mpApp
.
shopCallBack
(
res
.
data
.
data
);
mpApp
.
shopCallBack
&&
mpApp
.
shopCallBack
(
res
.
data
.
data
);
...
...
src/main.js
View file @
e542680b
...
@@ -28,6 +28,11 @@ Vue.config.productionTip = false
...
@@ -28,6 +28,11 @@ Vue.config.productionTip = false
App
.
mpType
=
'app'
App
.
mpType
=
'app'
Vue
.
prototype
.
$store
=
Store
Vue
.
prototype
.
$store
=
Store
// 用户行为收集
console
.
log
(
Store
.
state
,
'---35'
)
let
mpBehavior
=
require
(
"../static/mayi.mpBehavior"
)
Vue
.
prototype
.
$mpBehavior
=
mpBehavior
;
// 异常监控(行为收集)
// 异常监控(行为收集)
let
mpAnalytics
=
require
(
"../node_modules/mayi-analytics/dist/mayi.mpAnalytics.js"
)
let
mpAnalytics
=
require
(
"../node_modules/mayi-analytics/dist/mayi.mpAnalytics.js"
)
.
default
;
.
default
;
...
...
static/mayi.mpBehavior.js
0 → 100644
View file @
e542680b
This diff is collapsed.
Click to expand it.
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