From 0dd252b392938b4e17cedaab89c0f4d4676f371d Mon Sep 17 00:00:00 2001 From: szdot Date: Tue, 31 Oct 2023 19:30:41 +0800 Subject: [PATCH] =?UTF-8?q?pathSelection=E7=BB=84=E4=BB=B6=20=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BF=AE=E6=94=B9=EF=BC=9Bui=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E4=BF=AE=E6=94=B9;=E5=88=86=E7=B1=BB=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BF=AE=E6=94=B9=EF=BC=9B=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E5=AE=8C=E5=96=84=EF=BC=88=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=20=E6=98=BE=E7=A4=BA=20=E6=8E=92=E5=BA=8F=EF=BC=89=20?= =?UTF-8?q?=EF=BC=9B=20=E5=95=86=E5=93=81=E6=B7=BB=E5=8A=A0=E9=A1=B5?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Selection.vue | 70 ------- src/router/index.js | 8 +- src/store/index.js | 54 ++++++ src/styles/myIcon.scss | 2 +- .../layout/components/main/admin/add.vue | 6 +- .../layout/components/main/admin/index.vue | 6 +- .../layout/components/main/category/index.vue | 6 +- .../layout/components/main/product/add.vue | 69 +++++-- .../layout/components/main/product/index.vue | 174 +++++++++++++++--- .../layout/components/main/register/add.vue | 6 +- .../layout/components/main/register/index.vue | 6 +- .../layout/components/main/route/add.vue | 6 +- .../layout/components/main/route/index.vue | 6 +- src/views/layout/components/main/shop/add.vue | 10 +- src/views/layout/components/main/site/add.vue | 6 +- .../layout/components/main/site/index.vue | 6 +- 16 files changed, 295 insertions(+), 146 deletions(-) delete mode 100644 src/components/Selection.vue 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 @@