微信小程序登录:手动登录完成

This commit is contained in:
YunaiV
2023-12-23 17:53:07 +08:00
parent 1c218cd730
commit b23fca683b
9 changed files with 108 additions and 79 deletions
+32
View File
@@ -37,6 +37,38 @@ const AuthUtil = {
method: 'POST',
});
},
// 社交授权的跳转
socialAuthRedirect: (type, redirectUri) => {
return request({
url: '/app-api/member/auth/social-auth-redirect',
method: 'GET',
params: {
type,
redirectUri,
},
custom: {
showSuccess: true,
loadingMsg: '登陆中',
},
});
},
// 社交快捷登录
socialLogin: (type, code, state) => {
return request({
url: '/app-api/member/auth/social-login',
method: 'POST',
data: {
type,
code,
state,
},
custom: {
showSuccess: true,
loadingMsg: '登陆中',
// TODO 芋艿:登录成功???
},
});
},
// 创建微信 JS SDK 初始化所需的签名
createWeixinMpJsapiSignature: (url) => {
return request({
+12
View File
@@ -1,6 +1,18 @@
import request from '@/sheep/request2';
const UserApi = {
// 修改基本信息
updateUser: (data) => {
return request({
url: '/app-api/member/user/update',
method: 'PUT',
data,
custom: {
showSuccess: true,
auth: true,
},
});
},
// 修改密码
updateUserPassword: (data) => {
return request({
-19
View File
@@ -30,25 +30,6 @@ export default {
auth: true,
},
}),
// profile: () =>
// request({
// url: '/user/api/user/profile',
// method: 'GET',
// custom: {
// showLoading: false,
// auth: true,
// },
// }),
// update: (data) =>
// request({
// url: '/user/api/user/update',
// method: 'POST',
// custom: {
// showSuccess: true,
// auth: true,
// },
// data,
// }),
update: (data) =>
request2({
url: 'member/user/update',