
        import RequestUtil, { AxiosRequestConfigFunc } from "@/utils/request";
        
        
export  class WxLoginUsingGetParams {
        
                /// 小程序获取的code
                 code!: string ;


                /// 渠道号
                channelCode!: string;
                
}
    
export  class WxLoginUsingGetResponse {
        
                /// 
                 isReal!: undefined ;
                
                /// 
                 showHome!: string ;
                
                /// 
                 userMobile!: string ;
                
                /// 
                 nickName!: string ;
                
                /// 
                 inviteCode!: string ;
                
                /// 
                 currentIdStatus!: undefined ;
                
                /// 
                 headUrls!: string ;
                
                /// 
                 userId!: undefined ;
                
                /// 
                 token!: string ;
                
                /// 
                 isRealNameNetLoan!: undefined ;
                
}
    
export  class AgreementsUsingPostBody {
        
                /// register_privacy
                 pageView!: string ;
                
}
    
export  class AgreementsUsingPostResponse {
        
                /// 名称
                 name!: string ;
                
                /// 版本
                 version!: string ;
                
                /// 是否选择
                 selected!: number ;
                
                /// webview 地址
                 url!: string ;
                
}
    
export  class GetIndexInfoUsingPostParams {
        
                /// Appid
                 appId!: string ;
                
}
    
export  class GetIndexInfoUsingPostResponse {
        
                /// undefined
                 appId!: string ;
                
                /// 链接地址
                 link!: string ;
                
                /// 链接文案
                 name!: string ;
                
}
    
export  class HomeTabUsingPostBody {
        
                /// Appid
                 appId!: string ;
                
}
    
export  class HomeTabUsingPostResponseTabMenus {
        
                /// 
                 id!: number ;
                
                /// 
                 appid!: number ;
                
                /// 
                 code!: string ;
                
                /// 
                 name!: string ;
                
                /// 
                 icon!: string ;
                
                /// 
                 iconActive!: string ;
                
                /// 
                 jumpTypeId!: number ;
                
                /// 
                 jumpTarget!: string ;
                
                /// 
                 status!: number ;
                
                /// 
                 sort!: number ;
                
}
    
export  class HomeTabUsingPostResponseArticleCategories {
        
                /// 
                 id!: number ;
                
                /// 
                 name!: string ;
                
                /// 
                 sort!: number ;
                
                /// 
                 status!: number ;
                
                /// 
                 createBy!: string ;
                
                /// 
                 updateBy!: string ;
                
                /// 
                 createTime!: string ;
                
                /// 
                 updateTime!: string ;
                
}

export  class HomeFetchChannelBody {
    ///
    channelCode: string;

    ///
    refer: string
}
export  class sendCodeBody {
    ///
    channelCode: string;

    ///
    phone: string
    
    ///
    sceneType: string
}
export  class loginBody {
    ///
    channelCode: string;

    ///
    phone: string;

    ///
    sceneType: string;

    ///
    uctrackid: string

    ///
    verifyCode: string
}
export  class HomeTabUsingPostResponse {
        
                /// undefined
                  tabMenus!: HomeTabUsingPostResponseTabMenus[] ;
                
                /// undefined
                  articleCategories!: HomeTabUsingPostResponseArticleCategories[] ;
                
}

export type GetJumpUrlPostBody = {
    appId: number | string

    channelCode: string

    productId: number

}

export type GetJumpUrlPostResponse = {
    adJumpLink: string
}

export type WxMpUpdateOpenIdBody = {
    jsCode: string
}

    
        
        export default class UserApi {
               
        /// 微信登录
        static  wxLoginUsingGet(options:AxiosRequestConfigFunc<any,WxLoginUsingGetParams> ):RequestUtil<WxLoginUsingGetResponse> {
            return new RequestUtil<WxLoginUsingGetResponse>(`/wxMp/login`,'GET' ,options);
        }
       
        /// 获取隐私政策
        static  agreementsUsingPost(options:AxiosRequestConfigFunc<AgreementsUsingPostBody,any> ):RequestUtil<AgreementsUsingPostResponse[]> {
            return new RequestUtil<AgreementsUsingPostResponse[]>(`/api/v1/app/agreements`,'POST' ,options);
        }
       
        /// 微信登录
        static  logOffUsingPost(options:AxiosRequestConfigFunc<any,any> ):RequestUtil<any> {
            return new RequestUtil<any>(`/api/v2/user/logoff`,'POST' ,options);
        }
       
        /// 微信登录
        static  getIndexInfoUsingPost(options:AxiosRequestConfigFunc<any,GetIndexInfoUsingPostParams> ):RequestUtil<GetIndexInfoUsingPostResponse> {
            return new RequestUtil<GetIndexInfoUsingPostResponse>(`/getIndexInfo/${options.params!.appId}`,'POST' ,options);
        }
       
        /// 获取首页tabs
        static  homeTabUsingPost(options:AxiosRequestConfigFunc<HomeTabUsingPostBody,any> ):RequestUtil<HomeTabUsingPostResponse> {
            return new RequestUtil<HomeTabUsingPostResponse>(`/api/v2/app/settings`,'POST' ,options);
        }
        

        static homeFetchChannel(options: AxiosRequestConfigFunc<HomeFetchChannelBody, any>):RequestUtil<any> {
            return new RequestUtil<any>('/h5/query/channel', 'POST', options)
        }

        static sendCode(options: AxiosRequestConfigFunc<sendCodeBody, any>):RequestUtil<any> {
            return new RequestUtil<any>('/h5/send/sms', 'POST', options)
        }
        static login(options: AxiosRequestConfigFunc<loginBody, any>):RequestUtil<any> {
            return new RequestUtil<any>('/h5/login', 'POST', options)
        }
        
        
        
        static getJumpUrlPost(options: AxiosRequestConfigFunc<GetJumpUrlPostBody, any>): RequestUtil<GetJumpUrlPostResponse> {
            return new RequestUtil<any>('/h5/get/product/jump/url', 'POST' ,options)
        }

        static wxUpdateOpenIdGet(options: AxiosRequestConfigFunc<any, WxMpUpdateOpenIdBody>):RequestUtil<any> {
            return new RequestUtil<any>(`/wxMp/updateOpenId`, 'GET', options)
        }
        }
        
