operations.search.js 4.11 KB
/**
 * Created by ty on 2017/02/07.
 * 搜索广告管理
 */

module.exports=function(app) {

    app.get("/search/postionIndex","operations.search.postionIndex", function () {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "搜索广告位置"
        }
    });
    app.post("/operations/search/getPositionList","operationsSearch_getPositionList");
    app.post("/operations/search/updatePositionInfo","operationsSearch_updatePositionInfo");
    app.post("/operations/search/selectPostionById","operationsSearch_selectPostionById");
    app.post("/operations/search/insertPositionInfo","operationsSearch_insertPositionInfo");
    app.post("/operations/search/queryPositionListForDown","operationsSearch_queryPositionListForDown");

    app.get("/search/templetIndex","operations.search.templetIndex", function () {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "搜索广告模板"
        }
    });
    app.get("/search/templetEdit/:id","operations.search.templetEdit", "operationsSearch_selectTempletById", function (rs,req,res) {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "修改广告模板",
            action: '/operations/search/updateTempletInfo',
            data:rs.data
        }
        return rs.data;
    });
    app.get("/search/templetAdd", "operations.search.templetEdit", "operationsSearch_selectTempletById", function (rs,req,res){
        this.$extend = {
            moduleName: "运营管理",
            pageName: "新增广告模板",
            action: '/operations/search/insertTemplet',
            data: rs.data
        }
        return rs.data;
    });
    app.post("/operations/search/getTempletList","operationsSearch_getTempletList");
    app.post("/operations/search/updateTempletInfo","operationsSearch_updateTempletInfo");
    app.post("/operations/search/selectTempletById","operationsSearch_selectTempletById");
    app.post("/operations/search/updateTempletStatus","operationsSearch_updateTempletStatus");
    app.post("/operations/search/insertTemplet","operationsSearch_insertTemplet");
    app.post("/operations/search/queryTempletListForDown","operationsSearch_queryTempletListForDown");


    app.get("/search/bannerIndex","operations.search.bannerIndex", function () {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "搜索广告管理"
        }
    });
    app.get("/search/bannerEdit/:id","operations.search.bannerEdit", "operationsSearch_selectBannerById", function (rs,req,res) {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "修改搜索广告管理",
            action: '/operations/search/updateBannerInfo',
            data:rs.data
        }
        return rs.data;
    });
    app.get("/search/bannerAdd", "operations.search.bannerEdit", "operationsSearch_selectBannerById", function (rs,req,res){
        this.$extend = {
            moduleName: "运营管理",
            pageName: "新增搜索广告管理",
            action: '/operations/search/insertBanner',
            data: rs.data
        }
        return rs.data;
    });
    app.post("/operations/search/getBannerList","operationsSearch_getBannerList");
    app.post("/operations/search/delBannerById","operationsSearch_delBannerById");
    app.post("/operations/search/updateBannerInfo","operationsSearch_updateBannerInfo");
    app.post("/operations/search/selectBannerById","operationsSearch_selectBannerById");
    app.post("/operations/search/updateBannerStatus","operationsSearch_updateBannerStatus");
    app.post("/operations/search/insertBanner","operationsSearch_insertBanner");
    app.post("/operations/search/queryAllStyle","operationsSearch_queryAllStyle");
    app.post("/operations/search/querySortBySortId","operationsSearch_querySortBySortId");

    app.get("/search/bannerView/:id", "operations.search.bannerView", "operationsSearch_selectBannerById", function (rs,req,res){
        this.$extend = {
            moduleName: "运营管理",
            pageName: "预览广告模板",
            data: rs.data
        }
        return rs.data;
    });
}