Authored by liuyue

销售类目

var dragging = function(el, array, callback) {
var $ = require('jquery');
var drag = function(el, array, callback) {
this.el = el;
this.dataArray = array;
this.callback = callback;
}
dragging.prototype = {
constructor: dragging,
drag.prototype = {
constructor: drag,
minZindex: 1,
dragItemList: null,
dragItemPos: [],
Initialize: function(){
console.log(list);
this.dragItemList = $("#" + this.el).find(".dragItem");
this.dragItemList = $(this.el).find("li");
if(this.dragItemList.length < 1){
return;
}
var elHeight = 0;
$(this.el).css("position","relative");
for(var i=0;i<this.dragItemList.length;i++){
var top = this.dragItemList[i].offsetTop;
var left = this.dragItemList[i].offsetLeft;
... ... @@ -24,7 +27,12 @@ dragging.prototype = {
this.dragItemPos[i] = {left:left, top:top};
this.dragItemList[i].index = i;
if(i == this.dragItemList.length - 1){
elHeight = top + $(this.dragItemList[i]).height() + 20;
}
}
$(this.el).css("height", elHeight + "px");
for(var i=0; i<this.dragItemList.length; i++){
$(this.dragItemList[i]).css("position", "absolute").css("margin", 0);
... ... @@ -82,6 +90,11 @@ dragging.prototype = {
_self.move(oNear,_self.dragItemPos[obj.index]);
_self.move(obj,_self.dragItemPos[oNear.index]);
/*
$(oNear).css("top",_self.dragItemPos[obj.index].top+"px").css("left",_self.dragItemPos[obj.index].left+"px");
$(obj).css("top",_self.dragItemPos[oNear.index].top+"px").css("left",_self.dragItemPos[oNear.index].left+"px");
*/
//交换index
oNear.index += obj.index;
obj.index = oNear.index - obj.index;
... ... @@ -191,3 +204,5 @@ dragging.prototype = {
}
}
module.exports = drag;
\ No newline at end of file
... ...
... ... @@ -283,7 +283,7 @@ var util = {
},
__joinImg:function(bucket,url) {
var urlArr = url.split('/');
var domain = 'static.yhbimg.com/'+bucket;
var domain = 'static.yhbimg.com'+"/"+bucket;
var num = urlArr[urlArr.length-1].substr(1,1);
var url = domain + url;
if(num == 1) {
... ... @@ -321,9 +321,9 @@ var util = {
var result={};
if($.isArray(data)){
data.forEach(function(item,index){
result[index]=item;
result[index]=util.__ArrayToObj(item);
});
}else if(typeof data=="string"){
}else if(typeof data=="string"||typeof data=="number"||typeof data=="boolean"){
result=data;
}
else{
... ... @@ -346,7 +346,7 @@ var util = {
result[name]=util.__ObjToArray(data[name]);
}
}
}else if(typeof data=="string"){
}else if(typeof data=="string"||typeof data=="number"||typeof data=="boolean"){
result=data;
}else{
/*基本不会被运行到,需要优化*/
... ...
... ... @@ -15,7 +15,7 @@ if(param&&param.length==1){
async:false
},function(res){
ViewModel=res.data;
});
},true);
}
console.log("ViewModel",ViewModel);
... ... @@ -59,6 +59,15 @@ var Bll = {
});
},
renderBrandPic: function(Brdata) {
var map2={};
Brdata.forEach(function(item){
map2[item.id]=item;
});
Brdata=[];
for(var key in map2){
Brdata.push(map2[key]);
}
var Brands2 = [];
Brdata.forEach(function(item, index) {
if(!item.brandIco){
... ... @@ -75,10 +84,19 @@ var Bll = {
$("#addPic").prepend(common.util.__template2($("#template3").html(), {
Brands: Brands2
}));
return Brdata;
},
contentDatas: [],
module: null,
toast: function(index, module) {
if(!module.contentData.dialog){
Button.forEach(function(item,index){
if(module.contentData.template_name==item.template_name){
module.contentData.dialog=item.dialog;
return;
}
});
}
var d = new common.dialog({
title: (!!~index ? "修改" : "添加") + module.contentData.template_intro,
content: common.util.__template2($("#" + module.contentData.dialog).html(), module),
... ... @@ -90,7 +108,6 @@ var Bll = {
//TODO
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
console.log(Bll.contentDatas);
d.close();
}
... ... @@ -114,8 +131,7 @@ var Bll = {
Bll.module.contentData.data=common.util.__buildobj(names, '.', Bll.module.contentData.data, function(o, name) {
o[name] = obj.data;
});
console.log(Bll.module.contentData.data);
console.log(Bll.module.contentData);
}
});
},
... ... @@ -126,6 +142,8 @@ var Bll = {
},
__render: function(selecter, templater, data) {
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
},
Tags: []
}
... ... @@ -146,12 +164,18 @@ Bll.Tags=ViewModel.tag?ViewModel.tag.split(','):[];
Bll.__render("#taglist","template4",{tags:Bll.Tags});
/*内容渲染->对象转数组*/
// Bll.contentDatas=ENUM.articleContent;
if(ViewModel.articleContent){
ViewModel.articleContent.forEach(function(item,index){
item.contentData=item.contentData.replace(/(jpg|png)\?[^"]*/g,'$1');
item.contentData=common.util.__ObjToArray(JSON.parse(item.contentData));
Bll.contentDatas.push(item);
});
}
/*第三部解析楼层*/
Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
... ... @@ -164,7 +188,7 @@ new common.dropDown({
ajax: "guangGetSortList",
params: function() {
return {
pid: 0
parentId: 0
};
}
});
... ... @@ -173,7 +197,7 @@ new common.dropDown({
ajax: "guangGetSortList",
params: function() {
return {
pid: $("#maxSortId").val()
parentId: $("#maxSortId").val()
};
}
});
... ... @@ -226,14 +250,22 @@ $(document).on("click", "#addBrands", function() {
Brdata: Bll.Brdata.join('|')
}), function() {
//todo
Bll.Brdata = $("#brandCheckBox").val().split('|');
Bll.Brdata = Bll.Brdata.map(function(item, index) {
return {
"brandCategory": "1",
// Bll.Brdata = $("#brandCheckBox").val().split('|');
// Bll.Brdata = Bll.Brdata.map(function(item, index) {
// return {
// "brandCategory": "1",
// "id": item
// }
// });
$("#brandCheckBox").val().split('|').forEach(function(item){
Bll.Brdata.push({
"brandCategory": "1",
"id": item
}
});
Bll.renderBrandPic(Bll.Brdata);
});
});
Bll.Brdata=Bll.renderBrandPic(Bll.Brdata);
});
e.init();
});
... ... @@ -322,7 +354,7 @@ $("#content_btns").html(common.util.__template2($("#template_content_btns").html
$(document).on("click", ".add_btn", function() {
var item = Button[$(this).data("index")];
Bll.module={};
Bll.module={templateKey:item.template_name};
Bll.module.contentData = $.extend(true, {}, item);
Bll.toast(-1, Bll.module);
});
... ... @@ -333,17 +365,15 @@ $(document).on("click", ".del", function() {
$(document).on("change", ".observe", function() {
var $this = $(this);
var name = $this.data("field");
var name = $this.data("field");//a.b.2.d
Bll.module.contentData.data=common.util.__buildobj(name, '.', Bll.module.contentData.data, function(obj, name) {
obj[name] = $this.val();
});
console.log("module",Bll.module.contentData.data);
});
$(document).on("click", ".edit", function() {
var index = $(this).data("index");
var item = Bll.contentDatas[index];
console.log(Bll.contentDatas);
Bll.module = $.extend(true, {}, item);
Bll.toast(index, Bll.module);
});
... ... @@ -371,7 +401,6 @@ var goodsgird = new common.grid({
}, {
display: "产品图片",
render: function (item) {
console.log(item);
if (item.images_url) {
item.images_url = common.util.__joinImg("goodsimg", item.images_url);
}
... ... @@ -413,7 +442,7 @@ $(document).on("click", "#goodsSelectBtn", function () {
button: [{
value: "确定",
callback: function () {
Bll.module.data = goodsgird.selected.map(function (item, index) {
Bll.module.contentData.data = goodsgird.selected.map(function (item, index) {
return {
src: item.images_url,
id: item.product_skn,
... ... @@ -432,8 +461,9 @@ $(document).on("click", "#goodsSelectBtn", function () {
});
//点击“添加组”按钮(添加商品组)
$(document).on("click", "#goodsaddBtn", function () {
Bll.module.data.push(Button[4].data[0]);
console.log(Bll.module.data);
if(Bll.module.contentData.data[0].list.length){
Bll.module.contentData.data.push(Button[4].data[0]);
}
Bll.__render("#groupsgoods", "template_dialog_remgoodsgroup", Bll.module);
});
//点击“选择标签”按钮(添加商品组)
... ... @@ -447,14 +477,14 @@ $(document).on("click", ".goodsSelectBtn", function () {
value: "确定",
callback: function () {
goodsgird.selected.forEach(function (item, i) {
Bll.module.data[index].list[i] = {
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) {
Bll.module.data[index].cover = {
Bll.module.contentData.data[index].cover = {
cover: item.images_url,
maxSortId: item.max_sort_id
};
... ... @@ -469,9 +499,9 @@ $(document).on("click", ".goodsSelectBtn", function () {
});
//删除图片按钮
$(document).on("click", ".removepic", function() {
Bll.module.data.splice($(this).data("index"), 1);
Bll.module.contentData.data.splice($(this).data("index"), 1);
$("#goodspic").html(common.util.__template2($("#template_dialog_goodsimgs").html(), {
datas: Bll.module.data
datas: Bll.module.contentData.data
}));
});
... ... @@ -481,7 +511,11 @@ var e = new common.edit("#panel-body", {
bucket: "article"
});
e.init();
e.on("validate",function(){
if(Bll.contentDatas.length==0&&$("#url").val()==""){
return "链接和内容不能同时为空";
}
});
$(document).on("click", "#submit", function() {
e.submit($("#panel-body").attr("action"), function(option) {
if(param&&param.length==1){
... ... @@ -491,31 +525,23 @@ $(document).on("click", "#submit", function() {
option.data.contentData = [];
Bll.contentDatas.forEach(function(item, index) {
var data = common.util.__ArrayToObj({
data: item.data,
template_name: item.template_name,
template_intro: item.template_intro
});
option.data.contentData.push({
"templateKey": item.template_name,
"contentData": data
});
item.contentData=common.util.__ArrayToObj(item.contentData);
option.data.contentData.push(item);
});
console.log("Bll.contentDatas", Bll.Brdata);
console.log("Bll.contentDatas", option.data.contentData);
option.data.contentData = JSON.stringify(option.data.contentData);
option.data.brands = JSON.stringify(Bll.Brdata);
option.data.tag = Bll.Tags.join(',');
console.log("submit", option.data);
option.success=function(res){
res = res.data;
if(res.code == "200") {
e.$tip("提交成功", function() {
//location.href="/supplier/baseproduct/index"
//location.href="/guang/article/index"
}, 'growl-success');
}else{
e.$tip(res.message);
... ... @@ -526,6 +552,95 @@ $(document).on("click", "#submit", function() {
}
});
});
/*交互部分*/
/*选择分类 自动切换 图片类型*/
var TypeAToT={
"潮品":"1",
"搭配":"2",
"话题":"1",
"潮人":"2",
"小贴士":"1"
};
$(document).on("change","#maxSortId",function(){
var id=$(this).val();
var name=$(this).find("option[value='"+id+"']").text();
$(":radio[name=coverImageType]").each(function(){
if($(this).val()==TypeAToT[name]){
$(":radio[name=coverImageType]").prop("checked",false);
$(this).prop("checked",true);
$("#articleGender").val($(this).val());
}
});
});
$(document).on("click","#brandAutoBtn",function(){
var product_skc=[];
Bll.contentDatas.forEach(function(item,index){
if(item.templateKey=="goodsGroup"){
item.contentData.data.forEach(function(datas,i){
datas.list.forEach(function(data,j){
product_skc.push(data.id);
});
});
}
if(item.templateKey=="goods"){
item.contentData.data.forEach(function(datas,i){
product_skc.push(datas.id);
});
}
});
//product_skc=["51022754","51178582","50030519","51128961","51146105","51055462","51143090","51153133","51010047","51153223","51152761","51149414","51082157","51149561","51079256"];
if(product_skc.length>0){
common.util.__ajax({
url:'/yohosearch/search',
data:{
status:1,
query:product_skc.join(',')
}
},function(res){
if(res.code==200){
var map={};
console.log(res.data.list);
res.data.list.forEach(function(item,index){
map[item.product_skn]={
id:item.brand_id,
brandIco:item.brand_ico,
brandName:item.brand_name,
brandCategory:1
};
});
console.log(map);
var b=[];
product_skc.forEach(function(item,index){
if(map[item]){
b.push(map[item]);
}
});
//console.log(b);
Bll.Brdata=(ViewModel.brandList||[]).concat(b);
// var map2={};
// Bll.Brdata.forEach(function(item){
// map2[item.id]=item;
// });
// Bll.Brdata=[];
// for(var key in map2){
// Bll.Brdata.push(map2[key]);
// }
Bll.Brdata=Bll.renderBrandPic(Bll.Brdata);
}
},true);
}
});
// var contentDrag = new common.drag("#add-content", Bll.contentDatas, function(data){
// console.log(data);
// Bll.contentDatas = data;
// Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
// });
// contentDrag.Initialize();
\ No newline at end of file
... ...
... ... @@ -35,17 +35,17 @@ var Button=[
{
template_intro:"焦点图",
template_name:"focus",
dialog:"",
dialog:"focus-template",
data:[
{
"src": "",
"alt": "",
"url": {},
"bgColor": "",
"imgId": ""
"imgId": "0"
}
],
focus_type:""
focus_type:"1"
},
{
template_intro:"添加商品",
... ... @@ -77,7 +77,7 @@ var Button=[
},
{
"template_name": "appIconList",
"template_intro": "图标",
"template_intro": "图标入口",
dialog:"icon-template",
"data": [
{
... ... @@ -228,7 +228,7 @@ var Button=[
{
"template_name": "singleNameImage",
"template_intro": "标题广告",
dialog:"",
dialog:"singleNameImage-template",
"data": {
"title": "",
"src": "",
... ... @@ -367,7 +367,32 @@ var Button=[
data: {}
},
{
template_intro:"一个连接",
template_intro:"推荐品牌",
template_name:"appHotBrands",
dialog:"brands-template",
"data": {
"title": {
"title": ""
},
"is_show_name": "N",
"list": []
}
},
{
template_intro:"自定义品牌",
template_name:"customBrands",
dialog:"brands-template",
"data": {
"title": {
"title": "",
"param": "",
"param_value": ""
},
"list": []
}
},
{
template_intro:"一个链接",
dialog:"template_dialog_link",
template_name:"link",
data:[
... ... @@ -376,13 +401,48 @@ var Button=[
},
{
template_intro:"添加促销",
dialog:"",
dialog:"promotion-template",
template_name:"promotion",
data: {
"promotionId": ""
}
},
{
template_intro:"轮播banner",
template_name:"carouselBanner",
dialog:"carouselBanner-template",
"data": {
"speed": "",
"list": [
{
"src": "",
"url": {}
}
]
}
},
{
template_intro:"kids推荐品牌",
template_name:"kidsBrands",
dialog:"brands-template",
"data": {
"params": {
"param": "",
"paramValue": "",
"title": "",
"more": "",
"more_url": ""
},
"list": []
}
},
{
template_intro:"推荐(L1-RT1-RF2)",
template_name:"",
dialog:"noEdit-template",
"data": {}
},
{
template_intro:"添加楼层",
dialog:"icon-template",
template_name:"addfloor",
... ... @@ -506,6 +566,159 @@ var Button=[
}
},
{
template_intro:"文本导航",
dialog:"textNav-template",
template_name:"textNav",
data: []
},
{
template_intro:"图片列表",
dialog:"imageList-template",
template_name:"imageList",
"data": {
"title": {
"title": "",
"column_num": "",
"is_show_name": "N"
},
"list": []
}
},
{
template_intro:"标题标签",
dialog:"noEdit-template",
template_name:"",
"data": {}
},
{
template_intro:"编辑推荐",
dialog:"noEdit-template",
template_name:"",
"data": {}
},
{
template_intro:"热门品类",
dialog:"hotCategory-template",
template_name:"hotCategory",
"data": {
"title": {
"name": "",
"more_name": "",
"more_url": {
"action": "",
"url": ""
}
},
"blocks": [],
"list": [
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
}
],
"imgs": []
}
},
{
template_intro:"有序焦点",
dialog:"debrisSlider-template",
template_name:"debrisSlider",
"data": {
"big_image": [
{
"src": "",
"url": {
action:"",
url:""
},
"title": ""
}
],
"left": [],
"right": []
}
},
{
template_intro:"新人专享",
dialog:"newUserFloor-template",
template_name:"newUserFloor",
... ... @@ -555,6 +768,28 @@ var Button=[
}
},
{
template_intro:"自定义参数",
dialog:"paramsGroup-template",
template_name:"paramsGroup",
data: {
"title": "",
"more": "",
"more_url": "",
"list": [
{
"title": "",
"params": ""
}
]
}
},
{
template_intro:"自定义参数图片",
dialog:"noEdit-template",
template_name:"",
data: {}
},
{
template_intro:"站内公告",
dialog:"noEdit-template",
template_name:"announcement",
... ... @@ -585,7 +820,7 @@ var Button=[
dialog:"multiLabelImage-template",
template_name:"multiLabelImage",
data: {
"label_list":[
"label":[
{
"title": "",
"url": {
... ... @@ -659,6 +894,27 @@ var Button=[
]
}
},
{
"template_name": "getCoupon",
"template_intro": "领券频道",
dialog:"getCoupon-template",
"data": {
"title":"",
"isShow":"YES",
"image":{
"src": "",
"url": {
"action": "",
"url": ""
}
},
"couponID":"",
"goShopping":{
"action": "",
"url": ""
}
}
}
];
module.exports = Button;
... ...
var $ = require('jquery'),
common = require('../common/common');
var Button=require('./partials/Button1');
/*获取数据*/
... ... @@ -18,13 +17,15 @@ common.util.__ajax({
var edit = new common.edit(".modal-body", {
bucket: "goodsimg"
});
var Bll={
Brands: [],
Brands1: {},
Brdata: [],
contentDatas:[],
module: null,
__render:function(selecter,templater,data){
$(selecter).html(common.util.__template2($("#"+templater).html(),data) );
},
contentDatas:[],
module: null,
toast: function(index, module) {
var d = new common.dialog({
title: (!!~index ? "修改" : "添加") + module.contentData.template_intro,
... ... @@ -65,8 +66,76 @@ var Bll={
}
});
},
//获取品牌
getBrands: function() {
var Brand = {};
$.get("/ajax/yohosearch", function(res) {
res.data.forEach(function(item, index) {
var brandAlif = (item.brand_alif || "").toUpperCase();
if (/^[0-9]$/.test(item.brand_alif)) {
brandAlif = "0-9";
}
if (/^\W$/.test(item.brand_alif)) {
brandAlif = "#";
}
Brand[brandAlif] = Brand[brandAlif] || [];
Brand[brandAlif].push(item);
Bll.Brands1[item.id] = item;
});
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;
return 0;
});
Bll.Brands.push({
name: i,
items: Brand[i]
});
}
});
},
renderBrandPic: function(Brdata) {
var Brands2 = [];
Brdata.forEach(function(item, index) {
if(!item.brandIco){
var a = Bll.Brands1[item];
a.brandIco = common.util.__joinImg("brandLogo", a.brand_ico);
Brands2.push(a);
}else{
item.brandIco=common.util.__template(item.brandIco,{width:110,height:150});
Brands2.push(item);
}
});
Bll.module=Bll.module||{};
Bll.module.contentData=Bll.module.contentData||{};
Bll.module.contentData.data=Bll.module.contentData.data||{};
Bll.module.contentData.data.list=Bll.module.contentData.data.list||[];
for(var i=0;i<Brands2.length;i++){
var pic={};
if( Bll.module.contentData.template_name=="kidsBrands"){
pic={
"src":Brands2[i].brandIco,
"id":Brands2[i].id,
"title":Brands2[i].brand_name
};
}else{
pic={
"src":Brands2[i].brandIco,
"id":Brands2[i].id,
"name":Brands2[i].brand_name
};
}
Bll.module.contentData.data.list.push(pic);
}
Bll.renderDialog("brands-template");
}
}
};
... ... @@ -127,9 +196,13 @@ $(document).on("click", ".edit", function() {
$(document).on("change", ".observe", function() {
var $this = $(this);
var name = $this.data("field");
console.log("name");
console.log(name);
Bll.module.contentData.data=common.util.__buildobj(name, '.', Bll.module.contentData.data, function(obj, name) {
obj[name] = $this.val();
});
console.log("Bll.module.contentData.data");
console.log(Bll.module.contentData.data);
});
$(document).on("click", '#multiLabelImage-addImage', function() {
... ... @@ -144,7 +217,7 @@ $(document).on("click", '#multiLabelImage-addImage', function() {
});
$(document).on("click", '#multiLabelImage-addOne', function() {
Bll.module.contentData.data.label_list.push({
Bll.module.contentData.data.label.push({
"src": "",
"url": {
"action": "",
... ... @@ -154,6 +227,18 @@ $(document).on("click", '#multiLabelImage-addOne', function() {
Bll.renderDialog("multiLabelImage-template");
});
$(document).on("click", '#imageGroup-addOne', function() {
Bll.module.contentData.data.list.push({
"src": "",
"title": "",
"url": {
"action": "",
"url": ""
}
});
Bll.renderDialog("imageGroup-template");
});
$(document).on("click", '#matchImage-addOne', function() {
Bll.module.contentData.data.list.push({
"title": "",
... ... @@ -164,6 +249,241 @@ $(document).on("click", '#matchImage-addOne', function() {
});
Bll.renderDialog("matchImage-template");
});
//添加一个图标
$(document).on("click", '#icon-addOne', function() {
Bll.module.contentData.data.push({
//"title": "",
"url": {
"action": "",
"url": ""
}
});
Bll.renderDialog("icon-template");
});
//删除一个图标
$(document).on("click", '#icon-delOne', function() {
var index = $(this).data("index");
Bll.module.contentData.data.splice(index,1);
Bll.renderDialog("icon-template");
});
//获取品牌
Bll.getBrands();
/*渲染品牌*/
Bll.Brdata=ViewModel.brandList||[];
Bll.renderBrandPic(Bll.Brdata);
//打开品牌选择模态
$(document).on("click", "#addBrands", function() {
var e = new common.edit("#brandForm");
console.log("Bll.Brdata",Bll.Brdata);
common.dialog.confirm("选择品牌", common.util.__template2($("#template5").html(), {
Brands: Bll.Brands,//所有品牌数据
Brdata: []
}), function() {
//todo
Bll.Brdata = $("#brandCheckBox").val().split('|');
Bll.renderBrandPic(Bll.Brdata);
});
e.init();
});
//删除一个品牌
$(document).on("click", '#remove_brand', function() {
var index = $(this).data("index");
Bll.module.contentData.data.list.splice(index,1);
Bll.renderDialog("brands-template");
});
/*自定义参数*/
$(document).on("click", '.paramsGroupDel', function() {
Bll.module.contentData.data.list.splice($(this).data("index"),1);
Bll.renderDialog("paramsGroup-template");
});
$(document).on("click", '#paramsGroup-addOne', function() {
Bll.module.contentData.data.list.push(
{
"title": "",
"params": ""
}
);
Bll.renderDialog("paramsGroup-template");
});
/*新人专享*/
$(document).on("click", '#newUserFloor-addBanner', function() {
Bll.module.contentData.data.banner_image.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("newUserFloor-template");
});
/*有序焦点添加*/
$(document).on("click", '#debrisSlider-addLeft', function() {
Bll.module.contentData.data.left.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
$(document).on("click", '#debrisSlider-addCenter', function() {
Bll.module.contentData.data.big_image.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
$(document).on("click", '#debrisSlider-addRight', function() {
Bll.module.contentData.data.right.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
//*****************************************************************//
/*热门品类*/
$(document).on("click", '#hotCategory-addLeft', function() {
Bll.module.contentData.data.blocks.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '#hotCategory-addRight', function() {
Bll.module.contentData.data.imgs.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '.hotCategory-delLeft', function() {
Bll.module.contentData.data.blocks.splice($(this).data("index"),1);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '.hotCategory-delRight', function() {
Bll.module.contentData.data.imgs.splice($(this).data("index"),1);
Bll.renderDialog("hotCategory-template");
});
//*****************************************************************//
/*图片列表*/
$(document).on("click", '#imageList-addOne', function() {
Bll.module.contentData.data.list.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("imageList-template");
});
$(document).on("click", '.imageList-del', function() {
Bll.module.contentData.data.list.splice($(this).data("index"),1);
Bll.renderDialog("imageList-template");
});
$(document).on("checked", '#imageList_Y', function() {
Bll.module.contentData.data.title.is_show_name = "Y";
Bll.renderDialog("imageList-template");
});
$(document).on("checked", '#imageList_N', function() {
Bll.module.contentData.data.title.is_show_name = "N";
Bll.renderDialog("imageList-template");
});
//*****************************************************************//
/*文本导航*/
$(document).on("click", '#textNav-addOne', function() {
Bll.module.contentData.data.push(
{
"name": "",
"url": {
"action": "",
"url": ""
}
}
);
Bll.renderDialog("textNav-template");
});
$(document).on("click", '.textNav-delOne', function() {
Bll.module.contentData.data.splice($(this).data("index"), 1);
Bll.renderDialog("textNav-template");
});
//*****************************************************************//
/*推荐(标题 + 12张图)*/
$(document).on("change", '#recommendContentFive-is_show', function() {
Bll.module.contentData.data.title.is_show = 1-Bll.module.contentData.data.title.is_show;
Bll.renderDialog("recommendContent-template");
});
//*****************************************************************//
/*焦点图*/
$(document).on("click", '#focus-addOne', function() {
Bll.module.contentData.data.push(
{
"src": "",
"alt": "",
"url": {},
"bgColor": "",
"imgId": "0"
}
);
Bll.renderDialog("focus-template");
});
$(document).on("click", '.focus-del', function() {
Bll.module.contentData.data.splice($(this).data("index"), 1);
Bll.renderDialog("focus-template");
});
$(document).on("change", '#focus-select', function() {
Bll.module.contentData.focus_type = $(this).val();
Bll.renderDialog("focus-template");
});
//*****************************************************************//
/*轮播banner*/
$(document).on("click", '#carouselBanner-addOne', function() {
Bll.module.contentData.data.list.push(
{
"src": "",
"url": {}
}
);
Bll.renderDialog("carouselBanner-template");
});
$(document).on("click", '.carouselBanner-del', function() {
Bll.module.contentData.data.list.splice($(this).data("index"), 1);
Bll.renderDialog("carouselBanner-template");
});
//*****************************************************************//
$(document).on("click", "#sub_btn", function() {
var data = {
... ... @@ -188,4 +508,135 @@ $(document).on("click", "#sub_btn", function() {
console.log(res.data);
window.location.href=window.location.href;
});
});
/****************************************************************************************************/
/*商品,商品组*/
/*选择商品表格*/
var goodsgird = new common.grid({
el: '#goodsgird',
parms: function () {
var beginPrice = 0, endPrice = 1000000;
if (common.util.__input('beginPrice')) {
beginPrice = common.util.__input('beginPrice');
}
if (common.util.__input('endPrice')) {
endPrice = common.util.__input('endPrice')
}
return {
query: common.util.__input('skns'),
price: beginPrice + "," + endPrice
};
},
columns: [
{
display: "选择",
type: "checkbox"
}, {
display: "产品图片",
render: function (item) {
if (item.images_url) {
item.images_url = common.util.__joinImg("goodsimg", item.images_url);
}
else {
item.images_url = "";
}
return "<img width=120 height=60 src='" + item.images_url + "?imageView/2/w/100/h/100'/>";
}
}, {
display: "产品名称",
name: "product_name"
}, {
display: "品牌",
name: "brand_name"
}, {
display: "现价",
name: "sales_price"
}, {
display: "牌价",
name: "market_price"
}, {
display: "预售",
name: "stock_number"
}, {
display: "库存",
name: "storage_num"
}]
});
//搜索按钮
$(document).on("click", "#search", function() {
goodsgird.reload();
});
//点击“选择标签”按钮(添加商品)
$(document).on("click", "#goodsSelectBtn", function () {
new common.dialog({
title: "选择商品",
content: $("#template_dialog_goodsgird").html(),
width: '80%',
button: [{
value: "确定",
callback: 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
}
});
// Bll.module.data=goodsgird.selected;
Bll.__render("#goodspic", "template_dialog_goodsimgs", {
datas: Bll.module.contentData.data
});
},
css: "btn-primary"
}]
});
goodsgird.init('/yohosearch/search');
});
//点击“添加组”按钮(添加商品组)
$(document).on("click", "#goodsaddBtn", function () {
if(Bll.module.contentData.data[0].list.length){
Bll.module.contentData.data.push(Button[5].data[0]);
}
Bll.__render("#groupsgoods", "template_dialog_remgoodsgroup", Bll.module);
});
//点击“选择标签”按钮(添加商品组)
$(document).on("click", ".goodsSelectBtn", function () {
var index = $(this).data("index");
new common.dialog({
title: "选择商品",
content: $("#template_dialog_goodsgird").html(),
width: '80%',
button: [{
value: "确定",
callback: function () {
goodsgird.selected.forEach(function (item, i) {
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) {
Bll.module.contentData.data[index].cover = {
cover: item.images_url,
maxSortId: item.max_sort_id
};
}
});
Bll.__render("#groupsgoods", "template_dialog_remgoodsgroup", Bll.module);
},
css: "btn-primary"
}]
});
goodsgird.init('/yohosearch/search');
});
//删除图片按钮
$(document).on("click", ".removepic", function() {
Bll.module.contentData.data.splice($(this).data("index"), 1);
$("#goodspic").html(common.util.__template2($("#template_dialog_goodsimgs").html(), {
datas: Bll.module.contentData.data
}));
});
\ No newline at end of file
... ...
... ... @@ -290,8 +290,8 @@ span.tag{
text-decoration: none;
font-size: 11px;
}
#source-m .small-pic .small-pic-list2 img{
width: 25%;
float: left;
border: 1px solid #fff;
.custom-group img{
width: 100%;
height: 100%;
display: block;
}
\ No newline at end of file
... ...
... ... @@ -145,7 +145,7 @@ exports.res = [
method:'POST',
url:'/guang/article/getSortList',
params:[
{name:"pid",type:"Number"}
{name:"parentId",type:"Number"}
]
}
... ...
... ... @@ -563,7 +563,8 @@ exports.res = [
view:'pages/guang/contentEdit',
src:'/guang/contentEdit',
data:{
action:"/ajax/guang/article/addArticle"
action:"/ajax/guang/article/addArticle",
pageTitle:"添加文章"
}
},
{
... ... @@ -615,7 +616,8 @@ exports.res = [
view:'pages/guang/contentEdit',
src:'/guang/contentEdit',
data:{
action:"/ajax/guang/article/updateArticle"
action:"/ajax/guang/article/updateArticle",
pageTitle:"修改文章"
},
params:[
{name:"id",type:"Number"}
... ...
... ... @@ -9,12 +9,16 @@ exports.brandlist = function (req, res) {
exports.search = function (req, res) {
var size = 10;//每页数据量
var page = 1;
var price=req.body.price;
if (req.body.page) {
page = req.body.page;
// var page = 1;
// var price=req.body.price;
// if (req.body.page) {
// page = req.body.page;
// }
var params = [];
for (var key in req.body) {
params.push(key + "=" + req.body[key]);
}
var url = searchDomain+"/search.json?viewNum=" + size + "&query=" + req.body.query + "&page=" + page+"&price="+price;
var url = searchDomain+"/search.json?viewNum=" + size + "&"+params.join('&');
console.log("请求url",url);
request({url: url}, function (error, response, body) {
var data = {};
... ... @@ -37,7 +41,7 @@ exports.search = function (req, res) {
data.totalPage = body.data.page_total;
data.nums = data.list.length;//记录每一页数据量
//console.log("最终data", data);
res.json({data: {data: data}});
res.json({data: {data: data,code:200}});
});
};
... ...
... ... @@ -7,11 +7,11 @@
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="/guang/article/index">文章管理</a></li>
<li>添加文章</li>
<li>{{pageTitle}}</li>
</ul>
<div>
<h4>添加文章</h4>
<h4>{{pageTitle}}</h4>
</div>
</div>
</div><!-- media -->
... ... @@ -132,7 +132,7 @@
<label class="col-sm-2 control-label">链接:</label>
<div class="col-sm-7">
<input type="text" name="url" id="url" value='[[url]]' class="form-control" placeholder="请输入内容链接" readonly="true" required>
<input type="text" name="url" id="url" value='[[url]]' class="form-control" placeholder="请输入内容链接" readonly="true">
<p style="color:#999">注:链接中不能有英文单引号</p>
</div>
<div class="col-sm-1">
... ... @@ -172,6 +172,15 @@
</li>
</ul>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
</div>
<div class="col-sm-8">
<button class="btn btn-info" type="button" id="brandAutoBtn">自动获取品牌</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">选择标签:</label>
... ... @@ -257,54 +266,51 @@
[[each btns as btn index]]
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.template_intro]]</a></li>
[[/each]]
<div class="clearfix"></div>
</script>
<script type="text/template" id="template_content">
<!-- 文本内容 -->
[[each modules as module index]]
<li class="custom-group" data-index="[[index]]">
<li class="form-group custom-group" data-index="[[index]]" style="width: 100%">
[[if module.contentData.template_name=='text']]
<div class="con">[[module.contentData.data.text]]</div>
<div class="col-sm-12"><h3>[[module.contentData.data.text]]</h3></div>
[[else if module.contentData.template_name=='singleImage']]
<div class="list">
<div class="col-sm-12">
<img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
</div>
[[else if module.contentData.template_name=='smallPic']]
<div class="small-pic">
<ul class="small-pic-list">
[[each module.contentData.data as item i]]
<img src="[[item.src]]" title="[[item.title]]">
<div class="col-sm-6">
<img src="[[item.src]]" title="[[item.title]]">
</div>
[[/each]]
</ul>
</div>
[[else if module.contentData.template_name=='goods']]
<div class="small-pic">
<ul class="small-pic-list">
[[each module.contentData.data as item i]]
<img src="[[item.src]]" title="[[item.id]]">
<div class="col-sm-6">
<img src="[[item.src]]" title="[[item.title]]">
</div>
[[/each]]
</ul>
</div>
[[else if module.template_name=='link']]
<div class="list">
<h3>添加链接</h3>
</div>
[[else if module.template_name=='goodsGroup']]
<div class="small-pic">
<div class="small-pic-list2">
[[each module.data as items i]]
[[else if module.contentData.template_name=='link']]
<div class="col-sm-12">
<h3>添加链接</h3>
</div>
[[else if module.contentData.template_name=='goodsGroup']]
<div class="form-group">
[[each module.contentData.data as items i]]
<div class="col-sm-3">
<img src="[[items.cover.cover]]" >
</div>
[[/each]]
</div>
<div class="small-pic-list">
[[each module.data[0].list as item index]]
<img src="[[item.src]]" title="[[item.id]]">
[[/each]]
[[each module.contentData.data[0].list as item index]]
<div class="col-sm-6">
<img src="[[item.src]]" title="[[item.id]]">
</div>
[[/each]]
</ul>
</div>
[[/if]]
... ... @@ -420,7 +426,7 @@
<!-- 推荐商品 -->
<script type="text/tempalte" id="template_dialog_remgoods">
<div class="rows" id="groupsgoods">
[[each data as items i]]
[[each contentData.data as items i]]
<div class="form-group">
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10" id="goodspic-0">
... ... @@ -453,7 +459,7 @@
</script>
<script type="text/template" id="template_dialog_remgoodsgroup">
[[each data as items i]]
[[each contentData.data as items i]]
<div class="form-group">
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10" id="goodspic-0">
... ... @@ -481,7 +487,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">选择跳转目的地:</label>
<div class="col-sm-8">
<select class="form-control observe" data-field="0.url.action" value='[[data[0].url.action]]'>
<select class="form-control observe" data-field="0.url.action" value='[[contentData.data[0].url.action]]'>
[[layout template_default_1]]
</select>
... ... @@ -491,7 +497,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">跳转地址:</label>
<div class="col-sm-8">
<textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="0.url.url" >[[data[0].url.url]]</textarea>
<textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="0.url.url" >[[contentData.data[0].url.url]]</textarea>
</div>
</div>
... ...
<!-- 添加图标、楼层 -->
<script type="text/template" id="icon-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>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data as item index]]
<tr>
<td>
[[index+1]]
<!--<input type="hidden" value="[[index]]" data-field="[[index]].imgId">-->
</td>
<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]]"
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"
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"
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>
</td>
<td>
<a class="btn btn-danger" id="icon-delOne" data_index="[[index]]">删除</a>
</td>
</tr>
[[/each]]
</tbody>
</table>
</div>
<a href="JavaScript:;" id="icon-addOne" class="btn btn-primary btn-xs">添加一个</a>
</div>
</script>
<!-- 推荐品牌-->
<script type="text/template" id="brands-template">
<div class="rows">
[[if contentData.template_name=='appHotBrands']]
<div class="form-group col-sm-12">
<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="推荐品牌">
<label class="col-sm-1 control-label">显示名称</label>
<div class="col-sm-2 observe">
<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>
<input type="hidden" id="is_show_name" value="[[contentData.data.is_show_name]]" class="observe"
data-field="is_show_name" for="radio"/>
</div>
[[/if]]
[[if contentData.template_name=='customBrands']]
<div class="form-group col-sm-12">
<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="自定义品牌">
<label class="col-sm-1 control-label">附加参数</label>
<select class="col-sm-2 " value="[[contentData.data.title.param]]">
<option value="-1">请选择附加参数</option>
<option value="1">大分类</option>
</select>
<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>
[[/if]]
[[if contentData.template_name=='kidsBrands']]
<div class="form-group col-sm-12">
<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">
<label class="col-sm-1 control-label">分类</label>
<select class="col-sm-2 " value="[[contentData.data.params.param]]" data-field="params.param">
<option value="-1">促销id</option>
<option value="1">大分类ID</option>
</select>
<label class="col-sm-2 control-label">附加参数值</label>
<input class="col-sm-2 observe" type="text" value="[[contentData.data.params.paramValue]]"
data-field="params.paramValue" placeholder="附加参数值">
</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.params.more]]"
data-field="params.more">
[[layout action_template]]
</select>
<label class="col-sm-1 control-label">链接</label>
<input value="[[contentData.data.params.more_url]]" class="col-sm-2 observe" required="required"
data-field="params.more_url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
[[/if]]
</div>
<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>
</thead>
<tbody>
[[each contentData.data.list as item index]]
<tr>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src"/>
</td>
<td>
[[if contentData.template_name=='kidsBrands']]
<input class="col-sm-8 observe" type="text" value="[[item.title]]"
data-field="[[index]].title">
[[else]]
<input class="col-sm-8 observe" type="text" value="[[item.name]]" data-field="[[index]].name">
[[/if]]
</td>
<td>
<a class="btn btn-danger" id="remove_brand" data_index="[[index]]">删除</a>
</td>
</tr>
[[/each]]
</tbody>
</table>
</div>
<a href="JavaScript:;" id="addBrands" class="btn btn-primary btn-xs">添加品牌</a>
</div>
</script>
<!--品牌选择模态-->
<script type="text/template" id="template5">
<div class="row" id="brandForm">
<div class="form-group">
[[each Brands as brand index]]
<a class="btn brand-index" href="#[[brand.name]]">[[brand.name]]</a>
[[/each]]
</div>
<div class="form-group brand-wrap" style="height: 400px;overflow: auto;">
[[each Brands as brand index]]
<div class="form-group" name="[[brand.name]]">
[[each brand.items as item __index ]]
<a class="btn">
<input type="checkbox" value="[[item.id]]" name="brandCheckBox">
<label>[[item.brand_name]]</label>
</a>
[[/each]]
</div>
[[/each]]
</div>
<input type="hidden" id="brandCheckBox" for="checkbox" value="[[Brdata]]"/>
</div>
</script>
\ No newline at end of file
... ...
<!--领券楼层-->
<!-- 标题图片 -->
<script type="text/template" id="titleImage-template">
<div class="panel-body" id="titleImage-baseFrom">
... ... @@ -60,13 +62,13 @@
<div class="form-group">
[[each contentData.data.label as item index]]
<label class="control-label">标签[[index+1]]:</label>
<input type="text" class="observe" value="[[item.title]]" data-field="label_list.[[index]].title" required="required" style="width: 100px">
<input type="text" class="observe" value="[[item.title]]" data-field="label.[[index]].title" required="required" style="width: 100px">
<label class="control-label">跳转目的</label>
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="label_list.[[index]].url.action" style="width: 120px" >
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="label.[[index]].url.action" style="width: 120px" >
[[layout action_template]]
</select>
<label>跳转地址</label>
<input type="text" class="observe" value="[[item.url.url]]" data-field="label_list.[[index]].url.url" required="required" style="width: 120px" /><br>
<input type="text" class="observe" value="[[item.url.url]]" data-field="label.[[index]].url.url" required="required" style="width: 120px" /><br>
[[/each]]
</div>
<a href="JavaScript:;" id="multiLabelImage-addOne" class="btn btn-primary btn-xs">添加标签</a>
... ... @@ -215,7 +217,8 @@
<input type="text" class="form-control observe" value="[[contentData.data.title.title]]" required="required" data-field="title.title">
</div>
<label class="col-sm-4 control-label">是否显示
<input type="checkbox" value="[[contentData.data.title.is_show]]" checked="[[contentData.data.title.is_show?'checked':'']]" class="observe" data-field="title.is_show">
<input type="checkbox" name="is_show" value="1" id="recommendContentFive-is_show">
<input type="hidden" id="is_show" for="checkbox" value="[[contentData.data.title.is_show]]" />
</label>
</div>
[[/if]]
... ... @@ -250,7 +253,11 @@
[[/if]]
[[each contentData.data.list as item index]]
<tr>
[[if contentData.data.big_image]]
<td>[[index+2]]</td>
[[else]]
<td>[[index+1]]</td>
[[/if]]
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td>
<div class="col-sm-12">
... ... @@ -323,8 +330,456 @@
</tbody>
</table>
</div>
<a href="JavaScript:;" id="imageGroup-addOne" class="btn btn-primary btn-xs">添加图片</a>
</div>
</script>
<!--自定义参数-->
<script type="text/template" id="paramsGroup-template">
<div class="panel-body" id="paramsGroup-baseFrom">
<div class="form-group">
<label class="col-sm-2 control-label">标题设置:</label>
<div class="col-sm-4">
<input type="text" class="form-control observe" value="[[contentData.data.title]]" required="required" data-field="title">
</div>
<label class="col-sm-2 control-label">更多设置:</label>
<div class="col-sm-4">
<input type="text" value="[[contentData.data.more]]" class="form-control observe" data-field="more">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">跳转地址</label>
<div class="col-sm-4">
<input value="[[contentData.data.more_url.url]]" class="form-control observe" required="required" data-field="more_url.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
<div id="paramsGroup-bottom">
<ul id="sortable" class="sortable" style="margin:10px;width:100%;">
[[each contentData.data.list as item index]]
<li>
<table style="width:100%;z-index:-1;">
<tbody>
<tr>
<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>
</tbody>
</table>
<p style="color:#999">如:http://list.yohobuy.com/?gender=1,3&amp;msort=1,3 参数为:gender=1,3&amp;msort=1,3</p>
</li>
[[/each]]
</ul>
<button type="button" class="btn btn-sm" id="paramsGroup-addOne">添加一个</button>
</div>
</div>
</script>
<!--新人专享-->
<script type="text/template" id="newUserFloor-template">
<div class="panel-body" id="newUserFloor-baseFrom">
<div class="new_user_floor">
<p>标题 : <input type="text" value="[[contentData.data.title.name]]" class="observe" data-field="title.name"> 更多名称 : <input type="text" value="[[contentData.data.title.more_name]]" style="width:50px;" class="observe" data-field="title.more_name"> </p>
<p>
更多链接 : <select name="goTo" class="observe" value="[[contentData.data.title.more_url.action]]" data-field="title.more_url.action">
[[layout action_template]]
</select>
<input value="[[contentData.data.title.more_url.url]]" class="observe" required="required" data-field="title.more_url.url"/>
</p>
<p>活动 ID <input type="text" class="observe" value="[[contentData.data.title.active_id]]" data-field="title.active_id"></p>
<p><input type="button" class="btn btn-info btn-xs" value="添加banner" style="margin:10px;" id="newUserFloor-addBanner"></p>
</div>
<div id="newUserFloor-bottom">
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
[[each contentData.data.banner_image as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="banner_image.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="form-control observe" value="[[item.url.action]]" data-field="banner_image.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="form-control observe" required="required" data-field="banner_image.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="form-control observe" required="required" data-field="banner_image.[[index]].title"/>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
</div>
</div>
</script>
<!--有序焦点-->
<script type="text/template" id="debrisSlider-template">
<div class="panel-body" id="debrisSlider-baseFrom">
<div class="debris_slider">
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加左图" style="margin:10px;" id="debrisSlider-addLeft"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
[[each contentData.data.left as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="left.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="left.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="left.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="left.[[index]].title"/>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加中间图" style="margin:10px;" id="debrisSlider-addCenter"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
[[each contentData.data.big_image as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="big_image.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="big_image.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="big_image.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="big_image.[[index]].title"/>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加右图" style="margin:10px;" id="debrisSlider-addRight"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
[[each contentData.data.right as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="right.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="right.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="right.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="right.[[index]].title"/>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
</div>
</div>
</script>
<!--热门品类-->
<script type="text/template" id="hotCategory-template">
<div class="hotCategory">
<p>
标题 : <input type="text" class="observe" data-field="title.name" value="[[contentData.data.title.name]]" required> 更多名称 : <input type="text" class="observe" data-field="title.more_name" value="[[contentData.data.title.more_name]]" style="width:50px;"><br>
跳转目的 : <select name="goTo" class="observe" value="[[contentData.data.title.more_url.action]]" data-field="title.more_url.action">
[[layout action_template]]
</select>
跳转url : <input value="[[contentData.data.title.more_url.url]]" class="observe" required="required" data-field="title.more_url.url"/>
</p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加左上图片" style="margin:10px;" id="hotCategory-addLeft"></p>
[[if contentData.data.blocks.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.blocks as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="blocks.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="blocks.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="blocks.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="blocks.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm hotCategory-delLeft" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
[[/if]]
<p>添加左下导航:</p>
[[each contentData.data.list as item index]]
<p>
导航名称:<input type="text" class="observe" value="[[item.name]]" data-field="list.[[index]].name">
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="list.[[index]].url.action">
[[layout action_template]]
</select>
<input value="[[item.url.url]]" class="observe" required="required" data-field="list.[[index]].url.url"/>
</p>
[[/each]]
<p>
<input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加右侧图片" style="margin:10px;" id="hotCategory-addRight">
</p>
[[if contentData.data.imgs.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.imgs as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="imgs.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="imgs.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="imgs.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="imgs.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm hotCategory-delRight" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
[[/if]]
</div>
</script>
<!--图片列表-->
<script type="text/template" id="imageList-template">
<p>
标题:<input type="text" class="observe" data-field="title.title" value="[[contentData.data.title.title]]" style="width:100px;">
显示名称: <input type="radio" name="is_show_name" id="imageList_Y" value="Y"> <input type="radio" name="is_show_name" id="imageList_N" value="N"> &nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" id="is_show_name" for="radio" value="[[contentData.data.title.is_show_name]]" />
每行显示:<input style="width:60px;" type="number" data-field="title.column_num" class="observe" value="[[contentData.data.title.column_num]]"> 张图片
</p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加图片" style="margin:10px;" id="imageList-addOne"></p>
[[if contentData.data.list.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.list as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="list.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="list.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="list.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm imageList-del" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
[[/if]]
</script>
<!--文本导航-->
<script type="text/template" id="textNav-template">
<div class="textNav-baseForm">
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加一个" style="margin:10px;" id="textNav-addOne"></p>
[[each contentData.data as item index]]
<p>
导航名称:<input type="text" value="[[item.name]]" class="observe" data-field="[[index]].name" required>
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="[[index]].url.action">
[[layout action_template]]
</select>
<input value="[[item.url.url]]" data-field="[[index]].url.url" class="observe" required="required"/>
<a type="button" class="btn btn-danger btn-xs textNav-delOne" data-index="[[index]]">删除</a>
</p>
[[/each]]
</div>
</script>
<!--轮播banner-->
<script type="text/template" id="carouselBanner-template">
<input type="button" name="select-pic" value="添加图片" class="btn btn-info btn-xs" style="margin:10px;" id="carouselBanner-addOne">
  轮播速度:<input type="text" class="observe" data-field="speed" value="[[contentData.data.speed]]"><br>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.list as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td><button class="btn btn-danger btn-sm carouselBanner-del" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
</script>
<!--添加促销-->
<script type="text/template" id="promotion-template">
<p> 添加促销id<input type="text" class="observe" value="[[contentData.data.promotionId]]" data-field="promotionId"></p>
</script>
<!--标题广告-->
<script type="text/template" id="singleNameImage-template">
<p style="margin:10px;">添加标题: <input type="text" class="observe" value="[[contentData.data.title]]" data-field="title"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><input type="file" name="file" value="[[contentData.data.src]]" class="observe" data-field="src" required/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[contentData.data.url.action]]" data-field="url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[contentData.data.url.url]]" class="observe form-control" required="required" data-field="url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[contentData.data.alt]]" class="observe form-control" data-field="alt"/>
</div>
</td>
</tr>
</tbody>
</table>
</script>
<!--焦点图-->
<script type="text/template" id="focus-template">
<input type="button" class="btn btn-info btn-xs" id="focus-addOne" value="添加图片" style="margin:10px;"><br>
焦点图类型:&nbsp;&nbsp;
<select id="focus-select" value="[[contentData.focus_type]]">
<option value="1">通栏</option>
<option value="2">左右滑动</option>
<option value="3">手风琴</option>
</select>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src" required/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.alt]]" class="observe form-control" data-field="[[index]].alt"/>
</div>
<div class="col-sm-12">
<input placeholder="通栏背景色" value="[[item.bgColor]]" class="observe form-control" data-field="[[index]].bgColor"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm focus-del" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
</script>
<!--select选项-->
<script type="text/template" id="action_template">
<option value="">选择跳转目标</option>
... ... @@ -364,4 +819,31 @@
<script type="text/template" id="noEdit-template">
<div>固定内容,暂时无法编辑!</div>
</script>
<!--有序焦点-->
<script type="text/template" id="debrisSlider-grid">
<li>
<table style="width:100%;z-index:-1;" id="tableImageBox">
<tbody>
<tr>
<td style="width:100px;"><img class="bImgBox" src="[[src]]"></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="recommendContent-observe" value="[[url.action]]" data-rows="[[__index]]" data-index="[[index]]" data-observe="list-action" >
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input value="[[url.url]]" class="recommendContent-observe" required="required" data-rows="[[__index]]" data-index="[[index]]" data-observe="list-url" />
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[url.title]]" class="recommendContent-observe" required="required" data-rows="[[__index]]" data-index="[[index]]" data-observe="list-url" />
</div>
</td>
<td><input type="button" value="更换图片" class="btn btn-info btn-xs change-big-pic" data-id=""> <input class="btn btn-danger btn-xs del-pic" type="button" value="删除" data-id=""></td>
</tr>
</tbody>
</table>
</li>
</script>
\ No newline at end of file
... ...
... ... @@ -77,7 +77,7 @@
<img src="/js/source/plugins/trendgoodsTopic/trend.png" width="96%">
</div>
</div>
[[else if module.contentData.template_name=='customBrands']]
[[else if module.contentData.template_name=='appHotBrands']]
<div class="custom-pic">
<div class="hot-brand-title">[[module.contentData.data.title]]</div>
<ul class="custom-pic clearfix">
... ... @@ -141,7 +141,7 @@
[[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>
<ul class="custom-pic clearfix image-list-box resource-row li[[12/module.contentData.data.title.column_num]]">
<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]]
... ... @@ -184,10 +184,10 @@
</div>
[[else if module.contentData.template_name=='imageGroup']]
<div class="custom-group-list focus">
<div class="custom-group-box">
<div class="image-group-box">
<div class="row">
[[each module.contentData.data.list as item index]]
<div class="col-lg-[[12/(module.contentData.data.show_num?module.contentData.data.show_num:4)]]">
<div class="col-lg-[[12/(module.contentData.data.show_num=='0'?3:module.contentData.data.show_num)]]">
<img src="[[item.src]]" class="image-group-box-[[module.contentData.data.show_num==1?'big':'small']]">
</div>
[[/each]]
... ... @@ -231,7 +231,7 @@
</div>
<div class='row'>
[[each module.contentData.data.list as item index]]
<div class='col-sm-6 matchImage'><img src="[[item.src]]"></div>
<div class='col-sm-4 matchImage'><img src="[[item.src]]"></div>
[[/each]]
</div>
</div>
\ No newline at end of file
... ...
<script type="text/template" id="template_content">
<!-- 文本内容 -->
[[each modules as module index]]
<li class="custom-group text" data-index="[[index]]">
<li class="form-group custom-group" data-index="[[index]]" style="width: 100%">
[[if module.contentData.template_name=='text']]
<div class="con">[[module.contentData.data.text]]</div>
<div class="col-sm-12"><h3>[[module.contentData.data.text]]</h3></div>
[[else if module.contentData.template_name=='singleImage']]
<div class="list">
<img src="[[module.data[0].src]]" title="[[module.data[0].title]]">
<div class="col-sm-12">
<img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
</div>
[[else if module.contentData.template_name=='smallPic']]
<div class="small-pic">
<ul class="small-pic-list">
[[each module.contentData.data as item i]]
<img src="[[item.src]]" title="[[item.title]]">
<div class="col-sm-6">
<img src="[[item.src]]" title="[[item.title]]">
</div>
[[/each]]
</ul>
</div>
[[else if module.contentData.template_name=='goods']]
<div class="small-pic">
<ul class="small-pic-list">
[[each module.contentData.data as item i]]
<img src="[[item.src]]" title="[[item.id]]">
<div class="col-sm-6">
<img src="[[item.src]]" title="[[item.title]]">
</div>
[[/each]]
</ul>
</div>
[[else if module.contentData.template_name=='link']]
<div class="list">
<h3>添加链接</h3>
</div>
<div class="col-sm-12">
<h3>添加链接</h3>
</div>
[[else if module.contentData.template_name=='goodsGroup']]
<div class="small-pic">
<div class="small-pic-list2">
<div class="form-group">
[[each module.contentData.data as items i]]
<div class="col-sm-3">
<img src="[[items.cover.cover]]" >
</div>
[[/each]]
</div>
<div class="small-pic-list">
[[each module.contentData.data[0].list as item index]]
<img src="[[item.src]]" title="[[item.id]]">
[[/each]]
[[each module.contentData.data[0].list as item index]]
<div class="col-sm-6">
<img src="[[item.src]]" title="[[item.id]]">
</div>
[[/each]]
</ul>
</div>
{{> resource/taoyu2}}
{{> resource/taoyu2}}
[[/if]]
<div class="actions-box">
<div class="actions-wrap">
... ... @@ -81,7 +75,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-index="[[index]]" /></td>
<td><input type="file" name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" /></td>
</tr>
[[/each]]
</tbody>
... ... @@ -96,7 +90,7 @@
<div class="form-group">
<div class="col-sm-12">
<ul class="cover-image-list col-sm-10" id="goodspic">
[[each data as item index]]
[[each contentData.data as item index]]
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
... ... @@ -131,14 +125,21 @@
[[/each]]
</script>
<!--添加商品/商品组--选择标签界面模板-->
<script type="text/template" id="template_dialog_goodsgird">
<div class="rows">
<div class="form-group">
<div class="col-sm-4">
<input class="form-control" placeholder="输入SKN" />
<div class="panel-col2">
<input class="form-control" id="skns" placeholder="输入SKN(多个skn以逗号分隔)" />
</div>
<div class="col-sm-4">
<input class="form-control" placeholder="输入标签" />
<div class="panel-col">
<input type="number" id="beginPrice" name="begin_price" class="form-control"
placeholder="起始价" value="" >
</div>
<div class="panel-col">
<input type="number" id="endPrice" name="end_price" class="form-control"
placeholder="结束价" value="" >
</div>
<div class="col-sm-1">
<input type="button" id="search" class="btn btn-primary mr5" value="搜索" />
... ... @@ -153,7 +154,7 @@
<!-- 推荐商品 -->
<script type="text/tempalte" id="template_dialog_remgoods">
<div class="rows" id="groupsgoods">
[[each data as items i]]
[[each contentData.data as items i]]
<div class="form-group">
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10" id="goodspic-0">
... ... @@ -186,7 +187,7 @@
</script>
<script type="text/template" id="template_dialog_remgoodsgroup">
[[each data as items i]]
[[each contentData.data as items i]]
<div class="form-group">
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10" id="goodspic-0">
... ... @@ -214,7 +215,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">选择跳转目的地:</label>
<div class="col-sm-8">
<select class="form-control observe" data-index="0" data-field="url.action" value='[[data[0].url.action]]'>
<select class="form-control observe" data-field="0.url.action" value='[[contentData.data[0].url.action]]'>
[[layout template_default_1]]
</select>
... ... @@ -224,7 +225,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">跳转地址:</label>
<div class="col-sm-8">
<textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="url.url" data-index="0">[[data[0].url.url]]</textarea>
<textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="0.url.url" >[[contentData.data[0].url.url]]</textarea>
</div>
</div>
... ...