Authored by 陈峰

Merge branch 'release/3.0' into 'gray'

yas



See merge request !32
import yoho from 'yoho';
export default () => {
return {
REC_ID: '',
... ... @@ -6,15 +8,13 @@ export default () => {
'_' + Math.floor(Math.random() * 1000000 + 1000000));
},
event(op, param) {
if (window._yas && window._yas.sendCustomInfo) {
setTimeout(() => {
window._yas.sendCustomInfo({
op: op,
if (window._yas && window._yas.sendAppLogs) {
window._yas.sendAppLogs({
appop: op,
param: JSON.stringify(Object.assign(param, {
REC_ID: this.REC_ID
}))
}, true);
}, 0);
}
},
eventData(op, param) {
... ...
... ... @@ -50,6 +50,11 @@ directive(Vue);
filter(Vue);
Vue.use(VueTouch);
Vue.prototype.$isApp = yoho.isApp;
Vue.prototype.$isiOS = yoho.isiOS;
Vue.prototype.$isAndroid = yoho.isAndroid;
Vue.prototype.$isYohoBuy = yoho.isYohoBuy;
$(() => {
const $body = $('body');
... ...
... ... @@ -65,6 +65,7 @@
},
methods: {
clickProduct(item, index) {
if (this.$isYohoBuy) {
this.$yas.event('YB_GOODS_LIST_DT', {
TYPE_ID: 13,
ENT_ID: this.query,
... ... @@ -72,6 +73,7 @@
PRD_ID: item.product_id,
SORT_TYPE: this.orderType
});
}
},
search: function() {
const nextPage = this.page + 1;
... ... @@ -102,6 +104,8 @@
if (!this.filterConfig) {
this.filterConfig = res.data.filter;
}
if (this.$isYohoBuy) {
setTimeout(() => {
this.$yas.eventData('YB_GOODS_LIST', {
TYPE_ID: 13,
ENT_ID: this.query,
... ... @@ -111,6 +115,8 @@
}).join(','),
SORT_TYPE: this.orderType,
});
}, 500);
}
}
})
.fail(() => {
... ... @@ -142,7 +148,6 @@
created: function() {
const self = this;
bus.$on('list.paging', function() {
self.search();
});
... ...