Authored by QC-L

更新登录逻辑为未支持的授权添加登录逻辑 review by 黄敬囿

... ... @@ -30,10 +30,7 @@ export default class Focus extends Component {
return (
<Swiper
className='index-swiper'
indicatorActiveColor='#fff'
circular
indicatorDots
autoplay>
>
{
floor.map((item, index) => {
return (
... ...
... ... @@ -161,7 +161,10 @@ const isStringEmpty = (str) => {
export const getUserInfo = (e) => {
if (e.detail.errMsg === 'getUserInfo:ok') {
loginAction((error, loginData) => {
if (error) return;
if (error) {
event.emit('user-get-phonenumber-error', e.detail);
return;
}
decodeUnionId(loginData.srd_session, e).then(data => {
wechatUserIsBind(data.union_id, data.userInfo).then(message => {
... ... @@ -196,8 +199,10 @@ export const getUserInfo = (e) => {
});
} else {
loginAction((error, loginAction) => {
if (error) return;
event.emit('user-get-phonenumber-error', e.detail);
if (error) {
event.emit('user-get-phonenumber-error', e.detail);
return;
}
});
}
}
... ...