|
|
@ -63,7 +63,7 @@ |
|
|
<view class="agreement_right"> |
|
|
<view class="agreement_right"> |
|
|
by continuong, you agree to be <text class="text" @click="gotonewpage(1)"> terms of use |
|
|
by continuong, you agree to be <text class="text" @click="gotonewpage(1)"> terms of use |
|
|
</text> and <text class="text" @click="gotonewpage(2)"> privacy policy</text>. |
|
|
</text> and <text class="text" @click="gotonewpage(2)"> privacy policy</text>. |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="cellphone" style="padding-top: 15px;"> |
|
|
<view class="cellphone" style="padding-top: 15px;"> |
|
|
<view class="cellphone-box"> |
|
|
<view class="cellphone-box"> |
|
|
@ -277,32 +277,33 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
appleOauth.login( function(oauth){ |
|
|
appleOauth.login( function(oauth){ |
|
|
console.log(oauth); |
|
|
|
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}); |
|
|
|
|
|
// 授权成功,苹果授权返回的信息在 oauth.target.appleInfo 中 |
|
|
|
|
|
// const openid = JSON.parse(oauth.target.appleInfo.identityToken) |
|
|
|
|
|
// console.log(openid); |
|
|
|
|
|
let data = { |
|
|
let data = { |
|
|
_action: 'loginbyapple', |
|
|
_action: 'loginbyapple', |
|
|
ap_user_id: oauth.target.appleInfo.user, |
|
|
ap_user_id: oauth.target.appleInfo.user, |
|
|
ap_user_name: oauth.target.appleInfo.familyName, |
|
|
ap_user_name: oauth.target.appleInfo.fullName.familyName, |
|
|
ap_user_first_name: oauth.target.appleInfo.familyName, |
|
|
ap_user_first_name: oauth.target.appleInfo.fullName.familyName, |
|
|
ap_user_middle_name: oauth.target.appleInfo.givenName, |
|
|
ap_user_middle_name: oauth.target.appleInfo.fullName.givenName, |
|
|
ap_user_last_name: oauth.target.appleInfo.familyName, |
|
|
ap_user_last_name: oauth.target.appleInfo.fullName.familyName, |
|
|
ap_user_email: oauth.target.appleInfo.email |
|
|
ap_user_email: oauth.target.appleInfo.email |
|
|
} |
|
|
} |
|
|
uni.setStorageSync('isLogin', 1) |
|
|
|
|
|
|
|
|
|
|
|
// uni.setStorageSync('user_info', {nickname: oauth.target.appleInfo.familyName}) |
|
|
// uni.setStorageSync('user_info', {nickname: oauth.target.appleInfo.familyName}) |
|
|
// uni.setStorageSync('user_info', {email: oauth.target.appleInfo.email}) |
|
|
// uni.setStorageSync('user_info', {email: oauth.target.appleInfo.email}) |
|
|
defaultRequest(data).then(res => { |
|
|
defaultRequest(data).then(res => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
uni.showLoading({ |
|
|
// uni.showLoading({ |
|
|
title: 'Logining', |
|
|
// title: 'Logining', |
|
|
}) |
|
|
// }) |
|
|
|
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}); |
|
|
}) |
|
|
}) |
|
|
|
|
|
console.log(oauth); |
|
|
|
|
|
uni.setStorageSync('isLogin', 1) |
|
|
|
|
|
// 授权成功,苹果授权返回的信息在 oauth.target.appleInfo 中 |
|
|
|
|
|
// const openid = JSON.parse(oauth.target.appleInfo.identityToken) |
|
|
|
|
|
// console.log(openid); |
|
|
|
|
|
|
|
|
console.log(this.loginDate) |
|
|
console.log(this.loginDate) |
|
|
defaultRequest1(this.loginDate).then(res => { |
|
|
defaultRequest1(this.loginDate).then(res => { |
|
|
app.globalData.error = res.error |
|
|
app.globalData.error = res.error |
|
|
@ -347,9 +348,8 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}); |
|
|
|
|
|
// defaultRequest(data).then(res => { |
|
|
// defaultRequest(data).then(res => { |
|
|
// console.info(res) |
|
|
// console.info(res) |
|
|
// console.log('===================================='); |
|
|
// console.log('===================================='); |
|
|
@ -518,9 +518,13 @@ |
|
|
// uni.setStorageSync('user_info.data.nickname', 'googleOauth.authResult.nickName'); |
|
|
// uni.setStorageSync('user_info.data.nickname', 'googleOauth.authResult.nickName'); |
|
|
defaultRequest(data).then(res => { |
|
|
defaultRequest(data).then(res => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
uni.showLoading({ |
|
|
// uni.showLoading({ |
|
|
title: 'Logining', |
|
|
// title: 'Logining', |
|
|
}) |
|
|
// duration: 2000 |
|
|
|
|
|
// }) |
|
|
|
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}); |
|
|
}) |
|
|
}) |
|
|
console.log(this.loginDate) |
|
|
console.log(this.loginDate) |
|
|
defaultRequest1(this.loginDate).then(res => { |
|
|
defaultRequest1(this.loginDate).then(res => { |
|
|
@ -566,9 +570,8 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}); |
|
|
|
|
|
}, function(err) { |
|
|
}, function(err) { |
|
|
console.log(err); |
|
|
console.log(err); |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
|