123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- import { requestApi } from '../util/network'
- // 获取卖家商品列表
- export const getGoodsList =
- (controller, params, keyword, goods_type, search_type) =>
- requestApi(
- '/' + controller + '/goods_list',
- 'POST',
- {
- 'keyword': keyword,
- 'goods_type': goods_type,
- 'search_type': search_type,
- 'page': params.page,
- 'per_page': params.per_page,
- 'client_type': 'wap'
- },
- 'seller'
- )
- // 删除商品
- export const dropGoods =
- (controller, commonid) =>
- requestApi(
- '/' + controller + '/drop_goods',
- 'POST',
- {
- 'commonid': commonid,
- 'client_type': 'wap'
- },
- 'seller'
- )
- // 商品上架
- export const goodsShow =
- (controller, commonid) =>
- requestApi(
- '/' + controller + '/goods_show',
- 'POST',
- {
- 'commonid': commonid,
- 'client_type': 'wap'
- },
- 'seller'
- )
- // 商品下架
- export const goodsUnshow =
- (controller, commonid) =>
- requestApi(
- '/' + controller + '/goods_unshow',
- 'POST',
- {
- 'commonid': commonid,
- 'client_type': 'wap'
- },
- 'seller'
- )
- // 商品编辑
- export const goodsEdit =
- (controller, commonid) =>
- requestApi(
- '/' + controller + '/edit_goods',
- 'POST',
- {
- 'commonid': commonid
- },
- 'seller'
- )
- // 保存商品规格
- export const goodsSpecSave =
- (data) =>
- requestApi(
- '/Sellerspec/save_spec',
- 'POST',
- data,
- 'seller'
- )
- // 商品规格值
- export const goodsSpecAdd =
- (controller, name, gc_id, sp_id) =>
- requestApi(
- '/' + controller + '/add_spec',
- 'POST',
- {
- 'name': name,
- 'gc_id': gc_id,
- 'sp_id': sp_id
- },
- 'seller'
- )
- export const uploadInfoFile =
- (controller, file) =>
- requestApi(
- '/' + controller + '/image_upload',
- 'POST',
- file,
- 'seller',
- true
- )
- export const uploadVideo =
- (controller, file) =>
- requestApi(
- '/' + controller + '/video_upload',
- 'POST',
- file,
- 'seller',
- true
- )
- export const uploadResource =
- (file) =>
- requestApi(
- '/seller_resource/resource_upload',
- 'POST',
- file,
- 'seller',
- true
- )
- export const delResource =
- (data) =>
- requestApi(
- '/seller_resource/del_resource',
- 'POST',
- data,
- 'seller'
- )
- // 商品保存
- export const goodsSave =
- (controller, class_id, commonid, goods, goods_body, sgcate_id, spec, sp_name, sp_val, attr, g_fccount, g_fcprefix) =>
- requestApi(
- '/' + controller + '/save_goods',
- 'POST',
- {
- 'class_id': class_id,
- 'commonid': commonid,
- 'goods': goods,
- 'goods_body': goods_body,
- 'sgcate_id': sgcate_id,
- 'spec': spec,
- 'sp_name': sp_name,
- 'sp_val': sp_val,
- 'attr': attr,
- 'g_fcprefix': g_fcprefix,
- 'g_fccount': g_fccount
- },
- 'seller'
- )
- // 获取店铺商品分类公共数据
- export const getCommonData =
- (controller, class_id) =>
- requestApi(
- '/' + controller + '/get_common_data',
- 'POST',
- {
- 'class_id': class_id
- },
- 'seller'
- )
- // 图片编辑
- export const imageEdit =
- (controller, commonid) =>
- requestApi(
- '/' + controller + '/edit_image',
- 'POST',
- {
- 'commonid': commonid
- },
- 'seller'
- )
- // 图片保存
- export const imageSave =
- (controller, commonid, img) =>
- requestApi(
- '/' + controller + '/save_image',
- 'POST',
- {
- 'commonid': commonid,
- 'img': img
- },
- 'seller'
- )
- // 获取店铺经营分类
- export const getGoodsClass =
- (controller) =>
- requestApi(
- '/' + controller + '/goods_class',
- 'POST',
- {
- },
- 'seller'
- )
|