Authored by weiqingting

提交

... ... @@ -127,21 +127,7 @@ edit.prototype = {
}
/*初始化文件上传*/
<<<<<<< HEAD
if ($('input[type="file"]', that.el).length > 0) {
$('input[type="file"]', that.el).each(function() {
var src = $(this).attr("value");
var _id = $(this).attr("id") || $(this).attr("name");
var Temp = '<ul class="upload-image-list" id="img-' + _id + '">';
Temp += '<li class="fileinput-button">';
Temp += '<a class="fileinput-button-icon" href="javascript:void(0);">';
if (src) {
var ext = src.split('.').pop().toLowerCase();
if (ext == "mp4") {
Temp += '<video width="76" height="80" src="' + src + '"></video>';
} else {
Temp += '<img width="76" height="80" src="' + src + '">';
=======
if($('input[type="file"]',that.el).length>0){
$('input[type="file"]',that.el).each(function(){
var src=$(this).attr("value");
... ... @@ -158,11 +144,7 @@ edit.prototype = {
}
}else{
Temp+='+';
>>>>>>> master
}
} else {
Temp += '+';
}
Temp += '</a>';
Temp += '</li>';
Temp += '</ul>';
... ... @@ -180,7 +162,6 @@ edit.prototype = {
// $(this).attr("value",response.data);
// }
// });
<<<<<<< HEAD
$('input[type="file"]', that.el).ajaxfileupload({
'action': '/ajax/upload',
'params': {
... ... @@ -188,14 +169,6 @@ edit.prototype = {
"bucket": that.option.bucket || 'smart',
__type: "upload"
},
=======
if(!that.option.bucket){
alert("bucket不存在");
}
$('input[type="file"]',that.el).ajaxfileupload({
'action': '/ajax/upload',
'params':{"userId":543883,"bucket":that.option.bucket,__type:"upload"},
>>>>>>> master
'onComplete': function(response) {
if (response.status && response.code == 200) {
var _w = $(this).next().find('.fileinput-button-icon');
... ...
... ... @@ -227,6 +227,8 @@ common.edit.ajaxfileupload("#fenmianfile",{
}
}
});
$(document).on("click",".cover-color .btn-metro",function(){
var index=$(this).parents("ul").data("index");
var index1=$(this).parents(".cover-image-item").data("index");
... ... @@ -238,8 +240,8 @@ $(document).on("click",".cover-color .btn-metro",function(){
}
var groups=$(this).parent(".cover-color");
item.isDefault=groups.find("a").eq(0).hasClass("info")?"Y":"N";
item.genderCover=groups.find("a").eq(0).hasClass("info")?"1":"0";
item.genderCover=groups.find("a").eq(0).hasClass("info")?"2":"0";
item.genderCover=groups.find("a").eq(1).hasClass("info")?"1":"0";
item.genderCover=groups.find("a").eq(2).hasClass("info")?"2":"0";
console.log(item);
});
$(document).on("click",".goods-color a",function(){
... ... @@ -258,8 +260,6 @@ $(document).on("click","#fenMainSave",function(){
common.util.__ajax({
url:'/netSale/manageProductImg',
data:data
},function(data){
console.log(data);
});
return false;
});
... ... @@ -269,7 +269,6 @@ GOLABDATA.on("fenmian",function(){
goodsImagesBoList:[]
};
$.each(goodsImagesList,function(index,item){
map.isDefault=item.isDefault;
if(item.isDefault=="Y"){
map.productSkc=item.productSkc;
map.productSkn=item.productSkn;
... ...
... ... @@ -6,15 +6,12 @@
<h2 class="panel-title">小编推荐</h2>
</div>
<div class="panel-body nopadding">
<<<<<<< HEAD
<script id="edit-recommender" type="text/plain" style="width:100%;height:500px;"></script>
<p>
<span class="red">提示:与商品相关的逛信息自动抓取到下列各模块中,若要在商品详情中展示,请将其编辑在【小编推荐】中。
</span>
</span>
</p>
=======
<script id="editor" type="text/plain" style="width:100%;height:400px;"></script>
>>>>>>> master
</div>
<div class="panel-footer">
<button class="btn btn-primary" id="btn-recommand">保存</button>
... ...
... ... @@ -73,7 +73,11 @@
</div>
<div class="col-sm-11">
<div class="goods-color height40">
<a href="javascript:;" class="btn btn-default btn-metro" data-index=[[index]]>设置默认</a>
[[if item.isDefault=="Y"]]
<a href="javascript:;" class="btn btn-default btn-metro info" data-index=[[index]]>设置默认</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro" data-index=[[index]]>设置默认</a>
[[/if]]
<!-- <a href="javascript:;" class="btn btn-default btn-metro">调用图片</a> -->
</div>
</div>
... ...