正在显示
2 个修改的文件
包含
18 行增加
和
7 行删除
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | //获取应用实例 |
4 | 4 | var app = getApp(); |
5 | 5 | var baseUrl = app.globalData.baseUrl; |
6 | +var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/; | |
6 | 7 | |
7 | 8 | Page({ |
8 | 9 | data: { |
... | ... | @@ -32,11 +33,11 @@ Page({ |
32 | 33 | if (this.data.buttonDisable) return; |
33 | 34 | var that = this; |
34 | 35 | var mobile = this.data.mobile; |
35 | - var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/; | |
36 | + | |
36 | 37 | console.log("mobile---", mobile); |
37 | 38 | if (!regMobile.test(mobile)) { |
38 | 39 | wx.showToast({ |
39 | - image: "/images/error.png", | |
40 | + icon: 'none', | |
40 | 41 | title: '手机号有误!' |
41 | 42 | }) |
42 | 43 | return; |
... | ... | @@ -90,6 +91,14 @@ Page({ |
90 | 91 | |
91 | 92 | login: function () { |
92 | 93 | var that = this; |
94 | + console.log("mobile---login", that.data.mobile); | |
95 | + if (!regMobile.test(that.data.mobile)) { | |
96 | + wx.showToast({ | |
97 | + icon:'none', | |
98 | + title: '手机号有误!' | |
99 | + }) | |
100 | + return; | |
101 | + } | |
93 | 102 | var Authorization = getApp().globalData.Authorization; |
94 | 103 | wx.request({ |
95 | 104 | url: baseUrl + "uaa/v1/users/op/bind-mobile", |
... | ... | @@ -132,9 +141,9 @@ Page({ |
132 | 141 | console.log("fail ", res.data) |
133 | 142 | }, |
134 | 143 | complete: function (res) { |
135 | - wx.reLaunch({ | |
136 | - url: '../main/guide/guide' | |
137 | - }) | |
144 | + // wx.reLaunch({ | |
145 | + // url: '../main/guide/guide' | |
146 | + // }) | |
138 | 147 | } |
139 | 148 | }) |
140 | 149 | }, | ... | ... |
... | ... | @@ -60,8 +60,10 @@ |
60 | 60 | </view> |
61 | 61 | </scroll-view> |
62 | 62 | |
63 | - <image class='chat-img' bindtap='gochat' src='/images/icon_chat.png'></image> | |
63 | + <!-- <image class='chat-img' bindtap='gochat' src='/images/icon_chat.png'></image> --> | |
64 | 64 | |
65 | - <image class='logout-img' bindtap='loginout' src='/images/icon_logout.png'></image> | |
65 | + <!-- <image class='logout-img' bindtap='loginout' src='/images/icon_logout.png'></image> --> | |
66 | + | |
67 | + <image class='logout-img' bindtap='gochat' src='/images/icon_chat.png'></image> | |
66 | 68 | |
67 | 69 | </view> | ... | ... |
请
注册
或
登录
后发表评论