HuaJingwen 7 years ago
parent
commit
daaa015dd8
51 changed files with 232 additions and 782 deletions
  1. 18 6
      app.js
  2. 0 4
      app.json
  3. 37 4
      app.wxss
  4. 1 1
      pages/application/application.js
  5. 2 1
      pages/application/application.json
  6. 15 36
      pages/card/card.js
  7. 2 1
      pages/card/card.json
  8. 2 1
      pages/card/card.wxml
  9. 13 1
      pages/card/card.wxss
  10. 9 21
      pages/details/details.js
  11. 3 2
      pages/details/details.wxml
  12. 6 7
      pages/details/details.wxss
  13. 7 3
      pages/feedback/feedback.js
  14. 1 1
      pages/feedback/feedback.json
  15. 4 14
      pages/find/find.js
  16. 2 1
      pages/find/find.json
  17. 0 50
      pages/getIt/getIt.js
  18. 2 2
      pages/getIt/getIt.wxml
  19. 17 15
      pages/getPhone/getPhone.js
  20. 4 2
      pages/getPhone/getPhone.wxml
  21. 34 1
      pages/index/index.js
  22. 1 0
      pages/index/index.wxml
  23. 0 126
      pages/list/list.js
  24. 0 1
      pages/list/list.json
  25. 0 12
      pages/list/list.wxml
  26. 0 3
      pages/list/list.wxss
  27. 0 25
      pages/login/login.js
  28. 0 1
      pages/login/login.json
  29. 0 1
      pages/login/login.wxml
  30. 0 0
      pages/login/login.wxss
  31. 0 15
      pages/logs/logs.js
  32. 0 3
      pages/logs/logs.json
  33. 0 6
      pages/logs/logs.wxml
  34. 0 8
      pages/logs/logs.wxss
  35. 0 66
      pages/logs_to/logs_to.js
  36. 0 1
      pages/logs_to/logs_to.json
  37. 0 5
      pages/logs_to/logs_to.wxml
  38. 0 72
      pages/logs_to/logs_to.wxss
  39. 1 1
      pages/mine/mine.js
  40. 1 3
      pages/mine/mine.wxml
  41. 1 1
      pages/questions/questions.wxss
  42. 0 66
      pages/register_phon/register_phon.js
  43. 0 1
      pages/register_phon/register_phon.json
  44. 0 22
      pages/register_phon/register_phon.wxml
  45. 0 78
      pages/register_phon/register_phon.wxss
  46. 31 65
      pages/signup/signup.js
  47. 6 7
      pages/signup/signup.wxml
  48. 2 9
      pages/signup/signup.wxss
  49. 8 9
      pages/template/template.wxml
  50. 1 1
      project.config.json
  51. 1 0
      utils/util.js

+ 18 - 6
app.js

@@ -3,15 +3,31 @@ var appInstance = getApp()
3 3
 // console.log(appInstance.onShow())
