shopAdd.js 1.37 KB
module.exports = function (app){
    app.get("/supplier/store/index", "shop.Index", function (req,res){
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺创建",
            add:true,
            gridurl:'/supplier/shop/indexPage',
            authority:'{"btn":false,"info":"info","create":true,"operationStatus":1,"checkStatusArr":"100,200,900"}'
        };
    });

    app.get("/supplier/store/add", "shop.Edit", function () {
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺创建",
            editTitle:"创建新店铺",
            action:'/store/add',
            data:{shopId:0}
        }
    });

    app.get("/supplier/store/update/:shopsId", "shop.Edit", "shopAdd_getShopDetailById", function (rs,req,res){
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺编辑",
            editTitle:"编辑店铺信息",
            action:'/store/update',
            data:rs.data
        }
    });
    
    app.get("/supplier/store/info/:shopsId", "shop.Info", "shopAdd_getShopDetailById", function (rs,req,res){
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺详情",
            backhref:'/supplier/store/index',
            data:rs.data
        }
    });
    
    //添加店铺
    app.post("/store/add","shopAdd_addShops");
}