const tagInfo = '[/libs/model/index.js]：';
import http from '../net/request';
import apiUrls from "../net/urls";

const Index = {
    /**
     * 用户注册，注册完成 同时登录 
     * @param {*} login_name 
     * @param {*} password 
     * @param {*} repassword 
     * @returns 
     */
    async reg(login_name, password, repassword) {
        let url = apiUrls.reg;
        let param = {
            login_name,
            password,
            repassword
        };
        let res = await http.get(url, param);
        return res;
    },
    /**
     * 用户登录 
     * @param {*} login_name 
     * @param {*} password 
     * @returns 
     */
    async login(login_name, password) {
        let url = apiUrls.login;
        let param = {
            login_name,
            password,

        };
        let res = await http.post(url, param);
        return res;
    }


}
export default Index;