支持用户授权注册登录mock
This commit is contained in:
@@ -183,9 +183,16 @@ export default {
|
||||
|
||||
const ret = res.data || {};
|
||||
if (ret.code === 0 && ret.data) {
|
||||
// 合并微信授权信息(头像、昵称)到 user_info
|
||||
const authInfo = uni.getStorageSync('auth_info') || {};
|
||||
const userInfo = {
|
||||
...authInfo,
|
||||
...ret.data.user_info,
|
||||
};
|
||||
|
||||
// 保存 token 和用户信息
|
||||
uni.setStorageSync('token', ret.data.token);
|
||||
uni.setStorageSync('user_info', ret.data.user_info);
|
||||
uni.setStorageSync('user_info', userInfo);
|
||||
|
||||
// 清除临时数据
|
||||
uni.removeStorageSync('temp_token');
|
||||
@@ -349,10 +356,8 @@ page {
|
||||
|
||||
/* 底部协议 */
|
||||
.agreement {
|
||||
position: absolute;
|
||||
bottom: 80rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin-top: 80rpx;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user