...
|
...
|
@@ -2,8 +2,15 @@ import qs from 'yoho-qs'; |
|
|
import yasTools from 'common/yas-tools';
|
|
|
|
|
|
class GoodsShowYasRpter {
|
|
|
constructor() {
|
|
|
constructor(params) {
|
|
|
this.timer = null;
|
|
|
this.goodsContainer = $(document);
|
|
|
this.goodsSelectorStr = '.good-info';
|
|
|
|
|
|
if (params) {
|
|
|
this.goodsContainer = params.goodsContainer ? $(params.goodsContainer) : this.goodsContainer;
|
|
|
this.goodsSelectorStr = params.goodsSelectorStr || '.good-info';
|
|
|
}
|
|
|
|
|
|
this.reportParams = {
|
|
|
C_ID: qs.physical_channel || 1,
|
...
|
...
|
@@ -34,7 +41,7 @@ class GoodsShowYasRpter { |
|
|
report() {
|
|
|
let cacheTheShowSkns = []; // 暂存此次上报的商品,上报后复制给 lastReportSkns
|
|
|
|
|
|
$('.good-info').each((gindex, theGoods) => {
|
|
|
this.goodsContainer.find(this.goodsSelectorStr).each((gindex, theGoods) => {
|
|
|
let $theGoods = $(theGoods);
|
|
|
let proSkn = $theGoods.data('id');
|
|
|
|
...
|
...
|
@@ -67,4 +74,4 @@ class GoodsShowYasRpter { |
|
|
|
|
|
}
|
|
|
|
|
|
export default new GoodsShowYasRpter(); |
|
|
export default GoodsShowYasRpter; |
...
|
...
|
|