/**
 * @description: 商品管理
 * @return {*}
 * @param {}-
 */
import request from "../request";


const shopping = {
    /*************************************************
     * 修改商品价格
     */
    update_stores_skus: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/sku/UpdateStoresSkus', 'PUT', params)
    },


    /*************************************************
     * 修改商品为临时不可售
     */
    update_stores_skus_sale: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/sku/UpdateStoresSkusSale', 'PUT', params)
    },


    /*************************************************
     * 获取商品分类
    */
    getStore_category_map: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/GetStoreCategoryMap', 'GET', params)
    },


    /*************************************************
     * 备用获取分类列表
    */
    get_categories: async (params?: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/sku/GetCategories', 'GET', params)
    },


    /*************************************************
     * 获取商品
    */
    get_stores_skus_for_store: async (params?: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/sku/GetStoresSkusForStore', 'GET', params)
    },


    /*************************************************
     * 获取商品
    */
    get_top_skus_by_city_code: async (params?: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/sku/GetTopSkusByCityCode', 'GET', params)
    },


    /*************************************************
     * 获取待审核列表
    */
    get_store_sku_audit: async (params?: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/sku/GetStoreSkuAudit', 'GET', params)
    },


    /*************************************************
     * 获取待审核列表
    */
    get_sku_names_new: async (params?: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/sku/GetSkuNamesNew', 'GET', params)
    },


    /*************************************************
     * 审核商品
    */
    store_sku_price_audit: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/sku/StoreSkuPriceAudit', 'POST', params)
    },


    /*************************************************
     * 请求京东商品库
    */
    get_jd_upc_code_by_name: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/sku/GetJdUpcCodeByName', 'GET', params)
    },


    /*************************************************
     * 微信扫码创建商品
    */
    create_skus_and_focus_from_wx: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/sku/CreateSkusAndFocusFromWx', 'POST', params)
    },
}

export default shopping
