From 72d5b5eb8e71a5eab8731d27e61cd5085fe2e888 Mon Sep 17 00:00:00 2001 From: Lee EC Date: Thu, 22 Aug 2019 15:48:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20xview=20=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.html | 4 ++-- dist/index_demo.html | 4 ++-- info.json | 6 +++--- src/index.js | 12 ++++++++++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/dist/index.html b/dist/index.html index 064ab90..eed9380 100644 --- a/dist/index.html +++ b/dist/index.html @@ -7,12 +7,12 @@ demo - +
- + \ No newline at end of file diff --git a/dist/index_demo.html b/dist/index_demo.html index 21cb2b7..4654013 100644 --- a/dist/index_demo.html +++ b/dist/index_demo.html @@ -9,7 +9,7 @@ - +
@@ -18,5 +18,5 @@ - + \ No newline at end of file diff --git a/info.json b/info.json index 702de82..cabe0d1 100755 --- a/info.json +++ b/info.json @@ -5,9 +5,9 @@ "title": "aesthetic", "ambName": "梦幻", "github": "https://github.com/o2team-ambient/aesthetic", - "demoSnippet": "\n
\n
\n ", - "controlUrl": "//storage.jd.com/ambient/control-aesthetic.js?t=1565874966000", - "configUrl": "//storage.jd.com/ambient/config-aesthetic.js?t=1565874966000", + "demoSnippet": "\n
\n
\n ", + "controlUrl": "//storage.jd.com/ambient/control-aesthetic.js?t=1566460071000", + "configUrl": "//storage.jd.com/ambient/config-aesthetic.js?t=1566460071000", "placeholderImg": "//storage.jd.com/ambient/aesthetic_placeholder.png?t=1554195745000", "spriteImg": "//storage.jd.com/ambient/aesthetic_sprite.png?t=1554195745000" } diff --git a/src/index.js b/src/index.js index fe48460..afa670f 100755 --- a/src/index.js +++ b/src/index.js @@ -17,5 +17,13 @@ try { console.log(e) } -Report.init({}) -Report.processPV(29) +const handleReport = () => { + Report.init({}) + Report.processPV() +} + +if (typeof window.XView === 'undefined') { + handleReport() +} else { + window.handleReport = handleReport +}