From 9c60ed86997cfbd3af534bc33d41d9528fbfa230 Mon Sep 17 00:00:00 2001 From: DongZeLiang <2746733890@qq.com> Date: Mon, 25 Mar 2024 11:46:52 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/product/info.js | 7 + src/components/Editor/index.vue | 3 + src/layout-shop/index.vue | 74 ++++++++++ src/router/index.js | 14 ++ src/views/product/info/detail/index.vue | 186 ++++++++++++++++++++++++ 5 files changed, 284 insertions(+) create mode 100644 src/layout-shop/index.vue create mode 100644 src/views/product/info/detail/index.vue diff --git a/src/api/product/info.js b/src/api/product/info.js index 80b02c2..e15e6f7 100644 --- a/src/api/product/info.js +++ b/src/api/product/info.js @@ -16,6 +16,13 @@ export function getInfo(id) { method: 'get' }) } +// 查询商品信息详细 +export function getDetailInfo(id) { + return request({ + url: '/product/info/detail/' + id, + method: 'get' + }) +} // 新增商品信息 export function addInfo(data) { diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 4d10bd8..9d4a8d3 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -124,6 +124,9 @@ export default { methods: { init() { const editor = this.$refs.editor; + if (this.readOnly){ + this.options.modules.toolbar = {}; + } this.Quill = new Quill(editor, this.options); // 如果设置了上传地址则自定义图片上传事件 if (this.type == 'url') { diff --git a/src/layout-shop/index.vue b/src/layout-shop/index.vue new file mode 100644 index 0000000..4739abf --- /dev/null +++ b/src/layout-shop/index.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 2afac71..182d438 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,6 +2,7 @@ import Vue from 'vue' import Router from 'vue-router' /* Layout */ import Layout from '@/layout' +import LayoutShop from "@/layout-shop"; Vue.use(Router) @@ -73,6 +74,19 @@ export const constantRoutes = [ } ] }, + { + path: '', + component: LayoutShop, + redirect: 'product-detail', + children: [ + { + path: 'product-detail', + component: () => import('@/views/product/info/detail/index'), + name: 'Demo', + meta: {title: '商品详情', icon: 'dashboard', affix: true} + } + ] + }, { path: '/user', component: Layout, diff --git a/src/views/product/info/detail/index.vue b/src/views/product/info/detail/index.vue new file mode 100644 index 0000000..d4fc254 --- /dev/null +++ b/src/views/product/info/detail/index.vue @@ -0,0 +1,186 @@ + + + + + From 923638dc95c9339b422312307b4c0089c592af8d Mon Sep 17 00:00:00 2001 From: DongZeLiang <2746733890@qq.com> Date: Mon, 25 Mar 2024 11:47:36 +0800 Subject: [PATCH 02/12] IP --- vue.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index 17d9a1d..92405cd 100644 --- a/vue.config.js +++ b/vue.config.js @@ -35,7 +35,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://127.0.0.1:8080`, + target: `http://10.1.123.97:8080`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' From ffe6fc9333379031145cccb3a4a0a93f7c7c6998 Mon Sep 17 00:00:00 2001 From: DongZeLiang <2746733890@qq.com> Date: Mon, 25 Mar 2024 14:08:17 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E8=A7=84=E6=A0=BC=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/info/detail/index.vue | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/views/product/info/detail/index.vue b/src/views/product/info/detail/index.vue index d4fc254..b27bfc3 100644 --- a/src/views/product/info/detail/index.vue +++ b/src/views/product/info/detail/index.vue @@ -76,18 +76,9 @@

商品规格(内存-储存-颜色)

¥125

- - - 备选项 - 备选项 - 备选项 - - - - - 备选项 - 备选项 - 备选项 + + + {{value}} From aef740d9c7e6baf3671b88b1775a9c0d62e4dbe5 Mon Sep 17 00:00:00 2001 From: DongZeLiang <2746733890@qq.com> Date: Tue, 26 Mar 2024 11:24:25 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=95=86=E5=93=81=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.vue | 2 +- src/views/product/info/detail/index.vue | 117 ++++++++++++++---------- 2 files changed, 69 insertions(+), 50 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 9d4a8d3..dd3e1e0 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -179,7 +179,7 @@ export default { }, handleUploadSuccess(res, file) { // 如果上传成功 - if (res.data.code == 200) { + if (res.code == 200) { // 获取富文本组件实例 let quill = this.Quill; // 获取光标所在位置 diff --git a/src/views/product/info/detail/index.vue b/src/views/product/info/detail/index.vue index b27bfc3..cb3ca31 100644 --- a/src/views/product/info/detail/index.vue +++ b/src/views/product/info/detail/index.vue @@ -9,8 +9,8 @@ - -

{{ item }}

+ +
@@ -18,9 +18,7 @@
@@ -29,7 +27,7 @@
@@ -38,32 +36,19 @@
- -
- -