import { IApiDocInterface } from "../base/interface";

const userApiDoc: IApiDocInterface = {
    "/wxMp/login": {
        funcName: "wxLogin",
        desc: "微信登录",
        get: {
            params: {
                code: { type: "String", desc: "小程序获取的code", required: true, },
            },
            response: {
                isReal: { type: 'number', desc: '', },
                showHome: { type: 'String', desc: '' },
                userMobile: { type: 'String', desc: '' },
                nickName: { type: 'String', desc: '' },
                inviteCode: { type: 'String', desc: '' },
                currentIdStatus: { type: 'number', desc: '' },
                headUrls: { type: 'String', desc: '' },
                userId: { type: 'number', desc: '' },
                token: { type: 'String', desc: '' },
                isRealNameNetLoan: { type: 'number', desc: '' }
            }
        }
    },
    "/api/v1/app/agreements": {
        funcName: "agreements",
        desc: "获取隐私政策",
        post: {
            body: {
                pageView: { type: "String", desc: "register_privacy", required: true },
            },
            response: [
                {
                    name: { type: "String", desc: "名称", required: true },
                    version: { type: "String", desc: "版本", required: true },
                    selected: { type: "int", desc: "是否选择", required: true },
                    url: { type: "String", "desc": "webview 地址", required: true },
                }
            ]
        }
    },
    "/api/v2/user/logoff": {
        funcName: "logOff",
        desc: "注销微信",
        post: {
          
        }
    },
    "/getIndexInfo/{appId}": {
        funcName: "getIndexInfo",
        desc: "微信登录",
        post: {
            params: {
                appId: { url: true, type: "String", desc: "Appid", required: true, },
            },
            response: {
                appId: { type: "String" },
                link: { type: "String", desc: "链接地址" },
                name: { type: "String", desc: "链接文案" },
            }
        }
    },
    "/api/v2/app/settings": {
        funcName: "homeTab",
        desc: "获取首页tabs",
        post: {
            body: {
                appId: { type: "String", desc: "Appid", required: true, },
            },
            response: {
                tabMenus: {
                    type: "list",
                    child: {
                        id: { type: 'int', desc: '' },
                        appid: { type: 'int', desc: '' },
                        code: { type: 'String', desc: '' },
                        name: { type: 'String', desc: '' },
                        icon: { type: 'String', desc: '' },
                        iconActive: { type: 'String', desc: '' },
                        jumpTypeId: { type: 'int', desc: '' },
                        jumpTarget: { type: 'String', desc: '' },
                        status: { type: 'int', desc: '' },
                        sort: { type: 'int', desc: '' }
                    }
                },
                articleCategories: {
                    type: "list",
                    child: {
                        id: { type: 'int', desc: '' },
                        name: { type: 'String', desc: '' },
                        sort: { type: 'int', desc: '' },
                        status: { type: 'int', desc: '' },
                        createBy: { type: 'String', desc: '' },
                        updateBy: { type: 'String', desc: '' },
                        createTime: { type: 'String', desc: '' },
                        updateTime: { type: 'String', desc: '' }
                    }
                }
            }
        }
    },
}

export default userApiDoc;
