Authored by xuhongyun

build

... ... @@ -98,12 +98,16 @@ webpackJsonp([17],{
location.href = '/ajax/download?path=' + path;
});
$(function(){
$(".countryInfo").empty().html(common.util.__template2($("#countryInfoList").html(), {data: mainData.countryInfoList, brandHeadstream:mainData.brandHeadstream}));
});
$(document).on('click','#save_brand',function () {
e.submit($("#basicForm").attr("action"), function (option) {
//option.data.authorizeCerts = authorizeCertList;
option.data.countryId = option.data.brandHeadstream;
var brandHeadstream = $("input[name='brandHeadstream']:checked").val();
option.data.countryId = brandHeadstream;
option.data.brandHeadstream = brandHeadstream;
option.data.authorizeCerts = JSON.stringify(authorizeCertList);
option.success = function (res) {
... ...
... ... @@ -1244,34 +1244,6 @@ webpackJsonp([170],{
Bll.moduleDataList[index].moduleData.properties = {};
}
if(moduleType == 'RecommendProduct' || moduleType == 'AppRecommendProduct') {
validation = Bll.validator.validateModule(moduleType, Bll.recommendProduct);
Bll.saveRecommendProduct(index);
var displayType = Bll.recommendProduct.displayType;
if(displayType == 1){// 根据skn查询
sknList = Bll.recommendProduct.sknList;
if(sknList.length >0){
var productInfo = Bll.getProductDetailBySkns(sknList.toString());
Bll.moduleDataList[index].moduleData.productInfo = productInfo;
}
}else if(displayType == 0){ // 通过搜索查询商品信息;
var lineNumber = Bll.recommendProduct.lineNumber;
var order = Bll.moduleDataList[index].moduleData.data[0].order;
var shopId = Bll.shopId;
searchProductInfo = Bll.searchProductDetail(lineNumber, order, shopId);
Bll.moduleDataList[index].moduleData.productInfo = searchProductInfo;
if(searchProductInfo == null || searchProductInfo === undefined || searchProductInfo.length <= 0){
common.util.__tip('推荐商品模块自动获取该店铺下商品为空,请先在该店铺下添加可售商品!', 'warning');
return;
}
}
} else {
validation = Bll.validator.validateModule(moduleType, Bll.moduleGrid.__rows);
Bll.moduleDataList[index].moduleData.data = Bll.moduleGrid.__rows;
}
if(! validation) {
return false;
}
// 处理模块数据,增加资源位标识,用于热点分析
$.each(Bll.moduleDataList[index].moduleData.data, function(index, item) {
item.id = Bll.generateRandomNumber();
... ... @@ -1301,7 +1273,34 @@ webpackJsonp([170],{
// 保存是否设置模块间距
Bll.moduleDataList[index].moduleData.properties.isModuleMargin = +$('#moduleMargin').val();
if(moduleType == 'RecommendProduct' || moduleType == 'AppRecommendProduct') {
validation = Bll.validator.validateModule(moduleType, Bll.recommendProduct);
Bll.saveRecommendProduct(index);
var displayType = Bll.recommendProduct.displayType;
if(displayType == 1){// 根据skn查询
sknList = Bll.recommendProduct.sknList;
if(sknList.length >0){
var productInfo = Bll.getProductDetailBySkns(sknList.toString());
Bll.moduleDataList[index].moduleData.productInfo = productInfo;
}
}else if(displayType == 0){ // 通过搜索查询商品信息;
var lineNumber = Bll.recommendProduct.lineNumber;
var order = Bll.moduleDataList[index].moduleData.data[0].order;
var shopId = Bll.shopId;
searchProductInfo = Bll.searchProductDetail(lineNumber, order, shopId);
Bll.moduleDataList[index].moduleData.productInfo = searchProductInfo;
if(searchProductInfo == null || searchProductInfo === undefined || searchProductInfo.length <= 0){
common.util.__tip('推荐商品模块自动获取该店铺下商品为空,请先在该店铺下添加可售商品!', 'warning');
return;
}
}
} else {
validation = Bll.validator.validateModule(moduleType, Bll.moduleGrid.__rows);
Bll.moduleDataList[index].moduleData.data = Bll.moduleGrid.__rows;
}
if(! validation) {
return false;
}
Bll.reloadMain(index);
// 更新计数器
Bll.changedModuleMonitor++;
... ...
... ... @@ -90,31 +90,8 @@
<div class="form-group">
<label class="col-sm-2 control-label">发源地 <span class="red">*</span></label>
<div class="col-sm-10">
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="1"/>欧洲
</label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="2"/>日本 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="3"/>韩国 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="4"/>香港 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="5"/>本地 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="6"/>澳洲 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="7"/>台湾 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="8"/>美国 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="9"/>泰国 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="10"/>新加坡 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="11"/>东南亚 </label>
<label class="radio-inline">
<input type="radio" name="brandHeadstream" value="12"/>加拿大 </label>
<div class ="countryInfo">
</div>
</div>
<input type="hidden" id="brandHeadstream" value="<%data.brandHeadstream%>" required for="radio">
</div>
... ... @@ -182,7 +159,17 @@
</div>
</div>
</div>
<script type="text/template" id="countryInfoList">
[[each data as item _index]]
<label class="radio-inline">
[[if item.id == brandHeadstream]]
<input checked="checked" type="radio" name="brandHeadstream" value=[[item.id]]>[[item.countryChName]]
[[else]]
<input type="radio" name="brandHeadstream" value=[[item.id]]>[[item.countryChName]]
[[/if]]
</label>
[[/each]]
</script>
<!--图片列表-->
<script type="text/template" id="template2">
<ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;">
... ...
... ... @@ -93,11 +93,20 @@
<!-- 两张图 -->
[[if item.moduleType == 'DoubleImage']]
[[if item.moduleData]]
<div class="app-double-image modular-editor" data-type="DoubleImage" data-title="编辑两张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item">
<img src="[[item.moduleData.data[1].pic]]" alt="#" class="img-item">
</div>
[[if item.moduleData.properties]]
<div class="app-double-image modular-editor" data-type="DoubleImage" data-title="编辑两张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item">
<img src="[[item.moduleData.data[1].pic]]" alt="#" class="img-item">
</div>
[[else]]
<div class="app-double-image modular-editor" data-type="DoubleImage" data-title="编辑两张图模块" data-index="[[index]]">
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[else]]
<div class="app-double-image modular-editor" data-type="DoubleImage" data-title="编辑两张图模块" data-index="[[index]]">
<div class="border">
... ... @@ -151,6 +160,18 @@
<img src="[[item.moduleData.data[2].pic]]" alt="#" class="img-item42">
</div>
</div>
[[else]]
<div class="app-triple-image modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]">
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border" style="border-width: 0;">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
</div>
[[/if]]
[[else]]
<div class="app-triple-image modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]">
... ...