Authored by huangyi

上报修改

@@ -148,7 +148,6 @@ Component({ @@ -148,7 +148,6 @@ Component({
148 }, 148 },
149 149
150 submitFormId(e) { 150 submitFormId(e) {
151 - console.log(e.detail);  
152 return this.commonService.addWechatFormId({ 151 return this.commonService.addWechatFormId({
153 formId: e.detail.formId, 152 formId: e.detail.formId,
154 uid: app.getUid() || 0, 153 uid: app.getUid() || 0,
1 // page/subPackage/pages/zeroSell/components/tabs.js 1 // page/subPackage/pages/zeroSell/components/tabs.js
  2 +import CommonService from '../service/common'
  3 +
  4 +const app = getApp();
  5 +
2 Component({ 6 Component({
3 /** 7 /**
4 * 组件的属性列表 8 * 组件的属性列表
@@ -73,11 +77,22 @@ Component({ @@ -73,11 +77,22 @@ Component({
73 this.setData({ 77 this.setData({
74 tabs 78 tabs
75 }); 79 });
  80 + },
  81 + submitFormId(e) {
  82 + if (app.getUid()) {
  83 + this.commonService.addWechatFormId({
  84 + formId: e.detail.formId,
  85 + uid: app.getUid() || 0,
  86 + openId: app.getOpenID() || '',
  87 + miniapp_type: app.getMiniappType()
  88 + })
  89 + }
76 } 90 }
77 }, 91 },
78 92
79 ready() { 93 ready() {
80 let nodes = this._getAllPane(); 94 let nodes = this._getAllPane();
  95 + this.commonService = new CommonService();
81 96
82 this.setData({ 97 this.setData({
83 nodes, 98 nodes,
1 <!--page/subPackage/pages/zeroSell/components/tabs.wxml--> 1 <!--page/subPackage/pages/zeroSell/components/tabs.wxml-->
  2 +<form bindsubmit='submitFormId' report-submit='true'>
  3 + <view class="tabs tabs-class">
  4 + <block wx:for="{{tabs}}" wx:key="{{index}}">
  5 + <block wx:if="{{item.active}}">
  6 + <button form-type="submit" class="tab active" data-index="{{index}}" bindtap="_onTap">{{item.name}}</button>
  7 + </block>
2 8
3 -<view class="tabs tabs-class">  
4 - <block wx:for="{{tabs}}" wx:key="{{index}}">  
5 - <block wx:if="{{item.active}}">  
6 - <view class="tab active" data-index="{{index}}" bindtap="_onTap">{{item.name}}</view> 9 + <block wx:else>
  10 + <button form-type="submit" class="tab" data-index="{{index}}" bindtap="_onTap">{{item.name}}</button>
  11 + </block>
7 </block> 12 </block>
8 -  
9 - <block wx:else>  
10 - <view class="tab" data-index="{{index}}" bindtap="_onTap">{{item.name}}</view>  
11 - </block>  
12 - </block>  
13 -</view>  
14 - 13 + </view>
  14 +</form>
15 <slot></slot> 15 <slot></slot>
@@ -23,4 +23,7 @@ @@ -23,4 +23,7 @@
23 23
24 .active { 24 .active {
25 color: black; 25 color: black;
  26 +}
  27 +button::after {
  28 + border: 0;
26 } 29 }