Authored by weiqingting

Merge branch 'develop' into release/1.6

... ... @@ -5,25 +5,34 @@ var $ = require('jquery'),
var renderHd = false;
var g = new common.grid({
el: "#basicTable",
parms: function() {
return {
state: $('.state-select').find('.current').find('input').val()
}
},
columns: [{
display: '',
name: 'foler',
render: function(item) {
var html = '';
var html = "", top = true;
if (!renderHd) {
html += $('#tableHdTemp').html();
html += common.util.__template2($('#tableTemp').html(), item);
init(item);
renderHd = true;
} else {
html += common.util.__template2($('#tableTemp').html(), item);
}
} else {init(item)}
return html;
function init(item){
if(top){
html += "<div class='level-wrap clearfix'>";
top = false;
}else{
html += "<div class='level-wrap clearfix' style='display: none'>"
}
html += common.util.__template2($('#tableTemp2').html(), item);
if(item.items){
for(var i=0; i<item.items.length; i++){
init(item.items[i]);
}
}
html += "</div>";
}
}
}
]
... ... @@ -77,21 +86,17 @@ function savePosition(categoryId, orderBy){
//打开层级类目
$(document).on('click', '.folder', function() {
var $wrap = $(this).parent();
if (!$(this).hasClass('open')) {
if ($wrap.find('.level-2-wrap').size() > 0) {
$wrap.find('.level-2-wrap').show();
$(this).addClass('open');
} else if ($wrap.find('.level-3-wrap').size() > 0) {
$wrap.find('.level-3-wrap').show();
if ($wrap.find('> .level-wrap').size() > 0) {
var position = $(this).css("background-position");
var a = position.substring(0,position.indexOf("px"));
$wrap.find('> .level-wrap').show().find(".folder").css("background-position", (parseInt(a)+36) + "px");
$(this).addClass('open');
}
} else {
$(this).removeClass('open');
if ($wrap.find('.level-2-wrap').size() > 0) {
$wrap.find('.level-2-wrap').hide();
} else if ($wrap.find('.level-3-wrap').size() > 0) {
$wrap.find('.level-3-wrap').hide();
if ($wrap.find('.level-wrap').size() > 0) {
$wrap.find('.level-wrap').hide().find(".folder").removeClass('open').css("background-position", "12px center");
}
}
});
... ...
var Button = [
{
template_intro: "文本",
button_name:"文本",
dialog:"template_dialog_text",
data: {text: ""},
template_name: "text"
},
{
template_intro: "一张图",
template_intro: "一张图片",
button_name:"一张图",
dialog:"template_dialog_grid",
template_name: "singleImage",
data: [{
"url": {
... ... @@ -14,12 +17,13 @@ var Button = [
},
"alt": "",
"src": "",
"imgId": ""
"imgId": "0"
}]
},
{
template_intro: "添加小图",
button_name:"添加小图",
template_name: "smallPic",
dialog:"template_dialog_grid",
data: [{
"url": {
"action": "",
... ... @@ -27,7 +31,7 @@ var Button = [
},
"alt": "",
"src": "",
"imgId": ""
"imgId": "0"
}, {
"url": {
"action": "",
... ... @@ -35,11 +39,13 @@ var Button = [
},
"alt": "",
"src": "",
"imgId": ""
"imgId": "1"
}]
},
{
template_intro: "焦点图",
button_name:"焦点图",
dialog:"focus-template",
template_name: "focus",
data: [
{
... ... @@ -47,14 +53,15 @@ var Button = [
"alt": "",
"url": {},
"bgColor": "",
"imgId": "0"
}
],
focus_type: "1"
},
{
template_intro: "添加商品",
button_name:"添加商品",
template_name: "goods",
dialog:"template_dialog_goods",
data: [
// {
// src:"",
... ... @@ -63,8 +70,10 @@ var Button = [
]
},
{
template_intro: "推荐商品组",
template_intro: "添加商品组",
button_name:"添加商品组",
template_name: "goodsGroup",
dialog:"template_dialog_remgoods",
data: [
{
cover: {cover: "", maxSortId: ""},
... ... @@ -80,7 +89,9 @@ var Button = [
},
{
"template_name": "appIconList",
"template_intro": "图标入口",
button_name:"图标入口",
"template_intro": "图标",
dialog:"icon-template",
"data": [
{
"url": {
... ... @@ -94,8 +105,10 @@ var Button = [
]
},
{
template_intro: "推荐(1T-1L-4R)",
button_name:"推荐(1T-1L-4R)",
template_intro: "一张大图一个大的推荐和4个小图推荐",
template_name: "recommendContentOne",
dialog:"recommendContent-template",
"data": {
"title": {
"name": "",
... ... @@ -147,13 +160,23 @@ var Button = [
"action": "",
"url": ""
}
},
{
"src": "",
"title": "",
"url": {
"action": "",
"url": ""
}
}
]
}
},
{
template_intro: "推荐(1T-6F)",
button_name: "推荐(1T-6F)",
template_name: "recommendContentTwo",
template_intro: "一张大图和6个小图推荐",
dialog:"recommendContent-template",
"data": {
"title": {
"name": "",
... ... @@ -226,8 +249,10 @@ var Button = [
}
},
{
button_name: "标题广告",
"template_name": "singleNameImage",
"template_intro": "标题广告",
"template_intro": "带标题的图片广告",
dialog:"singleNameImage-template",
"data": {
"title": "",
"src": "",
... ... @@ -239,8 +264,10 @@ var Button = [
}
},
{
template_intro: "推荐(1T-12F)",
button_name: "推荐(1T-12F)",
template_intro: "一张大图12个小图推荐",
template_name: "recommendContentThree",
dialog:"recommendContent-template",
"data": {
"big_image": [
{
... ... @@ -353,18 +380,24 @@ var Button = [
}
},
{
button_name: "潮人搭配",
template_intro: "潮人搭配",
template_name: "trendsetterCollocation",
dialog:"noEdit-template",
data: {}
},
{
button_name: "潮品话题",
template_intro: "潮品话题",
template_name: "trendgoodsTopic",
dialog:"noEdit-template",
data: {}
},
{
button_name: "推荐品牌",
template_intro: "推荐品牌",
template_name: "appHotBrands",
dialog:"brands-template",
"data": {
"title": {
"title": ""
... ... @@ -374,8 +407,10 @@ var Button = [
}
},
{
button_name: "自定义品牌",
template_intro: "自定义品牌",
template_name: "customBrands",
dialog:"brands-template",
"data": {
"title": {
"title": "",
... ... @@ -386,22 +421,28 @@ var Button = [
}
},
{
button_name: "一个链接",
template_intro: "一个链接",
template_name: "link",
dialog:"template_dialog_link",
data: [
{"url": {"action": "", "url": ""}}
]
},
{
template_intro: "添加促销",
button_name: "添加促销",
template_intro: "促销专区",
template_name: "promotion",
dialog:"promotion-template",
data: {
"promotionId": ""
}
},
{
button_name: "轮播banner",
template_intro: "轮播banner",
template_name: "carouselBanner",
dialog:"carouselBanner-template",
"data": {
"speed": "",
"list": [
... ... @@ -413,8 +454,10 @@ var Button = [
}
},
{
button_name: "kids推荐品牌",
template_intro: "kids推荐品牌",
template_name: "kidsBrands",
dialog:"brands-template",
"data": {
"params": {
"param": "",
... ... @@ -430,8 +473,10 @@ var Button = [
}
},
{
button_name: "推荐(L1-RT1-RF2)",
template_intro: "推荐(L1-RT1-RF2)",
template_name: "recommendContentFour",
dialog:"recommendContentFour-template",
"data": {
"left": {
"title": "",
... ... @@ -478,8 +523,10 @@ var Button = [
}
},
{
button_name: "添加楼层",
template_intro: "添加楼层",
template_name: "addfloor",
dialog:"icon-template",
data: [
{
"url": {},
... ... @@ -491,8 +538,10 @@ var Button = [
]
},
{
template_intro: "推荐(标题 + 12张图)",
button_name: "推荐(标题 + 12张图)",
template_intro: "带标题的12个小图推荐",
template_name: "recommendContentFive",
dialog:"recommendContent-template",
data: {
"title": {
"title": "",
... ... @@ -599,13 +648,16 @@ var Button = [
}
},
{
template_intro: "文本导航",
button_name: "文本导航",
template_intro: "文本链接",
template_name: "textNav",
dialog:"textNav-template",
data: []
},
{
template_intro: "图片列表",
button_name:"图片列表",
template_name: "imageList",
dialog:"imageList-template",
"data": {
"title": {
"title": "",
... ... @@ -616,8 +668,10 @@ var Button = [
}
},
{
button_name:"标题标签",
template_intro: "标题标签",
template_name: "title",
dialog:"title-template",
"data": {
"title_name": "",
"more_name": "",
... ... @@ -637,8 +691,10 @@ var Button = [
}
},
{
button_name:"编辑推荐",
template_intro: "编辑推荐",
template_name: "editorTalk",
dialog:"editorTalk-template",
"data": {
"title": {
"title": "",
... ... @@ -648,8 +704,10 @@ var Button = [
}
},
{
button_name:"热门品类",
template_intro: "热门品类",
template_name: "hotCategory",
dialog:"hotCategory-template",
"data": {
"title": {
"name": "",
... ... @@ -750,8 +808,10 @@ var Button = [
}
},
{
template_intro: "有序焦点",
button_name:"有序焦点",
template_intro: "三张左图两张右图多张中间图",
template_name: "debrisSlider",
dialog:"debrisSlider-template",
"data": {
"big_image": [
{
... ... @@ -768,8 +828,10 @@ var Button = [
}
},
{
button_name:"新人专享",
template_intro: "新人专享",
template_name: "newUserFloor",
dialog:"newUserFloor-template",
data: {
"title": {
"name": "",
... ... @@ -793,8 +855,10 @@ var Button = [
}
},
{
template_intro: "图片广告",
button_name:"图片广告",
template_intro: "带标题的图片广告",
template_name: "imageGroup",
dialog:"imageGroup-template",
data: {
"title": "",
"more": "",
... ... @@ -814,8 +878,10 @@ var Button = [
}
},
{
template_intro: "自定义参数",
button_name:"自定义参数",
template_intro: "参数集合",
template_name: "paramsGroup",
dialog:"paramsGroup-template",
data: {
"title": "",
"more": "",
... ... @@ -829,17 +895,23 @@ var Button = [
}
},
{
button_name:"自定义参数图片",
template_intro: "自定义参数图片",
template_name: "",
dialog:"noEdit-template",
data: {}
},
{
button_name:"站内公告",
template_intro: "站内公告",
template_name: "announcement"
template_name: "announcement",
dialog:"noEdit-template"
},
{
button_name:"标题图片",
template_intro: "标题图片",
template_name: "titleImage",
dialog:"titleImage-template",
data: {
"title": "",
"more_name": "",
... ... @@ -857,8 +929,10 @@ var Button = [
}
},
{
button_name:"多标签图片",
template_intro: "多标签图片",
template_name: "multiLabelImage",
dialog:"multiLabelImage-template",
data: {
"label": [
{
... ... @@ -881,8 +955,10 @@ var Button = [
}
},
{
button_name:"搭配(2T-nF)",
template_intro: "搭配(2T-nF)",
template_name: "matchImage",
dialog:"matchImage-template",
data: {
"title": {
"name": "",
... ... @@ -934,11 +1010,13 @@ var Button = [
}
},
{
button_name:"领券频道",
"template_name": "getCoupon",
"template_intro": "领券频道",
dialog:"getCoupon-template",
"data": [
{
"title": "",
"title": "标题内容",
"isShow": "YES",
"image": {
"src": "",
... ... @@ -948,10 +1026,6 @@ var Button = [
}
},
"couponID": ""
//"goShopping":{
// "action": "",
// "url": ""
//}
}
]
}
... ...
/**
* Created by ty on 2016/4/15.
*/
var resourceObj = {
focus: function (data) {
initImgId(data);
},
appIconList:function(data) {
initImgId(data);
},
addfloor:function(data) {
initImgId(data);
},
imageList: function (data) {
initImgId(data.list);
}
};
var initImgId = function(list) {
for(var i = 0; i < list.length; i++) {
list[i].imgId = "" + i;
}
};
module.exports = resourceObj;
\ No newline at end of file
... ...
var $ = require('jquery'),
common = require('../common/common');
var Button = require('./partials/Button1');
var resourceObj = require('./partials/resourceObj');
/*获取数据*/
var ViewModel = {};
... ... @@ -19,45 +20,27 @@ var edit = new common.edit(".modal-body", {
bucket: "yhb-img01"
});
var tempArr = [];
tempArr["text"] = "template_dialog_text";
tempArr["singleImage"] = "template_dialog_grid";
tempArr["smallPic"] = "template_dialog_grid";
tempArr["focus"] = "focus-template";
tempArr["goods"] = "template_dialog_goods";
tempArr["goodsGroup"] = "template_dialog_remgoods";
tempArr["appIconList"] = "icon-template";
tempArr["recommendContentOne"] = "recommendContent-template";
tempArr["recommendContentTwo"] = "recommendContent-template";
tempArr["singleNameImage"] = "singleNameImage-template";
tempArr["recommendContentThree"] = "recommendContent-template";
tempArr["trendsetterCollocation"] = "noEdit-template";
tempArr["trendgoodsTopic"] = "noEdit-template";
tempArr["appHotBrands"] = "brands-template";
tempArr["customBrands"] = "brands-template";
tempArr["link"] = "template_dialog_link";
tempArr["promotion"] = "promotion-template";
tempArr["carouselBanner"] = "carouselBanner-template";
tempArr["kidsBrands"] = "brands-template";
tempArr["recommendContentFour"] = "recommendContentFour-template";
tempArr["addfloor"] = "icon-template";
tempArr["recommendContentFive"] = "recommendContent-template";
tempArr["textNav"] = "textNav-template";
tempArr["imageList"] = "imageList-template";
tempArr["title"] = "title-template";
tempArr["editorTalk"] = "editorTalk-template";
tempArr["hotCategory"] = "hotCategory-template";
tempArr["debrisSlider"] = "debrisSlider-template";
tempArr["newUserFloor"] = "newUserFloor-template";
tempArr["imageGroup"] = "imageGroup-template";
tempArr["paramsGroup"] = "paramsGroup-template";
tempArr["自定义参数图片"] = "noEdit-template";
tempArr["announcement"] = "noEdit-template";
tempArr["titleImage"] = "titleImage-template";
tempArr["multiLabelImage"] = "multiLabelImage-template";
tempArr["matchImage"] = "matchImage-template";
tempArr["getCoupon"] = "getCoupon-template";
/**
* 验证
*/
var Validate = {
"getCoupon": [
{
name: "couponID", fn: function () {
var couponID = $("couponID").val();
common.util.__ajax({
url: "/coupon/batchCheckCoupons",
data: {
params: couponID
}
}, function (res) {
console.log("res", res);
return "领券码不存在";
});
}
}
]
};
var Bll = {
Brands: [],
Brands1: {},
... ... @@ -68,16 +51,28 @@ var Bll = {
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
},
toast: function (index, module) {
var btn = Button.filter(function (item) {
return item.template_name == module.contentData.template_name;
});
if (Validate[module.contentData.template_name]) {
Validate[module.contentData.template_name].forEach(function (item) {
edit.on("validate", item.fn);
})
}
var d = new common.dialog({
title: (!!~index ? "修改" : "添加") + module.contentData.template_intro,
title: (!!~index ? "修改" : "添加") + btn[0].button_name,
//content: common.util.__template2($("#" + module.contentData.dialog).html(), module),
content: common.util.__template2($("#" + tempArr[module.contentData.template_name]).html(), module),
content: common.util.__template2($("#" + btn[0].dialog).html(), module),
width: '70%',
button: [{
value: "保存",
callback: function () {
if (edit.validate()) {
//TODO
if (resourceObj[module.contentData.template_name]){
resourceObj[module.contentData.template_name](module.contentData.data);
}
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
d.close();
... ... @@ -122,10 +117,12 @@ var Bll = {
});
for (var i in Brand) {
Brand[i].sort(function (a, b) {
var aName = a.brand_name.toLowerCase(),
bName = b.brand_name.toLowerCase();
if (aName < bName) return -1;
if (aName > bName) return 1;
if(a.brand_name && b.brand_name) {
var aName = a.brand_name.toLowerCase(),
bName = b.brand_name.toLowerCase();
if (aName < bName) return -1;
if (aName > bName) return 1;
}
return 0;
});
Bll.Brands.push({
... ... @@ -255,6 +252,12 @@ $(document).on("change", ".observe", function () {
});
});
var clickBtns = {
multiLabelImage:{
}
};
$(document).on("click", '#multiLabelImage-addImage', function () {
Bll.module.contentData.data.image.push({
"src": "",
... ... @@ -331,10 +334,10 @@ $(document).on("click", '#nav-addOne', function () {
$(document).on("click", '#coupon-addOne', function () {
var length = Bll.module.contentData.data.length;
if (length >= 4) {
alert("最多添加4个")
common.util.__tip("最多添加四条!","warning");
} else {
Bll.module.contentData.data.push({
"title": "",
"title": "标题内容",
"isShow": "YES",
"image": {
"src": "",
... ... @@ -347,7 +350,6 @@ $(document).on("click", '#coupon-addOne', function () {
});
Bll.renderDialog("getCoupon-template");
}
});
//获取品牌
Bll.getBrands();
... ... @@ -519,10 +521,6 @@ $(document).on("click", '.is_show_name', function () {
Bll.module.contentData.data.title.is_show_name = $(this).val();
Bll.renderDialog("imageList-template");
});
$(document).on("click", '.isShow_coupon', function () {
Bll.module.contentData.data.isShow = $(this).val();
Bll.renderDialog("getCoupon-template");
});
//*****************************************************************//
/*文本导航*/
$(document).on("click", '#textNav-addOne', function () {
... ... @@ -619,6 +617,8 @@ $(document).on("click", "#sub_btn", function () {
var action;
var url;
addSuffix(contentData);
delete contentData.button_name;
delete contentData.dialog;
if (contentData.template_name == "kidsBrands") {
action = contentData.data.params.more_url.action || "";
url = contentData.data.params.more_url.url || "";
... ... @@ -687,7 +687,7 @@ var goodsgird = new common.grid({
display: "产品图片",
render: function (item) {
if (item.images_url) {
item.images_url = common.util.__joinImg("goodsimg", item.images_url);
item.images_url = common.util.__joinImg("yhb-img01", item.images_url);
}
else {
item.images_url = "";
... ... @@ -730,8 +730,7 @@ $(document).on("click", "#goodsSelectBtn", function () {
Bll.module.contentData.data = goodsgird.selected.map(function (item, index) {
return {
src: item.images_url,
id: item.product_skn,
product_skc: item.product_skc
id: item.product_skn
}
});
// Bll.module.data=goodsgird.selected;
... ... @@ -765,7 +764,6 @@ $(document).on("click", ".goodsSelectBtn", function () {
Bll.module.contentData.data[index].list[i] = {
src: item.images_url,
id: item.product_skn,
product_skc: item.product_skc,
maxSortId: item.max_sort_id
};
if (!i) {
... ...
... ... @@ -41,8 +41,8 @@
width: 12.5%;
font-size: 13px;
border-left: 1px solid #ddd;
height: 104px;
line-height: 104px;
height: 50px;
line-height: 50px;
vertical-align: middle;
text-align: center;
... ... @@ -74,8 +74,8 @@
border-bottom: 1px solid #ddd;
span {
font-weight: bold;
height: 34px;
line-height: 34px;
height: 40px;
line-height: 40px;
&.operate {
line-height: 34px;
... ... @@ -97,28 +97,6 @@
}
.level-2-wrap {
.level-wrap {
.folder {
background-position: 36px center;
}
}
}
.level-3-wrap {
.level-wrap {
.folder {
background-position: 72px center;
}
}
}
.level-2-wrap, .level-3-wrap {
display: none;
}
.grid input.saleCategoryNumInput{
height: 40px;
width: 50px;
... ... @@ -130,5 +108,5 @@
}
.level-wrap input.saleCategoryNumInput{
margin: 32px auto;
margin: 5px auto;
}
... ...
... ... @@ -21,6 +21,7 @@ var config = {
//domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.120:8088/platform',//曹艳
//domain:'http://172.16.6.231:8080/platform',//王伟
//domain: 'http://172.16.6.239:8080', //孙杰翔
//domain:'http://172.16.6.189:8088/platform', //李健1
... ...
... ... @@ -3,6 +3,7 @@
* 模特管理
*/
exports.domain = require('../config/common.js').domain;
//exports.domain ='http://172.16.6.120:8088/platform';//曹艳
exports.res = [
//主界面
... ... @@ -70,5 +71,14 @@ exports.res = [
{name: 'avatar', type: 'string'},//头像
{name: 'modelCard', type: 'string'}//模特卡
]
},
//验证领券码
{
route: "/coupon/batchCheckCoupons",
method: "POST",
url: "/coupon/batchCheckCoupons",
params: [
{name: "params", type: "string"}
]
}
];
\ No newline at end of file
... ...
... ... @@ -3,10 +3,10 @@
* 资源管理路由
*/
//exports.domain = require('../config/common.js').domain;
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.115:8080/platform';//王伟
//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.domain = 'http://172.16.6.231:8080/platform';
//exports.domain = 'http://172.16.6.231:8080/platform';
exports.res = [
{
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://localhost:30012';
//exports.domain = 'http://172.16.6.243:8088/platform';
exports.domain = 'http://172.16.6.243:8088/platform';
//销售类目路由
exports.res = [{
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://localhost:30012';
//exports.domain = 'http://172.16.6.231:8080/platform';
exports.domain = 'http://172.16.6.231:8080/platform';
exports.res = [
{
... ...
... ... @@ -23,7 +23,7 @@
<div class="contentpanel">
<div class="panel panel-default" style="margin:10px 0;">
<div class="panel panel-default" style="margin:10px 0; display: none">
<div class="panel-body nopadding">
<div class="state-select">
<strong>状态:</strong>
... ... @@ -228,3 +228,20 @@
</div>
</script>
<script type="text/template" id="tableTemp2">
<span class="folder"></span>
<span>[[categoryId]]</span>
<span>[[categoryName]]</span>
<span>[[levelNumber]]级分类</span>
<span><img src="[[icon]]" alt=""></span>
<span class="orderby"> <input type="text" class="form-control saleCategoryNumInput" value="[[orderBy]]" categoryId="[[categoryId]]" /></span>
<span class="status">[[if state=="1"]]<b style="color: #449d44">开启</b> [[/if]][[if state=="0"]]<b style="color: #d9534f">关闭</b>[[/if]]</span>
<span class="operate" data-id="[[categoryId]]" data-name="[[categoryName]]">
<a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[categoryId]]">标签管理</a>
<a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
[[if state=="1"]]<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>[[/if]]
[[if state=="0"]]<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>[[/if]]
</span>
</script>
... ...
... ... @@ -45,7 +45,7 @@
<!-- 按钮 -->
<script type="text/template" id="template_content_btns">
[[each btns as btn index]]
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.template_intro]]</a></li>
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.button_name]]</a></li>
[[/each]]
</script>
... ...
... ... @@ -21,28 +21,29 @@
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src"/>
</td>
<td>
<div class="col-sm-12">
<select name="goTo" class="col-sm-4 observe" value="[[item.url.action]]"
<div class="form-group col-sm-12">
<select name="goTo" class="form-control observe" value="[[item.url.action]]"
data-field="[[index]].url.action">
[[layout action_template]]
</select>
<div class="col-sm-1"></div>
<input value="[[item.url.url]]" class=" col-sm-4 observe" required="required"
</div>
<div class="form-group col-sm-12">
<input value="[[item.url.url]]" class="form-control observe" required="required"
data-field="[[index]].url.url" placeholder="图片链接"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
<div class="col-sm-12">
<input value="[[item.alt]]" class="col-sm-4 observe" required="required"
<div class="form-group col-sm-12">
<input value="[[item.alt]]" class="form-control observe" required="required"
data-field="[[index]].alt" placeholder="图片描述"/>
<div class="col-sm-1"></div>
[[if contentData.template_name=='addfloor']]
<input value="[[item.altEn]]" class="col-sm-4 observe" required="required"
data-field="list.[[index]].altEn" placeholder="英文描述"/>
[[/if]]
</div>
[[if contentData.template_name=='addfloor']]
<div class="form-group col-sm-12">
<input value="[[item.altEn]]" class="form-control observe" required="required"
data-field="[[index]].altEn" placeholder="英文描述"/>
</div>
[[/if]]
</td>
<td>
<a class="btn btn-danger" id="icon-delOne" data_index="[[index]]">删除</a>
... ... @@ -59,13 +60,16 @@
<script type="text/template" id="brands-template">
<div class="rows">
[[if contentData.template_name=='appHotBrands']]
<div class="form-group col-sm-12">
<div class="form-group">
<label class="col-sm-1 control-label">标题</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.title.title]]"
data-field="title.title" placeholder="推荐品牌">
<div class="col-sm-4">
<input class="form-control observe" type="text" value="[[contentData.data.title.title]]"
data-field="title.title" placeholder="推荐品牌">
</div>
<label class="col-sm-1 control-label">显示名称</label>
<div class="col-sm-2 is_show_name_brand">
<div class="col-sm-4 is_show_name_brand ">
<label style="cursor: pointer;"><input type="radio" name="is_show_name" value="Y"></label>
<label style="cursor: pointer;"><input type="radio" name="is_show_name" value="N"></label>
</div>
... ... @@ -73,46 +77,80 @@
</div>
[[/if]]
[[if contentData.template_name=='customBrands']]
<div class="form-group col-sm-12">
<div class="form-group ">
<label class="col-sm-1 control-label">标题</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.title.title]]"
data-field="title.title" placeholder="自定义品牌">
<div class="col-sm-4">
<input class="form-control observe" type="text" value="[[contentData.data.title.title]]"
data-field="title.title" placeholder="自定义品牌">
</div>
</div>
<div class="form-group ">
<label class="col-sm-1 control-label">附加参数</label>
<select class="col-sm-2 observe" value="[[contentData.data.title.param]]" data-field="title.param">
[[layout parm1_template]]
</select>
<div class="col-sm-4">
<select class="form-control observe" value="[[contentData.data.title.param]]" data-field="title.param">
[[layout parm1_template]]
</select>
</div>
<label class="col-sm-2 control-label">附加参数值</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.title.param_value]]"
data-field="title.param_value" placeholder="附加参数值">
<div class="col-sm-4">
<input class="form-control observe" type="text" value="[[contentData.data.title.param_value]]"
data-field="title.param_value" placeholder="附加参数值">
</div>
</div>
[[/if]]
[[if contentData.template_name=='kidsBrands']]
<div class="form-group col-sm-12">
<div class="form-group ">
<label class="col-sm-1 control-label">标题</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.params.title]]"
data-field="params.title">
<div class="col-sm-4 ">
<input class="form-control observe" type="text" value="[[contentData.data.params.title]]"
data-field="params.title">
</div>
</div>
<div class="form-group ">
<label class="col-sm-1 control-label">分类</label>
<select class="col-sm-2 observe" value="[[contentData.data.params.param]]" data-field="params.param">
[[layout parm2_template]]
</select>
<div class="col-sm-4 ">
<select class="form-control observe" value="[[contentData.data.params.param]]"
data-field="params.param">
[[layout parm2_template]]
</select>
</div>
<label class="col-sm-1 control-label">附加参数值</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.params.paramValue]]"
data-field="params.paramValue" placeholder="附加参数值">
<div class="col-sm-4 ">
<input class="form-control observe" type="text" value="[[contentData.data.params.paramValue]]"
data-field="params.paramValue" placeholder="附加参数值">
</div>
</div>
<div class="form-group col-sm-12">
<div class="form-group ">
<label class="col-sm-1 control-label">更多名称</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.params.more]]"
data-field="params.more" placeholder="更多名称">
<div class="col-sm-4 ">
<input class="form-control observe" type="text" value="[[contentData.data.params.more]]"
data-field="params.more" placeholder="更多名称">
</div>
</div>
<div class="form-group ">
<label class="col-sm-1 control-label">跳转目的</label>
<select name="goTo" class="col-sm-2 observe" value="[[contentData.data.params.more_url.action]]"
data-field="params.more_url.action">
[[layout action_template]]
</select>
<div class="col-sm-4 ">
<select name="goTo" class="form-control observe" value="[[contentData.data.params.more_url.action]]"
data-field="params.more_url.action">
[[layout action_template]]
</select>
</div>
<label class="col-sm-1 control-label">链接</label>
<input value="[[contentData.data.params.more_url.url]]" class="col-sm-2 observe" required="required"
data-field="params.more_url.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
<div class="col-sm-4 ">
<input value="[[contentData.data.params.more_url.url]]" class="form-control observe" required="required"
data-field="params.more_url.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
[[/if]]
</div>
... ... @@ -129,17 +167,20 @@
<tbody>
[[each contentData.data.list as item index]]
<tr>
<td><input type="file" name="file" value="[[item.src]]" class="observe"
<td>
<input type="file" name="file" value="[[item.src]]" class="observe"
data-field="list.[[index]].src"/>
</td>
<td>
[[if contentData.template_name=='kidsBrands']]
title:<input class="col-sm-8 observe" type="text" value="[[item.title]]"
data-field="list.[[index]].title">
[[else]]
name:<input class="col-sm-8 observe" type="text" value="[[item.name]]"
data-field="list.[[index]].name">
[[/if]]
<div class="form-group">
[[if contentData.template_name=='kidsBrands']]
<input class="form-control observe" type="text" value="[[item.title]]"
data-field="list.[[index]].title">
[[else]]
<input class="form-control observe" type="text" value="[[item.name]]"
data-field="list.[[index]].name">
[[/if]]
</div>
</td>
<td>
<a class="btn btn-danger" id="remove_brand" data_index="[[index]]">删除</a>
... ... @@ -192,25 +233,39 @@
<!-- 9-1 标题标签 -->
<script type="text/template" id="title-template">
<div class="rows">
<div class="form-group col-sm-12">
<div class="form-group ">
<label class="col-sm-1 control-label">标题名称</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.title_name]]"
data-field="title_name">
<div class="col-sm-4">
<input class="form-control observe" type="text" value="[[contentData.data.title_name]]"
data-field="title_name">
</div>
<label class="col-sm-1 control-label">更多名称</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.more_name]]"
data-field="more_name">
<div class="col-sm-4">
<input class="form-control observe" type="text" value="[[contentData.data.more_name]]"
data-field="more_name">
</div>
</div>
<div class="form-group col-sm-12">
<label class="col-sm-1 control-label">跳转目的</label>
<select name="goTo" class="col-sm-2 observe" value="[[contentData.data.more_link.action]]"
data-field="more_link.action">
[[layout action_template]]
</select>
<div class="col-sm-4">
<select name="goTo" class="form-control observe" value="[[contentData.data.more_link.action]]"
data-field="more_link.action">
[[layout action_template]]
</select>
</div>
<label class="col-sm-1 control-label">链接</label>
<input value="[[contentData.data.more_link.url]]" class="col-sm-2 observe" required="required"
data-field="more_link.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
<div class="col-sm-4">
<input value="[[contentData.data.more_link.url]]" class="form-control observe" required="required"
data-field="more_link.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
</div>
<div class="panel-body">
... ... @@ -230,18 +285,21 @@
[[index+1]]
</td>
<td>
<input value="[[item.name]]" class="col-sm-6 observe" required="required"
data-field="nav.[[index]].name" placeholder="标签名称"/>
<div class="form-group">
<input value="[[item.name]]" class="form-control observe" required="required"
data-field="nav.[[index]].name" placeholder="标签名称"/>
</div>
</td>
<td>
<div class="col-sm-12">
<select name="goTo" class="col-sm-4 observe" value="[[item.url.action]]"
<div class="form-group">
<select name="goTo" class="form-control observe" value="[[item.url.action]]"
data-field="nav.[[index]].url.action">
[[layout action_template]]
</select>
<div class="col-sm-1"></div>
<input value="[[item.url.url]]" class=" col-sm-4 observe" required="required"
</div>
<div class="form-group">
<input value="[[item.url.url]]" class=" form-control observe" required="required"
data-field="nav.[[index]].url.url" placeholder="链接"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
... ... @@ -255,14 +313,13 @@
<a href="JavaScript:;" id="nav-addOne" class="btn btn-primary btn-xs">添加一个</a>
</div>
</script>
<!-- 添加图标、楼层 -->
<!-- 领券频道 -->
<script type="text/template" id="getCoupon-template">
<div class="panel-body">
<div>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>标题内容</th>
<th>图片</th>
<th>选项</th>
</tr>
... ... @@ -272,30 +329,16 @@
<tr>
<td>
<div class="form-group">
<input value="[[item.title]]" class="form-control observe" required="required"
data-field="[[index]].title" placeholder="标题内容"/>
</div>
</td>
<td>
<div class="form-group">
<input type="file" name="file" value="[[item.image.src]]" class="form-control observe"
data-field="[[index]].image.src"/>
</div>
</td>
<td>
<div class="form-group">
<div class="isShow_coupon form-control">
<label style="cursor: pointer;"><input type="radio" name="isShow" value="YES"></label>
<label style="cursor: pointer;"><input type="radio" name="isShow" value="NO"></label>
</div>
<input type="hidden" id="isShow_coupon" value="[[contentData.data.isShow]]" for="radio"/>
</div>
<div class="form-group">
<input value="[[item.couponID]]" class="form-control observe" required="required"
data-field="[[index]].couponID" placeholder="码"/>
<input value="[[item.couponID]]" id="couponID" class="form-control observe" required="required"
data-field="[[index]].couponID" placeholder="领券码"/>
<p style="color:#999;margin-top: 5px;">多个以英文逗号隔开</p>
<p style="color:#999;margin-top: 5px;">多个领券码以英文逗号隔开</p>
</div>
<div class="form-group">
<select name="goTo" class="form-control observe" value="[[item.image.url.action]]"
... ...
... ... @@ -443,7 +443,7 @@
<table style="width:100%;z-index:-1;">
<tbody>
<tr>
<td width="100px">标题:<input class="abc" type="text" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td>
<td width="100px">标题:<input type="text" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td>
<td>参数:<input type="text" style="width:300px;" class="observe" value="[[item.params]]" data-field="list.[[index]].params"></td>
<td><button class="btn btn-danger btn-sm paramsGroupDel" type="button" data-index="[[index]]">删除</button></td>
</tr>
... ...
... ... @@ -5,17 +5,22 @@
</div>
</div>
[[else if module.contentData.template_name=='appIconList']]
<div class="app_icon_list">
<ul class="icon-list clearfix">
[[each module.contentData.data as item index]]
<li style="width:75px; float:left;margin-left:5px;"><img src="[[item.src]]"></li>
[[/each]]
</ul>
<div>
<div class="row title">[[module.contentData.template_intro]]</div>
<div class="app_icon_list">
<ul class="icon-list clearfix">
[[each module.contentData.data as item index]]
<li style="width:75px; float:left;margin-left:5px;"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
[[else if module.contentData.template_name=='recommendContentOne']]
<div class="recommend_content_one">
<div class="recommend-info">
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a></p>
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
</p>
<p class="big-pic"><img src="[[module.contentData.data.big_image[0].src]]"></p>
<ul class="small-pic">
[[each module.contentData.data.list as item index]]
... ... @@ -27,7 +32,9 @@
[[else if module.contentData.template_name=='recommendContentTwo']]
<div class="recommend_content_two">
<div class="recommend-info">
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a></p>
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
</p>
<p class="big-pic"><img src="[[module.contentData.data.big_image[0].src]]"></p>
<ul class="small-pic">
[[each module.contentData.data.list as item index]]
... ... @@ -39,7 +46,8 @@
[[else if module.contentData.template_name=='singleNameImage']]
<div class="single_name_image">
<div class="single-info">
<span class="title" style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title]]</span>
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title]]</span>
<img src="[[module.contentData.data.src]]" style="width:100%">
</div>
</div>
... ... @@ -79,7 +87,7 @@
</div>
[[else if module.contentData.template_name=='appHotBrands']]
<div class="custom-pic">
<div class="hot-brand-title row title" >[[module.contentData.data.title.title]]</div>
<div class="hot-brand-title row title">[[module.contentData.data.title.title]]</div>
<ul class="custom-pic clearfix">
[[each module.contentData.data.list as item index]]
<li><img src="[[item.src]]" class="custom-pic-img" style="margin:2px;"></li>
... ... @@ -117,6 +125,7 @@
<div class="recommend-info">
<div class="left" style="width:50%;float:left">
<img src="[[module.contentData.data.left.list[0].src]]" width="100%" height="200">
<p class="left_title">[[module.contentData.data.left.title]]</p>
</div>
<div class="right" style="width:50%;float:left">
... ... @@ -130,6 +139,7 @@
</div>
</div>
[[else if module.contentData.template_name=='addfloor']]
<div class='row title'>[[module.contentData.template_intro]]</div>
<div class="app_icon_list">
<ul class="icon-list clearfix">
[[each module.contentData.data as item index]]
... ... @@ -140,7 +150,8 @@
[[else if module.contentData.template_name=='recommendContentFive']]
<div class="recommend_content_five">
<div class="recommend-info">
<span class="title" style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title.title]]</span>
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title.title]]</span>
<ul class="small-pic">
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]"><img src="[[item.src]]"></li>
... ... @@ -154,21 +165,25 @@
</div>
[[else if module.contentData.template_name=='imageList']]
<div class="custom-pic">
<div class="hot-brand-title" style="margin:0px auto; text-align:center;">[[module.contentData.data.title.title]]</div>
<div class="hot-brand-title" style="margin:0px auto; text-align:center;">[[module.contentData.data.title.title]]
</div>
<ul class="custom-pic clearfix image-list-box resource-row li[[module.contentData.data.title.column_num]]">
[[each module.contentData.data.list as item index]]
<li><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
[[else if module.contentData.template_name=='标题标签']]
[[else if module.contentData.template_name=='title']]
<div class="custom-pic">
<div class="list">
<img src="/js/source/plugins/title/bigPic.jpg" width="96%">
</div>
</div>
[[else if module.contentData.template_name=='editorTalk']]
<div class="editorTalk_content">
<div class="editor-info">
<span class="title" style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title.title]]</span>
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title.title]]</span>
<ul class="nav nav-tabs">
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]">
... ... @@ -197,7 +212,8 @@
<li><img width="80px" height="76px" src="[[item.src]]"></li>
[[/each]]
</ul>
<div style="float:left;width:160px;"><img width="160px" height="180px" src="[[module.contentData.data.big_image[0].src]]"></div>
<div style="float:left;width:160px;"><img width="160px" height="180px"
src="[[module.contentData.data.big_image[0].src]]"></div>
<ul style="float:left;width:80px;">
[[each module.contentData.data.right as item index]]
<li><img width="80px" height="76px" src="[[item.src]]"></li>
... ... @@ -208,7 +224,9 @@
[[else if module.contentData.template_name=='newUserFloor']]
<div class="new_user_floor">
<div class="user_floor">
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a></p>
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
</p>
<p class="banner-pic"><img src="[[module.contentData.data.banner_image[0].src]]" width="96%"></p>
</div>
</div>
... ... @@ -234,7 +252,8 @@
[[else if module.contentData.template_name=='titleImage']]
<div class="editorTalk_content">
<div class="editor-info">
<span class="title" style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title]]</span>
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title]]</span>
<img src="[[module.contentData.data.image.src]]" style="width:99%">
</div>
</div>
... ... @@ -262,3 +281,11 @@
</div>
</div>
[[else if module.contentData.template_name=='getCoupon']]
<div class="getCoupon">
<div class='row title'>[[module.contentData.template_intro]]</div>
<div class='row'>
[[each module.contentData.data as item index]]
<div class='col-sm-6 matchImage'><img src="[[item.image.src]]"></div>
[[/each]]
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -76,7 +76,7 @@
[[each contentData.data as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" /></td>
<td><input type="file" name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" required/></td>
<td>
<div class="form-group">
<div class="col-sm-10">
... ...