import axios from '../utils/axios';

// 绑定微信
export function bindWechat(adminId) {
    return axios.get(`/SZWL-SERVER/tWechat/bindWechat?adminId=${adminId}`);
}

export function callback(params) {
    return axios.get('SZWL-SERVER/tWechat/callback', {params});
}

export function auth(code, state) {
    const params = {
        code,
        state,
    };
    return axios.post('SZWL-SERVER/tWechat/auth', params);
}

// 获取微信头像
export function getAvatar(adminId) {
    return axios.get(`SZWL-SERVER/tWechat/getAvatar?adminId=${adminId}`);
}