个人信息:增加读取社交信息的接口

This commit is contained in:
YunaiV
2023-12-23 22:04:11 +08:00
parent f968397ad8
commit 4d9343d2db
6 changed files with 121 additions and 49 deletions
+54
View File
@@ -0,0 +1,54 @@
import request from '@/sheep/request';
const SocialApi = {
// 获得社交用户
getSocialUser: (type) => {
return request({
url: '/app-api/member/social-user/get',
method: 'GET',
params: {
type
},
custom: {
showLoading: false,
},
});
},
// 社交绑定
socialBind: (type, code, state) => {
return request({
url: '/app-api/member/social-user/bind',
method: 'POST',
data: {
type,
code,
state
},
custom: {
custom: {
showSuccess: true,
loadingMsg: '绑定中',
successMsg: '绑定成功',
},
},
});
},
// 社交绑定
socialUnbind: (type, openid) => {
return request({
url: '/app-api/member/social-user/unbind',
method: 'DELETE',
data: {
type,
openid
},
custom: {
showLoading: false,
loadingMsg: '解除绑定',
successMsg: '解绑成功',
},
});
},
};
export default SocialApi;
-12
View File
@@ -28,18 +28,6 @@ export default {
},
}),
// 解除绑定微信
unbind: (data) =>
request({
url: 'third/wechat/unbind',
method: 'POST',
data,
custom: {
showSuccess: true,
loadingMsg: '解除绑定',
},
}),
// 公众号授权
oauthLogin: (data) =>
request({