Authored by weiqingting

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

... ... @@ -220,26 +220,30 @@ if (window.NETSALEDATA && window.NETSALEDATA.goodsList) {
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
goodsList: goodsList
}));
common.edit.ajaxfileupload("#fenmianfile", {
common.edit.ajaxfileupload(".fenmianfile", {
params: {
__type: "upload",
bucket: "goodsimg"
},
valid_extensions: ['gif', 'png', 'jpg', 'jpeg'],
onComplete: function(response) {
console.log(response);
if (response.status && response.code == 200) {
var item = goodsList[$(this).data("index")].goodsImagesList;
var item = goodsList[$(this).data("index")].goodsImagesList || [];
var len = item ? item.length : 1;
var data = {
"angle": 0,
"genderCover": 0,
"imageUrl": response.data,
"orderBy": item.length,
"orderBy": len,
"productSkc": goodsList[$(this).data("index")].productSkc,
"productSkn": goodsList[$(this).data("index")].productSkn,
"__index": item.length,
"__index": len,
"index": $(this).data("index")
};
item.push(data);
goodsList[$(this).data("index")].goodsImagesList = item;
$(this).parents(".cover-image-item").before(common.util.__template2($("#fenmianImgTemp").html(), data));
} else {
common.util.__tip(response.message);
... ... @@ -287,7 +291,8 @@ GOLABDATA.on("fenmian", function() {
var map = {
goodsImagesBoList: []
};
$.each(goodsImagesList, function(index, item) {
$.each(goodsList, function(index, item) {
if (item.isDefault == "Y") {
map.productSkc = item.productSkc;
map.productSkn = item.productSkn;
... ...
exports.domain = require('../config/common.js').domain;
// exports.domain = 'http://172.16.6.227:8083/yohobuy-platform-web'; //马力
//exports.domain = 'http://172.16.6.227:8083/yohobuy-platform-web'; //马力
//exports.domain = 'http://172.16.6.236:8080/platform'; //钱军
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
... ...
... ... @@ -20,15 +20,15 @@
<div class="col-sm-1">
<div class="goods-img">
<p>SKC: [[item.productSkc]]</p>
<p>[[item.goodsName]]</p>
<p><img src="[[item.goodsColorImage]]" style="width: 60px;height: 60px;" /></p>
<p>[[item.goodsName]]</p>
<p>[[item.factoryGoodsName]]</p>
</div>
<div class="cover-color height40">颜色封面:</div>
</div>
<div class="col-sm-11">
<ul class="cover-image-list col-sm-12" data-index=[[index]]>
[[each item.goodsImagesList as _item _index]]
[[each item.goodsImagesList as _item _index]]
<li class="cover-image-item fileinput-button" data-index=[[_index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);"><img src="[[_item.imageUrl]]"></a>
... ... @@ -58,11 +58,13 @@
<a href="javascript:;" class="btn btn-default btn-metro">调用图片</a>
</div> -->
</li>
[[/each]]
[[/each]]
<li class="cover-image-item fileinput-button">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">+</a>
<input type="file" class="goods-img-upload" name="fenmianfile" id="fenmianfile" data-index=[[index]]>
<input type="file" class="goods-img-upload fenmianfile" name="fenmianfile" data-index=[[index]]>
</div>
<div class="cover-color height40">
</div>
</li>
</ul>
... ...