zyejMAll-mobile/sheep/api/member/social.js

55 lines
1.0 KiB
JavaScript
Raw Permalink Normal View History

2024-08-07 10:31:42 +08:00
import request from '@/sheep/request';
const SocialApi = {
// 获得社交用户
getSocialUser: (type) => {
return request({
url: '/member/social-user/get',
method: 'GET',
params: {
2024-08-07 21:40:27 +08:00
type,
2024-08-07 10:31:42 +08:00
},
custom: {
showLoading: false,
},
});
},
// 社交绑定
socialBind: (type, code, state) => {
return request({
url: '/member/social-user/bind',
method: 'POST',
data: {
type,
code,
2024-08-07 21:40:27 +08:00
state,
2024-08-07 10:31:42 +08:00
},
custom: {
custom: {
showSuccess: true,
loadingMsg: '绑定中',
successMsg: '绑定成功',
},
},
});
},
// 社交绑定
socialUnbind: (type, openid) => {
return request({
url: '/member/social-user/unbind',
method: 'DELETE',
data: {
type,
2024-08-07 21:40:27 +08:00
openid,
2024-08-07 10:31:42 +08:00
},
custom: {
showLoading: false,
loadingMsg: '解除绑定',
successMsg: '解绑成功',
},
});
},
};
2024-08-07 21:40:27 +08:00
export default SocialApi;