Parcourir la Source

Merge branch 'master' of http://git.quyaqu.com/huajingwen/bw_smallApp

HuaJingwen il y a 6 ans
Parent
commit
2406f03edc

+ 16 - 0
pages/application/application.js

@@ -127,4 +127,20 @@ Page({
127 127
   onHide () {
128 128
     this.setData({hiddenThis: true})
129 129
   },
130
+  //FormId
131
+  formSubmit(e) {
132
+    var formId = e.detail.formId;
133
+    this.getFromid(formId);
134
+  },
135
+  getFromid(formId) {
136
+    wx.request({
137
+      url: app.globalData.HOST + '/user/wx/getFromid',
138
+      method: "POST",
139
+      data: Object.assign({}, app.globalData.common, { from_id: formId }),
140
+      success: function (res) {
141
+      },
142
+      complete: function () {
143
+      }
144
+    });
145
+  }
130 146
 })

+ 5 - 1
pages/application/application.wxml

@@ -22,7 +22,11 @@
22 22
       <view class="content">
23 23
         <view class="title">小提示</view>
24 24
         <view class="text">回复"<text>2</text>",去还款</view>
25
-        <button class="contact-btn" open-type="contact"  session-from="id={{appid}}">我知道了</button>
25
+
26
+        <form bindsubmit="formSubmit" report-submit="{{true}}" >
27
+          <button class="contact-btn" open-type="contact"  session-from="id={{appid}}" formType="submit">我知道了</button>
28
+        </form>
29
+
26 30
       </view>
27 31
     </view>
28 32
 </view>

+ 16 - 0
pages/card/card.js

@@ -107,5 +107,21 @@ Page({
107 107
         app.noticeModal('您取消了分享')
108 108
       }
109 109
     }
110
+  },
111
+  //FormId
112
+  formSubmit(e) {
113
+    var formId = e.detail.formId;
114
+    this.getFromid(formId);
115
+  },
116
+  getFromid(formId) {
117
+    wx.request({
118
+      url: app.globalData.HOST + '/user/wx/getFromid',
119
+      method: "POST",
120
+      data: Object.assign({}, app.globalData.common, { from_id: formId }),
121
+      success: function (res) {
122
+      },
123
+      complete: function () {
124
+      }
125
+    });
110 126
   }
111 127
 })

+ 5 - 1
pages/card/card.wxml

@@ -31,7 +31,11 @@
31 31
       <view class="content">
32 32
         <view class="title">小提示</view>
33 33
         <view class="text">回复"<text>1</text>",获取贷款资格</view>
34
-        <button class="contact-btn" open-type="contact"  session-from="id=X_{{appid}}">我知道了</button>
34
+
35
+        <form bindsubmit="formSubmit" report-submit="{{true}}" >
36
+          <button class="contact-btn" open-type="contact"  session-from="id=X_{{appid}}" formType="submit">我知道了</button>
37
+        </form>
38
+        
35 39
       </view>
36 40
     </view>
37 41
 </view>

+ 17 - 0
pages/details/details.js

@@ -136,5 +136,22 @@ Page({
136 136
     this.setData({hiddenThis: true})
137 137
   },
138 138
   onUnload: function () {
139
+  },
140
+  //FormId
141
+  formSubmit(e) {
142
+    var formId = e.detail.formId;
143
+    this.getFromid(formId);
144
+    console.log(formId+"formID")
145
+  },
146
+  getFromid(formId) {
147
+    wx.request({
148
+      url: app.globalData.HOST + '/user/wx/getFromid',
149
+      method: "POST",
150
+      data: Object.assign({}, app.globalData.common, { from_id: formId }),
151
+      success: function (res) {
152
+      },
153
+      complete: function () {
154
+      }
155
+    });
139 156
   }
140 157
 })

+ 4 - 1
pages/details/details.wxml

@@ -68,7 +68,10 @@
68 68
       <view class="content">
69 69
         <view class="title">小提示</view>
70 70
         <view class="text">回复"<text>1</text>",获取贷款资格</view>
71
-        <button class="contact-btn" open-type="contact"  session-from="id=Y_{{appid}}&period={{time}}&money={{money}}">我知道了</button>
71
+
72
+        <form bindsubmit="formSubmit" report-submit="{{true}}" >
73
+          <button class="contact-btn" open-type="contact"  session-from="id=Y_{{appid}}&period={{time}}&money={{money}}" formType="submit">我知道了</button>
74
+        </form>
72 75
       </view>
73 76
     </view>
74 77
 </view>

+ 21 - 0
pages/find/find.js

@@ -133,5 +133,26 @@ Page({
133 133
         app.noticeModal('您取消了分享')
134 134
       }
135 135
     }
136
+  },
137
+  //FormId
138
+  formSubmit(e) {
139
+    var formId = e.detail.formId;
140
+    var id = e.target.dataset.id;
141
+    this.getFromid(formId, id); 
142
+    console.log(formId + "formID发现")
143
+  },
144
+  getFromid(formId, ids) {
145
+    wx.request({
146
+      url: app.globalData.HOST + '/user/wx/getFromid',
147
+      method: "POST",
148
+      data: Object.assign({}, app.globalData.common, { from_id: formId }),
149
+      success: function (res) {
150
+        wx.navigateTo({
151
+          url: '/pages/details/details?id=' + ids
152
+        })
153
+      },
154
+      complete: function () {
155
+      }
156
+    });
136 157
   }
137 158
 })

+ 16 - 0
pages/getIt/getIt.js

