import request from '../utils/request'
import {codeProjectName,requestUrl} from '../config'

let hi_request=null;
if(window.HIVUI_SETTING&&window.HIVUI_SETTING.request){
  hi_request=window.HIVUI_SETTING.request;
}
function _request(opt){
  if(hi_request){
    return hi_request(opt);
  }else{
    return request(opt);
  }
}
const __base=(window.HIVUI_SETTING.serverUrl||codeProjectName);
//密码重置
export function resetpw(data) {
  debugger;return request({
    url: __base + "/sys/user/forgot-pwd",
    method: 'post',
    data
  })
}
//注册获取验证码
export function captcha(data) {
  return request({
    url: __base+"/sms/captcha",
    method: 'post',
    data
  })
}
//用户注册
export function register(data) {
  return request({
    url: __base+"/login/sso-reg",
    method: 'post',
    data
  })
}

