import axios from '../utils/axios';
import { stringToUrl } from '@/common/js/utils';
// 注册
export function register(params) {
  return axios.post('/SZWL-SERVER/user/register', params);
}
// 发送验证码
export function sentRegisterCode(params) {
  return axios.post(`/SZWL-SERVER/tMessageCode/sentRegisterCode?ifForeign=${params.ifForeign}&phoneOrEmail=${params.phoneOrEmail}`, params);
}
// 获取已有关联上级的名称
export function tAdminGetRelation(params) {
  return axios.get(`/SZWL-SERVER/tAdmin/getRelationAdminUsername?${stringToUrl(params)}`, params);
}
// 添加关联上级
export function tAdminSetRelationAdmin(params) {
  return axios.post(`/SZWL-SERVER/tAdmin/setRelationAdmin?${stringToUrl(params)}`, params);
}