store.js 7.66 KB
exports.domain = require('../config/common.js').domain;
//路由配置
exports.res = [{
      // 创建店铺页面渲染
        route: '/supplier/store/index',   
        method: 'GET',
        view: 'pages/store/index',     
        noApi:true,
        data: {
            gridurl:'/supplier/store/indexPage'
        },
        src:'/store/indexlist'
    },{
      // 创建店铺页面数据获取
        route: '/supplier/store/indexPage',   
        method: 'POST',
        url:"/ShopsRest/getShopList",
        isJsonRaw:true,
        params:[
            {name: 'supplierId', type: 'Number'},
            {name: 'brandId', type: 'Number'},
            {name: 'operationStatus', type: 'Number'},
            {name: 'checkStatus', type: 'Number'},
            {name: 'checkStatusArr', type: 'String'},
            {name: 'size', type: 'Number'},
            {name: 'page', type: 'Number'}
        ],
        src:'/store/indexlist'
    },{
      // 店铺信息页面渲染
        route: '/supplier/store/examine',   
        method: 'GET',
        view: 'pages/store/examine',        
        noApi:true,
        data: {
            gridurl:'/supplier/store/examinePage'
        },
        src:'/store/examine',
    },{
      // 店铺信息页面数据获取
        route: '/supplier/store/examinePage',
        method: 'POST',
        url:"/ShopsRest/getShopList",
        isJsonRaw:true,
        params:[
            {name: 'supplierId', type: 'Number'},
            {name: 'brandId', type: 'Number'},
            {name: 'operationStatus', type: 'Number'},
            {name: 'checkStatus', type: 'Number'},
            {name: 'checkStatusArr', type: 'String'},
            {name: 'size', type: 'Number'},
            {name: 'page', type: 'Number'}
        ],
        src:'/store/examine'
    },{
      // 店铺审核页面
        route: '/supplier/check/index',   
        method: 'GET',
        view: 'pages/store/check',        
        noApi:true,
        data: {
            gridurl:'/supplier/store/checkPage'
        },
        src:'/store/check',
    },{
      // 店铺审核页面数据获取
        route: '/supplier/store/checkPage',
        method: 'POST',
        url:"/ShopsRest/getShopList",
        isJsonRaw:true,
        params:[
            {name: 'supplierId', type: 'Number'},
            {name: 'brandId', type: 'Number'},
            {name: 'checkStatus', type: 'Number'},
            {name: 'checkStatusArr', type: 'String'},
            {name: 'size', type: 'Number'},
            {name: 'page', type: 'Number'}
        ],
        src:'/store/check'
    },{
      // 店铺详细信息页面渲染
        route: '/supplier/store/info/:shopsId',   
        method: 'GET',
        view: 'pages/store/info',
        url:"/ShopsRest/getShopDetailById",
        isJsonRaw:true,
        params:[{
            name:'shopsId',
            type:'String'
        }],
        src:'/store/index'
    },{
      // 修改店铺页面渲染
        route: '/supplier/store/update/:shopsId',   
        method: 'GET',
        view: 'pages/store/update',
        url:"/ShopsRest/getShopDetailById",
        isJsonRaw:true,
        params:[{
            name:'shopsId',
            type:'String'
        }],
        src:'/store/info'
    },{
      // 修改店铺页面提交
        route: '/store/update',
        method: 'POST',
        url: '/ShopsRest/updateShops',
        isJsonRaw: true,
        params:[
            {name:"shopsId",type:"Number"},
            {name:"shopName",type:"String"},
            {name:"shopDomain",type:"String"},
            {name:"shopNature",type:"String"},
            {name:"createPid",type:"Number"},
            {name:"shopsType",type:"Number"},
            {name:"shopLogo",type:"String"},
            {name:"shopIntro",type:"String"},
            {name:"websiteUrl",type:"String"},
            {name:"otherUrl",type:"String"},
            {name:"shopAddress",type:"String"},
            {name:"onCheck",type:"Number"},
            {name:"shopRelation",type:"String"}
        ]
    },{
      // 新增店铺页面渲染
        route: '/supplier/store/add',   
        method: 'GET',
        view: 'pages/store/update',
        src:'/store/info',
        noApi:true,
        data:{
            action:'/store/add',
            data:{},
            add:true
        }
    }, {// 新增店铺数据
        route: '/store/add',
        method: 'POST',
        url: '/ShopsRest/addShops',
        isJsonRaw: true,
        params:[
            {name:"shopName",type:"String"},
            {name:"shopDomain",type:"String"},
            {name:"shopNature",type:"String"},
            {name:"createPid",type:"Number"},
            {name:"shopsType",type:"Number"},
            {name:"shopLogo",type:"String"},
            {name:"shopIntro",type:"String"},
            {name:"websiteUrl",type:"String"},
            {name:"otherUrl",type:"String"},
            {name:"shopAddress",type:"String"},
            {name:"onCheck",type:"Number"},
            {name:"shopRelation",type:"String"}
        ]
    },{
      // 店铺管理员关系列表
        route: '/supplier/storeadmin/index',   
        method: 'GET',
        view: 'pages/store/storeAdmin',
        noApi:true,
        data: {
            gridurl:'/supplier/storeadmin/indexPage'
        },
        src:'/store/adminindex'
    },{
      // 店铺管理员关系列表
        route: '/supplier/storeadmin/indexPage',   
        method: 'POST',
        url:"/ShopsAdminRest/getShopsAdminList",
        isJsonRaw:true,
        params:[
            {name: 'page', type: 'Number'},
            {name: 'size', type: 'Number'}
        ]
    },{
      // 关店
        route: '/supplier/store/closeShops',   
        method: 'POST',
        url:"/ShopsRest/closeShops",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"}
        ]
    },{
      // 开店
        route: '/supplier/store/openShops',   
        method: 'POST',
        url:"/ShopsRest/openShops",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"}
        ]
    },{
      // 移除店铺管理员关系列表
        route: '/supplier/storeadmin/delete',   
        method: 'POST',
        url:"/ShopsAdminRest/delAdminRelation",
        isJsonRaw:true,
        params:[
            {name:"id",type:"Number"}
        ]
    },{
      // 店铺管理员关系新增
        route: '/supplier/storeadmin/adminAdd',
        method: 'GET',
        view: 'pages/store/adminedit',
        src:'/store/adminedit'
    },{      
        // 店铺管理员关系新增
        route: '/supplier/storeadmin/addguanxi',
        method: 'POST',
        url:"/ShopsAdminRest/addAdminRelation",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"},
            {name:"adminPid",type:"Number"},
            {name:"identity",type:"Number"}
        ]
    },{
      // 修改店铺页面渲染
        route: '/supplier/store/adminupdate/:id',   
        method: 'GET',
        view: 'pages/store/adminedit',
        url:"/ShopsAdminRest/getAdminRelationDetailById",
        isJsonRaw:true,
        params:[{
            name:'id',
            type:'String'
        }],
        src:'/store/adminedit'
    },{
      // 根据身份选择管理员
        route: '/supplier/storeadmin/managerName',   
        method: 'POST',
        url:"/ShopsAdminRest/getUsersByIdentity",
        isJsonRaw:true,
        src:'/store/adminedit',
        params:[
            {name:"identity",type:"Number"}
        ]
    },{
      // 根据品牌选择供应商
        route: '/supplier/storeadmin/supplierlist',   
        method: 'POST',
        url:"/supplier/supplier/selectSupplierByBrandId",
        isJsonRaw:true,
        params:[
            {name:"brandId",type:"Number"}
        ]
    }]