Showing
1 changed file
with
34 additions
and
8 deletions
... | ... | @@ -19,11 +19,12 @@ |
19 | 19 | <view class="f__login"> |
20 | 20 | <view class="loginPhone"> |
21 | 21 | <view class="form-row u-flex"> |
22 | - <u-input v-model="loginForm.username" type="text" placeholder="请输入登录账号" border="bottom" /> | |
22 | + <u-input :adjust-position="false" v-model="loginForm.username" type="text" placeholder="请输入登录账号" | |
23 | + border="bottom" /> | |
23 | 24 | </view> |
24 | 25 | <view class="form-row u-flex"> |
25 | - <u-input v-model="loginForm.password" :password="showPassword" placeholder="请输入登录密码" | |
26 | - border="bottom"> | |
26 | + <u-input :adjust-position="false" v-model="loginForm.password" :password="showPassword" | |
27 | + placeholder="请输入登录密码" border="bottom"> | |
27 | 28 | <template slot="suffix"> |
28 | 29 | <view @click="showPasswordMode" style="padding: 10rpx"> |
29 | 30 | <u-icon width="18" height="14" :name=" |
... | ... | @@ -41,17 +42,19 @@ |
41 | 42 | <view class="row-reset login-text-gray" @click="findPassrordFunc">忘记密码</view> |
42 | 43 | </view> |
43 | 44 | <view class="u-flex link-login"> |
45 | + <!-- #ifdef MP-WEIXIN --> | |
44 | 46 | <view class="link-text login-text-gray">第三方账号登录</view> |
45 | 47 | <view style="height: 20rpx"></view> |
46 | - <!-- #ifdef MP-WEIXIN --> | |
47 | 48 | <button class="link-image" @tap="handleWenxinAuthorization"> |
48 | 49 | <image class="image" src="../../static/weixin.png" mode="aspectFill"></image> |
49 | 50 | </button> |
50 | 51 | <!-- #endif --> |
51 | 52 | <!-- #ifdef APP-PLUS --> |
53 | + <!-- <view class="link-text login-text-gray">第三方账号登录</view> | |
54 | + <view style="height: 20rpx"></view> | |
52 | 55 | <button class="link-image" @click="handleAppPlusAuthorization"> |
53 | 56 | <image class="image" src="../../static/weixin.png" mode="aspectFill"></image> |
54 | - </button> | |
57 | + </button> --> | |
55 | 58 | <!-- #endif --> |
56 | 59 | </view> |
57 | 60 | </view> |
... | ... | @@ -187,9 +190,32 @@ |
187 | 190 | }, |
188 | 191 | //#endif |
189 | 192 | //#ifdef APP-PLUS |
190 | - handleAppPlusAuthorization() { | |
191 | - console.log('TODO'); | |
192 | - }, | |
193 | + // handleAppPlusAuthorization() { | |
194 | + // var that = this; | |
195 | + // uni.getProvider({ | |
196 | + // service: 'oauth', | |
197 | + // success: function(res) { | |
198 | + // if (~res.provider.indexOf('weixin')) { | |
199 | + // uni.login({ | |
200 | + // provider: 'weixin', | |
201 | + // success: function(loginRes) { | |
202 | + // // loginRes 包含access_token,expires_in,openid,unionid等信息 | |
203 | + // uni.showToast({ | |
204 | + // title: "第三方账号登录成功", | |
205 | + // icon: "none", | |
206 | + // }) | |
207 | + // }, | |
208 | + // fail: function(res) { | |
209 | + // // that.$refs.uToast.show({ | |
210 | + // // title: '微信登录失败', | |
211 | + // // type: 'warning' | |
212 | + // // }); | |
213 | + // } | |
214 | + // }); | |
215 | + // } | |
216 | + // } | |
217 | + // }); | |
218 | + // }, | |
193 | 219 | //#endif |
194 | 220 | async saveUserInfo() { |
195 | 221 | const userInfoRes = await api.loginApi.setUserInfoApi() | ... | ... |