import config from "@/config";
import http from "@/utils/request";

export default {
	token: {
		url: `${config.API_URL}/user.login`,
		name: "登录获取TOKEN",
		post: async function (data = {}) {
			return await http.post(this.url, data);
		},
	},
	phoneLogin: {
		url: `${config.API_URL}/mobile.login`,
		name: "手机验证码登录获取TOKEN",
		post: async function (data = {}) {
			return await http.post(this.url, data);
		},
	},
	wechatLogin:{
		url: `${config.API_URL}/open.platform.oauth.login`,
		name: "微信扫码登录",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	wechatCode:{
		url: `${config.API_URL}/open.platform.scan.code`,
		name: "获取微信扫码二维码",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	bindWechat:{
		url: `${config.API_URL}/official.qrcode`,
		name: "微信绑定获取二维码地址",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	dingTalkLogin:{
		url: `${config.API_URL}/ding.app.login.scan.code`,
		name: "钉钉扫码登录",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	dingTalkCode:{
		url: `${config.API_URL}/ding.app.login.scan.url`,
		name: "钉钉登录二维码地址",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	bindDingTalk:{
		url: `${config.API_URL}/ding.app.login.scan.url.bind`,
		name: "获取钉钉绑定二维码地址",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	bindDingTalkUser:{
		url: `${config.API_URL}/ding.app.bind.user`,
		name: "钉钉绑定用户",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	unbindUser:{
		url: `${config.API_URL}/unbind.user`,
		name: "解除绑定",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
};
