diff --git a/src/api/product.js b/src/api/product.js index 337978d..7faf5e5 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -142,6 +142,35 @@ export function categorySelectApi() { return request.get(`store/category/select`) } + +/**mer/store/category/topList + * @description 商品列表 -- 新商户分类 + */ +export function newCategorySelectApi() { + return request.get(`store/category/topList`) +} + +/**mer/store/category/topList + * @description 商品导入到云商城 + */ +export function importApi(data) { + return request.post(`store/product/import`, data) +} + +/**mer/store/category/topList + * @description 删除云商品 + */ +export function deleteProductCloudApi(data) { + return request.post(`store/product/delCloudProduct`, data) +} + +/**mer/store/category/topList + * @description 云商城列表 + */ +export function cloudProductListApi(data) { + return request.get(`store/product/cloudProductList`, data) +} + /** * @description 商品列表 -- 平台分类 */ @@ -528,11 +557,11 @@ export function batchesTempApi(data) { } /** 参数模板 -- 添加 */ export function productSpecs(data) { - return request.post(`store/params/temp/create`,data) + return request.post(`store/params/temp/create`, data) } /** 参数模板 -- 编辑 */ export function specsUpdate(id, data) { - return request.post(`store/params/temp/update/${id}`,data) + return request.post(`store/params/temp/update/${id}`, data) } /** 参数模板 -- 详情 */ export function productSpecsInfo(id) { @@ -552,7 +581,7 @@ export function specsDetailApi(id) { } /** 添加商品 -- 参数筛选 */ export function specsSelectedApi(data) { - return request.get(`store/params/temp/select`,data) + return request.get(`store/params/temp/select`, data) } /** 添加商品 -- 参数筛选详情 */ export function productSpecsDetailApi(data) { @@ -567,7 +596,7 @@ export function productBathSvipApi(data) { return request.post(`store/product/batch_svip`, data) } /** 商品列表 -- 立即生成规格 */ -export function generateAttrApi(id,data) { +export function generateAttrApi(id, data) { return request.post(`store/product/get_attr_value/${id}`, data) } /** 商品列表 -- 系统表单下拉 */ @@ -580,11 +609,11 @@ export function associatedFormInfo(id) { } /** 商品列表 -- 批量设置 */ export function batchSetProduct(data) { - return request.post(`store/product/batch_process`,data) + return request.post(`store/product/batch_process`, data) } /** 商品列表 -- 商品操作记录 */ -export function operateRecordList(id,data) { - return request.get(`store/product/get_operate_list/${id}`,data) +export function operateRecordList(id, data) { + return request.get(`store/product/get_operate_list/${id}`, data) } /** diff --git a/src/router/modules/product.js b/src/router/modules/product.js index ea39e8a..1bef20a 100644 --- a/src/router/modules/product.js +++ b/src/router/modules/product.js @@ -10,99 +10,108 @@ import Layout from '@/layout' import { roterPre } from '@/settings' const productRouter = - { - path: `${roterPre}/product`, - name: 'product', - component: Layout, - meta: { - icon: 'dashboard', - title: '商品管理' +{ + path: `${roterPre}/product`, + name: 'product', + component: Layout, + meta: { + icon: 'dashboard', + title: '商品管理' + }, + alwaysShow: true, + redirect: 'noRedirect', + children: [ + { + path: 'classify', + name: 'ProductClassify', + meta: { + title: '商品分类', + noCache: true + }, + component: () => import('@/views/product/productClassify') }, - alwaysShow: true, - redirect: 'noRedirect', - children: [ - { - path: 'classify', - name: 'ProductClassify', - meta: { - title: '商品分类', - noCache: true - }, - component: () => import('@/views/product/productClassify') + { + path: 'attr', + name: `ProductAttr`, + meta: { + title: '商品规格', + noCache: true }, - { - path: 'attr', - name: `ProductAttr`, - meta: { - title: '商品规格', - noCache: true - }, - component: () => import('@/views/product/productAttr') + component: () => import('@/views/product/productAttr') + }, + { + path: 'label', + name: `ProductLabel`, + meta: { + title: '商品标签', + noCache: true }, - { - path: 'label', - name: `ProductLabel`, - meta: { - title: '商品标签', - noCache: true - }, - component: () => import('@/views/product/productLabel') + component: () => import('@/views/product/productLabel') + }, + { + path: 'list', + name: `ProductList`, + meta: { + title: '商品列表', + noCache: true }, - { - path: 'list', - name: `ProductList`, - meta: { - title: '商品列表', - noCache: true - }, - component: () => import('@/views/product/productList') + component: () => import('@/views/product/productList') + }, + { + path: 'list/addProduct/:id?/:edit?', + component: () => import('@/views/product/addProduct/index'), + name: 'AddProduct', + meta: { title: '商品添加', noCache: true, activeMenu: `${roterPre}/product/list` }, + hidden: true + }, + { + path: 'reviews', + name: 'ProductReviews', + meta: { + title: '商品评论', noCache: true, activeMenu: `${roterPre}/product/reviews` }, - { - path: 'list/addProduct/:id?/:edit?', - component: () => import('@/views/product/addProduct/index'), - name: 'AddProduct', - meta: { title: '商品添加', noCache: true, activeMenu: `${roterPre}/product/list` }, - hidden: true + component: () => import('@/views/product/Reviews/index') + }, + { + path: 'specs', + name: 'ProductSpecs', + meta: { + title: '商品参数', + noCache: true, + }, - { - path: 'reviews', - name: 'ProductReviews', - meta: { - title: '商品评论', noCache: true, activeMenu: `${roterPre}/product/reviews` - }, - component: () => import('@/views/product/Reviews/index') + component: () => import('@/views/product/specs/list.vue') + }, + { + path: 'cloud', + name: 'productCloud', + meta: { + title: '云商品列表', + noCache: true, }, - { - path: 'specs', - name: 'ProductSpecs', - meta: { - title: '商品参数', - noCache: true, - - }, - component: () => import('@/views/product/specs/list.vue') + component: () => import('@/views/product/cloud/index.vue') + }, + { + path: 'specs/create/:id?', + name: 'ProductSpecsCreate', + meta: { + title: '添加参数模板', + noCache: true, + activeMenu: `${roterPre}/product/specs` }, - { - path: 'specs/create/:id?', - name: 'ProductSpecsCreate', - meta: { - title: '添加参数模板', - noCache: true, - activeMenu: `${roterPre}/product/specs` - }, - component: () => import('@/views/product/specs/create.vue') + component: () => import('@/views/product/specs/create.vue') + }, + { + path: 'unit', + name: `ProductUnit`, + meta: { + title: '商品单位', + noCache: true, + activeMenu: `${roterPre}/product/unit` }, - { - path: 'unit', - name: `ProductUnit`, - meta: { - title: '商品单位', - noCache: true, - activeMenu: `${roterPre}/product/unit` - }, - component: () => import('@/views/product/productUnit') - }, - ] - } + component: () => import('@/views/product/productUnit') + }, + ] +} export default productRouter diff --git a/src/views/product/cloud/index.vue b/src/views/product/cloud/index.vue new file mode 100644 index 0000000..f8f9c8e --- /dev/null +++ b/src/views/product/cloud/index.vue @@ -0,0 +1,1080 @@ + + + + diff --git a/src/views/product/productList/index.vue b/src/views/product/productList/index.vue index 640337d..d27af46 100644 --- a/src/views/product/productList/index.vue +++ b/src/views/product/productList/index.vue @@ -1,12 +1,14 @@