| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828 |
- // +----------------------------------------------------------------------
- // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
- // +----------------------------------------------------------------------
- // | Author: CRMEB Team <admin@crmeb.com>
- // +----------------------------------------------------------------------
- import request from '@/plugins/request';
- /*
- * 获取商品表单头数量;
- * */
- export function getGoodHeade(data) {
- return request({
- url: 'product/product/type_header',
- method: 'get',
- params: data
- });
- }
- /*
- * 获取商品表单头数量;
- * */
- export function getGoodsCategory(data) {
- return request({
- url: '/goods/goods_category',
- method: 'get',
- params: data
- });
- }
- /**
- * @description 商品管理-- 列表
- */
- export function getGoods(params) {
- return request({
- url: 'product/product',
- method: 'get',
- params
- });
- }
- /**
- * @description 商品管理-- 上下架
- */
- export function PostgoodsIsShow(id, isShow) {
- return request({
- url: `product/product/set_show/${id}/${isShow}`,
- method: 'put'
- });
- }
- /**
- * @description 商品属性 -- 批量上下架
- * @param {Object} param data {Object} 传值对象
- */
- export function productShowApi(data) {
- return request({
- url: `product/product/product_show`,
- method: 'put',
- data
- });
- }
- /**
- * @description 商品属性 -- 批量下架
- * @param {Object} param data {Object} 传值对象
- */
- export function productUnshowApi(data) {
- return request({
- url: `product/product/product_unshow`,
- method: 'put',
- data
- });
- }
- /**
- * @description 商品列表 -- 批量添加配送方式
- * @param {Object} param data {Object} 传值对象
- */
- export function setDeliveryType(data) {
- return request({
- url: `product/product/setDeliveryType`,
- method: 'put',
- data
- });
- }
- /**
- * @description 商品管理-- 审核
- */
- export function productReviewApi(id) {
- return request({
- url: `/product/product/verify/${id}`,
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 强制下架
- */
- export function forcedRemovalApi(id) {
- return request({
- url: `/product/product/remove/${id}`,
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 分类
- */
- export function treeListApi(type) {
- return request({
- url: `product/category/tree/${type}`,
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 详情
- */
- export function productInfoApi(id) {
- return request({
- url: `product/product/${id}`,
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 提交
- */
- export function productAddApi(data) {
- return request({
- url: `product/product/${data.id}`,
- method: 'POST',
- data
- });
- }
- /**
- * @description 商品分类 -- 列表
- * @param {Object} param params {Object} 传值参数
- */
- export function productListApi(params) {
- return request({
- url: 'product/category',
- method: 'get',
- params
- });
- }
- /**
- * @description 商品分类 -- 添加表单
- * @param {Object} param params {Object} 传值参数
- */
- export function productCreateApi() {
- return request({
- url: 'product/category/create',
- method: 'get'
- });
- }
- /**
- * @description 商品分类 -- 编辑表单
- * @param {Object} param params {Object} 传值参数
- */
- export function productEditApi(id) {
- return request({
- url: `product/category/${id}`,
- method: 'get'
- });
- }
- /**
- * @description 商品分类 -- 修改状态
- * @param {Object} param params {Object} 传值参数
- */
- export function setShowApi(data) {
- return request({
- url: `product/category/set_show/${data.id}/${data.is_show}`,
- method: 'PUT'
- });
- }
- /**
- * @description 选择商品 -- 列表
- */
- export function changeListApi(params) {
- return request({
- url: `product/product/list`,
- method: 'GET',
- params
- });
- }
- /**
- * @description 选择商品 -- 列表-标签
- */
- export function allLabelApi(params) {
- return request({
- url: `product/all_label`,
- method: 'get',
- params
- });
- }
- /**
- * @description 商品评论 -- 列表
- * @param {Object} param params {Object} 传值参数
- */
- export function replyListApi(params) {
- return request({
- url: `product/reply`,
- method: 'get',
- params
- });
- }
- /**
- * @description 商品评论 -- 回复
- * @param {Object} param data {Object} 传值参数
- */
- export function setReplyApi(data, id) {
- return request({
- url: `product/reply/set_reply/${id}`,
- method: 'PUT',
- data
- });
- }
- /**
- * @description 获取复制商品配置
- */
- export function copyConfigApi() {
- return request({
- url: `product/copy_config`,
- method: 'get'
- })
- }
- /**
- * @description 商品管理 -- 获取京东、淘宝商品数据
- * @param {Object} param data {Object} 传值参数
- */
- export function crawlFromApi(data) {
- return request({
- url: `product/copy`,
- method: 'POST',
- data
- });
- }
- /**
- * @description 商品管理 -- 京东、淘宝商品数据提交
- * @param {Object} param data {Object} 传值参数
- */
- export function crawlSaveApi(data) {
- return request({
- url: `product/crawl/save`,
- method: 'POST',
- data
- });
- }
- /**
- * @description 商品管理 -- 生成属性
- * @param {Object} param data {Object} 传值参数
- */
- export function generateAttrApi(data, id, type) {
- return request({
- url: `product/generate_attr/${id}/${type}`,
- method: 'POST',
- data
- });
- }
- /**
- * @description 商品属性 -- 列表
- * @param {Object} param params {Object} 传值参数
- */
- export function ruleListApi(params) {
- return request({
- url: `product/product/rule`,
- method: 'GET',
- params
- });
- }
- /**
- * @description 商品属性 -- 添加
- * @param {Number} param id {Number} 属性id
- * @param {Object} param data {Object} 传值参数
- */
- export function ruleAddApi(data, id) {
- return request({
- url: `product/product/rule/${id}`,
- method: 'POST',
- data
- });
- }
- /**
- * @description 商品属性 -- 详情
- * @param {Number} param id {Number} 属性id
- */
- export function ruleInfoApi(id) {
- return request({
- url: `product/product/rule/${id}`,
- method: 'get'
- });
- }
- /**
- * @description 商品评价 -- 虚拟评价
- * @id--产品id;
- */
- export function fictitiousReply(id) {
- return request({
- url: `product/reply/fictitious_reply/${id}`,
- method: 'get'
- });
- }
- /**
- * @description 商品属性 -- 获取规则属性模板
- */
- export function productGetRuleApi() {
- return request({
- url: `product/product/get_rule`,
- method: 'get'
- });
- }
- /**
- * @description 商品 -- 获取运费模板
- */
- export function productGetTemplateApi(data) {
- return request({
- url: `product/product/get_template`,
- method: 'get',
- params: data
- });
- }
- /**
- * @description 获取上传参数
- */
- export function productGetTempKeysApi(data) {
- return request({
- url: `product/product/get_temp_keys`,
- method: 'get',
- params: data,
- });
- }
- /**
- * @description 商铺产品 -- 导出
- */
- export function storeProductApi(data) {
- return request({
- url: `export/storeProduct`,
- method: 'get',
- params: data
- });
- }
- /**
- * @description 添加商品 -- 检测活动存在
- */
- export function checkActivityApi(id) {
- return request({
- url: `product/product/check_activity/${id}`,
- method: 'get'
- });
- }
- /**
- * @description 商品添加编辑-- 用户标签
- */
- export function labelListApi() {
- return request({
- url: 'user/user_label',
- method: 'get'
- });
- }
- /**
- * @description 商品分类-- cascader
- */
- export function cascaderListApi(type) {
- return request({
- url: `product/category/cascader_list/${type}`,
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 临时保存
- */
- export function productCache() {
- return request({
- url: 'product/cache',
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 取消临时保存
- */
- export function cacheDelete() {
- return request({
- url: 'product/cache',
- method: 'delete'
- });
- }
- /**
- * @description 商品管理-- 取消临时保存
- */
- export function getProductAttr(id) {
- return request({
- url: 'product/product/get_attr/' + id,
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 关联用户标签
- */
- export function productUserLabel() {
- return request({
- url: 'product/user_label',
- method: 'get'
- });
- }
- /**
- * @description 添加商品-- 商品标签
- */
- export function productStoreLabel() {
- return request({
- url: 'product/product_label',
- method: 'get'
- });
- }
- /**
- * @description 添加商品-- 商品标签
- */
- export function productAllEnsure() {
- return request({
- url: 'product/all_ensure',
- method: 'get'
- });
- }
- /**
- * @description 添加商品-- 添加商品标签
- */
- export function productLabelAdd() {
- return request({
- url: 'product/label/form',
- method: 'get'
- });
- }
- /**
- * @description 添加商品-- 添加商品参数
- */
- export function productAllSpecs() {
- return request({
- url: 'product/all_specs',
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 添加品牌-获取上级分类
- */
- export function brandCascader() {
- return request({
- url: 'product/brand/cascader_list',
- method: 'get'
- });
- }
- /**
- * @description 商品管理-- 提交添加品牌
- */
- export function productBrand(data) {
- return request({
- url: 'product/brand',
- method: 'POST',
- data
- });
- }
- /**
- * @description 商品管理-- 提交添加品牌
- */
- export function productBrandlist(data) {
- return request({
- url: 'product/brand',
- method: 'get',
- params: data
- });
- }
- /**
- * @description 商品管理-- 提交编辑品牌
- */
- export function productBrandrev(id,data) {
- return request({
- url: `product/brand/${id}`,
- method: 'put',
- data
- });
- }
- /**
- * @description 商品管理-- 修改品牌状态
- */
- export function productBrandShow(id,show) {
- return request({
- url: `product/brand/set_show/${id}/${show}`,
- method: 'put'
- });
- }
- /**
- * @description 商品管理-- 添加商品品牌列表
- */
- export function brandList() {
- return request({
- url: `product/brand/cascader_list/2`,
- method: 'get'
- });
- }
- /**
- *商品列表-获取商品规格
- */
- export function productAttrsApi(id) {
- return request({
- url: `product/product/attrs/${id}`,
- method: 'get'
- });
- }
- /**
- *商品列表-提交商品规格库存
- */
- export function productSaveStocksApi(data,id) {
- return request({
- url: `product/product/saveStocks/${id}`,
- method: 'PUT',
- data
- });
- }
- /**
- *添加商品-获取所有商品单位列表
- */
- export function productAllUnit(id) {
- return request({
- url: `product/get_all_unit`,
- method: 'get'
- });
- }
- /**
- *添加商品-商品单位添加表单
- */
- export function productUnitCreate(id) {
- return request({
- url: `product/unit/create`,
- method: 'get'
- });
- }
- /**
- * @description 商品添加编辑-- 获取上传视频类型
- */
- export function uploadType () {
- return request({
- url: 'file/upload_type',
- method: 'get'
- })
- }
- /**
- * @description 商品添加编辑-- 商品单位列表
- */
- export function productUnit (data) {
- return request({
- url: 'product/unit',
- method: 'get',
- params: data
- })
- }
- /**
- * @description 商品添加编辑-- 编辑单位
- */
- export function productUnitEdit(id) {
- return request({
- url: `product/unit/${id}/edit`,
- method: 'get'
- })
- }
- /**
- * @description 商品添加编辑-- 倒入卡密
- */
- export function importCard (data) {
- return request({
- url: 'product/product/import_card',
- method: 'get',
- params: data
- })
- }
- /**
- * @description 商品添加编辑-- 下载卡密
- */
- export function exportProductCard (data) {
- return request({
- url: 'export/storeProductCardTemplate',
- method: 'get'
- })
- }
- /**
- * @description 商品标签组-- 添加
- */
- export function labelCateCreate () {
- return request({
- url: 'product/label_cate/create',
- method: 'get'
- })
- }
- /**
- * @description 商品标签组-- 列表
- */
- export function productLabelCate (data) {
- return request({
- url: 'product/label_cate',
- method: 'get',
- params: data
- })
- }
- /**
- * @description 商品标签组-- 编辑
- */
- export function productLabelEdit(id) {
- return request({
- url: `product/label_cate/${id}/edit`,
- method: 'get'
- })
- }
- /**
- * @description 商品标签-- 保存标签
- */
- export function productLabel(data) {
- return request({
- url: `product/label/${data.id}`,
- method: 'post',
- data
- })
- }
- /**
- * @description 商品服务保障- 添加
- */
- export function productEnsureCreate() {
- return request({
- url: `product/ensure/create`,
- method: 'get',
- })
- }
- /**
- * @description 商品保障服务-- 列表
- */
- export function productEnsure (data) {
- return request({
- url: 'product/ensure',
- method: 'get',
- params: data
- })
- }
- /**
- * @description 商品保障服务-- 编辑
- */
- export function productEnsureEdit(id) {
- return request({
- url: `product/ensure/${id}/edit`,
- method: 'get'
- })
- }
- /**
- * @description 商品保障服务--是否显示
- */
- export function ensureSetShow(data) {
- return request({
- url: `product/ensure/set_show/${data.id}/${data.is_show}`,
- method: 'put'
- })
- }
- /**
- * @description 商品参数-- 编辑
- */
- export function productSpecs(data) {
- return request({
- url: `product/specs/${data.id}`,
- method: 'post',
- data
- })
- }
- /**
- * @description 商品参数-- 列表
- */
- export function productSpecsList (data) {
- return request({
- url: 'product/specs',
- method: 'get',
- params: data
- })
- }
- /**
- * @description 商品参数-- 获取单个商品参数模版信息
- */
- export function productSpecsInfo (id) {
- return request({
- url: `product/specs/${id}`,
- method: 'get'
- })
- }
- /**
- * @description 商品评价-- 回复评价列表
- */
- export function productReplycomment (data,id) {
- return request({
- url: `product/reply/comment/${id}`,
- method: 'get',
- params: data
- })
- }
- /**
- * @description 商品评价-- 保存管理员回复
- */
- export function productReplySave (data,replyId,id) {
- return request({
- url: `product/reply/save_comment/${replyId}/${id}`,
- method: 'post',
- data:data
- })
- }
- /**
- * @description 保存云端视频附件记录
- * @param {String} param ids {String}
- */
- export function videoAttachment (data) {
- return request({
- url: 'file/video_attachment',
- method: 'post',
- data
- });
- }
- /**
- * 添加虚拟评论
- * @param {*} data
- * @returns
- */
- export function saveFictitiousReply(data) {
- return request({
- url: 'product/reply/save_fictitious_reply',
- method: 'post',
- data
- });
- }
- /**
- * 商品批量操作
- * @param {*} data
- * @returns
- */
- export function batchProcess(data) {
- return request({
- url: 'product/batch_process',
- method: 'post',
- data
- });
- }
- /**
- * diy系统表单列表(全部)
- * @param {*} type
- * @returns
- */
- export function allSystemForm() {
- return request({
- url: `/system/form/all_system_form`,
- method: 'get'
- });
- }
|