Authored by weiqingting

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

# Conflicts:
#	server/interface/common_select.js
... ... @@ -192,7 +192,7 @@
//,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
//,zIndex : 900 //编辑器层级的基数,默认是900
,zIndex : 10 //编辑器层级的基数,默认是900
//如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
//注意这里添加的样式,最好放在.edui-editor-body .edui-body-container这两个的下边,防止跟页面上css冲突
... ...
... ... @@ -76,7 +76,7 @@ var g = new common.grid({
}
}]
});
g.init('/hotSearchBrand/queryHotBrandList1');
g.init('/hotSearchBrand/queryHotBrandList');
var edit = new common.edit2(".modal-body");
var Bll = {
module: null,
... ...
var Button = [
{
button_name:"文本",
dialog:"template_dialog_text",
button_name: "文本",
dialog: "template_dialog_text",
data: {text: ""},
template_name: "text"
},
{
template_intro: "一张图片",
button_name:"一张图",
dialog:"template_dialog_grid",
button_name: "一张图",
dialog: "template_dialog_grid",
template_name: "singleImage",
data: [{
"url": {
... ... @@ -21,9 +21,9 @@ var Button = [
}]
},
{
button_name:"添加小图",
button_name: "添加小图",
template_name: "smallPic",
dialog:"template_dialog_grid",
dialog: "template_dialog_grid",
data: [{
"url": {
"action": "",
... ... @@ -44,8 +44,8 @@ var Button = [
},
{
template_intro: "焦点图",
button_name:"焦点图",
dialog:"focus-template",
button_name: "焦点图",
dialog: "focus-template",
template_name: "focus",
data: [
{
... ... @@ -59,9 +59,9 @@ var Button = [
},
{
template_intro: "添加商品",
button_name:"添加商品",
button_name: "添加商品",
template_name: "goods",
dialog:"template_dialog_goods",
dialog: "template_dialog_goods",
data: [
// {
// src:"",
... ... @@ -71,9 +71,9 @@ var Button = [
},
{
template_intro: "添加商品组",
button_name:"添加商品组",
button_name: "添加商品组",
template_name: "goodsGroup",
dialog:"template_dialog_remgoods",
dialog: "template_dialog_remgoods",
data: [
{
cover: {cover: "", maxSortId: ""},
... ... @@ -89,12 +89,13 @@ var Button = [
},
{
"template_name": "appIconList",
button_name:"图标入口",
button_name: "图标入口",
"template_intro": "图标",
dialog:"icon-template",
dialog: "icon-template",
"number": 4,
"data": [
{
"column_num":4,
"url": {
"action": "",
"url": ""
... ... @@ -106,10 +107,10 @@ var Button = [
]
},
{
button_name:"推荐(1T-1L-4R)",
button_name: "推荐(1T-1L-4R)",
template_intro: "一张大图一个大的推荐和4个小图推荐",
template_name: "recommendContentOne",
dialog:"recommendContentOne-template",
dialog: "recommendContentOne-template",
"data": {
"title": {
"name": "",
... ... @@ -145,7 +146,7 @@ var Button = [
button_name: "推荐(1T-6F)",
template_name: "recommendContentTwo",
template_intro: "一张大图和6个小图推荐",
dialog:"recommendContentTwo-template",
dialog: "recommendContentTwo-template",
"data": {
"title": {
"name": "",
... ... @@ -181,7 +182,7 @@ var Button = [
button_name: "标题广告",
"template_name": "singleNameImage",
"template_intro": "带标题的图片广告",
dialog:"singleNameImage-template",
dialog: "singleNameImage-template",
"data": {
"title": "",
"src": "",
... ... @@ -196,7 +197,7 @@ var Button = [
button_name: "推荐(1T-12F)",
template_intro: "一张大图12个小图推荐",
template_name: "recommendContentThree",
dialog:"recommendContentThree-template",
dialog: "recommendContentThree-template",
"data": {
"big_image": [
{
... ... @@ -224,33 +225,33 @@ var Button = [
button_name: "潮人搭配",
template_intro: "潮人搭配",
template_name: "trendsetterCollocation",
dialog:"noEdit-template",
dialog: "noEdit-template",
data: {}
},
{
button_name: "潮品话题",
template_intro: "潮品话题",
template_name: "trendgoodsTopic",
dialog:"noEdit-template",
dialog: "noEdit-template",
data: {}
},
{
button_name: "推荐品牌",
template_intro: "推荐品牌",
template_name: "appHotBrands",
dialog:"brands-template",
dialog: "brands-template",
"data": {
"title": {
"title": ""
},
"is_show_name": "N",
"list": [],
"image":{
"image": {
"src": "",
"alt": "",
"url":{
"action":"",
"url":""
"url": {
"action": "",
"url": ""
}
}
... ... @@ -260,7 +261,7 @@ var Button = [
button_name: "自定义品牌",
template_intro: "自定义品牌",
template_name: "customBrands",
dialog:"brands-template",
dialog: "brands-template",
"data": {
"title": {
"title": "",
... ... @@ -274,7 +275,7 @@ var Button = [
button_name: "一个链接",
template_intro: "一个链接",
template_name: "link",
dialog:"template_dialog_link",
dialog: "template_dialog_link",
data: [
{"url": {"action": "", "url": ""}}
]
... ... @@ -283,7 +284,7 @@ var Button = [
button_name: "添加促销",
template_intro: "促销专区",
template_name: "promotion",
dialog:"promotion-template",
dialog: "promotion-template",
data: {
"promotionId": ""
}
... ... @@ -292,7 +293,7 @@ var Button = [
button_name: "轮播banner",
template_intro: "轮播banner",
template_name: "carouselBanner",
dialog:"carouselBanner-template",
dialog: "carouselBanner-template",
"data": {
"speed": "",
"list": [
... ... @@ -307,7 +308,7 @@ var Button = [
button_name: "kids推荐品牌",
template_intro: "kids推荐品牌",
template_name: "kidsBrands",
dialog:"brands-template",
dialog: "brands-template",
"data": {
"params": {
"param": "",
... ... @@ -326,7 +327,7 @@ var Button = [
button_name: "推荐(L1-RT1-RF2)",
template_intro: "推荐(L1-RT1-RF2)",
template_name: "recommendContentFour",
dialog:"recommendContentFour-template",
dialog: "recommendContentFour-template",
"data": {
"left": {
"title": "",
... ... @@ -376,7 +377,7 @@ var Button = [
button_name: "添加楼层",
template_intro: "添加楼层",
template_name: "addfloor",
dialog:"icon-template",
dialog: "icon-template",
data: [
{
"url": {},
... ... @@ -391,7 +392,7 @@ var Button = [
button_name: "推荐(标题 + 12张图)",
template_intro: "带标题的12个小图推荐",
template_name: "recommendContentFive",
dialog:"recommendContentFive-template",
dialog: "recommendContentFive-template",
data: {
"title": {
"title": "",
... ... @@ -413,13 +414,13 @@ var Button = [
button_name: "文本导航",
template_intro: "文本链接",
template_name: "textNav",
dialog:"textNav-template",
dialog: "textNav-template",
data: []
},
{
button_name:"图片列表",
button_name: "图片列表",
template_name: "imageList",
dialog:"imageList-template",
dialog: "imageList-template",
"data": {
"title": {
"title": "",
... ... @@ -430,10 +431,10 @@ var Button = [
}
},
{
button_name:"标题标签",
button_name: "标题标签",
template_intro: "标题标签",
template_name: "title",
dialog:"title-template",
dialog: "title-template",
"data": {
"title_name": "",
"more_name": "",
... ... @@ -453,10 +454,10 @@ var Button = [
}
},
{
button_name:"编辑推荐",
button_name: "编辑推荐",
template_intro: "编辑推荐",
template_name: "editorTalk",
dialog:"editorTalk-template",
dialog: "editorTalk-template",
"data": {
"title": {
"title": "",
... ... @@ -466,10 +467,10 @@ var Button = [
}
},
{
button_name:"热门品类",
button_name: "热门品类",
template_intro: "热门品类",
template_name: "hotCategory",
dialog:"hotCategory-template",
dialog: "hotCategory-template",
"data": {
"title": {
"name": "",
... ... @@ -570,10 +571,10 @@ var Button = [
}
},
{
button_name:"有序焦点",
button_name: "有序焦点",
template_intro: "三张左图两张右图多张中间图",
template_name: "debrisSlider",
dialog:"debrisSlider-template",
dialog: "debrisSlider-template",
"data": {
"big_image": [
{
... ... @@ -590,10 +591,10 @@ var Button = [
}
},
{
button_name:"新人专享",
button_name: "新人专享",
template_intro: "新人专享",
template_name: "newUserFloor",
dialog:"newUserFloor-template",
dialog: "newUserFloor-template",
data: {
"title": {
"name": "",
... ... @@ -617,10 +618,10 @@ var Button = [
}
},
{
button_name:"图片广告",
button_name: "图片广告",
template_intro: "带标题的图片广告",
template_name: "imageGroup",
dialog:"imageGroup-template",
dialog: "imageGroup-template",
data: {
"title": "",
"more": "",
... ... @@ -640,10 +641,10 @@ var Button = [
}
},
{
button_name:"自定义参数",
button_name: "自定义参数",
template_intro: "参数集合",
template_name: "paramsGroup",
dialog:"paramsGroup-template",
dialog: "paramsGroup-template",
data: {
"title": "",
"more": "",
... ... @@ -657,23 +658,23 @@ var Button = [
}
},
{
button_name:"自定义参数图片",
button_name: "自定义参数图片",
template_intro: "自定义参数图片",
template_name: "",
dialog:"noEdit-template",
dialog: "noEdit-template",
data: {}
},
{
button_name:"站内公告",
button_name: "站内公告",
template_intro: "站内公告",
template_name: "announcement",
dialog:"noEdit-template"
dialog: "noEdit-template"
},
{
button_name:"标题图片",
button_name: "标题图片",
template_intro: "标题图片",
template_name: "titleImage",
dialog:"titleImage-template",
dialog: "titleImage-template",
data: {
"title": "",
"more_name": "",
... ... @@ -691,10 +692,10 @@ var Button = [
}
},
{
button_name:"多标签图片",
button_name: "多标签图片",
template_intro: "多标签图片",
template_name: "multiLabelImage",
dialog:"multiLabelImage-template",
dialog: "multiLabelImage-template",
data: {
"label": [
{
... ... @@ -717,10 +718,10 @@ var Button = [
}
},
{
button_name:"搭配(2T-nF)",
button_name: "搭配(2T-nF)",
template_intro: "搭配(2T-nF)",
template_name: "matchImage",
dialog:"matchImage-template",
dialog: "matchImage-template",
data: {
"title": {
"name": "",
... ... @@ -772,10 +773,10 @@ var Button = [
}
},
{
button_name:"领券频道",
button_name: "领券频道",
"template_name": "getCoupon",
"template_intro": "领券频道",
dialog:"getCoupon-template",
dialog: "getCoupon-template",
"data": [
{
"title": "标题内容",
... ...
... ... @@ -17,7 +17,7 @@ common.util.__ajax({
async: false
}, function (res) {
resources = res.data;
console.log(resources);
//console.log(resources);
}, true);
/*配置模块*/
... ... @@ -210,6 +210,7 @@ for (var i = 0; i < resources.length; i++) {
item.contentData.data.more_link.action = JSON.parse(temp).action || "";
item.contentData.data.more_link.url = JSON.parse(temp).url || "";
}
//推荐品牌默认加一张图片
if (item.contentData.template_name == 'appHotBrands') {
if (!item.contentData.data.image) {
item.contentData.data.image = {};
... ... @@ -223,6 +224,12 @@ for (var i = 0; i < resources.length; i++) {
}
}
}
//默认图标一行4个
if (item.contentData.template_name == 'appIconList') {
if (!item.contentData.number) {
item.contentData.number = 4;
}
}
item.contentData = JSON.stringify(item.contentData);
item.contentData = item.contentData.replace(/(gif|png|jpg|jpeg)\?[^"]*/g, '$1');
item.contentData = common.util.__ObjToArray(JSON.parse(item.contentData));
... ... @@ -260,7 +267,7 @@ $(document).on("change", ".observe", function () {
/*删除*/
$(document).on("click", ".del", function () {//删除
var index = $(this).data("index");
console.log(Bll.contentDatas[currIndex][index]);
//console.log(Bll.contentDatas[currIndex][index]);
common.dialog.confirm("警告",
common.util.__template2("是否确认删除?", {}),
function () {
... ... @@ -280,7 +287,7 @@ $(document).on("click", ".edit", function () {
var index = $(this).data("index");
var item = Bll.contentDatas[currIndex][index];
Bll.module = $.extend(true, {}, item);
console.log(Bll.module);
//console.log(Bll.module);
Bll.toast(index, Bll.module);
});
... ... @@ -392,6 +399,11 @@ $(document).on("click", '.is_show_name_brand', function () {
Bll.module.contentData.data.is_show_name = $(this).val();
Bll.renderDialog("brands-template");
});
//图标入口 一行显示个数
$(document).on("click", '.number', function () {
Bll.module.contentData.number = $(this).val();
Bll.renderDialog("icon-template");
});
//**********************************************************************************/
//复制
$(document).on("click", "#copyTab", function () {
... ...
... ... @@ -133,7 +133,7 @@ var g = new common.grid({
}
}]
});
g.init('/suggest/suggest/getSuggestList1');
g.init('/suggest/suggest/getSuggestList');
var Bll = {
dropDown: function (url, title, data) {
... ...
exports.domain =require('../config/common.js').domain;
//exports.domain ='http://172.16.6.250:8081/platform';//庞洁
// exports.domain = 'http://172.16.6.225:8080/platform';
exports.res = [
//原 supplier
... ...
... ... @@ -4,20 +4,20 @@
*/
//接口主域
//exports.domain = require('../config/common.js').domain;
exports.domain = "http://172.16.6.214:8088/platform";
exports.domain = require('../config/common.js').domain;
//exports.domain = "http://172.16.6.214:8088/platform";
//路由配置
exports.res = [
{
//搜索词页面渲染
route: '/hotSearchBrand/queryHotBrandList',
route: '/hotSearchBrand/index',
method: 'GET',
view: 'pages/hotBrands/index',
src: '/hotBrands/index'
},
//搜索词列表
{
route: '/hotSearchBrand/queryHotBrandList1',
route: '/hotSearchBrand/queryHotBrandList',
method: 'POST',
url: '/hotSearchBrand/queryHotBrandList',
params: [
... ...
... ... @@ -3,20 +3,20 @@
*/
//接口主域
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.225:8080/platform';
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.225:8080/platform';
//路由配置
exports.res = [
{
//页面渲染
route: '/suggest/suggest/getSuggestList',
route: '/suggest/suggest/index',
method: 'GET',
view: 'pages/suggest/index',
src: '/suggest/index'
},
//列表
{
route: '/suggest/suggest/getSuggestList1',
route: '/suggest/suggest/getSuggestList',
method: 'POST',
url: '/suggest/suggest/getSuggestList',
params: [
... ...
... ... @@ -3,11 +3,16 @@
[[if contentData.template_name=='appIconList']]
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2">每行显示张数</label>
<div class="col-sm-3">
<select class="form-control observe" value="[[contentData.data.column_num]]" data-field="column_num">
[[layout parm3_template]]
</select>
<label class="col-sm-2">图标类型</label>
<div class="col-sm-10">
<label style="cursor: pointer;">
<input type="radio" name="number" class="number" value="4">一行4
</label>
<label style="cursor: pointer;">
<input type="radio" name="number" class="number" value="5">一行5
</label>
<input type="hidden" id="number" value="[[contentData.number]]" for="radio"/>
</div>
</div>
</div>
... ... @@ -283,10 +288,6 @@
<option value="promotion">促销id</option>
<option value="msort">大分类ID</option>
</script>
<script type="text/template" id="parm3_template">
<option value="4">一行4</option>
<option value="5">一行5</option>
</script>
<!-- 9-1 标题标签 -->
<script type="text/template" id="title-template">
<div class="rows">
... ...
... ... @@ -5,15 +5,12 @@
</div>
</div>
[[else if module.contentData.template_name=='appIconList']]
<div>
<div class="row title">[[module.contentData.template_intro]]</div>
<div class="app_icon_list">
<ul class="icon-list clearfix li[[module.contentData.data.column_num]]">
[[each module.contentData.data as item index]]
<li style="width:75px; float:left;margin-left:5px;"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
<div class="custom-pic">
<ul class="custom-pic clearfix image-list-box resource-row li[[module.contentData.number]]">
[[each module.contentData.data as item index]]
<li><img src="[[item.src]]" class="custom-pic-img" style="margin:2px;"></li>
[[/each]]
</ul>
</div>
[[else if module.contentData.template_name=='recommendContentOne']]
<div class="recommend_content_one">
... ...