shop.shopInfo.js 1.21 KB
module.exports = function (app){
    app.get("/supplier/store/examine", "shop.Index", function (req,res){
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺信息管理",
            gridurl:'/supplier/store/indexPage',
            authority:'{"btn":true,"info":"info3","operationStatus":2,"checkStatusArr":"200,300,900"}'
        }
    });
    
    app.get("/supplier/store/info3/:shopsId", "shop.Info", "shopAudit_getLastCheckShopInfoById", function (rs,req,res){
        if(rs && rs.data) {
            const {shopNature,province ='',city='',county='',street='',detailAdd=''} = rs.data
            if(shopNature == 6) {
                rs.data.newShopAddress = `${province} ${city} ${county} ${street} ${detailAdd}`
            }
        }
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺详情",
            backhref:'/supplier/store/examine',
            data:rs.data
        }
    });

    //店铺列表(公共)
    app.post("/supplier/store/indexPage","shopInfo_getShopList");

    //店铺编辑修改保存(公共)
    app.post("/store/update","shopInfo_updateShops");

    app.post("/shop/selectAllProduct", "shopInfo_selectAllProduct");
}