@@ -12,6 +12,22 @@ Page({
12 12
     // console.log(tel);
13 13
     that.setData({phone_number: tel, preid: preid, from: from})
14 14
   },
15
+  //FormId
16
+  formSubmit (e) {
17
+    var formId = e.detail.formId;
18
+    this.getFromid(formId);
19
+  },
20
+  getFromid (formId) {
21
+    wx.request({
22
+      url: app.globalData.HOST + '/user/wx/getFromid',
23
+      method: "POST",
24
+      data: Object.assign({}, app.globalData.common, { from_id: formId }),
25
+      success: function (res) {
26
+      },
27
+      complete: function () {
28
+      }
29
+    });
30
+  },
15 31
   goApply () {
16 32
     var id = this.data.preid, from = this.data.from, appid = '';
17 33
     if (from == 'card') {

+ 7 - 1
pages/getIt/getIt.wxml

@@ -10,7 +10,13 @@
10 10
       <view class="content">
11 11
         <view class="title">小提示</view>
12 12
         <view class="text">回复"<text>1</text>",获取贷款资格</view>
13
-        <button class="contact-btn" open-type="contact"  session-from="id={{appid}}">我知道了</button>
13
+
14
+
15
+        <form bindsubmit="formSubmit" report-submit="{{true}}" >
16
+          <button class="contact-btn" open-type="contact"  session-from="id={{appid}}" formType="submit">我知道了</button>
17
+        </form>
18
+
19
+        
14 20
       </view>
15 21
     </view>
16 22
 </view>

+ 21 - 0
pages/index/index.js

@@ -69,5 +69,26 @@ Page({
69 69
         app.noticeModal('您取消了分享')
70 70
       }
71 71
     }
72
+  },
73
+  //FormId
74
+  formSubmit(e) {
75
+    var formId = e.detail.formId;
76
+    var id = e.target.dataset.id;
77
+    this.getFromid(formId,id);
78
+    console.log(formId + "formID首页")
79
+  },
80
+  getFromid(formId,ids) {
81
+    wx.request({
82
+      url: app.globalData.HOST + '/user/wx/getFromid',
83
+      method: "POST",
84
+      data: Object.assign({}, app.globalData.common, { from_id: formId }),
85
+      success: function (res) {
86
+        wx.navigateTo({
87
+          url: '/pages/details/details?id='+ids
88
+        })
89
+      },
90
+      complete: function () {
91
+      }
92
+    });
72 93
   }
73 94
 })

+ 17 - 13
pages/template/template.wxml

@@ -1,18 +1,22 @@
1 1
 <template name="jiefItem1">
2 2
   <view class="weui-cells weui-cells_after-title template">
3
-    <navigator url="/pages/details/details?id={{id}}" id="{{id}}"  hover-class="navigator-hover">
4
-    <view class="weui-cell borrow-list-temp">
5
-      <view class="weui-cell__hd">
6
-          <image class="icon" src="{{icon}}"/>
7
-      </view>
8
-      <view class="weui-cell__bd">
9
-          <view class="title">{{name}}<view class="weui-badge" wx-if="{{prod_title != null}}">{{prod_title}}</view></view>
10
-          <view class="desc elli">{{description}}</view>
11
-          <view class="desc elli" >申请人数<text class="emphasize">{{applicants}}</text> <text>{{show_day}}</text> <text class="emphasize" wx-if="{{show_day=='日利率'}}">{{day_rate}}%</text><text class="emphasize" wx:if="{{show_day!='日利率'}}">{{monthly_rate}}%</text></view>
12
-      </view>
13
-    </view>
14
-    <view class="weui-cell__ft weui-cell__ft_in-access"></view>
15
-    </navigator>
3
+    <form bindsubmit="formSubmit" report-submit="{{true}}" style='width:100%;height:100%;display:block;' data-id="{{id}}">
4
+       <!-- <navigator url="/pages/details/details?id={{id}}" id="{{id}}"  hover-class="navigator-hover">  -->
5
+        <button class='suspendImg'  plain="ture" hover-class="none" data-name="help" formType="submit" style="border:none !important; width:100%;height:100%;" >
6
+        <view class="weui-cell borrow-list-temp">
7
+          <view class="weui-cell__hd">
8
+              <image class="icon" src="{{icon}}"/>
9
+          </view>
10
+          <view class="weui-cell__bd">
11
+              <view class="title">{{name}}<view class="weui-badge" wx-if="{{prod_title != null}}">{{prod_title}}</view></view>
12
+              <view class="desc elli">{{description}}</view>
13
+              <view class="desc elli" >申请人数<text class="emphasize">{{applicants}}</text> <text>{{show_day}}</text> <text class="emphasize" wx-if="{{show_day=='日利率'}}">{{day_rate}}%</text><text class="emphasize" wx:if="{{show_day!='日利率'}}">{{monthly_rate}}%</text></view>
14
+          </view>
15
+        </view>
16
+          <view class="weui-cell__ft weui-cell__ft_in-access"></view>
17
+        </button> 
18
+       <!-- </navigator>  -->
19
+    </form>
16 20
   </view>
17 21
 </template>
18 22
 

+ 8 - 0
pages/template/template.wxss

@@ -17,4 +17,12 @@
17 17
 .weui-cell:before{
18 18
     color: #e5e5e5;
19 19
     /*border-top: none;*/
20
+}
21
+.suspendImg{
22
+  margin-left: 0 !important;
23
+  margin-right: 0 !important;
24
+  padding-left: 0 !important;
25
+  padding-right: 0 !important;
26
+  text-align: left !important;
27
+  line-height: 100% !important;  
20 28
 }