Authored by 陶雨

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

Conflicts:
	client/js/sourceManage/resourceContentManage.js
... ... @@ -135,7 +135,6 @@ grid.prototype = {
var g = this,
p = this.options;
if (pagination.total > 1) {
g.pagination.pagination({
items: pagination.total,
itemsOnPage: 5,
... ... @@ -150,7 +149,6 @@ grid.prototype = {
return false;
}
});
}
},
renderHead: function() {
... ...
... ... @@ -22,11 +22,27 @@ function batchExport(el, type) {
},
onComplete: function(response) {
console.log(response);
if (loadModal) {
loadModal.close();
}
if (response.code == 200) {
var failFileReason = response.data['failFileReason'];
// 有数据导入失败
if(failFileReason.length) {
var htmlStr = "";
//for(var item in failFileReason) {
for(var i = 0; i < failFileReason.length; i++){
htmlStr += '<p style="color:red;">"'+failFileReason[i]+'"</p>';
}
htmlStr += '<h2 style="color:red;">请修改后重新上传</h2>';
$('.result').html(htmlStr);
} else {
$('.result').html("");
common.util.__tip(response.message, 'success');
}
} else {
common.util.__tip(response.message, 'warning');
}
... ...
... ... @@ -8,7 +8,7 @@ var param = location.href.slice(location.href.indexOf("contentEdit")).match(/\/\
if(param&&param.length==1){
param[0]=param[0].replace(/\//,'');
common.util.__ajax({
url:'/guang/article/getArticleDetail',
url:'/guang/article/getDetail',
data:{
id:param[0]
},
... ... @@ -25,6 +25,8 @@ var components = new common.components(".modal-body", {
});
var Bll = {
d:null,
moduleimgs:[],
Brands: [],
Brands1: {},
Brdata: [],
... ... @@ -97,7 +99,7 @@ var Bll = {
}
});
}
var d = new common.dialog({
Bll.d = new common.dialog({
title: (!!~index ? "修改" : "添加") + module.contentData.template_intro,
content: common.util.__template2($("#" + module.contentData.dialog).html(), module),
width: '70%',
... ... @@ -109,7 +111,7 @@ var Bll = {
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
d.close();
Bll.d.close();
}
return false;
... ... @@ -148,10 +150,7 @@ var Bll = {
//获取品牌
Bll.getBrands();
$(document).on('click', '.brand-index', function() {
var brandIndex = $(this).text();
$('.brand-wrap').find('[name="' + brandIndex + '"]').show().siblings().hide();
});
/*渲染页面*/
ViewModel.coverImage=(ViewModel.coverImage||"").replace(/(gif|png|jpg|jpeg)\?[^"]*/g,'$1');
Bll.__render("#panel-body","tempalte1",ViewModel);
... ... @@ -441,7 +440,7 @@ var goodsgird = new common.grid({
});
//搜索按钮
$(document).on("click", "#search", function() {
goodsgird.reload();
goodsgird.reload(1);
});
//点击“选择标签”按钮(添加商品)
$(document).on("click", "#goodsSelectBtn", function () {
... ... @@ -646,6 +645,92 @@ $(document).on("click","#brandAutoBtn",function(){
}
});
/*上传多张图片*/
$(document).on("click","#imgsSelectBtn",function(){
Bll.d.close();
Bll.moduleimgs.length=0;
var components = new common.components("#moduleimgs", {
bucket: "goodsimg"
});
new common.dialog({
title: "添加多张"+Bll.module.contentData.template_intro,
content: common.util.__template2($("#template_dialog_imgmodule").html(),{}),
width: '80%',
button: [{
value: "确定",
callback: function () {
if(Bll.module.contentData.template_name=="singleImage"){
var button = Button[1];
Bll.moduleimgs.forEach(function(item,index){
var m={templateKey:button.template_name};
m.contentData = $.extend(true, {}, button);
m.contentData.data[0].src=item;
Bll.contentDatas.push(m);
});
}else{
var button = Button[2];
//多张
var imgs=[];
Bll.moduleimgs.forEach(function(item,index){
imgs.push(item);
if(imgs.length==2){
var m={templateKey:button.template_name};
m.contentData = $.extend(true, {}, button);
m.contentData.data[0].src=imgs[0];
m.contentData.data[1].src=imgs[1];
Bll.contentDatas.push(m);
imgs.length=0;
}
});
if(imgs.length>0){
var m={templateKey:button.template_name};
m.contentData = $.extend(true, {}, button);
m.contentData.data[0].src=imgs[0];
Bll.contentDatas.push(m);
imgs.length=0;
}
}
Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
},
css: "btn-primary"
}]
});
components.init();
components.on("file_onComplete", function(obj) {
Bll.moduleimgs.push(obj.datas);
Bll.__render(".modal-body","template_dialog_imgmodule",{datas:Bll.moduleimgs});
components.init();
});
});
/*点击品牌切换*/
$(document).on('click', '.brand-index', function() {
var brandIndex = $(this).text();
$('.brand-wrap').find('[name="' + brandIndex + '"]').show().siblings().hide();
});
$(document).on("focus","#brandsearch",function(){
$('.brand-wrap').find('[name="brandsearch"]').show().siblings().hide();
});
$(document).on("keyup","#brandsearch",function(){
var txt=$(this).val();
var regex = new RegExp(txt);
var bs=[];
Bll.Brands.forEach(function(brands){
brands.items.forEach(function(item){
if(regex.test(item.brand_name)){
bs.push('<a class="btn"><input type="checkbox" value="'+item.id+'" name="brandCheckBox"><label>'+item.brand_name+'</label></a>');
}
});
});
$("#brandsearchwrap").html(bs.join(''));
var e = new common.edit("#brandForm");
e.init();
});
//拖拽
$(document).on("mouseover",".dragItem",function(){
var drag = new common.drag("#add-content", Bll.contentDatas, function(data){
... ...
... ... @@ -31,6 +31,49 @@ var g = new common.grid({
g.init($("#gridurl").val());
//编辑排序
$(document).on('change', '.saleCategoryNumInput', function() {
if(checkNumInput($(this))){
$(this).removeClass("errorNumInput");
var categoryId = $(this).attr("categoryId");
var orderBy = $(this).val();
savePosition(categoryId,orderBy);
}
});
//排序框校验
function checkNumInput(inputObj){
if(inputObj.val()){
if(!isNaN(inputObj.val())){
if(inputObj.val() < 0){
inputObj.focus().select().addClass("errorNumInput");
common.util.__tip("排序数字请大于等于0!");
return false;
}
}else{
inputObj.focus().select().addClass("errorNumInput");
common.util.__tip("排序必须为数字!");
return false;
}
}else{
inputObj.focus().addClass("errorNumInput");
common.util.__tip("排序不能为空!");
return false;
}
return true;
}
//排序实时保存
function savePosition(categoryId, orderBy){
common.util.__ajax({
url:'/sale/salesCategory/updateSC',
data: {
"categoryId": categoryId,
"orderBy": orderBy
}
},function(rs){
common.util.__tip("排序保存成功!","success");
},true);
}
//打开层级类目
$(document).on('click', '.folder', function() {
var $wrap = $(this).parent();
... ... @@ -51,8 +94,6 @@ $(document).on('click', '.folder', function() {
$wrap.find('.level-3-wrap').hide();
}
}
});
var e = null,
... ...
... ... @@ -27,6 +27,12 @@ var g = new common.grid({
return EMUN.status[item.status];
}
}, {
display: '排序',
name: 'position',
render: function(item) {
return "<input class='form-control saleCategoryNumInput' type=text name='position' value='"+ item.orderBy +"' _id='"+ item.id +"' />";
}
}, {
display: '操作',
name: '',
render: function(item) {
... ... @@ -42,6 +48,49 @@ var g = new common.grid({
g.init('/sale/salesCategoryLabel/querySCLabelList');
//编辑排序
$(document).on('change', '.saleCategoryNumInput', function() {
if(checkNumInput($(this))){
$(this).removeClass("errorNumInput");
var id = $(this).attr("_id");
var orderBy = $(this).val();
savePosition(id,orderBy);
}
});
//排序框校验
function checkNumInput(inputObj){
if(inputObj.val()){
if(!isNaN(inputObj.val())){
if(inputObj.val() < 0){
inputObj.focus().select().addClass("errorNumInput");
common.util.__tip("排序数字请大于等于0!");
return false;
}
}else{
inputObj.focus().select().addClass("errorNumInput");
common.util.__tip("排序必须为数字!");
return false;
}
}else{
inputObj.focus().addClass("errorNumInput");
common.util.__tip("排序不能为空!");
return false;
}
return true;
}
//排序实时保存
function savePosition(id, orderBy){
common.util.__ajax({
url:'/sale/salesCategoryLabel/updateSCLabel',
data: {
"id": id,
"orderBy": orderBy
}
},function(rs){
common.util.__tip("排序保存成功!","success");
},true);
}
$('input[name="state"]').on('change', function() {
$(this).parent().addClass('current').siblings().removeClass('current');
g.reload();
... ...
... ... @@ -1016,7 +1016,7 @@ var Button = [
dialog:"getCoupon-template",
"data": [
{
"title": "",
"title": "标题内容",
"isShow": "YES",
"image": {
"src": "",
... ... @@ -1026,10 +1026,6 @@ var Button = [
}
},
"couponID": ""
//"goShopping":{
// "action": "",
// "url": ""
//}
}
]
}
... ...
... ... @@ -32,6 +32,13 @@ var Bll = {
var btn = Button.filter(function (item) {
return item.template_name == module.contentData.template_name;
});
//if(Validate[module.contentData.templater_name]){
// Validate[module.contentData.templater_name].forEach(function(item){
// //todo
// components.on("validate",item.fn);
// })
//}
var d = new common.dialog({
title: (!!~index ? "修改" : "添加") + module.contentData.button_name,
//content: common.util.__template2($("#" + module.contentData.dialog).html(), module),
... ... @@ -51,7 +58,6 @@ var Bll = {
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
d.close();
}
console.log(module);
return false;
},
css: "btn-primary"
... ... @@ -309,10 +315,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": "",
... ... @@ -325,7 +331,6 @@ $(document).on("click", '#coupon-addOne', function () {
});
Bll.renderDialog("getCoupon-template");
}
});
//获取品牌
Bll.getBrands();
... ... @@ -497,10 +502,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 () {
... ... @@ -534,6 +535,7 @@ $(document).on("click", '#focus-addOne', function () {
"alt": "",
"url": {},
"bgColor": "",
"imgId": "0"
}
);
Bll.renderDialog("focus-template");
... ... @@ -609,6 +611,7 @@ $(document).on("click", "#sub_btn", function () {
contentData.data.more_link = "{\"action\":\"" + action + "\",\"url\":\"" + url + "\"}";
}
data.content[i] = JSON.stringify(common.util.__ArrayToObj(contentData));
data.content[i] = JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[i].contentData));
if (Bll.contentDatas[i].id) {
data.data_id[i] = "id_" + Bll.contentDatas[i].id;
}
... ...
... ... @@ -118,3 +118,17 @@
.level-2-wrap, .level-3-wrap {
display: none;
}
.grid input.saleCategoryNumInput{
height: 40px;
width: 50px;
margin: 0 auto;
line-height: 40px;
}
.grid input.errorNumInput{
border: 2px solid #ff0000;
}
.level-wrap input.saleCategoryNumInput{
margin: 32px auto;
}
... ...
... ... @@ -20,8 +20,8 @@ var config = {
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//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.231:8080/platform',//王伟
//domain: 'http://192.168.102.202: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
//domain:'http://192.168.102.216:8180/platform', //李健2
... ...
... ... @@ -43,7 +43,7 @@ exports.res = [{
{name: 'brandId', type: 'Number'},
{name: 'rejectReason', type: 'String'},
{name: 'isPayDelivery', type: 'Number'},
{name: 'checktatus', type: 'Number'},
{name: 'checkStatus', type: 'Number'},
{name: 'id', type: 'Number'},
],
... ... @@ -152,6 +152,7 @@ exports.res = [{
method: 'GET',
view: 'pages/goods/cod-upload',
src: '/goods/cod-upload',
}
... ...
... ... @@ -399,16 +399,6 @@ exports.res = [
]
},{
// Plus/Star列表-获取详情
route: '/guang/plustar/delPlustar',
method: 'POST',
url: '/guang/plustar/delPlustar',
params: [
{name: 'id', type: 'Number'}
]
},
{
// Plus/Star列表-删除
route: '/guang/plustar/delPlustar',
method: 'POST',
... ... @@ -418,6 +408,7 @@ exports.res = [
]
},
//=================================【Plus/Star分类】
{//逛->Plus/Star分类 空白页
route: '/guang/plustarcategory/index',
... ... @@ -563,12 +554,12 @@ exports.res = [
view:'pages/guang/contentEdit',
src:'/guang/contentEdit',
data:{
action:"/ajax/guang/article/addArticle",
action:"/guang/article/addArticle",
pageTitle:"添加文章"
}
},
{
route: "/ajax/guang/article/addArticle",
route: "/guang/article/addArticle",
method:"POST",
url:"/guang/article/addArticle",
params:[
... ... @@ -589,7 +580,7 @@ exports.res = [
]
},
{
route: "/ajax/guang/article/updateArticle",
route: "/guang/article/updateArticle",
method:"POST",
url:"/guang/article/updateArticle",
params:[
... ... @@ -616,7 +607,7 @@ exports.res = [
view:'pages/guang/contentEdit',
src:'/guang/contentEdit',
data:{
action:"/ajax/guang/article/updateArticle",
action:"/guang/article/updateArticle",
pageTitle:"修改文章"
},
params:[
... ... @@ -624,7 +615,7 @@ exports.res = [
]
},
{
route:'/guang/article/getArticleDetail',
route:'/guang/article/getDetail',
method:'POST',
url:'/guang/article/getDetail',
params:[
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://localhost:30012';
//exports.domain = 'http://172.16.6.243:8088/platform';
//销售类目路由
exports.res = [{
... ... @@ -108,16 +109,13 @@ exports.res = [{
name: 'categoryId',
type: 'string'
}, {
name: 'parentId',
type: 'string'
}, {
name: 'orderBy',
type: 'string'
}, {
name: 'labelLevel',
name: 'status',
type: 'string'
}, {
name: 'status',
name: 'id',
type: 'string'
}]
}, {
... ...
... ... @@ -43,6 +43,11 @@
</td>
</tr>
</table>
<div class="result">
</div>
</div>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -244,6 +244,7 @@
[[each Brands as brand index]]
<a class="btn brand-index" href="#[[brand.name]]">[[brand.name]]</a>
[[/each]]
<input type="text" class="form-control" placeholder="搜索" id="brandsearch" />
</div>
<div class="form-group brand-wrap" style="height: 400px;overflow: auto;">
... ... @@ -257,6 +258,8 @@
[[/each]]
</div>
[[/each]]
<div class="form-group" id="brandsearchwrap" name="brandsearch">
</div>
</div>
<input type="hidden" id="brandCheckBox" for="checkbox" value="[[Brdata]]" />
</div>
... ... @@ -379,6 +382,25 @@
</tbody>
</table>
</div>
<div class="form-group">
<div class="col-sm-2">
<button class="btn btn-info" type="button" id="imgsSelectBtn">上传多张图片</button>
</div>
</div>
</div>
</script>
<script type="text/template" id="template_dialog_imgmodule">
<div class="rows" id="moduleimgs">
<div class="form-group">
[[each datas as item index]]
<div class="col-sm-2">
<img src="[[item]]" width="100%" height="100%">
</div>
[[/each]]
<div class="col-sm-2">
<input type="file" multiple="true" name="file" id="filemodelimgs" />
</div>
</div>
</div>
</script>
... ...
... ... @@ -137,7 +137,7 @@
<span>[[categoryName]]</span>
<span>一级分类</span>
<span><img src="[[icon]]" alt=""></span>
<span class="orderby">[[orderBy]]</span>
<span class="orderby"> <input type="text" class="form-control saleCategoryNumInput" value="[[orderBy]]" categoryId="[[categoryId]]" /></span>
<span class="status">
[[if state=="1"]]
开启
... ... @@ -166,7 +166,7 @@
<span>[[a.categoryName]]</span>
<span>二级分类</span>
<span><img src="[[a.icon]]" alt=""></span>
<span class="orderby">[[a.orderBy]]</span>
<span class="orderby"><input type="text" class="form-control saleCategoryNumInput" value="[[a.orderBy]]" categoryId="[[a.categoryId]]" /></span>
<span class="status">
[[if a.state=="1"]]
开启
... ... @@ -195,7 +195,7 @@
<span>[[b.categoryName]]</span>
<span>三级分类</span>
<span><img src="[[b.icon]]" alt=""></span>
<span class="orderby">[[b.orderBy]]</span>
<span class="orderby"><input type="text" class="form-control saleCategoryNumInput" value="[[b.orderBy]]" categoryId="[[b.categoryId]]" /></span>
<span class="status">
[[if b.state=="1"]]
开启
... ...
... ... @@ -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>
</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 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]]"
<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,47 +77,81 @@
</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]]"
<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">
<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]]"
<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]]"
<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">
<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]]"
<div class="col-sm-4 ">
<input class="form-control observe" type="text" value="[[contentData.data.params.paramValue]]"
data-field="params.paramValue" placeholder="附加参数值">
</div>
<div class="form-group col-sm-12">
</div>
<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]]"
<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]]"
<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"
<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>
<div class="panel-body">
... ... @@ -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>
<div class="form-group">
[[if contentData.template_name=='kidsBrands']]
title:<input class="col-sm-8 observe" type="text" value="[[item.title]]"
<input class="form-control observe" type="text" value="[[item.title]]"
data-field="list.[[index]].title">
[[else]]
name:<input class="col-sm-8 observe" type="text" value="[[item.name]]"
<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>
... ... @@ -255,14 +296,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 +312,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="码"/>
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]]"
... ...
... ... @@ -5,17 +5,22 @@
</div>
</div>
[[else if module.contentData.template_name=='appIconList']]
<div class="app_icon_list">
<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,7 +165,8 @@
</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>
... ... @@ -168,7 +180,8 @@
[[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 +210,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 +222,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 +250,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 +279,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
... ...