import http from '@/request/http.js'
import qs from 'qs'

export default {
    // 获取 token
    getToken: params => http.post('/api/Login/GetToken', JSON.stringify(params)),
    // 刷新 token
    refreshToken: () => http.get('/api/Login/RefreshToken', { isShowLoading: false }),
    // 登录
    login: params => http.post('/api/Login/Login', params),
    // 获得微信扫码登录账户其他关联账户
    getRelationAccountList: params => http.post(`/api/OtherLogin/GetRelationAccountList?${qs.stringify(params)}`),
    //  绑定微信开放平台账号
    weixinOpendBindUser: params => http.post('/api/Weixin/OAuth2/WeixinOpendBindUser', JSON.stringify(params)),
    //  账号选择跳转登录接口
    weixinOpendLoginSuccessRedirect: params => http.get('/api/Weixin/OAuth2/WeixinOpendLoginSuccessRedirect', { params })
}
