...
|
...
|
@@ -37,6 +37,7 @@ webpackJsonp([62],{ |
|
|
* 通用
|
|
|
*/
|
|
|
var Bll = {
|
|
|
|
|
|
d: null,
|
|
|
moduleimgs: [],
|
|
|
Brands: [],
|
...
|
...
|
@@ -101,7 +102,11 @@ webpackJsonp([62],{ |
|
|
if (!item.brandIco) {
|
|
|
var a = Bll.Brands1[item.id]
|
|
|
if (a) { // 如果之前选择的品牌没有log,则a取不到。页面报错
|
|
|
a.brandIco = common.util.__joinImg("brandLogo", a.brand_ico)
|
|
|
if(a.brand_ico.indexOf('http://') == 0){
|
|
|
a.brandIco = a.brand_ico.split("?")[0];
|
|
|
}else{
|
|
|
a.brandIco = common.util.__joinImg("brandLogo", a.brand_ico)
|
|
|
}
|
|
|
Brands2.push(a);
|
|
|
}
|
|
|
} else {
|
...
|
...
|
@@ -138,7 +143,11 @@ webpackJsonp([62],{ |
|
|
if (module.contentData.dialog == "template_dialog_text") {
|
|
|
module.contentData.data.text = baidu.getContent();
|
|
|
}
|
|
|
|
|
|
if(module.contentData.dialog=='template_dialog_video'){
|
|
|
module.contentData.data.src = $("#video_src").val();
|
|
|
module.contentData.data.size = $("#video_size").val();
|
|
|
module.contentData.data.video_intro = $("#video_intro").val();
|
|
|
}
|
|
|
// 对于图片资源位,增加图片的原始尺寸
|
|
|
if(module.contentData.dialog == 'template_dialog_grid' || module.contentData.dialog == 'template_dialog_grid2') {
|
|
|
$.each(module.contentData.data, function(index, data) {
|
...
|
...
|
@@ -164,6 +173,12 @@ webpackJsonp([62],{ |
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
//视频描述限制
|
|
|
var videoIntroLimit=$("#video_intro").val();
|
|
|
if(videoIntroLimit&&videoIntroLimit.length>200){
|
|
|
common.util.__tip("视频描述不能超过200字", 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
if (components.validate()) {
|
|
|
//TODO
|
|
|
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
|
...
|
...
|
@@ -175,13 +190,46 @@ webpackJsonp([62],{ |
|
|
css: "btn-primary"
|
|
|
}]
|
|
|
});
|
|
|
Bll.__editRender();
|
|
|
if (module.contentData.dialog != "template_dialog_video"){
|
|
|
Bll.__editRender();
|
|
|
}
|
|
|
Bll2.moveDrag();
|
|
|
if (module.contentData.dialog == "template_dialog_text") {
|
|
|
baidu && baidu.destroy();
|
|
|
baidu = UM.getEditor('baidueditor');
|
|
|
baidu.setContent(module.contentData.data.text);
|
|
|
}
|
|
|
};
|
|
|
if (module.contentData.dialog == "template_dialog_video") {
|
|
|
|
|
|
};
|
|
|
common.edit.ajaxfileupload(".picfile", {
|
|
|
params: {
|
|
|
__type: "import-video",
|
|
|
bucket: "goodsvideo"
|
|
|
},
|
|
|
valid_extensions: ['mp4','rmvb','avi','mov','wmv'],
|
|
|
// onStart: function(params) {
|
|
|
// loadModal = common.dialog.load();
|
|
|
// },
|
|
|
onComplete: function (response) {
|
|
|
console.log("批量接口返回数据",response);
|
|
|
if (response.status && response.code == 200) {
|
|
|
if(response.data.fileSize>50){
|
|
|
common.util.__tip("视频不能超过50M", 'warning');
|
|
|
}else{
|
|
|
$("#video_src").val(response.data.url);
|
|
|
$("#video_size").val(response.data.fileSize);
|
|
|
// if (loadModal) {
|
|
|
$("#imgTag").attr("src",response.data.url+"?vframe/jpg/offset/0");
|
|
|
$("#imgTag").show();
|
|
|
$("#imgATag").hide();
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
common.util.__tip(response.message, 'warning');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
renderDialog: function (templater) {
|
|
|
Bll.__render(".modal-body", templater, Bll.module);
|
...
|
...
|
@@ -391,6 +439,16 @@ webpackJsonp([62],{ |
|
|
"url": ""
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
template_intro: "添加视频",
|
|
|
dialog: "template_dialog_video",
|
|
|
template_name: "video",
|
|
|
data: {
|
|
|
"src":"",
|
|
|
"video_intro":"",
|
|
|
"size":""
|
|
|
}
|
|
|
}];
|
|
|
$("#content_btns").html(common.util.__template2($("#template_content_btns").html(), {
|
|
|
btns: Button
|
...
|
...
|
@@ -518,8 +576,15 @@ webpackJsonp([62],{ |
|
|
// });
|
|
|
|
|
|
$("#brandCheckBox").val().split('|').forEach(function (item) {
|
|
|
var a = Bll.Brands1[item];
|
|
|
var brandCategory;
|
|
|
if(a && a.is_global == 'Y'){
|
|
|
brandCategory = 2;
|
|
|
}else{
|
|
|
brandCategory = 1;
|
|
|
}
|
|
|
Bll.Brdata.push({
|
|
|
"brandCategory": "1",
|
|
|
"brandCategory": brandCategory,
|
|
|
"id": item
|
|
|
});
|
|
|
});
|
...
|
...
|
@@ -559,6 +624,7 @@ webpackJsonp([62],{ |
|
|
url: '/yohosearch/search',
|
|
|
data: {
|
|
|
// status: 1,
|
|
|
contain_global: 'Y',
|
|
|
query: product_skc.join(',')
|
|
|
}
|
|
|
}, function (res) {
|
...
|
...
|
@@ -568,11 +634,17 @@ webpackJsonp([62],{ |
|
|
common.util.__tip("没有查询到符合的品牌");
|
|
|
}
|
|
|
res.data.list.forEach(function (item, index) {
|
|
|
var brandCategory;
|
|
|
if(item.is_global == 'Y'){
|
|
|
brandCategory = 2
|
|
|
}else{
|
|
|
brandCategory = 1
|
|
|
}
|
|
|
map[item.product_skn] = {
|
|
|
id: item.brand_id,
|
|
|
brandIco: item.brand_ico,
|
|
|
brandName: item.brand_name,
|
|
|
brandCategory: 1
|
|
|
brandCategory: brandCategory
|
|
|
};
|
|
|
});
|
|
|
var b = [];
|
...
|
...
|
@@ -718,6 +790,8 @@ webpackJsonp([62],{ |
|
|
}
|
|
|
//加上是否搜索BLK的标识
|
|
|
var appType = $("#goodsgird").attr("appType");
|
|
|
var containGlobal = $("#goodsgird").attr("containGlobal");
|
|
|
var isGlobal = $("#goodsgird").attr("isGlobal");
|
|
|
return {
|
|
|
status: 1,
|
|
|
sales: "Y",
|
...
|
...
|
@@ -730,7 +804,9 @@ webpackJsonp([62],{ |
|
|
msort: Bll2.getIds(Bll.sorts[2].list),
|
|
|
brand: Bll2.getIds(Bll.sorts[3].list),
|
|
|
gender: Bll2.getIds(Bll.sorts[4].list),
|
|
|
app_type:appType
|
|
|
app_type:appType,
|
|
|
contain_global:containGlobal,
|
|
|
is_global:isGlobal
|
|
|
};
|
|
|
},
|
|
|
columns: [
|
...
|
...
|
@@ -746,7 +822,11 @@ webpackJsonp([62],{ |
|
|
}
|
|
|
else {
|
|
|
if (item.default_images) {
|
|
|
item.images_url = common.util.__joinImg("goodsimg", item.default_images);
|
|
|
if(item.default_images.indexOf('http://') == 0){
|
|
|
item.images_url = item.default_images.split("?")[0];
|
|
|
}else{
|
|
|
item.images_url = common.util.__joinImg("goodsimg", item.default_images);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
item.images_url = ""
|
...
|
...
|
@@ -795,6 +875,8 @@ webpackJsonp([62],{ |
|
|
pic_src: item.images_url,
|
|
|
product_skn: item.product_skn,
|
|
|
tagName: item.product_name.substring(0,30),
|
|
|
is_global: item.is_global,
|
|
|
is_limitbuy: item.is_limitbuy,
|
|
|
}
|
|
|
})
|
|
|
Bll.module.contentData.data[0].tagList = Bll.module.contentData.data[0].tagList.concat(gs);
|
...
|
...
|
@@ -830,11 +912,13 @@ webpackJsonp([62],{ |
|
|
return {
|
|
|
src: item.images_url,
|
|
|
id: item.product_skn,
|
|
|
product_skc: item.product_skc
|
|
|
product_skc: item.product_skc,
|
|
|
is_global: item.is_global,
|
|
|
is_limitbuy: item.is_limitbuy
|
|
|
}
|
|
|
})
|
|
|
Bll.module.contentData.data = Bll.module.contentData.data.concat(gs);
|
|
|
Bll.module.contentData.data = Unique(Bll.module.contentData.data, "product_skc")
|
|
|
//Bll.module.contentData.data = Unique(Bll.module.contentData.data, "product_skc")
|
|
|
Bll.__render("#goodspic", "template_dialog_goodsimgs", {
|
|
|
datas: Bll.module.contentData.data
|
|
|
});
|
...
|
...
|
@@ -938,6 +1022,8 @@ webpackJsonp([62],{ |
|
|
$(document).on("click", "#search", function () {
|
|
|
$(".goods-list").show();
|
|
|
$("#goodsgird").attr("appType","0");
|
|
|
$("#goodsgird").attr("containGlobal","N");
|
|
|
$("#goodsgird").attr("isGlobal","N");
|
|
|
if (goodsgird.grid) {
|
|
|
goodsgird.reload(1);
|
|
|
} else {
|
...
|
...
|
@@ -951,6 +1037,23 @@ webpackJsonp([62],{ |
|
|
$(document).on("click", "#searchBLK", function () {
|
|
|
$(".goods-list").show();
|
|
|
$("#goodsgird").attr("appType","1");
|
|
|
$("#goodsgird").attr("containGlobal","N");
|
|
|
$("#goodsgird").attr("isGlobal","N");
|
|
|
if (goodsgird.grid) {
|
|
|
goodsgird.reload(1);
|
|
|
} else {
|
|
|
goodsgird.init('/yohosearch/search');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 手动输入中“搜索全球购”按钮
|
|
|
*/
|
|
|
$(document).on("click", "#searchGlobal", function () {
|
|
|
$(".goods-list").show();
|
|
|
$("#goodsgird").attr("appType","");
|
|
|
$("#goodsgird").attr("containGlobal","Y");
|
|
|
$("#goodsgird").attr("isGlobal","Y");
|
|
|
if (goodsgird.grid) {
|
|
|
goodsgird.reload(1);
|
|
|
} else {
|
...
|
...
|
@@ -1481,8 +1584,8 @@ webpackJsonp([62],{ |
|
|
e.$tip(res.message || "接口异常报错");
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
...
|
...
|
|