4 4
 App({
5 5
   data:{
6
-    a: 0
6
+  },
7
+  globalData: {
8
+    userInfo: null,
9
+    HOST: 'https://chaoshi.henhaojie.com',
10
+    platform: 0
7 11
   },
8 12
   // 在这个app里面this就是app实例
9 13
   // 监听小程序初始化
10 14
   onLaunch: function (){
15
+      var system = '', app = this;
16
+      wx.getSystemInfo({
17
+        success: function(res) {
18
+          system = res.system
19
+          console.log(system)
20
+          if (system.indexOf('iOS') == -1) {
21
+            app.globalData.platform = 1;
22
+          }else{
23
+            app.globalData.platform = 2;
24
+          }
25
+          console.log(app.globalData.platform);
26
+        }
27
+      })
11 28
   },
12 29
   // 监听小程序显示
13 30
   onShow: function (options) {
14
-    // console.log(0)
15 31
   },
16 32
   // 监听小程序隐藏
17 33
   onHide: function () {
@@ -20,10 +36,6 @@ App({
20 36
   onError: function (msg) {
21 37
     console.log(msg)
22 38
   },
23
-  globalData: {
24
-    userInfo: null,
25
-    HOST: 'https://chaoshi.henhaojie.com'
26
-  },
27 39
   login: function (func) {
28 40
     let obj = {}, app = this, user = '';
29 41
     wx.login({

+ 0 - 4
app.json

@@ -2,18 +2,14 @@
2 2
   "pages": [
3 3
     "pages/index/index",
4 4
     "pages/find/find",
5
-    "pages/calculate/calculate",
6 5
     "pages/mine/mine",
7 6
     "pages/details/details",
8
-    "pages/list/list",
9
-    "pages/login/login",
10 7
     "pages/card/card",
11 8
     "pages/questions/questions",
12 9
     "pages/feedback/feedback",
13 10
     "pages/application/application",
14 11
     "pages/getPhone/getPhone",
15 12
     "pages/getIt/getIt",
16
-    "pages/register_phon/register_phon",
17 13
     "pages/signup/signup"
18 14
   ],
19 15
   "window": {

+ 37 - 4
app.wxss

@@ -58,7 +58,11 @@ page{
58 58
 
59 59
 .weui-cells::after{border-bottom:0 none;}
60 60
 
61
-.slide{height: 5px; border-top:1rpx solid #d9d9d9; background-color: #f5f4f9; }
61
+.slide{
62
+  height: 6px;
63
+  /*border-top:1rpx solid #d9d9d9; */
64
+  background-color: #f5f4f9;
65
+}
62 66
 
63 67
 /*成功率 星星*/
64 68
 .icon.icon-star {
@@ -131,15 +135,21 @@ page{
131 135
   width: 100%;
132 136
   height: 100%;
133 137
 }
138
+.template .weui-cell{
139
+  padding: 10px 12px;
140
+}
134 141
 .template .weui-cell__bd{
135 142
   margin-left: 10px;
136 143
 }
144
+.template .weui-cell__bd .title{
145
+    font-size: 16px;
146
+}
137 147
 .template .desc{
138 148
   font-size: 14px;
139 149
   color: #999;
140 150
 }
141 151
 .template .desc .emphasize{
142
-  color: #ff5100;
152
+  color: #E94D4D;
143 153
 }
144 154
 .template .contact-btn{
145 155
   /*display: none;*/
@@ -150,7 +160,21 @@ page{
150 160
   height: 100%;
151 161
   background: transparent;
152 162
 }
153
-.template .contact-btn::after{
163
+.template .notice-btn{
164
+    position: absolute;
165
+    top: 50%;
166
+    right: 16px;
167
+    width: 146rpx;
168
+    height: 40rpx;
169
+    font-size: 10px;
170
+    background: #E94D4D;
171
+    color: #fff;
172
+    line-height: 40rpx;
173
+    border-radius: 3px;
174
+    transform: translateY(-50%);
175
+    letter-spacing: 1rpx;
176
+}
177
+.template .contact-btn::after, .template .notice-btn::after{
154 178
   border: 0 none;
155 179
 }
156 180
 .template .weui-badge.other{
@@ -168,4 +192,13 @@ page{
168 192
   border-radius: 5px;
169 193
   margin-top:-3px;
170 194
   margin-left: 6px;
171
-}
195
+  padding: 2px 4px;
196
+}
197
+
198
+/*@media (-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5){
199
+
200
+}
201
+
202
+@media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2){
203
+
204
+}*/

+ 1 - 1
pages/application/application.js

@@ -6,7 +6,7 @@ Page({
6 6
     page: 0,
7 7
     dataList: [],
8 8
     cardList: [],
9
-    tabs: ["选项一", "选项二"],
9
+    tabs: ["借款申请", "信用卡申请"],
10 10
     activeIndex: 0,
11 11
     hidden: false
12 12
   },

+ 2 - 1
pages/application/application.json

@@ -1,3 +1,4 @@
1 1
 {
2
-    "enablePullDownRefresh": true
2
+    "enablePullDownRefresh": true,
3
+    "navigationBarTitleText": "我的申请"
3 4
 }

+ 15 - 36
pages/card/card.js

@@ -18,16 +18,18 @@ Page({
18 18
     this.initBanner();
19 19
     this.initCardList();
20 20
     app.login();
21
-    this.initConcact(false);
21
+    this.initConcact(null, true);
22 22
   },
23
-  initConcact (flag, event) {
24
-    var that = this, event = event || null, flag = flag || true;
23
+  initConcact (event, flag) {
24
+    var that = this, event = event || null, flag = flag || false;
25 25
     var tel = wx.getStorageSync('tel') || '0', user_id = wx.getStorageSync('user').user_id || '0', id = 0;
26 26
     if (user_id != '0' || tel != '0') {
27 27
       that.setData({hasPhone: true})
28 28
     }else{
29 29
       that.setData({hasPhone: false});
30
-      if (flag) {
30
+      console.log(flag);
31
+      if (!flag) {
32
+        console.log('test');
31 33
         id = event.currentTarget.dataset.id
32 34
         wx.navigateTo({
33 35
           url: "/pages/getPhone/getPhone?from=card&preid=" + id
@@ -36,7 +38,7 @@ Page({
36 38
     }
37 39
   },
38 40
   initCardList: function () {
39
-    var data = {}, list = [], that = this;
41
+    var data = {}, list = [], that = this, hasNext = true;
40 42
     if (that.data.page === 0) {
41 43
       list = []
42 44
     }else{
@@ -45,12 +47,14 @@ Page({
45 47
     wx.request({
46 48
       url: app.globalData.HOST + '/user/CreditCard/list',
47 49
       method: "POST",
48
-      data: {page: ++this.data.page},
50
+      data: {pageId: ++this.data.page},
49 51
       success: function (res) {
50 52
         if (res.data.errno == '0') {
51
-          data = res.data.rst.list;
53
+          // data = res.data.rst.list;
54
+          list = list.concat(res.data.rst.list)
55
+          hasNext = res.data.rst.pageInfo.hasNext
52 56
         }
53
-        that.setData({ cardList: data});
57
+        that.setData({ cardList: list, hasNext: hasNext});
54 58
       },
55 59
       complete: function () {
56 60
         // that.setData({ hidden:true});//加载成功
@@ -59,7 +63,6 @@ Page({
59 63
     });
60 64
   },
61 65
   initBanner () {
62
-    // https://chaoshi.henhaojie.com/user/CreditCard/bannerlist
63 66
     var data = [], that = this;
64 67
     wx.request({
65 68
       url: app.globalData.HOST + '/user/CreditCard/bannerlist',
@@ -76,32 +79,6 @@ Page({
76 79
       }
77 80
     });
78 81
   },
79
-  checkPhone () {
80
-    /*var token = wx.getStorage({
81
-        key: 'token',
82
-        success: function(res) {
83
-            // console.log(res.data)
84
-        },
85
-        fail: function (res){
86
-          app.login();
87
-        }
88
-    })*/
89
-    /*wx.request({
90
-      url: app.globalData.HOST + '/user/wx/personalCenter',
91
-      method: "POST",
92
-      success: function (res) {
93
-        console.log(res);
94
-        if (res.data.errno == '0') {
95
-          // data = res.data.rst.data;
96
-        }
97
-        // that.setData({ bannerList: data});
98
-      },
99
-      complete: function () {
100
-        // that.setData({ hidden:true});//加载成功
101
-        wx.stopPullDownRefresh() //停止下拉刷新
102
-      }
103
-    });*/
104
-  },
105 82
   onPullDownRefresh: function () {
106 83
     //下拉
107 84
     this.data.page = 0;
@@ -109,6 +86,8 @@ Page({
109 86
   },
110 87
   onReachBottom: function () {
111 88
     //上拉
112
-    this.initCardList()
89
+    if (this.data.hasNext) {
90
+        this.initCardList()
91
+    }
113 92
   }
114 93
 })

+ 2 - 1
pages/card/card.json

@@ -1,3 +1,4 @@
1 1
 {
2
-    "enablePullDownRefresh": true
2
+    "enablePullDownRefresh": true,
3
+    "navigationBarTitleText": "信用卡"
3 4
 }

+ 2 - 1
pages/card/card.wxml

@@ -6,10 +6,11 @@
6 6
        interval="{{interval}}" duration="{{duration}}"indicator-color="#E4E4E4" indicator-active-color="#8FA5FF">
7 7
         <block wx:for="{{bannerList}}" wx:key="id">
8 8
           <swiper-item class="item">
9
-            <view class="item-imglist" wx:for="{{item}}" wx:key="void" wx:for-item="imglist" bindtap="initConcact" data-id="{{imglist.id}}"  hover-class="navigator-hover">
9
+            <view class="item-imglist" wx:for="{{item}}" wx:key="void" wx:for-item="imglist" data-id="{{item.id}}" bindtap="initConcact" data-id="{{imglist.id}}"  hover-class="navigator-hover">
10 10
               <image src="{{imglist.card_icon}}" class="slide-image"/>
11 11
               <view class="elli title">{{imglist.name}}</view>
12 12
               <view class="elli desc">{{imglist.desc}}</view>
13
+              <button class="contact-btn" open-type="contact"  session-from="id=X_{{imglist.id}}" wx-if="{{hasPhone}}"/>
13 14
             </view>
14 15
           </swiper-item>
15 16
         </block>

+ 13 - 1
pages/card/card.wxss

@@ -20,6 +20,7 @@
20 20
     justify-content: center;
21 21
 }
22 22
 .card-swiper-container .item-imglist{
23
+    position: relative;
23 24
     display: inline-block;
24 25
     flex: 1;
25 26
     width: 33%;
@@ -45,6 +46,17 @@
45 46
 }
46 47
 .card .split{
47 48
     width: 100%;
48
-    height: 10px;
49
+    height: 8px;
49 50
     background: #F3F3F3;
51
+}
52
+.item-imglist .contact-btn{
53
+    position: absolute;
54
+    top: 0;
55
+    left: 0;
56
+    width: 100%;
57
+    height: 100%;
58
+    background: transparent;
59
+}
60
+.item-imglist .contact-btn::after{
61
+    border: 0 none;
50 62
 }

+ 9 - 21
pages/details/details.js

@@ -2,13 +2,11 @@
2 2
 var app = getApp();
3 3
 Page({
4 4
   data: {
5
-     array: ['美国', '中国', '巴西', '日本','美国', '中国', '巴西', '日本'],
6 5
      info: null,
7 6
      id: 129,
8 7
      remmondList: [],
9 8
      isShow: false,
10 9
      initPerid: null,
11
-     flag: 0,
12 10
      loanMoney: 0,
13 11
      money: 0,
14 12
      time: 0,
@@ -23,7 +21,7 @@ Page({
23 21
     }
24 22
     this.initDetails();
25 23
     this.getRemmondList();
26
-    this.showConcact(false);
24
+    this.showConcact(null, true);
27 25
     // console.log(this.data.remmondList);
28 26
   },
29 27
   bindPickerChange: function(e) {
@@ -60,7 +58,7 @@ Page({
60 58
       wx.request({
61 59
         url: app.globalData.HOST + '/user/product/getSameAmountByProductId',
62 60
         method: "POST",
63
-        data: {id: that.data.id},
61
+        data: {id: that.data.id, platform: app.globalData.platform},
64 62
         success: function (res) {
65 63
           if (res.data.errno == '0') {
66 64
             list = res.data.rst.data;
@@ -107,40 +105,30 @@ Page({
107 105
     that.setData({money: money})
108 106
     that.caculateMoney();
109 107
   },
110
-  showConcact (flag, event) {
111
-    var that = this, event = event || null, flag = flag || true;
108
+  showConcact (event, flag) {
109
+    var that = this, event = event || null, flag = flag || false;
112 110
     var tel = wx.getStorageSync('tel') || '0', user_id = wx.getStorageSync('user').user_id || '0', id = 0;
113 111
     if (user_id != '0' || tel != '0') {
112
+      console.log('test');
114 113
       that.setData({hasPhone: true})
115 114
     }else{
115
+      console.log(flag);
116 116
       that.setData({hasPhone: false});
117
-      if (flag) {
117
+      if (!flag) {
118 118
         id = event.currentTarget.dataset.id
119
+        console.log(id);
119 120
         wx.navigateTo({
120 121
           url: "/pages/getPhone/getPhone?from=details&preid=" + id
121 122
         })
122 123
       }
123 124
     }
124 125
   },
125
-  /**
126
-   * 生命周期函数--监听页面初次渲染完成
127
-   */
128 126
   onReady: function () {
129
-
130 127
   },
131
-  /**
132
-   * 生命周期函数--监听页面显示
133
-   */
134 128
   onShow: function () {
135
-
136 129
   },
137
-  /** 生命周期函数--监听页面隐藏*/
138 130
   onHide: function () {
139
-
140 131
   },
141
-  /** 生命周期函数--监听页面卸载 */
142 132
   onUnload: function () {
143
-
144
-  },
145
-
133
+  }
146 134
 })

+ 3 - 2
pages/details/details.wxml

@@ -33,13 +33,14 @@
33 33
             </view>
34 34
         </view>
35 35
     </view>
36
-    <view class='slide'></view>
36
+    <!-- <view class='slide'></view> -->
37 37
     <view class="details-info">
38
+      <view class="title">产品详情</view>
38 39
       <view class="intro">
39 40
         <view class="title">申请条件</view>
40 41
         <view class="content">{{info.requirements}}</view>
41 42
       </view>
42
-      <view class="intro">
43
+      <view class="intro {{isShow ? 'block' : 'none'}}">
43 44
         <view class="title">所需资料</view>
44 45
         <view class="content">{{info.document}}</view>
45 46
       </view>

+ 6 - 7
pages/details/details.wxss

@@ -35,11 +35,9 @@ page{
35 35
 .details .loan-limit{
36 36
     width: 100%;
37 37
     background: #fff;
38
-    height: 56px;
39 38
     box-sizing: border-box;
40
-    padding: 10px 0;
39
+    padding: 8px 0;
41 40
     border-bottom: 1px solid #E5E5E5;
42
-    line-height: 30px;
43 41
     font-size: 0px;
44 42
 }
45 43
 .details .loan-limit .text{
@@ -101,10 +99,10 @@ page{
101 99
     margin-top: 10px;
102 100
 }
103 101
 .details-info{
104
-    background: #fff;
105 102
     border-top: #e5e5e5 solid 1px;
106 103
 }
107 104
 .details-info .intro {
105
+    background: #fff;
108 106
     padding: 10px 12px;
109 107
     border-bottom: #e5e5e5 solid 1px;
110 108
 }
@@ -112,7 +110,7 @@ page{
112 110
     line-height: 12px;
113 111
     margin: 5px 0;
114 112
     padding-left: 5px;
115
-    border-left: #4997ff solid 2px;
113
+    border-left: #ffe100 solid 2px;
116 114
     color: #999;
117 115
 }
118 116
 .details-info .intro .content{
@@ -135,9 +133,9 @@ page{
135 133
 .recommend-wrapper{
136 134
     width: 100%;
137 135
 }
138
-.recommend-wrapper>.title{
136
+.recommend-wrapper>.title, .details-info .title{
139 137
     font-size: 14px;
140
-    line-height: 30px;
138
+    line-height: 32px;
141 139
     padding-left: 10px;
142 140
     color: #666;
143 141
 }
@@ -188,6 +186,7 @@ page{
188 186
     background-color: #ffe100;
189 187
     font-size: 15px;
190 188
     line-height: 40px;
189
+    border-radius: 3px;
191 190
 }
192 191
 .button-wrapper .contact-btn::after{
193 192
     border: 0 none;

+ 7 - 3
pages/feedback/feedback.js

@@ -27,9 +27,13 @@ Page({
27 27
         token: token,
28 28
         content: value
29 29
       },
30
-      success: function (res) {        
31
-        console.log(res)
32
-        console.log(111)
30
+      success: function (res) {
31
+        if (res.data.errno == 0) {
32
+            app.noticeModal('我们会及时处理,感谢您的反馈~')
33
+            wx.switchTab({
34
+              url: '/pages/mine/mine'
35
+            })
36
+        }
33 37
       }
34 38
     });
35 39
   },

+ 1 - 1
pages/feedback/feedback.json

@@ -1,3 +1,3 @@
1 1
 {
2
-  "navigationBarTitleText": "查看启动日志"
2
+  "navigationBarTitleText": "意见反馈"
3 3
 }

+ 4 - 14
pages/find/find.js

@@ -2,17 +2,14 @@
2 2
 var utils = require('../../utils/util.js');
3 3
 var  app = getApp();
4 4
 Page({
5
-  /**
6
-   * 页面的初始数据
7
-   */
8 5
   data: {
9 6
     tabArr: {
10 7
       curHdIndex: 0,
11 8
       curBdIndex: 0
12 9
     },
13
-    jobArr: ['不限','上班族','个体户','企业主'],
14
-    moneyArr: ['不限', '1000元~5000元', '5000元~1万元','1万~~10万元','10万以上', '10万以上'],
15
-    timeArr: ['不限', '1个月', '3个月', '6个月', '12个月'],
10
+    jobArr: [],
11
+    moneyArr: [],
12
+    timeArr: [],
16 13
     obj:{ amount: 0, is_hot: 0, is_new: 0, search: 1, term: 0, user_title: "不限" },
17 14
     hasNext: false,
18 15
     page: 1,
@@ -103,7 +100,7 @@ Page({
103 100
     var that = this;
104 101
     that.data.page = 1;
105 102
     utils.initList(that, that.data.obj, 'top', that.data.page);
106
-    utils.initList(that, that.data.obj, that.data.page);
103
+    // utils.initList(that, that.data.obj, that.data.page);
107 104
   },
108 105
   onReachBottom: function () {
109 106
     //上拉
@@ -113,18 +110,11 @@ Page({
113 110
     }
114 111
   },
115 112
   onReady: function () {
116
-
117 113
   },
118 114
   onShow: function () {
119
-
120 115
   },
121 116
   onHide: function () {
122
-
123 117
   },
124 118
   onUnload: function () {
125
-
126
-  },
127
-  onShareAppMessage: function () {
128
-
129 119
   }
130 120
 })

+ 2 - 1
pages/find/find.json

@@ -1,3 +1,4 @@
1 1
 {
2
-    "enablePullDownRefresh": true
2
+    "enablePullDownRefresh": true,
3
+    "navigationBarTitleText": "发现"
3 4
 }

+ 0 - 50
pages/getIt/getIt.js

@@ -1,71 +1,21 @@
1
-// pages/logs_to/logs_to.js
2 1
 Page({
3
-
4
-  /**
5
-   * 页面的初始数据
6
-   */
7 2
   data: {
8 3
     phone_number:'18888888888',
9 4
     from: '',
10 5
     preid: ''
11 6
   },
12
-
13
-  /**
14
-   * 生命周期函数--监听页面加载
15
-   */
16 7
   onLoad: function (options) {
17 8
     var that = this, tel = options.tel, preid = options.preid || 0, from = options.from;
18 9
     console.log(tel);
19 10
     console.log(preid);
20 11
     that.setData({phone_number: tel, preid: preid, from: from})
21 12
   },
22
-
23
-  /**
24
-   * 生命周期函数--监听页面初次渲染完成
25
-   */
26 13
   onReady: function () {
27
-
28 14
   },
29
-
30
-  /**
31
-   * 生命周期函数--监听页面显示
32
-   */
33 15
   onShow: function () {
34
-
35 16
   },
36
-
37
-  /**
38
-   * 生命周期函数--监听页面隐藏
39
-   */
40 17
   onHide: function () {
41
-
42 18
   },
43
-
44
-  /**
45
-   * 生命周期函数--监听页面卸载
46
-   */
47 19
   onUnload: function () {
48
-
49
-  },
50
-
51
-  /**
52
-   * 页面相关事件处理函数--监听用户下拉动作
53
-   */
54
-  onPullDownRefresh: function () {
55
-
56
-  },
57
-
58
-  /**
59
-   * 页面上拉触底事件的处理函数
60
-   */
61
-  onReachBottom: function () {
62
-
63
-  },
64
-
65
-  /**
66
-   * 用户点击右上角分享
67
-   */
68
-  onShareAppMessage: function () {
69
-
70 20
   }
71 21
 })

+ 2 - 2
pages/getIt/getIt.wxml

@@ -5,6 +5,6 @@
5 5
         <view class='phone_number'>手机:<text>{{phone_number}}</text></view>
6 6
     </view>
7 7
     <view class='details'>同时申请<text>3</text>款以上产品,成功率提升<text>90%</text></view>
8
-    <button class="contact-btn" open-type="contact"  session-from="X_{{preid}}" wx-if="{{from == 'card' && preid != 0}}">立即申请</button>
9
-    <button class="contact-btn" open-type="contact"  session-from="Y_{{preid}}" wx-if="{{from != 'card' && preid != 0}}">立即申请</button>
8
+    <button class="contact-btn" open-type="contact"  session-from="id=X_{{preid}}" wx-if="{{from == 'card' && preid != 0}}">立即申请</button>
9
+    <button class="contact-btn" open-type="contact"  session-from="id=Y_{{preid}}" wx-if="{{from != 'card' && preid != 0}}">立即申请</button>
10 10
 </view>

+ 17 - 15
pages/getPhone/getPhone.js

@@ -6,10 +6,10 @@ Page({
6 6
     preid: ''
7 7
   },
8 8
   onLoad: function (options) {
9
-    // console.log(options.from);
9
+    console.log(options.from);
10 10
     var that = this;
11 11
     that.setData({from: options.from, preid: options.preid});
12
-    console.log(that.data.preid);
12
+    // console.log(that.data.preid);
13 13
   },
14 14
   getPhoneNumber: function(e) {
15 15
     var that = this;
@@ -21,6 +21,13 @@ Page({
21 21
       that.telHost(token, e.detail.iv, e.detail.encryptedData)
22 22
     }
23 23
   },
24
+  goSignup () {
25
+    var that = this;
26
+    var id = that.data.preid;
27
+    wx.redirectTo({
28
+      url: '/pages/signup/signup?from='+that.data.from+'&preid='+ that.data.preid
29
+    })
30
+  },
24 31
   telHost (token, iv, encryptedData) {
25 32
     var that = this;
26 33
     wx.request({
@@ -34,12 +41,16 @@ Page({
34 41
           var tel = data.rst.phone_number;
35 42
           wx.setStorage({key:"tel", data: tel})
36 43
           if (that.data.from === 'mine') {
37
-            wx.navigateTo({
38
-              url: '/pages/application/application?tel=' + tel
39
-            })
44
+              wx.redirectTo({
45
+                url: '/pages/application/application?tel=' + tel
46
+              })
47
+          }else if(that.data.from === 'mineFeedback'){
48
+              wx.redirectTo({
49
+                url: '/pages/feedback/feedback?tel=' + tel
50
+              })
40 51
           }else{
41 52
             //  if(that.data.from === 'card' && that.data.preid)
42
-            wx.navigateTo({
53
+            wx.redirectTo({
43 54
               url: '/pages/getIt/getIt?from='+that.data.from+'&preid='+ that.data.preid +'&tel=' + tel
44 55
             })
45 56
           }
@@ -60,14 +71,5 @@ Page({
60 71
   },
61 72
   onUnload: function () {
62 73
 
63
-  },
64
-  onPullDownRefresh: function () {
65
-
66
-  },
67
-  onReachBottom: function () {
68
-
69
-  },
70
-  onShareAppMessage: function () {
71
-
72 74
   }
73 75
 })

+ 4 - 2
pages/getPhone/getPhone.wxml

@@ -1,5 +1,7 @@
1 1
 <view class='pd64'>
2
-  <button type="btn" class='wx_login_btn' open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"> <image src='../resource/image/wx_login.png'></image>微信快速登录</button>
3
-  <button type="btn" class='zfb_login_btn'> <image src='../resource/image/zfb_login.png'></image>手机验证码注册 </button>
2
+    <button type="btn" class='wx_login_btn' open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"> <image src='../resource/image/wx_login.png'></image>微信快速登录</button>
3
+    <!-- <navigator url="/pages/signup/signup?id={{preid}}"  hover-class="navigator-hover"> -->
4
+    <button type="btn" class='zfb_login_btn' bindtap="goSignup"> <image src='../resource/image/zfb_login.png'></image>手机验证码注册 </button>
5
+    <!-- </navigator> -->
4 6
 </view>
5 7
 <view class='details'>同时申请<text>3</text>款以上产品,成功率提升<text>90%</text></view>

+ 34 - 1
pages/index/index.js

@@ -13,16 +13,21 @@ Page({
13 13
     dataList: [
14 14
     ],
15 15
     hidden: true,
16
-    listId:0
16
+    listId:0,
17
+    title: '',
18
+    img: ''
17 19
   },
18 20
   onLoad: function () {
19 21
     var that = this;
20 22
     app.login();
21 23
     wx.request({
22 24
       url: app.globalData.HOST + '/user/product/homeact',
25
+      method: 'POST',
26
+      data: {version: 2, platform: app.globalData.platform},
23 27
       success: function (res) {
24 28
         if (res.data.errno == '0'){
25 29
           that.setData({ imgUrls: res.data.rst.homeact});
30
+          that.initShare();
26 31
         }
27 32
       }
28 33
     });
@@ -37,5 +42,33 @@ Page({
37 42
     //上拉
38 43
     var that = this, obj = { amount: 0, is_hot: 1, is_new: 0, search: 0, term: 0, user_title: "不限" };
39 44
     utils.initList(that, obj, 'bottom', ++that.data.page);
45
+  },
46
+  initShare () {
47
+    var that = this;
48
+    var title='', img = '';
49
+    wx.request({
50
+      url: app.globalData.HOST + '/user/wx/share',
51
+      method: 'POST',
52
+      success: function (res) {
53
+        if (res.data.errno == '0'){
54
+          title = res.data.rst.title;
55
+          img = res.data.rst.pic;
56
+        }
57
+        that.setData({title: title, img: img})
58
+      }
59
+    });
60
+  },
61
+  onShareAppMessage: function () {
62
+    return {
63
+      title: this.data.title,
64
+      imageUrl: this.data.img,
65
+      path: '/pages/index/index',
66
+      success: function(res) {
67
+        app.noticeModal('分享成功')
68
+      },
69
+      fail: function(res) {
70
+        app.noticeModal('您取消了分享')
71
+      }
72
+    }
40 73
   }
41 74
 })

+ 1 - 0
pages/index/index.wxml

@@ -11,6 +11,7 @@
11 11
     </block>
12 12
   </swiper>
13 13
 </view>
14
+<view class="slide"></view>
14 15
 <view class="content-wrapper">
15 16
   <block wx:for="{{dataList}}" wx:key="void">
16 17
      <!-- 使用热门推荐模板,传入当前循环对象item  -->

+ 0 - 126
pages/list/list.js

@@ -1,126 +0,0 @@
1
-// pages/list/list.js
2
-var utils = require('../../utils/util.js');    
3
-Page({
4
-  data: {
5
-    id:0,
6
-    page: 1,
7
-    dataList:[],
8
-    hidden: true,
9
-  },
10
-  onLoad: function (options) {
11
-    var that = this;
12
-    that.setData({ id: options.id});
13
-    if(that.data.id == 0){
14
-      var obj = { 'is_hot': 0, 'is_new': 1 };
15
-      utils.initList(that, obj, '', that.data.page);
16
-    }else{
17
-      initCate(that, '', that.data.page);
18
-    }  
19
-  },
20
-  onPullDownRefresh: function () {
21
-    //下拉  
22
-    console.log(123)
23
-    var that = this;
24
-    if (that.data.id == 0) {
25
-      var obj = { 'is_hot': 0, 'is_new': 1 };
26
-      utils.initList(that, obj, 'top', that.data.page);
27
-    } else {
28
-      initCate(that, 'top', ++that.data.page);
29
-    }  
30
-  },
31
-  onReachBottom: function () {
32
-    //上拉  
33
-    console.log('text')
34
-    var that = this;
35
-    if (that.data.id == 0) {
36
-      var obj = { 'is_hot': 0, 'is_new': 1 };
37
-      utils.initList(that, obj, '', that.data.page);
38
-    } else {
39
-      initCate(that, '', ++that.data.page);
40
-    }  
41
-  },
42
-  /**
43
-   * 生命周期函数--监听页面初次渲染完成
44
-   */
45
-  onReady: function () {
46
-  
47
-  },
48
-
49
-  /**
50
-   * 生命周期函数--监听页面显示
51
-   */
52
-  onShow: function () {
53
-  
54
-  },
55
-
56
-  /**
57
-   * 生命周期函数--监听页面隐藏
58
-   */
59
-  onHide: function () {
60
-  
61
-  },
62
-
63
-  /**
64
-   * 生命周期函数--监听页面卸载
65
-   */
66
-  onUnload: function () {
67
-  
68
-  },
69
-
70
-  /**
71
-   * 页面相关事件处理函数--监听用户下拉动作
72
-   */
73
-  onPullDownRefresh: function () {
74
-  
75
-  },
76
-
77
-  /**
78
-   * 页面上拉触底事件的处理函数
79
-   */
80
-  onReachBottom: function () {
81
-  
82
-  },
83
-
84
-  /**
85
-   * 用户点击右上角分享
86
-   */
87
-  onShareAppMessage: function () {
88
-  
89
-  }
90
-})
91
-
92
-// 请求列表数据
93
-var initCate = function (that, orient, page) {
94
-  that.setData({ hidden: false });
95
-  var list = [];
96
-  if (page == 1) {
97
-    list = [];
98
-  } else {
99
-    list = that.data.dataList
100
-  }
101
-  wx.request({
102
-    url: 'http://m.henhaojie.com/user/product/getInfoByCat',
103
-    method: "POST",
104
-    data: { id: that.data.id, page: page},
105
-    success: function (res) {
106
-      var data = res.data.rst.data;
107
-      if (res.data.errno == '0') {
108
-        that.data.hasNext = res.data.rst.pageinfo.hasNext
109
-        console.log(that.data.hasNext)
110
-        for (var i = 0; i < data.length; i++) {
111
-          if (orient == 'top') {
112
-            list.unshift(data[i]);
113
-          } else {
114
-            list.push(data[i]);
115
-          }
116
-        }
117
-        that.setData({ dataList: list });
118
-      }
119
-    },
120
-    complete: function () {
121
-      // complete
122
-      that.setData({ hidden: true });//加载成功
123
-      wx.stopPullDownRefresh() //停止下拉刷新  
124
-    }
125
-  });
126
-}

+ 0 - 1
pages/list/list.json

@@ -1 +0,0 @@
1
-{}

+ 0 - 12
pages/list/list.wxml

@@ -1,12 +0,0 @@
1
-<import src="../template/template.wxml" />
2
-<view class="content-wrapper">
3
-  <block wx:for="{{dataList}}" wx:key="void">
4
-     <!-- 使用热门推荐模板,传入当前循环对象item  -->
5
-    <template is="jiefItem1" data="{{...item}}"/>
6
-  </block>
7
-</view> 
8
-<view class="body-view">
9
-  <loading hidden="{{hidden}}" bindchange="loadingChange">
10
-    加载中...
11
-  </loading>
12
-</view>

+ 0 - 3
pages/list/list.wxss

@@ -1,3 +0,0 @@
1
-/* pages/list/list.wxss */
2
-@import "../template/template.wxss";
3
-.content-wrapper{border-bottom:1rpx solid #d9d9d9;}

+ 0 - 25
pages/login/login.js

@@ -1,25 +0,0 @@
1
-// pages/eg/eg.js
2
-// require "../../util/";
3
-var app = getApp();
4
-Page({
5
-  onLaunch: function() {
6
-  },
7
-  setDisabled: function(){
8
-    app.login();
9
-   /* wx.login({
10
-      success: function(res) {
11
-        if (res.code) {
12
-          //发起网络请求
13
-          wx.request({
14
-            url: 'https://chaoshi.henhaojie.com/user/wx/login',
15
-            data: {
16
-              code: res.code
17
-            }
18
-          })
19
-        } else {
20
-          console.log('登录失败!' + res.errMsg)
21
-        }
22
-      }
23
-    });*/
24
-  }
25
-})

+ 0 - 1
pages/login/login.json

@@ -1 +0,0 @@
1
-{}

+ 0 - 1
pages/login/login.wxml

@@ -1 +0,0 @@
1
-<button bindtap="setDisabled">点击设置以上按钮disabled属性</button>

+ 0 - 0
pages/login/login.wxss


+ 0 - 15
pages/logs/logs.js

@@ -1,15 +0,0 @@
1
-//logs.js
2
-const util = require('../../utils/util.js')
3
-
4
-Page({
5
-  data: {
6
-    logs: []
7
-  },
8
-  onLoad: function () {
9
-    this.setData({
10
-      logs: (wx.getStorageSync('logs') || []).map(log => {
11
-        return util.formatTime(new Date(log))
12
-      })
13
-    })
14
-  }
15
-})

+ 0 - 3
pages/logs/logs.json

@@ -1,3 +0,0 @@
1
-{
2
-  "navigationBarTitleText": "查看启动日志"
3
-}

+ 0 - 6
pages/logs/logs.wxml

@@ -1,6 +0,0 @@
1
-<!--logs.wxml-->
2
-<view class="container log-list">
3
-  <block wx:for="{{logs}}" wx:for-item="log">
4
-    <text class="log-item">{{index + 1}}. {{log}}</text>
5
-  </block>
6
-</view>

+ 0 - 8
pages/logs/logs.wxss

@@ -1,8 +0,0 @@
1
-.log-list {
2
-  display: flex;
3
-  flex-direction: column;
4
-  padding: 40rpx;
5
-}
6
-.log-item {
7
-  margin: 10rpx;
8
-}

+ 0 - 66
pages/logs_to/logs_to.js

@@ -1,66 +0,0 @@
1
-// pages/logs_to/logs_to.js
2
-Page({
3
-
4
-  /**
5
-   * 页面的初始数据
6
-   */
7
-  data: {
8
-  
9
-  },
10
-
11
-  /**
12
-   * 生命周期函数--监听页面加载
13
-   */
14
-  onLoad: function (options) {
15
-  
16
-  },
17
-
18
-  /**
19
-   * 生命周期函数--监听页面初次渲染完成
20
-   */
21
-  onReady: function () {
22
-  
23
-  },
24
-
25
-  /**
26
-   * 生命周期函数--监听页面显示
27
-   */
28
-  onShow: function () {
29
-  
30
-  },
31
-
32
-  /**
33
-   * 生命周期函数--监听页面隐藏
34
-   */
35
-  onHide: function () {
36
-  
37
-  },
38
-
39
-  /**
40
-   * 生命周期函数--监听页面卸载
41
-   */
42
-  onUnload: function () {
43
-  
44
-  },
45
-
46
-  /**
47
-   * 页面相关事件处理函数--监听用户下拉动作
48
-   */
49
-  onPullDownRefresh: function () {
50
-  
51
-  },
52
-
53
-  /**
54
-   * 页面上拉触底事件的处理函数
55
-   */
56
-  onReachBottom: function () {
57
-  
58
-  },
59
-
60
-  /**
61
-   * 用户点击右上角分享
62
-   */
63
-  onShareAppMessage: function () {
64
-  
65
-  }
66
-})

+ 0 - 1
pages/logs_to/logs_to.json

@@ -1 +0,0 @@
1
-{}

+ 0 - 5
pages/logs_to/logs_to.wxml

@@ -1,5 +0,0 @@
1
-<view class='pd64'>
2
-  <button type="btn" class='wx_login_btn'> <image src='../img/wx_login.png'></image>微信快速登录</button>
3
-  <button type="btn" class='zfb_login_btn'> <image src='../img/zfb_login.png'></image>手机验证码注册 </button>
4
-</view>
5
-<view class='details'>同时申请<text>3</text>款以上产品,成功率提升90%</view>

+ 0 - 72
pages/logs_to/logs_to.wxss

@@ -1,72 +0,0 @@
1
-page {
2
-  /* font-size: 100px; */
3
-  font-family: "PingFangSC-Regular, 微软雅黑, sans-serif";
4
-  background: #f5f4f9;
5
-}
6
-
7
-view {
8
-  /* font-size: 100px; */
9
-  border-top: 1px solid#f5f4f9;
10
-  background: #fff;
11
-}
12
-
13
-.pd64 {
14
-  padding-bottom: 64px;
15
-}
16
-
17
-.wx_login_btn {
18
-  width: 90%;
19
-  height: 45px;
20
-  /* margin: auto; */
21
-  display: block;
22
-  border-radius: 0;
23
-  margin-top: 34px;
24
-  background-color: #52a939;
25
-  font-size: 18px;
26
-  color: #fff;
27
-  line-height: 45px;
28
-}
29
-
30
-.wx_login_btn image {
31
-  width: 25px;
32
-  height: 25px;
33
-  line-height: 45px;
34
-  position: relative;
35
-  top: 5px;
36
-  margin-right: 8px;
37
-}
38
-
39
-.zfb_login_btn {
40
-  height: 45px;
41
-  width: 90%;
42
-  display: block;
43
-  border-radius: 0;
44
-  margin-top: 20px;
45
-  background-color: #6082f9;
46
-  font-size: 18px;
47
-  color: #fff;
48
-}
49
-
50
-.zfb_login_btn image {
51
-  width: 25px;
52
-  height: 25px;
53
-  position: relative;
54
-  top: 5px;
55
-  margin-right: 8px;
56
-}
57
-
58
-.details {
59
-  display: block;
60
-  height: 84px;
61
-  width: 100%;
62
-  font-size: 14px;
63
-  margin: auto;
64
-  text-align: center;
65
-  line-height: 84px;
66
-  margin-top: 10px;
67
-  color: #8c8c8c;
68
-}
69
-
70
-.details  text {
71
-  color: #db3232;
72
-}

+ 1 - 1
pages/mine/mine.js

@@ -55,7 +55,7 @@ Page({
55 55
       })
56 56
     } else {
57 57
       wx.navigateTo({
58
-        url: "/pages/getPhone/getPhone?from=feedback"
58
+        url: "/pages/getPhone/getPhone?from=mineFeedback"
59 59
       })
60 60
     }
61 61
   }

+ 1 - 3
pages/mine/mine.wxml

@@ -24,11 +24,9 @@
24 24
         <view class='my_list_text'>常见问题</view>
25 25
       </navigator>
26 26
     </view>
27
-    <view class='my_applisation border_top_hr'>
28
-      <navigator  hover-class="navigator-hover"  bindtap='goFeedback'>
27
+    <view class='my_applisation border_top_hr' bindtap='goFeedback'>
29 28
         <icon class='icon my_list_03'></icon>
30 29
         <view class='my_list_text'>意见反馈</view>
31
-      </navigator>
32 30
     </view>
33 31
 
34 32
   </view>

+ 1 - 1
pages/questions/questions.wxss

@@ -6,7 +6,7 @@
6 6
 
7 7
 .accordion-item {
8 8
   border-bottom: #e5e5e5 solid 1px;
9
-  padding: 0px 16px;
9
+  padding: 0px 0 0 16px;
10 10
   height: 44px;
11 11
   line-height: 44px;
12 12
 }

+ 0 - 66
pages/register_phon/register_phon.js

@@ -1,66 +0,0 @@
1
-// pages/logs_to/logs_to.js
2
-Page({
3
-
4
-  /**
5
-   * 页面的初始数据
6
-   */
7
-  data: {
8
-  
9
-  },
10
-
11
-  /**
12
-   * 生命周期函数--监听页面加载
13
-   */
14
-  onLoad: function (options) {
15
-  
16
-  },
17
-
18
-  /**
19
-   * 生命周期函数--监听页面初次渲染完成
20
-   */
21
-  onReady: function () {
22
-  
23
-  },
24
-
25
-  /**
26
-   * 生命周期函数--监听页面显示
27
-   */
28
-  onShow: function () {
29
-  
30
-  },
31
-
32
-  /**
33
-   * 生命周期函数--监听页面隐藏
34
-   */
35
-  onHide: function () {
36
-  
37
-  },
38
-
39
-  /**
40
-   * 生命周期函数--监听页面卸载
41
-   */
42
-  onUnload: function () {
43
-  
44
-  },
45
-
46
-  /**
47
-   * 页面相关事件处理函数--监听用户下拉动作
48
-   */
49
-  onPullDownRefresh: function () {
50
-  
51
-  },
52
-
53
-  /**
54
-   * 页面上拉触底事件的处理函数
55
-   */
56
-  onReachBottom: function () {
57
-  
58
-  },
59
-
60
-  /**
61
-   * 用户点击右上角分享
62
-   */
63
-  onShareAppMessage: function () {
64
-  
65
-  }
66
-})

+ 0 - 1
pages/register_phon/register_phon.json

@@ -1 +0,0 @@
1
-{}

+ 0 - 22
pages/register_phon/register_phon.wxml

@@ -1,22 +0,0 @@
1
-<view class='register_logo'>
2
-  <image src='http://m.henhaojie.com/images/KX0004.png' class='logo_img'></image>
3
-</view>
4
-
5
-<view class='item'>
6
-<!-- 手机号 -->
7
-  <view class="item-inner">
8
-     <view class="item-title">手机号</view>
9
-     <view class="item-input">
10
-    <input maxlength="10" placeholder="请输入手机号码" />
11
-    </view>
12
-  </view>
13
-   <!-- 验证码 -->
14
-  <view class="item-inner">
15
-     <view class="item-title">验证码</view>
16
-     <view class="item-input label">
17
-    <input maxlength="10" placeholder="请输入验证码" />
18
-    </view>
19
-    <view class='get_code'>获取验证码</view>
20
-  </view>
21
-</view>
22
-   <button form-type="submit" class='item_btn'> 提交 </button>

+ 0 - 78
pages/register_phon/register_phon.wxss

@@ -1,78 +0,0 @@
1
-page {
2
-  font-family: "PingFangSC-Regular, 微软雅黑, sans-serif";
3
-  background: #f5f4f9;
4
-}
5
-
6
-view {
7
-  /* border-top: 1px solid#f5f4f9; */
8
-  background: #fff;
9
-}
10
-
11
-.register_logo {
12
-  background: #f5f4f9;
13
-  width: 100%;
14
-  height: 124px;
15
-}
16
-
17
-.register_logo image {
18
-  display: block;
19
-  width: 70px;
20
-  height: 70px;
21
-  margin: auto;
22
-  margin-top: 24px;
23
-}
24
-
25
-.item {
26
-  display: block;
27
-  width: 100%;
28
-}
29
-
30
-.item .item-inner {
31
-  display: block;
32
-  border-bottom: #e5e5e5 solid 1px;
33
-  box-sizing: border-box;
34
-  position: relative;
35
-  color: #333;
36
-  height: 56px;
37
-  width: 100%;
38
-}
39
-
40
-.item .item-inner .item-title {
41
-  display: block;
42
-  float: left;
43
-  width: 60px;
44
-  height: 55px;
45
-  /* background: #f00;   */
46
-  font-size: 14px;
47
-  color: #333;
48
-  padding-left: 13px;
49
-  line-height: 56px;
50
-}
51
-
52
-.item .item-inner .item-input  input {
53
-  display: block;
54
-  float: left;
55
-  height: 55px;
56
-  line-height: 56px;
57
-  vertical-align: middle;
58
-  font-size: 14px;
59
-  color: #999;
60
-}
61
-
62
-.item .item-inner .get_code {
63
-  float: right;
64
-  display: block;
65
-  width: 110px;
66
-  height: 40px;
67
-  font-size: 12px;
68
-  text-align: center;
69
-  line-height: 40px;
70
-  margin-top: 6px;
71
-  border-left: 1px solid#e5e5e5;
72
-}
73
-.item_btn{
74
- background-color: #ffe100;
75
-  font-size: 16px;
76
-  color: #333;
77
-  margin: 90px 15px 0 15px;
78
-}

+ 31 - 65
pages/signup/signup.js

@@ -1,82 +1,35 @@
1 1
 const app = getApp()
2
-// pages/logs_to/logs_to.js
3 2
 Page({
4
-
5
-  /**
6
-   * 页面的初始数据
7
-   */
8 3
   data: {
9 4
     counting: false,
10 5
     get_code: '获取验证码',
11 6
     count: '0',
12
-    placeholder_number: '请输入手机号码',
13 7
     searchinput: '',
14 8
     showicon: false,
15 9
     hideyzm: false,
16
-    showView: false
10
+    showView: false,
11
+    from: '',
12
+    preid: 0
17 13
   },
18
-
19
-  /**
20
-   * 生命周期函数--监听页面加载
21
-   */
22 14
   onLoad: function (options) {
23
-
15
+    var from = options.from, preid = options.preid || 0
16
+    this.setData({from: from, preid: preid})
17
+    console.log(from, preid);
24 18
   },
25
-  /**
26
-   * 生命周期函数--监听页面初次渲染完成
27
-   */
28 19
   onReady: function () {
29 20
 
30 21
   },
31
-
32
-  /**
33
-   * 生命周期函数--监听页面显示
34
-   */
35 22
   onShow: function () {
36 23
 
37 24
   },
38
-
39
-  /**
40
-   * 生命周期函数--监听页面隐藏
41
-   */
42 25
   onHide: function () {
43 26
 
44 27
   },
45
-
46
-  /**
47
-   * 生命周期函数--监听页面卸载
48
-   */
49 28
   onUnload: function () {
50 29
 
51 30
   },
52
-
53
-  /**
54
-   * 页面相关事件处理函数--监听用户下拉动作
55
-   */
56
-  onPullDownRefresh: function () {
57
-
58
-  },
59
-
60
-  /**
61
-   * 页面上拉触底事件的处理函数
62
-   */
63
-  onReachBottom: function () {
64
-
65
-  },
66
-
67
-  /**
68
-   * 用户点击右上角分享
69
-   */
70
-  onShareAppMessage: function () {
71
-
72
-  },
73
-
74 31
   bindTextAreaBlur: function (e) {
75 32
     var that = this, value = e.detail.value;
76
-    // that.setData({
77
-    //   mobile: e.detail.value,
78
-    // })
79
-    console.log(value)
80 33
     if (value != '') {
81 34
       that.setData({
82 35
         mobile: e.detail.value,
@@ -88,10 +41,8 @@ Page({
88 41
         showicon: false
89 42
       })
90 43
     }
91
-    console.log(e.detail.value)
92 44
   },
93
-
94
-  codename: function (e) {
45
+  codeName: function (e) {
95 46
     this.setData({
96 47
       code: e.detail.value
97 48
     })
@@ -118,7 +69,7 @@ Page({
118 69
     }, 1000);
119 70
   },
120 71
   // 获取验证码
121
-  get_code: function (e) {
72
+  getCode: function (e) {
122 73
     var that = this, token = wx.getStorageSync('user').token, value = this.data.mobile, get_code = this.data.get_code;
123 74
     console.log(value)
124 75
     if (token) {
@@ -168,8 +119,10 @@ Page({
168 119
     }
169 120
   },
170 121
   // 提交登录
171
-  go_Login: function (e) {
172
-    var that = this, token = wx.getStorageSync('user').token, value = this.data.mobile, code = this.data.code;
122
+  goLogin: function (e) {
123
+    var that = this;
124
+    var token = wx.getStorageSync('user').token, value = that.data.mobile, code = that.data.code,
125
+          from = that.data.from, preid = that.data.preid
173 126
     wx.request({
174 127
       url: app.globalData.HOST + '/user/wx/bindMobile',
175 128
       method: 'POST',
@@ -179,12 +132,25 @@ Page({
179 132
         code: code
180 133
       },
181 134
       success: function (errno) {
182
-        console.log(errno)
135
+        // console.log(errno)
183 136
         if (errno.data.errno == '0') {
184
-         
185
-          wx.switchTab({
186
-            url: "/pages/index/index"
187
-          })
137
+          wx.setStorage({key:"tel", data: value})
138
+          if (from === 'mine') {
139
+            // console.log('/pages/application/application?tel=' + value);
140
+            wx.redirectTo({
141
+              url: '/pages/application/application?tel=' + value
142
+            })
143
+          }else if(from === 'mineFeedback'){
144
+            // console.log('/pages/feedback/feedback?tel=' + value);
145
+              wx.redirectTo({
146
+                url: '/pages/feedback/feedback?tel=' + value
147
+              })
148
+          }else{
149
+              // console.log( '/pages/getIt/getIt?from='+ from +'&preid='+ preid +'&tel=' + value);
150
+              wx.redirectTo({
151
+                url: '/pages/getIt/getIt?from='+ from +'&preid='+ preid +'&tel=' + value
152
+              })
153
+          }
188 154
         }else{
189 155
           that.setData({
190 156
             hideyzm: true
@@ -199,7 +165,7 @@ Page({
199 165
       showView: false
200 166
     })
201 167
   },
202
-  hideyzm:function(){
168
+  hideCode: function(){
203 169
     this.setData({
204 170
       hideyzm: false
205 171
     })

+ 6 - 7
pages/signup/signup.wxml

@@ -6,20 +6,19 @@
6 6
   <view class="item-inner">
7 7
     <view class="item-title">手机号</view>
8 8
     <view class="item-input">
9
-      <!-- bindblur="mobileInputEvent" -->
10
-      <input type="number" maxlength="11" placeholder="{{placeholder_number}}" confirm-type="done" name='phonename' value="{{searchinput}}" bindinput='bindTextAreaBlur' />
9
+      <input type="number" maxlength="11" placeholder="请输入手机号码" confirm-type="done" name='phonename' value="" bindinput='bindTextAreaBlur' />
11 10
       <icon class="input_btn_icon {{showicon?'icon_show':'icon_hide'}}" bindtap='clear_phon'></icon>
12
-      <view class="{{showView?'bright789_view_show':'bright789_view_hide'}} phone_hide" bindtap="hideView">手机号码错误</view>
11
+      <view class="{{showView?'block':'none'}} phone_hide" bindtap="hideView">手机号码错误</view>
13 12
     </view>
14 13
   </view>
15 14
   <!-- 验证码 -->
16 15
   <view class="item-inner">
17 16
     <view class="item-title">验证码</view>
18 17
     <view class="item-input label">
19
-      <input maxlength="4" placeholder="请输入验证码" bindinput="codename" name='codename' />
20
-      <view class="{{hideyzm?'bright789_view_show':'bright789_view_hide'}} yzm_hide" bindtap="hideyzm">验证码错误</view>
18
+      <input maxlength="4" placeholder="请输入验证码" bindinput="codeName" name='codename' />
19
+      <view class="{{hideyzm?'block':'none'}} yzm_hide" bindtap="hideCode">验证码错误</view>
21 20
     </view>
22
-    <view bindtap='get_code' class="{{sendmsg}} get_code" style="background-color:{{pageBackgroundColor}}">{{get_code}}</view>
21
+    <view bindtap='getCode' class="{{sendmsg}} get_code" style="background-color:{{pageBackgroundColor}}">{{get_code}}</view>
23 22
   </view>
24 23
 </view>
25
-<button form-type="submit" class='item_btn' bindtap="go_Login"> 提交 </button>
24
+<button form-type="submit" class='item_btn' bindtap="goLogin"> 提交 </button>

+ 2 - 9
pages/signup/signup.wxss

@@ -51,6 +51,7 @@ view {
51 51
 
52 52
 .item .item-inner .item-input  input {
53 53
   display: block;
54
+  width: 520rpx;
54 55
   float: left;
55 56
   height: 55px;
56 57
   line-height: 56px;
@@ -60,7 +61,7 @@ view {
60 61
 }
61 62
 
62 63
 .item .item-inner .label  input {
63
-  width: 100px;
64
+  width: 260rpx;
64 65
 }
65 66
 
66 67
 .phone_hide {
@@ -113,14 +114,6 @@ view {
113 114
   color: #f00;
114 115
 }
115 116
 
116
-.bright789_view_hide {
117
-  display: none;
118
-}
119
-
120
-.bright789_view_show {
121
-  display: block;
122
-}
123
-
124 117
 .icon_hide {
125 118
   display: none;
126 119
 }

+ 8 - 9
pages/template/template.wxml

@@ -6,7 +6,7 @@
6 6
           <image class="icon" src="{{icon}}"/>
7 7
       </view>
8 8
       <view class="weui-cell__bd">
9
-          <view>{{name}}<view class="weui-badge" wx-if="{{prod_title != null}}">{{prod_title}}</view></view>
9
+          <view class="title">{{name}}<view class="weui-badge" wx-if="{{prod_title != null}}">{{prod_title}}</view></view>
10 10
           <view class="desc elli">{{description}}</view>
11 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 12
       </view>
@@ -25,7 +25,7 @@
25 25
       </view>
26 26
       <view class="weui-cell__bd">
27 27
           <button class="contact-btn" open-type="contact"  session-from="id=X_{{item.id}}" wx-if="{{hasPhone}}"/>
28
-          <view>{{item.name}}<view wx:for="{{item.keywords}}" wx:for-item="word" wx:key="void" wx-if="{{word == '礼'}}" class="weui-badge">{{word}}</view><view wx:for="{{item.keywords}}" wx:for-item="word" wx:key="void" wx-if="{{word !== '礼'}}" class="weui-badge other">{{word}}</view></view>
28
+          <view class="title">{{item.name}}<view wx:for="{{item.keywords}}" wx:for-item="word" wx:key="void" wx-if="{{word == '礼' && item.keywords.length > 0}}" class="weui-badge">{{word}}</view><view wx:for="{{item.keywords}}" wx:for-item="word" wx:key="void" wx-if="{{word !== '礼' && item.keywords.length > 0}}" class="weui-badge other">{{word}}</view></view>
29 29
           <view class="desc elli">{{item.desc}}</view>
30 30
           <view class="desc elli" >申请人数<text class="emphasize">{{item.apply_num}}</text></view>
31 31
       </view>
@@ -39,12 +39,13 @@
39 39
   <block wx:for="{{dataList}}" wx:key="void">
40 40
   <view class="weui-cells weui-cells_after-title template">
41 41
     <view class="weui-cell borrow-list-temp">
42
+      <button class="notice-btn">我要还款</button>
42 43
       <view class="weui-cell__hd">
43 44
           <image class="icon" src="{{item.product_icon}}"/>
44 45
       </view>
45 46
       <view class="weui-cell__bd">
46
-          <button class="contact-btn" open-type="contact"  session-from="id=Y_{{item.id}}"/>
47
-          <view>{{item.product_name}}<view class="weui-badge" wx-if="{{item.prod_title != null}}">{{item.prod_title}}</view></view>
47
+          <button class="contact-btn" open-type="contact"  session-from="id=Y_{{item.product_id}}"/>
48
+          <view class="title">{{item.product_name}}<view class="weui-badge" wx-if="{{item.prod_title != null}}">{{item.prod_title}}</view></view>
48 49
           <view class="desc elli">{{item.create_time}}</view>
49 50
           <view class="desc elli" >贷款金额<text class="emphasize">{{item.money}}</text>贷款期数<text class="emphasize">{{item.periods}}</text></view>
50 51
       </view>
@@ -56,19 +57,17 @@
56 57
 
57 58
 <template name="jiefItem4">
58 59
 <block wx:for="{{cardList}}" wx:key="void">
59
-  <view class="weui-cells weui-cells_after-title template" data-id="{{item.id}}" bindtap="initConcact">
60
+  <view class="weui-cells weui-cells_after-title template" data-id="{{item.product_id}}" bindtap="initConcact">
60 61
     <view class="weui-cell card-list-temp">
61 62
       <view class="weui-cell__hd">
62 63
           <image class="icon" src="{{item.icon}}"/>
63 64
       </view>
64 65
       <view class="weui-cell__bd">
65
-          <!-- <button class="contact-btn" open-type="contact"  session-from="id=X_{{item.id}}"/> -->
66
-          <view>{{item.product_name}}</view>
66
+          <view class="title">{{item.product_name}}</view>
67 67
           <view class="desc elli">{{item.desc}}</view>
68
-          <view class="desc elli" >申请人数{{item.create_time}}</view>
68
+          <view class="desc elli" >申请时间: {{item.create_time}}</view>
69 69
       </view>
70 70
     </view>
71
-    <!-- <view class="weui-cell__ft weui-cell__ft_in-access"></view> -->
72 71
   </view>
73 72
 </block>
74 73
 </template>

+ 1 - 1
project.config.json

@@ -24,7 +24,7 @@
24 24
 			"list": []
25 25
 		},
26 26
 		"miniprogram": {
27
-			"current": 16,
27
+			"current": -1,
28 28
 			"list": [
29 29
 				{
30 30
 					"id": -1,

+ 1 - 0
utils/util.js

@@ -5,6 +5,7 @@ var initList = function (that, obj, orient, page) {
5 5
   orient = orient || '';
6 6
   var obj = obj || { amount: 0, is_hot: 1, is_new: 0, search: 0, term: 0, user_title: "不限" };
7 7
   obj['page'] = page || 1;
8
+  obj['platform'] = app.globalData.platform
8 9
   var list = [];
9 10
   if (obj['page'] == 1){
10 11
     list = [];