// Learn more on how to config.
// - https://github.com/dora-js/dora-plugin-proxy#规则定义

module.exports = {
    '/api/todos': function (req, res) {
        setTimeout(function () {
            res.json({
                status: 1,
                result: [
                    {
                        id: 1,
                        text: 'Learn antd',
                        isComplete: true,
                    },
                    {
                        id: 2,
                        text: 'Learn ant-tool',
                    },
                    {
                        id: 3,
                        text: 'Learn dora',
                    },
                ],
            });
        }, 500);
    },
    '/api/catessddsd': function (req, res) {
        setTimeout(()=>{
            res.json({
                status:1,
                result:[
                    {
                        value:1,
                        label:'信托',
                        children:[
                            {
                                value:101,
                                label:'房产'
                            },{
                                value:102,
                                label:'政府'
                            },{
                                value:103,
                                label:'企业流贷'
                            }
                        ]
                    },{
                        value:2,
                        label:'资管',
                        children:[
                            {
                                value:201,
                                label:'房产'
                            },{
                                value:202,
                                label:'政府'
                            },{
                                value:203,
                                label:'企业流贷'
                            }
                        ]
                    },{
                        value:3,
                        label:'私募',
                        children:[
                            {
                                value:301,
                                label:'契约型'
                            }
                        ]
                    }

                ]
            })
        },100);
    },
    '/api/*': 'http://react.yanky.cn/',
    // '/api/*': 'http://192.168.1.126:8080/'
};
