yunlingyin 7 years ago
parent
commit
760150806a
3 changed files with 32 additions and 1 deletions
  1. 12 1
      pages/signup/signup.js
  2. 1 0
      pages/signup/signup.wxml
  3. 19 0
      pages/signup/signup.wxss

+ 12 - 1
pages/signup/signup.js

@@ -12,6 +12,7 @@ Page({
12 12
     placeholder_number: '请输入手机号码',
13 13
     searchinput: '',
14 14
     showicon: false,
15
+    hideyzm: false,
15 16
     showView: false
16 17
   },
17 18
 
@@ -188,11 +189,16 @@ Page({
188 189
         code: code
189 190
       },
190 191
       success: function (errno) {
191
-        // console.log(errno)
192
+        console.log(errno)
192 193
         if (errno.data.errno == '0') {
194
+         
193 195
           wx.switchTab({
194 196
             url: "/pages/index/index"
195 197
           })
198
+        }else{
199
+          that.setData({
200
+            hideyzm: true
201
+          })
196 202
         }
197 203
       }
198 204
     });
@@ -203,6 +209,11 @@ Page({
203 209
       showView: false
204 210
     })
205 211
   },
212
+  hideyzm:function(){
213
+    this.setData({
214
+      hideyzm: false
215
+    })
216
+  },
206 217
   // 点击x号清空input
207 218
   clear_phon:function(e){
208 219
     this.setData({

+ 1 - 0
pages/signup/signup.wxml

@@ -17,6 +17,7 @@
17 17
     <view class="item-title">验证码</view>
18 18
     <view class="item-input label">
19 19
       <input maxlength="4" placeholder="请输入验证码" bindinput="codename" name='codename' />
20
+      <view class="{{hideyzm?'bright789_view_show':'bright789_view_hide'}} yzm_hide" bindtap="hideyzm">验证码错误</view>
20 21
     </view>
21 22
     <view bindtap='get_code' class="{{sendmsg}} get_code" style="background-color:{{pageBackgroundColor}}">{{get_code}}</view>
22 23
   </view>

+ 19 - 0
pages/signup/signup.wxss

@@ -59,6 +59,10 @@ view {
59 59
   color: #999;
60 60
 }
61 61
 
62
+.item .item-inner .label  input {
63
+  width: 100px;
64
+}
65
+
62 66
 .phone_hide {
63 67
   position: absolute;
64 68
   z-index: 100;
@@ -73,6 +77,19 @@ view {
73 77
   /* display: none; */
74 78
 }
75 79
 
80
+.yzm_hide {
81
+  position: absolute;
82
+  z-index: 100;
83
+  float: left;
84
+  margin-left: 73px;
85
+  height: 55px;
86
+  line-height: 56px;
87
+  color: #f00;
88
+  font-size: 14px;
89
+  text-align: left;
90
+  width: 100px;
91
+}
92
+
76 93
 .item .item-inner .get_code {
77 94
   float: right;
78 95
   display: block;
@@ -103,6 +120,7 @@ view {
103 120
 .bright789_view_show {
104 121
   display: block;
105 122
 }
123
+
106 124
 .icon_hide {
107 125
   display: none;
108 126
 }
@@ -110,6 +128,7 @@ view {
110 128
 .icon_show {
111 129
   display: block;
112 130
 }
131
+
113 132
 .input_btn_icon {
114 133
   float: right;
115 134
   margin-right: 20px;