1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import request from '@/sheep/request';
- import {
- t
- } from '@/locale';
- const SocialApi = {
- // 获得社交用户
- getSocialUser: (type) => {
- return request({
- url: '/member/social-user/get',
- method: 'GET',
- params: {
- type
- },
- custom: {
- showLoading: false,
- },
- });
- },
- // 社交绑定
- socialBind: (type, code, state) => {
- return request({
- url: '/member/social-user/bind',
- method: 'POST',
- data: {
- type,
- code,
- state
- },
- custom: {
- custom: {
- showSuccess: true,
- loadingMsg: t('common.binding'),
- successMsg: t('common.bind_success'),
- },
- },
- });
- },
- // 社交绑定
- socialUnbind: (type, openid) => {
- return request({
- url: '/member/social-user/unbind',
- method: 'DELETE',
- data: {
- type,
- openid
- },
- custom: {
- showLoading: false,
- loadingMsg: t('common.unbind'),
- successMsg: t('common.unbind_success'),
- },
- });
- },
- };
- export default SocialApi;
|