diff --git a/src/components/Selection.vue b/src/components/Selection.vue deleted file mode 100644 index d3d9621..0000000 --- a/src/components/Selection.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - diff --git a/src/router/index.js b/src/router/index.js index 7ecd523..29600b9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -327,7 +327,7 @@ const routes = [ component: Layout, redirect: '/product/index', meta: { - title: '产品管理', + title: '商品管理', icon: 'iconfont icon-chanpin', roles: ['admin', 'editor'], tapName: 'admin' @@ -337,7 +337,7 @@ const routes = [ path: '/product/index', component: () => import('@/views/layout/components/main/product/index'), meta: { - title: '产品列表', + title: '商品列表', icon: 'iconfont icon-chanpinliebiao-02', roles: ['admin', 'editor'], tapName: 'admin' @@ -347,7 +347,7 @@ const routes = [ path: '/product/add', component: () => import('@/views/layout/components/main/product/add'), meta: { - title: '添加产品', + title: '添加商品', icon: 'iconfont icon-huoquchanpin', roles: ['admin', 'editor'], tapName: 'admin' @@ -357,7 +357,7 @@ const routes = [ path: '/product/edit/:id', component: () => import('@/views/layout/components/main/product/add'), meta: { - title: '编辑产品', + title: '编辑商品', icon: 'iconfont icon-huoquchanpin', roles: ['admin', 'editor'], tapName: 'admin', diff --git a/src/store/index.js b/src/store/index.js index 0d3a4b1..41663a2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -612,6 +612,60 @@ const store = new Vuex.Store({ } return res }, + /** + * @description: 产品排序 + * @param {*} 产品信息 + */ + async fetchOrderProduct ({ dispatch }, form) { + const params = new URLSearchParams() + params.append('shop_id', form.shop_id) + params.append('id', form.id) + params.append('sort', form.sort) + const res = await api.post('orderProduct', params, 'Admin') + if (res.data.status === 1) { + await dispatch('fetchProductList')// 刷新产品列表 + Message.success(res.data.msg) + } else { + Message.error(res.data.msg) + } + return res + }, + /** + * @description: 产品前端显示隐藏 + * @param {*} 产品信息 + */ + async fetchShowProduct ({ dispatch }, form) { + const params = new URLSearchParams() + params.append('shop_id', form.shop_id) + params.append('id', form.id) + params.append('show', form.show) + const res = await api.post('showProduct', params, 'Admin') + if (res.data.status === 1) { + await dispatch('fetchProductList')// 刷新产品列表 + Message.success(res.data.msg) + } else { + Message.error(res.data.msg) + } + return res + }, + /** + * @description: 产品前端推荐位 + * @param {*} 产品信息 + */ + async fetchRecommendProduct ({ dispatch }, form) { + const params = new URLSearchParams() + params.append('shop_id', form.shop_id) + params.append('id', form.id) + params.append('recommend', form.recommend) + const res = await api.post('recommendProduct', params, 'Admin') + if (res.data.status === 1) { + await dispatch('fetchProductList')// 刷新产品列表 + Message.success(res.data.msg) + } else { + Message.error(res.data.msg) + } + return res + }, /** * @description: 获取订单列表 ps:待发货及待收货 并且不是退款成功状态 * @return {*} 列表 diff --git a/src/styles/myIcon.scss b/src/styles/myIcon.scss index fadea5e..d39a041 100644 --- a/src/styles/myIcon.scss +++ b/src/styles/myIcon.scss @@ -1 +1 @@ -@import 'https://at.alicdn.com/t/c/font_3703467_89thn6xt9aj.css'; //iconfont阿里巴巴 \ No newline at end of file +@import 'https://at.alicdn.com/t/c/font_3703467_8nepryze00i.css'; //iconfont阿里巴巴 \ No newline at end of file diff --git a/src/views/layout/components/main/admin/add.vue b/src/views/layout/components/main/admin/add.vue index fb8f02c..8e03a21 100644 --- a/src/views/layout/components/main/admin/add.vue +++ b/src/views/layout/components/main/admin/add.vue @@ -13,7 +13,7 @@ - + @@ -56,7 +56,7 @@