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
1a764fe1
Commit
1a764fe1
authored
Mar 09, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上报性能数据
parent
27241d6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
src/App.vue
+6
-3
src/pages/home/index.vue
+11
-0
No files found.
src/App.vue
View file @
1a764fe1
...
...
@@ -8,13 +8,14 @@ export default {
let
extConfig
=
wx
.
getExtConfigSync
?
wx
.
getExtConfigSync
()
:
{};
console
.
log
(
extConfig
,
"-----------extConfig"
);
if
(
process
.
env
.
NODE_ENV
==
"
development
"
||
process
.
env
.
NODE_ENV
==
"
production
"
||
JSON
.
stringify
(
extConfig
)
==
"{}"
)
{
// extConfig = { mixid: "jordan", shopid: 471 };
extConfig
=
{
mixid
:
"antgood"
,
shopid
:
67
};
extConfig
=
{
"mixid"
:
"xyyx"
,
"shopid"
:
133
};
}
console
.
log
(
"1444444444"
,
extConfig
.
mixid
);
console
.
log
(
"1444444444"
,
extConfig
);
this
.
$store
.
commit
(
"setExtConfig"
,
extConfig
.
mixid
);
this
.
$store
.
commit
(
'setExtConfigInfo'
,
extConfig
)
// 调用API从本地缓存中获取数据
...
...
@@ -163,6 +164,8 @@ export default {
return
item
.
componentName
==
"底部导航"
;
})[
0
];
// 显示条件(未处理)
footerVal
.
componentData
.
list
=
footerVal
.
componentData
.
list
.
filter
(
item
=>
item
.
visible
==
undefined
||
item
.
visible
==
1
)
||
[];
this
.
mpApp
.
globalData
.
footerVal
=
footerVal
;
// app中异步数据回调 底部栏数据
if
(
mpApp
.
footerCallBack
)
{
...
...
src/pages/home/index.vue
View file @
1a764fe1
...
...
@@ -172,6 +172,17 @@ export default {
// }
// };
},
onReady
(){
// 上报首页打开时间
if
(
wx
.
canIUse
(
'reportPerformance'
))
{
const
performance
=
wx
.
getPerformance
()
const
observer
=
performance
.
createObserver
((
entryList
)
=>
{
let
getEntries
=
entryList
.
getEntries
()
wx
.
reportPerformance
(
2001
,
getEntries
[
0
][
'duration'
])
})
observer
.
observe
({
entryTypes
:
[
'render'
,
'script'
]
})
}
},
onLoad
(
options
)
{
let
location
=
JSON
.
parse
(
wx
.
getStorageSync
(
'location'
)
||
'{}'
)
...
...
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