Merge branch 'release/3.0' into 'gray'
yas See merge request !32
Showing
3 changed files
with
16 additions
and
6 deletions
1 | +import yoho from 'yoho'; | ||
2 | + | ||
1 | export default () => { | 3 | export default () => { |
2 | return { | 4 | return { |
3 | REC_ID: '', | 5 | REC_ID: '', |
@@ -6,15 +8,13 @@ export default () => { | @@ -6,15 +8,13 @@ export default () => { | ||
6 | '_' + Math.floor(Math.random() * 1000000 + 1000000)); | 8 | '_' + Math.floor(Math.random() * 1000000 + 1000000)); |
7 | }, | 9 | }, |
8 | event(op, param) { | 10 | event(op, param) { |
9 | - if (window._yas && window._yas.sendCustomInfo) { | ||
10 | - setTimeout(() => { | ||
11 | - window._yas.sendCustomInfo({ | ||
12 | - op: op, | 11 | + if (window._yas && window._yas.sendAppLogs) { |
12 | + window._yas.sendAppLogs({ | ||
13 | + appop: op, | ||
13 | param: JSON.stringify(Object.assign(param, { | 14 | param: JSON.stringify(Object.assign(param, { |
14 | REC_ID: this.REC_ID | 15 | REC_ID: this.REC_ID |
15 | })) | 16 | })) |
16 | }, true); | 17 | }, true); |
17 | - }, 0); | ||
18 | } | 18 | } |
19 | }, | 19 | }, |
20 | eventData(op, param) { | 20 | eventData(op, param) { |
@@ -50,6 +50,11 @@ directive(Vue); | @@ -50,6 +50,11 @@ directive(Vue); | ||
50 | filter(Vue); | 50 | filter(Vue); |
51 | Vue.use(VueTouch); | 51 | Vue.use(VueTouch); |
52 | 52 | ||
53 | +Vue.prototype.$isApp = yoho.isApp; | ||
54 | +Vue.prototype.$isiOS = yoho.isiOS; | ||
55 | +Vue.prototype.$isAndroid = yoho.isAndroid; | ||
56 | +Vue.prototype.$isYohoBuy = yoho.isYohoBuy; | ||
57 | + | ||
53 | $(() => { | 58 | $(() => { |
54 | const $body = $('body'); | 59 | const $body = $('body'); |
55 | 60 |
@@ -65,6 +65,7 @@ | @@ -65,6 +65,7 @@ | ||
65 | }, | 65 | }, |
66 | methods: { | 66 | methods: { |
67 | clickProduct(item, index) { | 67 | clickProduct(item, index) { |
68 | + if (this.$isYohoBuy) { | ||
68 | this.$yas.event('YB_GOODS_LIST_DT', { | 69 | this.$yas.event('YB_GOODS_LIST_DT', { |
69 | TYPE_ID: 13, | 70 | TYPE_ID: 13, |
70 | ENT_ID: this.query, | 71 | ENT_ID: this.query, |
@@ -72,6 +73,7 @@ | @@ -72,6 +73,7 @@ | ||
72 | PRD_ID: item.product_id, | 73 | PRD_ID: item.product_id, |
73 | SORT_TYPE: this.orderType | 74 | SORT_TYPE: this.orderType |
74 | }); | 75 | }); |
76 | + } | ||
75 | }, | 77 | }, |
76 | search: function() { | 78 | search: function() { |
77 | const nextPage = this.page + 1; | 79 | const nextPage = this.page + 1; |
@@ -102,6 +104,8 @@ | @@ -102,6 +104,8 @@ | ||
102 | if (!this.filterConfig) { | 104 | if (!this.filterConfig) { |
103 | this.filterConfig = res.data.filter; | 105 | this.filterConfig = res.data.filter; |
104 | } | 106 | } |
107 | + if (this.$isYohoBuy) { | ||
108 | + setTimeout(() => { | ||
105 | this.$yas.eventData('YB_GOODS_LIST', { | 109 | this.$yas.eventData('YB_GOODS_LIST', { |
106 | TYPE_ID: 13, | 110 | TYPE_ID: 13, |
107 | ENT_ID: this.query, | 111 | ENT_ID: this.query, |
@@ -111,6 +115,8 @@ | @@ -111,6 +115,8 @@ | ||
111 | }).join(','), | 115 | }).join(','), |
112 | SORT_TYPE: this.orderType, | 116 | SORT_TYPE: this.orderType, |
113 | }); | 117 | }); |
118 | + }, 500); | ||
119 | + } | ||
114 | } | 120 | } |
115 | }) | 121 | }) |
116 | .fail(() => { | 122 | .fail(() => { |
@@ -142,7 +148,6 @@ | @@ -142,7 +148,6 @@ | ||
142 | created: function() { | 148 | created: function() { |
143 | const self = this; | 149 | const self = this; |
144 | 150 | ||
145 | - | ||
146 | bus.$on('list.paging', function() { | 151 | bus.$on('list.paging', function() { |
147 | self.search(); | 152 | self.search(); |
148 | }); | 153 | }); |
-
Please register or login to post a comment