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,8 +20,8 @@
<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>
... ... @@ -62,7 +62,9 @@
<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>
... ...