✨ 微信小程序登录:手动登录完成
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user