|
|
@ -59,12 +59,12 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-button text="登录" :disabled="!phone||!code" @click="smsLogin" class="loginBtn"></u-button> |
|
|
|
<u-button text="登录" :disabled="!phone||!code" @click="smsLogin" class="loginBtn"></u-button> |
|
|
|
<!-- <view >登录</view> --> |
|
|
|
<!-- <view >登录</view> --> |
|
|
|
<view class="otherLogin"> |
|
|
|
<!-- <view class="otherLogin"> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="otext">其他登录</view> |
|
|
|
<view class="otext">其他登录</view> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="line"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<image src="@/static/wlogin.png" class="wlogin" @tap="$refs.show_rule_item.open()" mode="widthFix"></image> |
|
|
|
<image src="@/static/wlogin.png" class="wlogin" @tap="$refs.show_rule_item.open()" mode="widthFix"></image> --> |
|
|
|
<!-- <view class="page-height flex-center flex-column"> |
|
|
|
<!-- <view class="page-height flex-center flex-column"> |
|
|
|
<image mode="aspectFill" lazy-load class="logo-img mb-md" :src="base_info.app_logo"></image> |
|
|
|
<image mode="aspectFill" lazy-load class="logo-img mb-md" :src="base_info.app_logo"></image> |
|
|
|
<view class="f-caption c-caption">{{base_info.app_text}}</view> |
|
|
|
<view class="f-caption c-caption">{{base_info.app_text}}</view> |
|
|
@ -74,7 +74,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
|
|
<uni-popup ref="show_rule_item" type="center" :maskClick="false"> |
|
|
|
<!-- <uni-popup ref="show_rule_item" type="center" :maskClick="false"> |
|
|
|
<view class="common-popup-content fill-base pd-lg radius-34"> |
|
|
|
<view class="common-popup-content fill-base pd-lg radius-34"> |
|
|
|
<view class="title">温馨提示</view> |
|
|
|
<view class="title">温馨提示</view> |
|
|
|
<view class="f-desc c-title mt-lg"> |
|
|
|
<view class="f-desc c-title mt-lg"> |
|
|
@ -90,7 +90,7 @@ |
|
|
|
:style="{background: primaryColor,color:'#fff'}">确定</view> |
|
|
|
:style="{background: primaryColor,color:'#fff'}">确定</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
</uni-popup> --> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -163,58 +163,58 @@ |
|
|
|
...mapActions(['getConfigInfo', 'getUserInfo']), |
|
|
|
...mapActions(['getConfigInfo', 'getUserInfo']), |
|
|
|
...mapMutations(['updateConfigItem', 'updateUserItem']), |
|
|
|
...mapMutations(['updateConfigItem', 'updateUserItem']), |
|
|
|
//微信登录 |
|
|
|
//微信登录 |
|
|
|
async wxLogin() { |
|
|
|
// async wxLogin() { |
|
|
|
this.$refs.show_rule_item.close() |
|
|
|
// this.$refs.show_rule_item.close() |
|
|
|
try { |
|
|
|
// try { |
|
|
|
let [providerErr, providerData] = await uni.getProvider({ |
|
|
|
// let [providerErr, providerData] = await uni.getProvider({ |
|
|
|
service: 'oauth', |
|
|
|
// service: 'oauth', |
|
|
|
}); |
|
|
|
// }); |
|
|
|
console.log("111") |
|
|
|
// console.log("111") |
|
|
|
// let [loginErr, loginData] =await uni.getUserProfile({ |
|
|
|
// // let [loginErr, loginData] =await uni.getUserProfile({ |
|
|
|
// desc: '用于您的页面展示用户头像与昵称', |
|
|
|
// // desc: '用于您的页面展示用户头像与昵称', |
|
|
|
// lang: 'zh_CN', |
|
|
|
// // lang: 'zh_CN', |
|
|
|
// success: res => { |
|
|
|
// // success: res => { |
|
|
|
// console.log(res,"jjj"); |
|
|
|
// // console.log(res,"jjj"); |
|
|
|
// // this.isShowLogin = false; |
|
|
|
// // // this.isShowLogin = false; |
|
|
|
// // this.userInfo = res.userInfo; |
|
|
|
// // // this.userInfo = res.userInfo; |
|
|
|
// }, |
|
|
|
// // }, |
|
|
|
// fail: err => { |
|
|
|
// // fail: err => { |
|
|
|
// console.log(err.errMsg); |
|
|
|
// // console.log(err.errMsg); |
|
|
|
// } |
|
|
|
// // } |
|
|
|
// }); |
|
|
|
// // }); |
|
|
|
|
|
|
|
|
|
|
|
let [loginErr, loginData] = await uni.login({ |
|
|
|
// let [loginErr, loginData] = await uni.login({ |
|
|
|
provider: 'weixin' |
|
|
|
// provider: 'weixin' |
|
|
|
}); |
|
|
|
// }); |
|
|
|
console.log("222") |
|
|
|
// console.log("222") |
|
|
|
let [infoErr, infoData] = await uni.getUserInfo({ |
|
|
|
// let [infoErr, infoData] = await uni.getUserInfo({ |
|
|
|
provider: 'weixin' |
|
|
|
// provider: 'weixin' |
|
|
|
}) |
|
|
|
// }) |
|
|
|
console.log("333",infoData) |
|
|
|
// console.log("333",infoData) |
|
|
|
let { |
|
|
|
// let { |
|
|
|
userInfo = {} |
|
|
|
// userInfo = {} |
|
|
|
} = infoData |
|
|
|
// } = infoData |
|
|
|
let { |
|
|
|
// let { |
|
|
|
openId = '' |
|
|
|
// openId = '' |
|
|
|
} = userInfo |
|
|
|
// } = userInfo |
|
|
|
if (!openId) return |
|
|
|
// if (!openId) return |
|
|
|
this.$util.showLoading({ |
|
|
|
// this.$util.showLoading({ |
|
|
|
title: "登录中..." |
|
|
|
// title: "登录中..." |
|
|
|
}) |
|
|
|
// }) |
|
|
|
try { |
|
|
|
// try { |
|
|
|
this.toLogin(userInfo) |
|
|
|
// this.toLogin(userInfo) |
|
|
|
} catch (e) { |
|
|
|
// } catch (e) { |
|
|
|
this.$util.hideAll() |
|
|
|
// this.$util.hideAll() |
|
|
|
} |
|
|
|
// } |
|
|
|
} catch (e) { |
|
|
|
// } catch (e) { |
|
|
|
console.log(e) |
|
|
|
// console.log(e) |
|
|
|
this.$util.showToast({ |
|
|
|
// this.$util.showToast({ |
|
|
|
title: '请先安装微信或升级版本' |
|
|
|
// title: '请先安装微信或升级版本' |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
// }); |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
// }, |
|
|
|
async smsLogin(item){ |
|
|
|
async smsLogin(item){ |
|
|
|
if(this.checked.length==0){ |
|
|
|
if(this.checked.length==0){ |
|
|
|
uni.$u.toast('请阅读并同意《用户隐私协议》'); |
|
|
|
uni.$u.toast('请阅读并同意《用户隐私协议》'); |
|
|
|