HuaJingwen 6 years ago
parent
commit
423b1dd11f

+ 0 - 5
README.md

@@ -1,5 +0,0 @@
1
-# smallApp2
2
-
3
-借钱借款助手
4
-
5
-贷款产品助手

+ 4 - 1
app.js

@@ -5,7 +5,10 @@ App({
5 5
   data:{
6 6
   },
7 7
   globalData: {
8
-    common: {},
8
+    common: {
9
+      source: 0,
10
+      app_type: 2
11
+    },
9 12
     userInfo: null,
10 13
     HOST: 'https://chaoshi.henhaojie.com',
11 14
     platform: 0,

+ 2 - 2
app.json

@@ -15,7 +15,7 @@
15 15
   "window": {
16 16
     "backgroundTextStyle": "dark",
17 17
     "navigationBarBackgroundColor": "#fff",
18
-    "navigationBarTitleText": "帮你贷",
18
+    "navigationBarTitleText": "借钱借款助手",
19 19
     "navigationBarTextStyle": "black",
20 20
     "enablePullDownRefresh": false,
21 21
     "onReachBottomDistance": 10
@@ -36,7 +36,7 @@
36 36
         "selectedIconPath": "pages/resource/image/find-on.png",
37 37
         "iconPath": "pages/resource/image/find.png",
38 38
         "pagePath": "pages/find/find",
39
-        "text": "发现"
39
+        "text": "贷款大全"
40 40
       },
41 41
       {
42 42
         "selectedIconPath": "pages/resource/image/mine-on.png",

+ 18 - 11
app.wxss

@@ -122,7 +122,7 @@ page{
122 122
 .template .weui-cell{
123 123
   display: flex;
124 124
   display: -webkit-flex;
125
-  padding: 10px 12px;
125
+  padding: 28rpx 24rpx;
126 126
 }
127 127
 .card-list-temp .weui-cell__hd{
128 128
   width: 200rpx;
@@ -150,14 +150,14 @@ page{
150 150
 }
151 151
 
152 152
 .template .weui-cell__bd .title{
153
+    line-height: 20px;
153 154
     font-size: 16px;
155
+    color: #333;
154 156
 }
155 157
 .template .desc{
156
-  font-size: 14px;
157
-  color: #999;
158
-}
159
-.template .desc .emphasize{
160
-  color: #E94D4D;
158
+    line-height: 18px;
159
+    font-size: 12px;
160
+    color: #535353;
161 161
 }
162 162
 .template .contact-btn{
163 163
   /*display: none;*/
@@ -212,9 +212,10 @@ page{
212 212
   width: 100%;
213 213
   height: 100%;
214 214
   background: rgba(0, 0, 0, .5);
215
+  z-index: 100;
215 216
 }
216 217
 .mask .content{
217
-  width: 83.2%;
218
+  width: 72%;
218 219
   padding: 10px 0px 0;
219 220
   background: #fff;
220 221
   position: absolute;
@@ -228,12 +229,17 @@ page{
228 229
   font-size: 32rpx;
229 230
   color: #000;
230 231
   font-weight: 600;
231
-  margin: 12px auto 20px;
232
+  padding: 8px 0 16px;
233
+  border-bottom: #D8D8D8 solid 1rpx;
232 234
 }
233 235
 .mask .content .text{
234
-  margin-bottom: 20px;
236
+  padding: 15px;
235 237
   font-size: 30rpx;
236
-  color: #999;
238
+  color: #333333;
239
+}
240
+.mask .content .notice{
241
+  width:472rpx;
242
+  height:348rpx;
237 243
 }
238 244
 .mask .content .text>text{
239 245
   color: #E94D4D;
@@ -245,10 +251,11 @@ page{
245 251
   line-height: 50px;
246 252
   margin-top: 10px;
247 253
   font-size: 32rpx;
248
-  color: #3cc51f;
254
+  color: #333333;
249 255
   background: #fff;
250 256
   border-top: 1rpx solid #d2d3d5;
251 257
   border-radius: 0px 0px 10px 10px;
258
+  font-weight:600;
252 259
 }
253 260
 
254 261
 /*@media (-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5){

+ 1 - 1
pages/application/application.js

@@ -137,7 +137,7 @@ Page({
137 137
     wx.request({
138 138
       url: app.globalData.HOST + '/user/wx/getFromid',
139 139
       method: "POST",
140
-      data: Object.assign({}, app.globalData.common, { from_id: formId }),
140
+      data: Object.assign({}, app.globalData.common, { from_id: formId}),
141 141
       success: function (res) {
142 142
       },
143 143
       complete: function () {

+ 4 - 4
pages/details/details.js

@@ -16,11 +16,11 @@ Page({
16 16
      appid: 0
17 17
   },
18 18
   onLoad: function (options) {
19
-    var id = options.id
19
+    var id = options.id, tmplmsg = options.tmplmsg || 0;
20 20
     if (id) {
21 21
       this.setData({id: id})
22 22
     }
23
-    this.initDetails();
23
+    this.initDetails(tmplmsg);
24 24
     this.getRemmondList();
25 25
     // this.showConcact(null, true);
26 26
     // console.log(this.data.remmondList);
@@ -35,12 +35,12 @@ Page({
35 35
       that.caculateMoney();
36 36
       // console.log(time);
37 37
   },
38
-  initDetails () {
38
+  initDetails (tmplmsg) {
39 39
       var that = this, data = null;
40 40
       wx.request({
41 41
         url: app.globalData.HOST + '/user/product/detail',
42 42
         method: "POST",
43
-        data: Object.assign({}, app.globalData.common, {id: that.data.id}),
43
+        data: Object.assign({}, app.globalData.common, {id: that.data.id, tmplmsg: tmplmsg}),
44 44
         success: function (res) {
45 45
           if (res.data.errno == '0') {
46 46
             data = res.data.rst;

+ 3 - 3
pages/details/details.wxml

@@ -66,9 +66,9 @@
66 66
     </view>
67 67
     <view class="mask" hidden="{{hiddenThis}}">
68 68
       <view class="content">
69
-        <view class="title">提示</view>
70
-        <view class="text">回复"<text>1</text>",获取贷款资格</view>
71
-
69
+        <view class="title">申请提示</view>
70
+        <view class="text">因政策调整,请在客服对话框回复“1”获取申请链接哦~(如下图)</view>
71
+        <image class="notice" src="https://chaoshi.henhaojie.com/icon/kefu_r.png"></image>
72 72
         <form bindsubmit="formSubmit" report-submit="{{true}}" >
73 73
           <button class="contact-btn" open-type="contact"  session-from="id=Y_{{appid}}&period={{time}}&money={{money}}" formType="submit">我知道了</button>
74 74
         </form>

+ 2 - 1
pages/details/details.wxss

@@ -180,10 +180,11 @@
180 180
     width: 80%;
181 181
     height: 40px;
182 182
     margin-top: 10px;
183
-    background-color: #ffe100;
183
+    background-color: #FF2323;
184 184
     font-size: 15px;
185 185
     line-height: 40px;
186 186
     border-radius: 3px;
187
+    color: #fff;
187 188
 }
188 189
 .button-wrapper .contact-btn::after{
189 190
     border: 0 none;

+ 1 - 1
pages/find/find.json

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

+ 1 - 1
pages/find/find.wxss

@@ -75,7 +75,7 @@
75 75
 }
76 76
 
77 77
 .tab-flex .weui-flex__item.active {
78
-  border-bottom: #ffe100 solid 2px;
78
+  border-bottom: #FF2323 solid 2px;
79 79
   color: #000;
80 80
 }
81 81
 

+ 4 - 22
pages/getPhone/getPhone.js

@@ -6,14 +6,6 @@ Page({
6 6
     preid: ''
7 7
   },
8 8
   onLoad: function (options) {
9
-    // console.log(options.from);
10
-    var that = this;
11
-    if (options.preid) {
12
-        that.setData({from: options.from, preid: options.preid});
13
-    }else{
14
-        that.setData({from: options.from});
15
-    }
16
-    // console.log(that.data.from, options.preid);
17 9
   },
18 10
   getPhoneNumber: function(e) {
19 11
     var that = this;
@@ -44,20 +36,10 @@ Page({
44 36
         if (data.errno == '0'){
45 37
           var tel = data.rst.phone_number;
46 38
           wx.setStorage({key:"tel", data: tel})
47
-          if (that.data.from === 'mine') {
48
-              wx.redirectTo({
49
-                url: '/pages/application/application?tel=' + tel
50
-              })
51
-          }else if(that.data.from === 'mineFeedback'){
52
-              wx.redirectTo({
53
-                url: '/pages/feedback/feedback?tel=' + tel
54
-              })
55
-          }else{
56
-            //  if(that.data.from === 'card' && that.data.preid)
57
-            wx.redirectTo({
58
-              url: '/pages/getIt/getIt?from='+that.data.from+'&preid='+ that.data.preid +'&tel=' + tel
59
-            })
60
-          }
39
+
40
+          wx.switchTab({
41
+            url: '/pages/index/index'
42
+          })
61 43
         }else{
62 44
           // app.noticeModal(data.err);
63 45
         }

+ 7 - 5
pages/getPhone/getPhone.wxml

@@ -1,5 +1,7 @@
1
-<view class='pd64'>
2
-    <button type="btn" class='wx_login_btn' open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"> <image class="icon icon-wechat" src='https://chaoshi.henhaojie.com/icon/login@2x.png'></image>微信快速登录</button>
3
-    <button type="btn" class='zfb_login_btn' bindtap="goSignup"> <image class="icon icon-phone" src='https://chaoshi.henhaojie.com/icon/register@2x.png'></image>手机验证码注册 </button>
4
-</view>
5
-<view class='details'>同时申请<text>3</text>款以上产品,成功率提升<text>90%</text></view>
1
+<view class="get_phone">
2
+    <view class="title">Hi,请登录</view>
3
+    <view class="login">登录即可拿钱</view>
4
+    <view class="btn-wrapper">
5
+        <button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">微信快捷登录</button>
6
+    </view>
7
+</view>

+ 28 - 57
pages/getPhone/getPhone.wxss

@@ -1,57 +1,28 @@
1
-view {
2
-  border-top: 1rpx solid #E5E5E5;
3
-  background: #fff;
4
-}
5
-
6
-.pd64 {
7
-  padding-bottom: 64px;
8
-}
9
-
10
-.wx_login_btn, .zfb_login_btn{
11
-  display: block;
12
-  width: 90%;
13
-  height: 45px;
14
-  border-radius: 0;
15
-  margin-top: 34px;
16
-  background-color: #52a939;
17
-  font-size: 18px;
18
-  color: #fff;
19
-  line-height: 45px;
20
-  text-align: left;
21
-  padding-left: 160rpx;
22
-}
23
-
24
-.wx_login_btn .icon-wechat {
25
-  width: 68rpx;
26
-  height: 60rpx;
27
-  margin: -4px 16px 0px 0px;
28
-  vertical-align: middle;
29
-}
30
-
31
-.zfb_login_btn {
32
-  margin-top: 20px;
33
-  background-color: #6082f9;
34
-}
35
-
36
-.zfb_login_btn .icon-phone {
37
-  width: 60rpx;
38
-  height: 68rpx;
39
-  vertical-align: middle;
40
-  margin:-4px 18px 0 4rpx;
41
-}
42
-
43
-.details {
44
-  display: block;
45
-  height: 84px;
46
-  width: 100%;
47
-  font-size: 14px;
48
-  margin: auto;
49
-  text-align: center;
50
-  line-height: 84px;
51
-  margin-top: 10px;
52
-  color: #8c8c8c;
53
-}
54
-
55
-.details  text {
56
-  color: #db3232;
57
-}
1
+/*page{
2
+    background: #fff;
3
+}*/
4
+.get_phone{
5
+    padding: 0 20px;
6
+}
7
+.get_phone .title{
8
+    margin: 32rpx 0;
9
+    font-size: 56rpx;
10
+    line-height: 80rpx;
11
+    color: #262626;
12
+}
13
+.get_phone .login{
14
+    color: #666666;
15
+    font-size: 36rpx;
16
+    line-height: 50rpx;
17
+}
18
+.btn-wrapper{
19
+    width: 100%;
20
+    height: 92rpx;
21
+    margin-top: 118rpx;
22
+}
23
+.btn-wrapper .btn{
24
+    width: 100%;
25
+    height: 100%;
26
+    background: #19AD19;
27
+    color: #fff;
28
+}

+ 10 - 1
pages/index/index.js

@@ -17,14 +17,19 @@ Page({
17 17
   },
18 18
   onLoad: function (options) {
19 19
     var that = this, source = '';
20
-    const userInfo = wx.getStorageSync('userInfo') || null;
20
+    const userInfo = wx.getStorageSync('userInfo');
21
+    let tel= wx.getStorageSync('tel'), user = wx.getStorageSync('user');
21 22
     if (userInfo) {
22 23
         app.globalData.userInfo = userInfo;
24
+        if (tel == 0 && user.user_id == 0) {
25
+          wx.redirectTo({url: '/pages/getPhone/getPhone'})
26
+        }
23 27
     }else{
24 28
       wx.redirectTo({url: '/pages/login/login'})
25 29
     }
26 30
     if (options.source) {
27 31
       that.setData({source: options.source})
32
+      app.globalData.common['source'] = options.source;
28 33
     }
29 34
     const dataParam =  Object.assign({}, app.globalData.common, {version: 2, platform: app.globalData.platform});
30 35
     wx.request({
@@ -95,5 +100,9 @@ Page({
95 100
       complete: function () {
96 101
       }
97 102
     });
103
+  },
104
+  test (e) {
105
+    wx.setStorageSync('flag', 1);
106
+    console.log(e);
98 107
   }
99 108
 })

+ 8 - 4
pages/index/index.wxml

@@ -1,12 +1,16 @@
1 1
 <import src="../template/template.wxml" />
2
-<view class="swiper-container">
2
+<view class="swiper-container" >
3 3
   <swiper class='swiper' indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="true"
4 4
    interval="{{interval}}" duration="{{duration}}"indicator-color="rgba(0,0,0,.5)" indicator-active-color="#fff">
5 5
     <block wx:for="{{imgUrls}}" wx:key="id">
6 6
       <swiper-item>
7
-        <navigator url="/pages/details/details?id={{item.product_id}}" id="{{item.product_id}}"  hover-class="navigator-hover">
8
-          <image src="{{item.photo}}" class="slide-image"/>
9
-        </navigator>
7
+        <form class="swiper-form" bindsubmit="formSubmit" report-submit="{{true}}" data-id="{{item.product_id}}">
8
+           <!-- <navigator url="/pages/details/details?id={{id}}" id="{{id}}"  hover-class="navigator-hover">  -->
9
+            <button class='suspendImg'  plain="ture" hover-class="none" data-name="help" formType="submit" style="border:none !important; width:100%;height:100%;" ></button>
10
+          </form>
11
+        <image src="{{item.photo}}" class="slide-image"/>
12
+        <!-- <navigator url="/pages/details/details?id={{item.product_id}}" id="{{item.product_id}}"  hover-class="navigator-hover">
13
+        </navigator> -->
10 14
       </swiper-item>
11 15
     </block>
12 16
   </swiper>

+ 7 - 0
pages/index/index.wxss

@@ -43,3 +43,10 @@
43 43
   border-bottom: 0 none;
44 44
   font-size: 14px;
45 45
 }
46
+.swiper-form{
47
+  display: block;
48
+    position: absolute;
49
+    top: 0;
50
+    width: 100%;
51
+    height: 100%;
52
+}

+ 12 - 7
pages/login/login.js

@@ -25,13 +25,18 @@ Page({
25 25
       }
26 26
   },
27 27
   getUserInfo: function(e) {
28
+      const errno = e.detail.errMsg;
28 29
       const that = this, userInfo = {};
29
-      userInfo.encryptedData = e.detail.encryptedData;
30
-      userInfo.iv = e.detail.iv;
31
-      userInfo.avatar_url = e.detail.userInfo.avatarUrl;
32
-      userInfo.nick_name = e.detail.userInfo.nickName;
33
-      app.globalData.userInfo = userInfo;
34
-      wx.setStorageSync('userInfo', userInfo);
35
-      app.login(that);
30
+      if (errno === "getUserInfo:fail auth deny") {
31
+          return;
32
+      }else{
33
+          userInfo.encryptedData = e.detail.encryptedData;
34
+          userInfo.iv = e.detail.iv;
35
+          userInfo.avatar_url = e.detail.userInfo.avatarUrl;
36
+          userInfo.nick_name = e.detail.userInfo.nickName;
37
+          app.globalData.userInfo = userInfo;
38
+          wx.setStorageSync('userInfo', userInfo);
39
+          app.login(that);
40
+      }
36 41
   },
37 42
 })

+ 2 - 2
pages/login/login.json

@@ -1,5 +1,5 @@
1 1
 {
2
-    "navigationBarBackgroundColor": "#FFCF09",
2
+    "navigationBarBackgroundColor": "#FF6262",
3 3
     "navigationBarTextStyle": "#fff",
4
-    "backgroundColor": "#FFCF09"
4
+    "backgroundColor": "#FF2323"
5 5
 }

+ 3 - 4
pages/login/login.wxss

@@ -10,8 +10,8 @@ page{
10 10
 .login-wrapper .bg-wrapper{
11 11
     width: 100%;
12 12
     height: calc(100% - 288rpx);
13
-    background: -webkit-linear-gradient(#FFCF09 , #FFC323);
14
-    background: linear-gradient(#FFCF09 , #FFC323);
13
+    background: -webkit-linear-gradient(#FF6262 , #FF2323);
14
+    background: linear-gradient(#FF6262 , #FF2323);
15 15
     overflow: hidden;
16 16
 }
17 17
 .login-wrapper .bg-wrapper .title{
@@ -52,8 +52,7 @@ page{
52 52
     width: 560rpx;
53 53
     height: 88rpx;
54 54
     border-radius: 50rpx;
55
-    background: -webkit-linear-gradient(left, #FFCF09 , #FFC323);
56
-    background: linear-gradient(left, #FFCF09 , #FFC323);
55
+    background: #FF2323;
57 56
     margin-top: 88rpx;
58 57
     color: #fff;
59 58
 }

+ 1 - 1
pages/mine/mine.wxml

@@ -14,7 +14,7 @@
14 14
       <!--我的申请-->
15 15
       <view class='my_applisation' bindtap="goApplication" hover-class="navigator-hover">
16 16
         <icon class='icon my_list_01'></icon>
17
-        <view class='my_list_text'>我的申请</view>
17
+        <view class='my_list_text'>我的足迹</view>
18 18
       </view>
19 19
     </view>
20 20
   </view>

+ 2 - 2
pages/mine/mine.wxss

@@ -29,14 +29,14 @@
29 29
 .top {
30 30
   width: 100%;
31 31
   height: 24px;
32
-  background-color: #ffcf00;
32
+  background-color: #ca000f;
33 33
 }
34 34
 
35 35
 .ellipse_border {
36 36
   display: block;
37 37
   width: 100%;
38 38
   height: auto;
39
-  background: url('https://chaoshi.henhaojie.com/icon/bg@2x.png') no-repeat;
39
+  background: url('https://chaoshi.henhaojie.com/icon/my_head_r.png') no-repeat;
40 40
   background-size: 100% 100%;
41 41
 }
42 42
 

BIN
pages/resource/image/find-on.png


BIN
pages/resource/image/find.png


BIN
pages/resource/image/index-on.png


BIN
pages/resource/image/index.png


BIN
pages/resource/image/mine-on.png


BIN
pages/resource/image/mine.png


BIN
pages/resource/image/my_head.png


BIN
pages/resource/img/KX0001.png


BIN
pages/resource/img/KX0002.jpg


+ 10 - 6
pages/template/template.wxml

@@ -1,20 +1,24 @@
1 1
 <template name="jiefItem1">
2
-  <view class="weui-cells weui-cells_after-title template">
2
+  <view class="weui-cells weui-cells_after-title template" bindtap="test">
3 3
     <button wx:if="{{!hasUserInfo && canIUse}}" class="userinfo-btn" open-type="getUserInfo" bindgetuserinfo="getUserInfo"></button>
4 4
     <form wx:else bindsubmit="formSubmit" report-submit="{{true}}" style='width:100%;height:100%;display:block;' data-id="{{id}}">
5 5
        <!-- <navigator url="/pages/details/details?id={{id}}" id="{{id}}"  hover-class="navigator-hover">  -->
6
-        <button class='suspendImg'  plain="ture" hover-class="none" data-name="help" formType="submit" style="border:none !important; width:100%;height:100%;" >
6
+        <button class='suspendImg' data-id="{{id}}" plain="ture" hover-class="none" formType="submit" style="border:none !important; width:100%;height:100%;" >
7 7
         <view class="weui-cell borrow-list-temp">
8 8
           <view class="weui-cell__hd">
9 9
               <image class="icon" src="{{icon}}"/>
10 10
           </view>
11 11
           <view class="weui-cell__bd">
12 12
               <view class="title">{{name}}<view class="weui-badge" wx-if="{{prod_title != null}}">{{prod_title}}</view></view>
13
-              <view class="desc elli">{{description}}</view>
14
-              <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>
13
+              <view class="desc elli">{{applicants}}人申请</view>
14
+              <view class="desc elli" ><text class="emphasize">{{lend_time}}放款</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>
15
+          </view>
16
+          <view class="weui-cell__bd2">
17
+              <view class="emphasize count">{{upper_amount}}-{{lower_amount}}</view>
18
+              <view class="desc">额度范围(元)</view>
15 19
           </view>
16 20
         </view>
17
-          <view class="weui-cell__ft weui-cell__ft_in-access"></view>
21
+          <!-- <view class="weui-cell__ft weui-cell__ft_in-access"></view> -->
18 22
         </button>
19 23
        <!-- </navigator>  -->
20 24
     </form>
@@ -44,7 +48,7 @@
44 48
   <block wx:for="{{dataList}}" wx:key="void">
45 49
   <view class="weui-cells weui-cells_after-title template" data-id="Y_{{item.product_id}}" bindtap="showPanel">
46 50
     <view class="weui-cell borrow-list-temp">
47
-      <button class="notice-btn">我要还款</button>
51
+      <button class="notice-btn">我要申请</button>
48 52
       <view class="weui-cell__hd">
49 53
           <image class="icon" src="{{item.product_icon}}"/>
50 54
       </view>

+ 9 - 2
pages/template/template.wxss

@@ -2,7 +2,6 @@
2 2
   border-bottom: 0 none;
3 3
 }
4 4
 .emphasize{
5
-  color: #ff5100;
6 5
   margin-right: 5px;
7 6
 }
8 7
 .weui-badge{
@@ -14,6 +13,14 @@
14 13
   height: 50px;
15 14
   border-radius: 10px;
16 15
 }
16
+.weui-cell__bd2{
17
+  text-align: center;
18
+}
19
+.weui-cell__bd2 .count{
20
+  font-size: 16px;
21
+  line-height: 18px;
22
+  color: #E42A2A;
23
+}
17 24
 .weui-cell:before{
18 25
     color: #e5e5e5;
19 26
     /*border-top: none;*/
@@ -24,5 +31,5 @@
24 31
   padding-left: 0 !important;
25 32
   padding-right: 0 !important;
26 33
   text-align: left !important;
27
-  line-height: 100% !important;  
34
+  line-height: 100% !important;
28 35
 }