Skip to content

Commit

Permalink
feat: 更新 xview 上报
Browse files Browse the repository at this point in the history
  • Loading branch information
lyxuncle committed Aug 22, 2019
1 parent 68c31f1 commit 8e3d638
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<meta name="format-detection" content="telephone=no">
<title>demo</title>

<link href="//storage.jd.com/ambient/styles-little_thing.css?48a886b78954b12d1e02" rel="stylesheet"></head>
<link href="//storage.jd.com/ambient/styles-little_thing.css?df1d6a92cca825081f37" rel="stylesheet"></head>
<body>
<!-- S 主体内容 -->
<div class="o2team_ambient_main" id="o2team_ambient_main"></div>
<!-- E 主体内容 -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.13.0/bodymovin.min.js"></script> -->

<script type="text/javascript" src="//storage.jd.com/ambient/bundle-little_thing.js?48a886b78954b12d1e02"></script><script type="text/javascript" src="//storage.jd.com/ambient/control-little_thing.js?48a886b78954b12d1e02"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-little_thing.js?48a886b78954b12d1e02"></script></body>
<script type="text/javascript" src="//storage.jd.com/ambient/bundle-little_thing.js?df1d6a92cca825081f37"></script><script type="text/javascript" src="//storage.jd.com/ambient/control-little_thing.js?df1d6a92cca825081f37"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-little_thing.js?df1d6a92cca825081f37"></script></body>
</html>
4 changes: 2 additions & 2 deletions dist/index_demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<script type="text/javascript" src="//storage.jd.com/ambient-global/ambient-autoStop-head.js"></script>

<link href="//storage.jd.com/ambient/styles-little_thing.css?48a886b78954b12d1e02" rel="stylesheet"></head>
<link href="//storage.jd.com/ambient/styles-little_thing.css?df1d6a92cca825081f37" rel="stylesheet"></head>
<body>
<!-- S 主体内容 -->
<div class="o2team_ambient_main" id="o2team_ambient_main"></div>
Expand All @@ -17,5 +17,5 @@

<script type="text/javascript" src="//storage.jd.com/ambient-global/ambient-autoStop-body.js"></script>

<script type="text/javascript" src="//storage.jd.com/ambient/bundle-little_thing.js?48a886b78954b12d1e02"></script><script type="text/javascript" src="//storage.jd.com/ambient/control-little_thing.js?48a886b78954b12d1e02"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-little_thing.js?48a886b78954b12d1e02"></script></body>
<script type="text/javascript" src="//storage.jd.com/ambient/bundle-little_thing.js?df1d6a92cca825081f37"></script><script type="text/javascript" src="//storage.jd.com/ambient/control-little_thing.js?df1d6a92cca825081f37"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-little_thing.js?df1d6a92cca825081f37"></script></body>
</html>
6 changes: 3 additions & 3 deletions info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"title": "little_thing",
"ambName": "运动墨迹",
"github": "https://github.com/o2team-ambient/little_thing",
"demoSnippet": "<link href=\"//storage.jd.com/ambient/styles-little_thing.css?t=1565786831000\" rel=\"stylesheet\"></link><!-- S 主体内容 -->\n <div class=\"o2team_ambient_main\" id=\"o2team_ambient_main\"></div>\n <!-- E 主体内容 --><script src=\"//storage.jd.com/ambient/bundle-little_thing.js?t=1565786831000\"></script>",
"controlUrl": "//storage.jd.com/ambient/control-little_thing.js?t=1565786831000",
"configUrl": "//storage.jd.com/ambient/config-little_thing.js?t=1565786831000",
"demoSnippet": "<link href=\"//storage.jd.com/ambient/styles-little_thing.css?t=1566461916000\" rel=\"stylesheet\"></link><!-- S 主体内容 -->\n <div class=\"o2team_ambient_main\" id=\"o2team_ambient_main\"></div>\n <!-- E 主体内容 --><script src=\"//storage.jd.com/ambient/bundle-little_thing.js?t=1566461916000\"></script>",
"controlUrl": "//storage.jd.com/ambient/control-little_thing.js?t=1566461916000",
"configUrl": "//storage.jd.com/ambient/config-little_thing.js?t=1566461916000",
"placeholderImg": "//storage.jd.com/ambient/little_thing_placeholder.png?t=1554256256000",
"gifImg": "//storage.jd.com/ambient/little_thing_motion.gif?t=1553866143000",
"spriteImg": "//storage.jd.com/ambient/little_thing_sprite.png?t=1554256256000"
Expand Down
12 changes: 10 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ try {
console.log(e)
}

Report.init({})
Report.processPV()
const handleReport = () => {
Report.init({})
Report.processPV()
}

if (typeof window.XView === 'undefined') {
handleReport()
} else {
window.handleReport = handleReport
}

0 comments on commit 8e3d638

Please sign in to comment.