Authored by 姜敏

4.5资源位部分合并到4.3版本中

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,9 +89,10 @@ var Button = [
},
{
"template_name": "appIconList",
button_name:"图标入口",
button_name: "图标入口",
"template_intro": "图标",
dialog:"icon-template",
"number": 4,
dialog: "icon-template",
"data": [
{
"url": {
... ... @@ -105,10 +106,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": "",
... ... @@ -144,7 +145,7 @@ var Button = [
button_name: "推荐(1T-6F)",
template_name: "recommendContentTwo",
template_intro: "一张大图和6个小图推荐",
dialog:"recommendContentTwo-template",
dialog: "recommendContentTwo-template",
"data": {
"title": {
"name": "",
... ... @@ -180,7 +181,7 @@ var Button = [
button_name: "标题广告",
"template_name": "singleNameImage",
"template_intro": "带标题的图片广告",
dialog:"singleNameImage-template",
dialog: "singleNameImage-template",
"data": {
"title": "",
"src": "",
... ... @@ -195,7 +196,7 @@ var Button = [
button_name: "推荐(1T-12F)",
template_intro: "一张大图12个小图推荐",
template_name: "recommendContentThree",
dialog:"recommendContentThree-template",
dialog: "recommendContentThree-template",
"data": {
"big_image": [
{
... ... @@ -223,34 +224,42 @@ 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": []
"list": [],
"image": {
"src": "",
"alt": "",
"url": {
"action": "",
"url": ""
}
}
}
},
{
button_name: "自定义品牌",
template_intro: "自定义品牌",
template_name: "customBrands",
dialog:"brands-template",
dialog: "brands-template",
"data": {
"title": {
"title": "",
... ... @@ -264,7 +273,7 @@ var Button = [
button_name: "一个链接",
template_intro: "一个链接",
template_name: "link",
dialog:"template_dialog_link",
dialog: "template_dialog_link",
data: [
{"url": {"action": "", "url": ""}}
]
... ... @@ -273,7 +282,7 @@ var Button = [
button_name: "添加促销",
template_intro: "促销专区",
template_name: "promotion",
dialog:"promotion-template",
dialog: "promotion-template",
data: {
"promotionId": ""
}
... ... @@ -282,7 +291,7 @@ var Button = [
button_name: "轮播banner",
template_intro: "轮播banner",
template_name: "carouselBanner",
dialog:"carouselBanner-template",
dialog: "carouselBanner-template",
"data": {
"speed": "",
"list": [
... ... @@ -297,7 +306,7 @@ var Button = [
button_name: "kids推荐品牌",
template_intro: "kids推荐品牌",
template_name: "kidsBrands",
dialog:"brands-template",
dialog: "brands-template",
"data": {
"params": {
"param": "",
... ... @@ -316,7 +325,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": "",
... ... @@ -366,7 +375,7 @@ var Button = [
button_name: "添加楼层",
template_intro: "添加楼层",
template_name: "addfloor",
dialog:"icon-template",
dialog: "icon-template",
data: [
{
"url": {},
... ... @@ -381,7 +390,7 @@ var Button = [
button_name: "推荐(标题 + 12张图)",
template_intro: "带标题的12个小图推荐",
template_name: "recommendContentFive",
dialog:"recommendContentFive-template",
dialog: "recommendContentFive-template",
data: {
"title": {
"title": "",
... ... @@ -403,13 +412,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": "",
... ... @@ -420,10 +429,10 @@ var Button = [
}
},
{
button_name:"标题标签",
button_name: "标题标签",
template_intro: "标题标签",
template_name: "title",
dialog:"title-template",
dialog: "title-template",
"data": {
"title_name": "",
"more_name": "",
... ... @@ -443,10 +452,10 @@ var Button = [
}
},
{
button_name:"编辑推荐",
button_name: "编辑推荐",
template_intro: "编辑推荐",
template_name: "editorTalk",
dialog:"editorTalk-template",
dialog: "editorTalk-template",
"data": {
"title": {
"title": "",
... ... @@ -456,10 +465,10 @@ var Button = [
}
},
{
button_name:"热门品类",
button_name: "热门品类",
template_intro: "热门品类",
template_name: "hotCategory",
dialog:"hotCategory-template",
dialog: "hotCategory-template",
"data": {
"title": {
"name": "",
... ... @@ -560,10 +569,10 @@ var Button = [
}
},
{
button_name:"有序焦点",
button_name: "有序焦点",
template_intro: "三张左图两张右图多张中间图",
template_name: "debrisSlider",
dialog:"debrisSlider-template",
dialog: "debrisSlider-template",
"data": {
"big_image": [
{
... ... @@ -580,10 +589,10 @@ var Button = [
}
},
{
button_name:"新人专享",
button_name: "新人专享",
template_intro: "新人专享",
template_name: "newUserFloor",
dialog:"newUserFloor-template",
dialog: "newUserFloor-template",
data: {
"title": {
"name": "",
... ... @@ -607,10 +616,10 @@ var Button = [
}
},
{
button_name:"图片广告",
button_name: "图片广告",
template_intro: "带标题的图片广告",
template_name: "imageGroup",
dialog:"imageGroup-template",
dialog: "imageGroup-template",
data: {
"title": "",
"more": "",
... ... @@ -630,10 +639,10 @@ var Button = [
}
},
{
button_name:"自定义参数",
button_name: "自定义参数",
template_intro: "参数集合",
template_name: "paramsGroup",
dialog:"paramsGroup-template",
dialog: "paramsGroup-template",
data: {
"title": "",
"more": "",
... ... @@ -647,23 +656,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": "",
... ... @@ -681,10 +690,10 @@ var Button = [
}
},
{
button_name:"多标签图片",
button_name: "多标签图片",
template_intro: "多标签图片",
template_name: "multiLabelImage",
dialog:"multiLabelImage-template",
dialog: "multiLabelImage-template",
data: {
"label": [
{
... ... @@ -707,10 +716,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": "",
... ... @@ -762,10 +771,10 @@ var Button = [
}
},
{
button_name:"领券频道",
button_name: "领券频道",
"template_name": "getCoupon",
"template_intro": "领券频道",
dialog:"getCoupon-template",
dialog: "getCoupon-template",
"data": [
{
"title": "标题内容",
... ...
... ... @@ -239,6 +239,26 @@ ViewModel.contentData.forEach(function (item, index) {
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 = {};
item.contentData.data.image = {
"src": "",
"alt": "",
"url": {
"action": "",
"url": ""
}
}
}
}
//默认图标一行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));
... ... @@ -425,6 +445,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() {
... ...
... ... @@ -31,7 +31,7 @@ var config = {
//domain: 'http://172.16.6.243:8088/platform', //谭玲
//domain: 'http://172.16.6.108:8088/platform', //谭玲
//domain: 'http://172.16.6.204:8088/platform', //陆斌斌
yohoSearch: 'http://192.168.102.216:8087/yohosearch',
yohoSearch: 'http://192.168.102.216:8080/yohosearch',
loggers: {
api: {
level: 'verbose'
... ... @@ -51,7 +51,7 @@ var config = {
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.102.202:8088/platform',
yohoSearch: 'http://192.168.102.216:8087/yohosearch',
yohoSearch: 'http://192.168.102.216:8080/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
... ... @@ -72,7 +72,7 @@ var config = {
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.102.202:8081/platform',
yohoSearch: 'http://192.168.102.216:8087/yohosearch',
yohoSearch: 'http://192.168.102.216:8080/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
... ... @@ -93,7 +93,7 @@ var config = {
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.81.6:8189/yoho-admin-portal',
yohoSearch: 'http://search.yohoops.org/yohosearch',
yohoSearch: 'http://192.168.102.216:8080/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
... ...
<!-- 添加图标、楼层 -->
<script type="text/template" id="icon-template">
[[if contentData.template_name=='appIconList']]
<div class="panel-body">
<div class="form-group">
<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>
[[/if]]
<div class="panel-body">
<div>
<table class="table table-hover table-bordered responsive dataTable no-footer">
... ... @@ -134,6 +151,9 @@
[[/if]]
</div>
<div class="panel-body">
<div class="form-group">
<a href="JavaScript:;" id="addBrands" class="btn btn-primary btn-xs">添加品牌</a>
</div>
<div>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
... ... @@ -166,11 +186,55 @@
</tbody>
</table>
</div>
<a href="JavaScript:;" id="addBrands" class="btn btn-primary btn-xs">添加品牌</a>
</div>
<div id="brandLists">
</div>
<div class="panel-body">
[[if contentData.template_name=='appHotBrands']]
<div class="form-group">
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>图片</th>
<th>选项</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="file" name="file" value="[[contentData.data.image.src]]"
class="observe" required="required"
data-field="image.src"/>
</td>
<td>
<div class="form-group ">
<select name="goTo" class="form-control observe"
value="[[contentData.data.image.url.action]]"
data-field="image.url.action">
[[layout action_template]]
</select>
</div>
<div class="form-group ">
<input value="[[contentData.data.image.url.url]]"
class="form-control observe"
data-field="image.url.url" placeholder="图片链接"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
<div class="form-group ">
<input value="[[contentData.data.image.alt]]"
class="form-control observe"
data-field="image.alt" placeholder="图片描述"/>
</div>
</td>
</tr>
</tbody>
</table>
</div>
[[/if]]
</div>
</script>
<!--品牌选择模态-->
... ...
... ... @@ -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">
<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 style="width:75px; float:left;margin-left:5px;"><img src="[[item.src]]"></li>
<li><img src="[[item.src]]" class="custom-pic-img" style="margin:2px;"></li>
[[/each]]
</ul>
</div>
</div>
[[else if module.contentData.template_name=='recommendContentOne']]
<div class="recommend_content_one">
... ... @@ -97,6 +94,11 @@
<img src="[[item.src]]" class="custom-pic-img" style="margin:2px;">
</li>
[[/each]]
[[if module.contentData.data.image.src!='']]
<li>
<img src="[[module.contentData.data.image.src]]" class="custom-pic-img" style="margin:2px;">
</li>
[[/if]]
</ul>
</div>
</div>
... ...