import moment from 'moment'
export default [{
    url: '/gateway/org/back/functionService/querySecFunctionDTOTree',
    type: 'post',
    response: (req, res, next) => {
        // req.body 可获取post参数
        // req.query 可获取get参数
        return new Promise((res, rej) => {
            if (req.body.pid) {
                // setTimeout(() =>{
                    res({
                        "head": {
                            "requestId": "325a6e7fe9db88e8735febbe99353e39",
                            "errorCode": "0",
                            "timestamp": 1588930172798,
                            "time": 29,
                            "gtime": 51
                        },
                        "body": [{
                            "functioinId": "fcd5393e20434e8a81b723f482ce8b2e",
                            "name": "税务平台",
                            "url": "#",
                            "parentId": "1",
                            "subNodeFlag": "1"
                        }, {
                            "functioinId": "1a78cdc265af4c59bff40ca3f0f12e7a",
                            "name": "应用管理",
                            "url": "#",
                            "parentId": "1",
                            "imageUrl": "iconfont fsicon-yingyongzhongxin",
                            "subNodeFlag": "0"
                        }, {
                            "functioinId": "ebc3ebb7823042a5a485e0f80a67c645",
                            "name": "配置管理",
                            "url": "#",
                            "parentId": "1",
                            "subNodeFlag": "0"
                        }]
                    })
                // }, 5000)
                
            } else {
                res({
                    "head": {
                        "requestId": "76fd0720b7cdf685786bbe56d2f7db27",
                        "errorCode": "0",
                        "timestamp": 1588930172680,
                        "time": 61,
                        "gtime": 100
                    },
                    "body": [{
                        "functioinId": "1",
                        "name": "菜单权限列表",
                        "url": "#",
                        "parentId": "0",
                        "imageUrl": "fa fa-stack-exchange",
                        "subNodeFlag": "1"
                    }]
                })
            }
        })
    }
}, {
    url: '/gateway/system/back/sysDicItemService/sysDicItemByCodes',
    type: 'post',
    response: (req, res, next) => {
        // req.body 可获取post参数
        // req.query 可获取get参数
        return {
            "head": {
                "requestId": "3adb59fce3ea547b913333e7a58329be",
                "errorCode": "0",
                "timestamp": 1588930172024,
                "time": 29,
                "gtime": 68
            },
            "body": {
                "dic_DICT_BUSINESS_TYPE_BACK": `[{"itemid":"63","itemValue":"1","itemCode":"1","itemName":"金财互联","itemNameShort":"金财互联","dicId":"13","dicCode":null,"parentId":null,"parentName":null,"pathCode":"","sortNo":1,"remark":null,"createUser":"","createDate":1480995522000,"updateUser":"13","updateDate":null,"likeItemCode":null,"subNodeFlag":null},{"itemid":"3b58d0de5c9547a28b781918f93352b1","itemValue":"10","itemCode":"10","itemName":"金财管家中介客户","itemNameShort":"金财管家中介客户","dicId":"13","dicCode":null,"parentId":"平铺形式，没有父级","parentName":null,"pathCode":"001","sortNo":9,"remark":"金财管家中介客户","createUser":"1","createDate":1513410625000,"updateUser":"1","updateDate":1513410625000,"likeItemCode":null,"subNodeFlag":null}]`
            }
        }
    }
}, {
    url: '/gateway/org/back/functionService/querySecFunctionDTOByFunctionId',
    type: 'post',
    response: (req, res, next) => {
        // req.body 可获取post参数
        // req.query 可获取get参数
        return {
            "head": {
                "requestId": "89ddd8cb218a9bf16bfae38afe12f1f9",
                "errorCode": "0",
                "timestamp": 1588932050331,
                "time": 25,
                "gtime": 37
            },
            "body": {
                "parentName": "税务平台",
                "secFunctioinDTOReturn": {
                    "functioinId": "96fd10e9ee6f4306a875e4cd0632c710",
                    "busTypeId": "1",
                    "applicationId": "0",
                    "name": "API网关监控",
                    "code": "admin-monitorManage-page-apiGateway",
                    "functionType": "menu",
                    "url": "admin-monitorManage-page-apiGateway",
                    "parentId": "fcd5393e20434e8a81b723f482ce8b2e",
                    "sortNo": 8,
                    "isContextRelative": "Y",
                    "target": "_top",
                    "isValid": "Y",
                    "isShow": "Y",
                    "createUser": "8a555b0a1d5541d980ab3a7c648d5b8f",
                    "createDate": "2020-05-08T03:06:33.000+0000",
                    "updateUser": "0754e402a0ee4b819fb15d7a0258d9c5",
                    "updateDate": "2020-05-08T03:06:33.000+0000"
                }
            }
        }
    }
}, {
    url: '/gateway/org/back/functionService/deleteFunctionDTOByFunId',
    type: 'post',
    response: (req, res, next) => {
        // req.body 可获取post参数
        // req.query 可获取get参数
        return {
            "head": {
                "requestId": "3adb59fce3ea547b913333e7a58329be",
                "errorCode": "0",
                "timestamp": 1588930172024,
                "time": 29,
                "gtime": 68
            },
            "body": {
                "errorCode": '0',
                "errorMsg": "删除成功"
            }
        }
    }
}, {
    url: '/gateway/org/back/functionService/validateFunctionCode',
    type: 'post',
    response: (req, res, next) => {
        // req.body 可获取post参数
        // req.query 可获取get参数
        return {
            "head": {
                "requestId": "6ba2b53e496a1cab7f86a414475ed1d1",
                "errorCode": "0",
                "errorMsg": "编码值合法",
                "timestamp": 1588936788200,
                "time": 12,
                "gtime": 26
            }
        }
    }
}]