...
|
...
|
@@ -5,6 +5,8 @@ var resourceObj = require('./../partials/resourceObj'); |
|
|
var Validate = require('./../partials/Validate1');
|
|
|
var addObj = require('./../partials/addObj');
|
|
|
require('../../../common/util/datepicker');
|
|
|
|
|
|
|
|
|
var Button = [];
|
|
|
/*获取数据*/
|
|
|
var resources = [];
|
...
|
...
|
@@ -19,6 +21,9 @@ var code; |
|
|
var param = location.href.substring(location.href.lastIndexOf("/") + 1);
|
|
|
if(param==0){
|
|
|
code = location.href.substring(location.href.lastIndexOf("code_")+5,location.href.lastIndexOf("platform_")-1);
|
|
|
}else if(param.indexOf("#")!=-1){
|
|
|
param = param.substring(0,param.length-1);
|
|
|
console.log("param=====",param);
|
|
|
}
|
|
|
//0:查看1:编辑
|
|
|
var lock_type = location.href.substring(location.href.lastIndexOf("/")-1,location.href.lastIndexOf("/"));
|
...
|
...
|
@@ -52,6 +57,8 @@ if(param!=0){ |
|
|
var val = originButton[i];
|
|
|
Button.push(val);
|
|
|
}
|
|
|
|
|
|
|
|
|
if(lock_type==1){
|
|
|
common.util.__ajax({
|
|
|
url: "/resources/updateLock",
|
...
|
...
|
@@ -501,8 +508,9 @@ for(var i = 0; i < resources.length; i++) { |
|
|
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
|
|
|
|
|
|
/*第四部 操作按钮 添加 删除 修改*/
|
|
|
var Button_content = [];
|
|
|
$(document).on("click", ".add_btn", function () {
|
|
|
var item = Button[$(this).data("index")];
|
|
|
var item = Button_content[$(this).data("index")];
|
|
|
Bll.module = {};
|
|
|
Bll.module.contentData = $.extend(true, {}, item);
|
|
|
Bll.toast(-1, Bll.module);
|
...
|
...
|
@@ -2101,3 +2109,53 @@ function changeGuangRqDivShow(guangFlag){ |
|
|
$(".guangRqSysShow").css('display','none');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var BT = [];
|
|
|
|
|
|
BT.push({
|
|
|
"channel":"app",
|
|
|
"buttonNames":['focus','newUserFloor','newSingleImage','twoPicture','newProductListFloor','popularListFloor','findGoodsListFloor','imageListFloor','recommendContentFive','limitSaleListFloor','editorTalk','shopActivityListFloor','shopFloor','tabFloor','textNav','tfGoodsList','recommendGoodsGroup','guangRqFloor','guangShowOrderFloor','timeImage']
|
|
|
});
|
|
|
BT.push({
|
|
|
"channel":"pc",
|
|
|
"buttonNames":['recommendContentThree','text','singleImage','smallPic','focus','addfloor','textNav','hotCategory','link','appIconList','goods']
|
|
|
});
|
|
|
BT.push({
|
|
|
"channel":"h5",
|
|
|
"buttonNames":['focus','appIconList','divideImage','singleImage','recommendContentFive','appHotBrands','popularSingleProduct','newUserFloor']
|
|
|
});
|
|
|
BT.push({
|
|
|
"channel":"miniapp",
|
|
|
"buttonNames":['focus','recommendContentFive','imageListFloor','newSingleImage','newProductListFloor','popularListFloor']
|
|
|
});
|
|
|
BT.push({
|
|
|
"channel":"blk",
|
|
|
"buttonNames":['newSingleImage','blkNewProductFloor','twoPicture','focus','recommendContentFive','textNav','tfGoodsList','blkCategory']
|
|
|
});
|
|
|
$(document).on("click", ".button-type a", function() {
|
|
|
Button_content = [];
|
|
|
var channel = $(this).data("channel");
|
|
|
if(channel=='all'){
|
|
|
Button_content = originButton;
|
|
|
Bll.__render(".contents", "template_content_btns", {btns: originButton});
|
|
|
}else{
|
|
|
|
|
|
for(var i = 0; i < BT.length; i++) {
|
|
|
if(BT[i].channel==channel){
|
|
|
var buttonNames = BT[i].buttonNames;
|
|
|
for(var t=0;t<originButton.length;t++){
|
|
|
if(buttonNames.indexOf(originButton[t].template_name)>-1){
|
|
|
Button_content.push(originButton[t]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
Bll.__render(".contents", "template_content_btns", {btns: Button_content});
|
|
|
}
|
|
|
$(".button-type").removeClass("active");
|
|
|
$(".button-type a").each(function(index) {
|
|
|
if($(this).data("channel") == channel) {
|
|
|
$(this).parent().addClass("active");
|
|
|
}
|
|
|
});
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|