/* HTTP API 供应商业务模块
 * Copyright 2020, CAIMEI365
 * Date   2020/06/16
 * auther ZHJY
 */
var SupplierApi = {
        ShipmentsInfo: function (params, callback) {//发货商品初始化
            Http.AjaxService({ url:'/supplier/shipmentsInfo', type:'GET', data:params, json:true, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        MyOrderList: function (params, callback) {//供应商订单列表
            Http.AjaxService({ url:'/supplier/myOrderList', type:'GET', data:params, json:true, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        uploadimg: function (params, callback) {//供应商添加物流上传图片
            Http.uploadImage({ url:'/formData/MultiPictareaddData',data:params},callback)
        },
        GetMyProductList: function (params, callback) {//供应商商品列表
            Http.AjaxService({ url:'/supplier/myProduct', type:'GET', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        SwitchFeatured: function (params, callback) {//供应商商品增加删除 主推商品标志
            Http.AjaxService({ url:'/supplier/switchFeatured', type:'POST', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        SupplierSoldOut: function (params, callback) {//供应商商品下架(批量下架,单个商品下架)
            Http.AjaxService({ url:'/supplier/soldOut', type:'POST', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        brandList: function (params, callback) {//品牌管理列表
            Http.AjaxService({ url:'/supplier/brandManagement', type:'GET', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
         addBrand: function (params, callback) {//品牌管理/提交新品牌
            Http.AjaxService({ url:'/supplier/addBrand', type:'post', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        tiyixi: function (params, callback) {//发货/添加物流页 确定提交订单列表
            Http.AjaxService({ url:'/supplier/addLogistics', type:'post', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        shipmentsRecord: function (params, callback) {//发货/添加物流页 确定提交订单列表
            Http.AjaxService({ url:'/supplier/shipmentsRecord', type:'GET', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        GetBrandAssociation: function (params, callback) {//发布商品品牌联想
            Http.AjaxService({ url:'/supplier/brandAssociation', type:'GET', data:params, json:false, mask:false,replace:false})
            .then(function(res){
                callback(res);
            });
        },
        logisticsInfo: function (params, callback) {//记录的查看物流
            Http.AjaxService({ url:'/supplier/logisticsInfo', type:'GET', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        AddSupplierBrand: function (params, callback) {//发布商品提交新品牌
            Http.AjaxService({ url:'/supplier/addBrand', type:'post', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        CheckSupplierBrandDetection: function (params, callback) {//发布商品提交新品牌
            Http.AjaxService({ url:'/supplier/brandDetection', type:'get', data:params, json:false, mask:true,replace:false})
            .then(function(res){
                callback(res);
            });
        },
        AddSupplierReleaseProduct: function (params, callback) {//提交发布商品
            Http.AjaxService({ url:'/supplier/releaseProduct', type:'post', data:params, json:false, mask:true,replace:true})
            .then(function(res){
                callback(res);
            });
        },
        SupplierViewShop: function (params, callback) {//查看店铺
            Http.AjaxService({ url:'/supplier/viewShop', type:'get', data:params, json:false, mask:true,replace:false})
            .then(function(res){
                callback(res);
            });
        },
        SupplierViewShopProduct: function (params, callback) {//查看店铺供应商产品
            Http.AjaxService({ url:'/supplier/product', type:'get', data:params, json:false, mask:false,replace:false})
            .then(function(res){
                callback(res);
            });
        },
        SupplierViewShopInfo: function (params, callback) {//获取登录供应商信息
            Http.AjaxService({ url:'/supplier/shopInfo', type:'get', data:params, json:false, mask:true,replace:false})
                .then(function(res){
                    callback(res);
                });
        },
        EditReleaseProductInfo: function (params, callback) {//编辑我的商品回显数据
            Http.AjaxService({ url:'/supplier/productInfo', type:'get', data:params, json:false, mask:true,replace:false})
                .then(function(res){
                    callback(res);
                });
        },
        SearchSupplierProduct: function (params, callback) {//编辑我的商品回显数据
            Http.AjaxService({ url:'/supplier/productSearch', type:'get', data:params, json:false, mask:true,replace:false})
                .then(function(res){
                    callback(res);
                });
        },
        shopInfo: function (params, callback) {//资料信息 回显数据
            Http.AjaxService({ url:'/supplier/shopInfo', type:'GET', data:params, json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        },
        kdList: function ( callback) {//快递公司
            Http.AjaxService({ url:'/supplier/logisticsCompany', type:'GET',  json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        },
        addLogisticsInfo: function (params, callback) {//追加物流
            Http.AjaxService({ url:'/supplier/addLogisticsInfo', type:'post',data:params,  json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        },
        cancelShipment: function (params, callback) {//查看物流/撤销发货
            Http.AjaxService({ url:'/supplier/cancelShipment', type:'post', data:params, json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        },
        shopOrderDetails: function (params, callback) {//我的订单/查看详情
            Http.AjaxService({ url:'/supplier/shopOrderDetails', type:'GET', data:params, json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        },
         modifiedData: function (params, callback) {//我的订单/查看详情
            Http.AjaxService({ url:'/supplier/modifiedData', type:'post', data:params, json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        },
        homePageData: function (params, callback) {//供应商 首页个人中心
            Http.AjaxService({ url:'/supplier/homePageData', type:'get', data:params, json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        },
         uploadAvatar: function (params, callback) {//供应商 首页上传头像成功后调用
            Http.AjaxService({ url:'/user/uploadAvatar', type:'post', data:params, json:false, mask:true,replace:true})
                .then(function(res){
                    callback(res);
                });
        }

};
