Commit 8e01b8d11b4c17d67ea11b2aa1c64b6d2208ddd4

Authored by fengtao
1 parent 587ab894

pref:隐藏app端第三方登录

@@ -19,11 +19,12 @@ @@ -19,11 +19,12 @@
19 <view class="f__login"> 19 <view class="f__login">
20 <view class="loginPhone"> 20 <view class="loginPhone">
21 <view class="form-row u-flex"> 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 </view> 24 </view>
24 <view class="form-row u-flex"> 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 <template slot="suffix"> 28 <template slot="suffix">
28 <view @click="showPasswordMode" style="padding: 10rpx"> 29 <view @click="showPasswordMode" style="padding: 10rpx">
29 <u-icon width="18" height="14" :name=" 30 <u-icon width="18" height="14" :name="
@@ -41,17 +42,19 @@ @@ -41,17 +42,19 @@
41 <view class="row-reset login-text-gray" @click="findPassrordFunc">忘记密码</view> 42 <view class="row-reset login-text-gray" @click="findPassrordFunc">忘记密码</view>
42 </view> 43 </view>
43 <view class="u-flex link-login"> 44 <view class="u-flex link-login">
  45 + <!-- #ifdef MP-WEIXIN -->
44 <view class="link-text login-text-gray">第三方账号登录</view> 46 <view class="link-text login-text-gray">第三方账号登录</view>
45 <view style="height: 20rpx"></view> 47 <view style="height: 20rpx"></view>
46 - <!-- #ifdef MP-WEIXIN -->  
47 <button class="link-image" @tap="handleWenxinAuthorization"> 48 <button class="link-image" @tap="handleWenxinAuthorization">
48 <image class="image" src="../../static/weixin.png" mode="aspectFill"></image> 49 <image class="image" src="../../static/weixin.png" mode="aspectFill"></image>
49 </button> 50 </button>
50 <!-- #endif --> 51 <!-- #endif -->
51 <!-- #ifdef APP-PLUS --> 52 <!-- #ifdef APP-PLUS -->
  53 + <!-- <view class="link-text login-text-gray">第三方账号登录</view>
  54 + <view style="height: 20rpx"></view>
52 <button class="link-image" @click="handleAppPlusAuthorization"> 55 <button class="link-image" @click="handleAppPlusAuthorization">
53 <image class="image" src="../../static/weixin.png" mode="aspectFill"></image> 56 <image class="image" src="../../static/weixin.png" mode="aspectFill"></image>
54 - </button> 57 + </button> -->
55 <!-- #endif --> 58 <!-- #endif -->
56 </view> 59 </view>
57 </view> 60 </view>
@@ -187,9 +190,32 @@ @@ -187,9 +190,32 @@
187 }, 190 },
188 //#endif 191 //#endif
189 //#ifdef APP-PLUS 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 //#endif 219 //#endif
194 async saveUserInfo() { 220 async saveUserInfo() {
195 const userInfoRes = await api.loginApi.setUserInfoApi() 221 const userInfoRes = await api.loginApi.setUserInfoApi()