Authored by wangwei

楼层

... ... @@ -66,6 +66,24 @@
<div style="float: right;">[[module.contentData.data.title.more_name]]</div>
</div>
</div>
[[else if module.contentData.template_name=='newProductListFloor']]
<div class="col-sm-12">
<div class="wordText">
<span>新品商品列表</span>
</div>
</div>
[[else if module.contentData.template_name=='findGoodsListFloor']]
<div class="col-sm-12">
<div class="wordText">
<span>发现好货列表</span>
</div>
</div>
[[else if module.contentData.template_name=='popularListFloor']]
<div class="col-sm-12">
<div class="wordText">
<span>人气单品列表</span>
</div>
</div>
[[else if module.contentData.template_name=='sixLinesFloor']]
[[each module.contentData.data.list as item i]]
<div class="col-sm-6">
... ... @@ -700,3 +718,133 @@
</div>
</script>
<!-- 新品商品列表 -->
<script type="text/template" id="newProductListFloor-template">
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">选择频道</label>
<div class="col-sm-8">
<select class="form-control observe input-form" name="channel" value="[[contentData.data.channel]]" data-field="channel">
<option value="-1">选择频道</option>
<option value="1">男生</option>
<option value="2">女生</option>
<option value="3">潮童</option>
<option value="4">创意生活</option>
</select>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">默认逻辑</label>
<div class="col-sm-8">
<label style="color:#CCC">新品到着首页前10个不同品牌的商品</label>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">左滑链接</label>
<div class="col-sm-8">
<select name="goTo" class="form-control observe input-form" value="[[contentData.data.url.action]]" data-field="url.action">
[[layout action_template]]
</select>
<input value="[[contentData.data.url.url]]" class="form-control observe input-form" data-field="url.url" placeholder="url"/>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">默认skn</label>
<div class="col-sm-8">
<input type="text" placeholder="多个skn用英文逗号连接,按照顺序排在原逻辑前" class="observe form-control input-form" data-field="skns" value="[[contentData.data.skns]]" style="width:500px;">
</div>
</div>
</div>
</script>
<!--发现好货列表-->
<script type="text/template" id="findGoodsListFloor-template">
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">选择频道</label>
<div class="col-sm-8">
<select class="form-control observe input-form" name="channel" value="[[contentData.data.channel]]" data-field="channel">
<option value="-1">选择频道</option>
<option value="1">男生</option>
<option value="2">女生</option>
<option value="3">潮童</option>
<option value="4">创意生活</option>
</select>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">逻辑说明</label>
<div class="col-sm-8">
<label style="color:#CCC">发现好货的前10个商品</label>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">左滑链接</label>
<div class="col-sm-8">
<select name="goTo" class="form-control observe input-form" value="[[contentData.data.url.action]]" data-field="url.action">
[[layout action_template]]
</select>
<input value="[[contentData.data.url.url]]" class="form-control observe input-form" data-field="url.url" placeholder="url"/>
</div>
</div>
</div>
</script>
<!--人气单品列表-->
<script type="text/template" id="popularListFloor-template">
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">选择频道</label>
<div class="col-sm-8">
<select class="form-control observe input-form" name="channel" value="[[contentData.data.channel]]" data-field="channel">
<option value="-1">选择频道</option>
<option value="1">男生</option>
<option value="2">女生</option>
<option value="3">潮童</option>
<option value="4">创意生活</option>
</select>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">数据来源</label>
<div class="col-sm-8">
<input type="radio" name="dataSource" class="dataSource" value="1" [[contentData.data.dataSource=="1"?"checked":""]]> TOP100
<input type="radio" name="dataSource" class="dataSource" value="2" [[contentData.data.dataSource=="2"?"checked":""]]> 个性化推荐 &emsp;
<input type="hidden" id="dataSource" for="radio" value="[[contentData.data.dataSource]]" />
</div>
</div>
</div>
<div class="panel-body activityShow">
<div class="row">
<label class="col-sm-2 control-label">活动ID</label>
<div class="col-sm-8">
<input value="[[contentData.data.activityId]]" class="form-control observe input-form" data-field="activityId" placeholder="商品池ID"/>
</div>
</div>
</div>
<div class="panel-body">
<div class="row">
<label class="col-sm-2 control-label">左滑链接</label>
<div class="col-sm-8">
<select name="goTo" class="form-control observe input-form" value="[[contentData.data.url.action]]" data-field="url.action">
[[layout action_template]]
</select>
<input value="[[contentData.data.url.url]]" class="form-control observe input-form" data-field="url.url" placeholder="url"/>
</div>
</div>
</div>
</script>
... ...
... ... @@ -1471,7 +1471,51 @@ var Button = [
}
]
}
}
},
{
button_name: "新品商品列表",
template_name: "newProductListFloor",
template_intro: "新品商品列表",
__title:"新品商品列表楼层",
dialog: "newProductListFloor-template",
data: {
"channel":"",
"url": {
"action": "",
"url": ""
},
"skns":""
}
},
{
button_name: "发现好货列表",
template_name: "findGoodsListFloor",
template_intro: "发现好货列表",
__title:"发现好货列表楼层",
dialog: "findGoodsListFloor-template",
data: {
"channel":"",
"url": {
"action": "",
"url": ""
}
}
},
{
button_name: "人气单品列表",
template_name: "popularListFloor",
template_intro: "人气单品列表",
__title:"人气单品列表楼层",
dialog: "popularListFloor-template",
data: {
"dataSource":"",
"url": {
"action": "",
"url": ""
},
"activityId":""
}
}
];
module.exports = Button;
... ...
... ... @@ -88,10 +88,16 @@ var Bll = {
if(!checkLockStatus()){
return false;
}
//人气单品
if(module.contentData.template_name == 'popularListFloor'){
if(module.contentData.data.dataSource=='2'){
module.contentData.data.activityId='';
}
}
var couponFlag = true;
//好店推荐切换radio,增加/删除校验
var shopRecommendFlag = false;
if(module.contentData.template_name == 'shopRecommend') {
if(module.contentData.template_name == 'shopRecommend') {
if(module.contentData.isShopRecommend=="N"||module.contentData.isShopRecommend==""){
$(".shopRecommendRequired").attr("required",true);
module.contentData.shopChannelId='';
... ... @@ -756,6 +762,17 @@ $(document).on("click", '.isShopRecommend', function () {
//切换到推荐
changeShopRecommendDivShow(_isShopRecommend)
});
//人气单品列表
$(document).on("click", '.dataSource', function () {
var _dataSource = $(this).val();
Bll.module.contentData.data.dataSource = _dataSource;
if(_dataSource=='2') {
$(".activityShow").css('display', 'none');
}else{
$(".activityShow").css('display', 'block');
}
});
$(document).on("change", '.shopChannelId', function () {
Bll.module.contentData.shopChannelId = $(this).val();
//Bll.renderDialog("shopRecommend-template");
... ...