Authored by shuaiguo

Merge remote-tracking branch 'refs/remotes/origin/feature/groupTab' into develop

@@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
6 <div id="tab-{{@index}}" data-template-name="{{../template_name}}" data-tab-name="{{tab_name}}" data-template-id="{{../template_id}}" data-index="{{@index}}" data-index-idx="{{@index}}" data-item-idx="{{@index}}" class="guess-tab first" data-query="{{queryString}}" data-code="{{resources_code}}"> 6 <div id="tab-{{@index}}" data-template-name="{{../template_name}}" data-tab-name="{{tab_name}}" data-template-id="{{../template_id}}" data-index="{{@index}}" data-index-idx="{{@index}}" data-item-idx="{{@index}}" class="guess-tab first" data-query="{{queryString}}" data-code="{{resources_code}}">
7 {{#if src}} 7 {{#if src}}
8 <img class="guess-img" src="{{image2 src w=200 h=160 q=60 mode=3}}" /> 8 <img class="guess-img" src="{{image2 src w=200 h=160 q=60 mode=3}}" />
9 - <div class=""></div> 9 + <div class="guess-tab-active"></div>
10 {{else}} 10 {{else}}
11 - <span class="guess-like-tab">{{tab_name}}</span> 11 + <span class="guess-like-tab guess-like-tab-active">{{tab_name}}</span>
12 {{/if}} 12 {{/if}}
13 </div> 13 </div>
14 {{^}} 14 {{^}}
@@ -24,4 +24,4 @@ @@ -24,4 +24,4 @@
24 {{/each}} 24 {{/each}}
25 </div> 25 </div>
26 </div> 26 </div>
27 -</div>  
  27 +</div>
@@ -70,8 +70,12 @@ class ResourceShowYasRpter { @@ -70,8 +70,12 @@ class ResourceShowYasRpter {
70 let cacheTheShowSkns = []; // 暂存此次上报的楼层,上报后复制给 lastReportSkns 70 let cacheTheShowSkns = []; // 暂存此次上报的楼层,上报后复制给 lastReportSkns
71 let tabParams = {}; 71 let tabParams = {};
72 72
  73 + let $tapDom = $('.guess-like-tab-active');
  74 +
  75 + $tapDom = $tapDom.length ? $tapDom.parent() : $('.guess-tab-active').parent();
  76 +
73 tabParams.TAB_NAME = $('.guess-like-tab-active').parent().data('tab-name') || $('.guess-tab-active').parent().data('tab-name'); 77 tabParams.TAB_NAME = $('.guess-like-tab-active').parent().data('tab-name') || $('.guess-tab-active').parent().data('tab-name');
74 - tabParams.TAB_ID = $('.guess-like-tab-active').parent().data('item-idx') + 1 || $('.guess-tab-active').parent().data('item-idx') + 1; 78 + tabParams.TAB_ID = $tapDom.data('item-idx');
75 tabParams.P_PARAM = $('.guess-like-tab-active').parent().data('code') || $('.guess-tab-active').parent().data('code'); 79 tabParams.P_PARAM = $('.guess-like-tab-active').parent().data('code') || $('.guess-tab-active').parent().data('code');
76 80
77 $('.templates').each((floorIndex, theFloor) => { 81 $('.templates').each((floorIndex, theFloor) => {
@@ -380,7 +380,7 @@ class Group extends Page { @@ -380,7 +380,7 @@ class Group extends Page {
380 let tabName = $this.data('tab-name'); 380 let tabName = $this.data('tab-name');
381 381
382 let params = { 382 let params = {
383 - TAB_ID: itemIdx + 1, 383 + TAB_ID: itemIdx,
384 TAB_NAME: tabName || '', 384 TAB_NAME: tabName || '',
385 ...custom_params 385 ...custom_params
386 }; 386 };
@@ -406,7 +406,7 @@ class Group extends Page { @@ -406,7 +406,7 @@ class Group extends Page {
406 F_INDEX: indexIdx + 1, 406 F_INDEX: indexIdx + 1,
407 I_INDEX: itemIdx + 1, 407 I_INDEX: itemIdx + 1,
408 ACTION_URL: '', // 拼团不传 408 ACTION_URL: '', // 拼团不传
409 - TAB_ID: this.tabId + 1, 409 + TAB_ID: this.tabId,
410 TAB_NAME: this.tabName, 410 TAB_NAME: this.tabName,
411 P_PARAM: this.contentCode, 411 P_PARAM: this.contentCode,
412 ...custom_params 412 ...custom_params