Authored by weiqingting

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

... ... @@ -5,19 +5,19 @@ var $ = require('jquery');
var urlObj = {
'supplier': '/supplier/supplier/getSupplierListByIdName',
'brand': '/brand/getBrandNames',
'managerName': '/supplier/storeadmin/managerName',//根据身份选择管理员
'managerName': '/supplier/storeadmin/managerName', //根据身份选择管理员
'sortattribute': '/erpproduct/sortattribute/ajax/automatic', // 品类关联实物测量属性
'sortsize': '/erpproduct/sortsize/ajax/automatic',//尺码模糊查询【验证通过】
'queryBrand': '/goods/query/brand',//查询品牌列表接口
'querySupplier': '/goods/query/supplier',//查询供应商列表接口
'sortsize': '/erpproduct/sortsize/ajax/automatic', //尺码模糊查询【验证通过】
'queryBrand': '/goods/query/brand', //查询品牌列表接口
'querySupplier': '/goods/query/supplier', //查询供应商列表接口
'queryShop': '/goods/query/shop', // 查询店铺列表接口
'queryShopPass': '/goods/query/shopPass', // 查询通过审核店铺列表接口
'maxSort': '/goods/query/maxSort',//查询一级类目列表接口
'maxSort': '/goods/query/maxSort', //查询一级类目列表接口
'shopsRest': '/ShopsRest/getShopsByName', // 店铺列表
'xiangouID': '/limit/xiangouID/selectActivityListForSelect', //限购ID
'sortsize2':'/erpproduct/sortsize/ajax/querySizeListBySortId4Html',//尺码
'sortbybrand':'/goods/query/queryShopsByBrandId',
'getjitSup':'/goods/query/getJitSupplierByBrandld',
'sortsize2': '/erpproduct/sortsize/ajax/querySizeListBySortId4Html', //尺码
'sortbybrand': '/goods/query/queryShopsByBrandId',
'getjitSup': '/goods/query/getJitSupplierByBrandld',
// 'getsort':'/goods/query/querySortBySmallSort',
'sortlist': '/product/class/queryAllProductSortList',
... ... @@ -26,10 +26,12 @@ var urlObj = {
'getByCategoryId': '/operations/helpcontent/getSecondCategoryList',
'getAllHelpCategory': '/operations/helpcontent/getAllHelpCategory',
'getHelpCategory': '/operations/helpcontent/getHelpCategory',
'queryAll4Select': '/goods/brandSeries/queryAll4Select' //品牌款型系列
'queryAll4Select': '/goods/brandSeries/queryAll4Select', //品牌款型系列
'queryBrandByShopId': '/query/brandByshopId', //查询店铺下关联品牌
'querySupplierByShopId': '/query/supplierByshopId' //查询店铺下关联供应商
};
var minimumResultsForSearch=["sortbybrand","getjitSup","sortsize2"];
var minimumResultsForSearch = ["sortbybrand", "getjitSup", "sortsize2"];
var dropDown = function(option) {
new dropDown.prototype.init(option);
... ... @@ -47,24 +49,24 @@ dropDown.prototype = {
option[i] = _option[i];
}
}
if(minimumResultsForSearch.indexOf(_option.ajax)>-1){
option.minimumResultsForSearch=Infinity
if (minimumResultsForSearch.indexOf(_option.ajax) > -1) {
option.minimumResultsForSearch = Infinity
}
if (option.ajax) {
$(option.el).select2({
minimumResultsForSearch: option.minimumResultsForSearch||0,
minimumResultsForSearch: option.minimumResultsForSearch || 0,
ajax: {
url: option.url,
dataType: 'json',
type: 'POST',
delay: 250,
data: function(params) {
var param={};
if(Object.prototype.toString.call(option.params)=="[object Function]"){
param=option.params();
}else{
param=option.params;
var param = {};
if (Object.prototype.toString.call(option.params) == "[object Function]") {
param = option.params();
} else {
param = option.params;
}
var data = $.extend({}, {
idName: params.term
... ...