HuaJingwen 6 年之前
父節點
當前提交
d053010b59

+ 7 - 2
app.js

@@ -52,6 +52,7 @@ App({
52 52
   },
53 53
   login: function (that, func) {
54 54
     let obj = {}, app = this, user = '', source = '';
55
+    const tel = wx.getStorageSync('tel');
55 56
     if (that.data.source) {
56 57
       source = that.data.source
57 58
     }
@@ -72,9 +73,13 @@ App({
72 73
                         user = resLogin.data.rst;
73 74
                         wx.setStorageSync("user", user)
74 75
                         app.globalData.common['token'] = user.token
75
-                        wx.switchTab({'url': '/pages/index/index'})
76
+                        if (user.user_id == 0 && tel == 0) {
77
+                            wx.redirectTo({url: '/pages/getPhone/getPhone'})
78
+                        }else{
79
+                            wx.switchTab({'url': '/pages/index/index'})
80
+                        }
76 81
                         if (func) {
77
-                          func();
82
+                            func();
78 83
                         }
79 84
                         app.initShare();
80 85
                     }

+ 1 - 1
app.json

@@ -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){

+ 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/445505880102438783.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>

+ 1 - 1
pages/find/find.json

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

+ 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
+}

+ 9 - 1
pages/index/index.js

@@ -17,9 +17,13 @@ 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
     }
@@ -95,5 +99,9 @@ Page({
95 99
       complete: function () {
96 100
       }
97 101
     });
102
+  },
103
+  test (e) {
104
+    wx.setStorageSync('flag', 1);
105
+    console.log(e);
98 106
   }
99 107
 })

+ 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
 })

二進制
pages/resource/image/notice_img.png


+ 9 - 5
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>

+ 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
 }

+ 18 - 0
project.config.json

@@ -161,6 +161,24 @@
161 161
 					"name": "login",
162 162
 					"pathName": "pages/login/login",
163 163
 					"query": ""
164
+				},
165
+				{
166
+					"id": -1,
167
+					"name": "signup",
168
+					"pathName": "pages/signup/signup",
169
+					"query": ""
170
+				},
171
+				{
172
+					"id": -1,
173
+					"name": "signup",
174
+					"pathName": "pages/getPhone/getPhone",
175
+					"query": ""
176
+				},
177
+				{
178
+					"id": -1,
179
+					"name": "getPhone",
180
+					"pathName": "pages/getPhone/getPhone",
181
+					"query": ""
164 182
 				}
165 183
 			]
166 184
 		}