import { Service } from '@/Service/Service';
export class UserService {
    /**
     * 获取个人信息
     * GET /api/User/GetUserInfo
     */
    static async GetUserInfo() {
        return await Service.Request( "/api/User/GetUserInfo" ,'GET',{});
    }

    /**
     * 修改用户信息
     * POST /api/User/UpdateUser
     */
    static async UpdateUser(avatar:string,nick:string) {
        return await Service.Request( "/api/User/UpdateUser", 'POST', { avatar,nick });
    }

    /**
     * 修改用户手机号
     * POST /api/User/UpdateUserPhone
     */
    static async UpdateUserPhone(phone:string,smsCode:string) {
        return await Service.Request( "/api/User/UpdateUserPhone", 'POST', {phone,smsCode  });
    }

    /**
     * 获取用户账户信息
     * GET /api/User/GetUserAccInfo
     */
    static async GetUserAccInfo() {
        return await Service.Request( "/api/User/GetUserAccInfo",'GET',{} );
    }

    /**
     * 获取用户账户记录
     * GET /api/User/GetUserAccLog
     * @param accType 账户
     * @param op 0支出1收入
     */
    static async GetUserAccLog(accType: string, op: string, page: number) {
        return await Service.Request("/api/User/GetUserAccLog",'GET', { accType, op, page });
    }

    /**
     * 修改支付密码
     * POST /api/User/ForgetPayPwd
     */
    static async ForgetPayPwd(data: Record<string, any>) {
        return await Service.Request( "/api/User/ForgetPayPwd", 'POST',data);
    }

    /**
     * 用户评价接口
     * GET /api/User/GetUserEvaluateList
     */
    static async GetUserEvaluateList(source: number, page: number) {
        return await Service.Request( "/api/User/GetUserEvaluateList",'GET', { source, page });
    }

    /**
     * 删除评论接口
     * POST /api/User/DelUserEvaluate
     */
    static async DelUserEvaluate(data: Record<string, any>) {
        return await Service.Request( "/api/User/DelUserEvaluate",'POST',  data);
    }

    /**
     * 用户提现
     * POST /api/User/UserWithAcc
     */
    static async UserWithAcc(data: Record<string, any>) {
        return await Service.Request( "/api/User/UserWithAcc", 'POST', data);
    }

    /**
     * 用户提现记录
     * GET /api/User/GetUserWithList
     * @param accType moneyAcc/shopAcc
     */
    static async GetUserWithList(accType: string, page: number) {
        return await Service.Request( "/api/User/GetUserWithList",'GET', { accType, page });
    }

    /**
     * 获取推广列表
     * GET /api/User/GetUserRemList
     */
    static async GetUserRemList(page: number) {
        return await Service.Request( "/api/User/GetUserRemList", 'GET', { page });
    }
	
	
	/**
	 * 获取推广列表
	 * post /api/Upload/UploadFile
	 */
	static async UploadFile(file: string,path:string) {
	    return await Service.Request( "/api/Upload/UploadFile", 'POST', { file,path });
	}
	
	/**
	 * 获取推广列表
	 * post /api/User/TranAccount
	 */
	static async TranAccount(amount: number,type:number) {
	    return await Service.Request( "/api/User/TranAccount", 'POST', { amount,type });
	}
	
	
}