From eb7cec25069e17f19808c7b4aea2935c1fd4b154 Mon Sep 17 00:00:00 2001 From: rouchen <3133657697@qq.com> Date: Mon, 25 Mar 2024 17:17:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/api/product/info.js | 7 + src/components/Editor/index.vue | 3 + src/main.js | 7 +- src/router/index.js | 9 +- src/views/product/info/detail/index.vue | 181 +++++++++++++++++-- src/views/product/shop/index.vue | 229 ++++++++++++++++++++++++ 7 files changed, 419 insertions(+), 19 deletions(-) create mode 100644 src/views/product/shop/index.vue diff --git a/package.json b/package.json index 6a46cc5..f733a17 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "clipboard": "2.0.8", "core-js": "3.25.3", "echarts": "5.4.0", - "element-ui": "2.15.13", + "element-ui": "^2.15.13", "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "9.18.5", diff --git a/src/api/product/info.js b/src/api/product/info.js index 20c88ae..5288172 100644 --- a/src/api/product/info.js +++ b/src/api/product/info.js @@ -9,6 +9,13 @@ export function listInfo(query) { }) } +// 查询商品信息详细 +export function getDetailInfo(id) { + return request({ + url: '/product/info/detail/' + id, + method: 'get' + }) +} // 查询商品信息详细 export function getInfo(id) { return request({ diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 4d10bd8..7eb6e9f 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/main.js b/src/main.js index ec9f715..8513d52 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,9 @@ -import Vue from 'vue' + +import Vue from 'vue'; +import ElementUI from 'element-ui'; +import 'element-ui/lib/theme-chalk/index.css'; + +Vue.use(ElementUI); import Cookies from 'js-cookie' diff --git a/src/router/index.js b/src/router/index.js index 3d5426b..74d3068 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,6 +3,7 @@ import Router from 'vue-router' /* Layout */ import Layout from '@/layout' import LayoutShop from "@/layout-shop/index.vue"; +import detail from "@/views/product/info/detail/index.vue"; Vue.use(Router) /** @@ -80,12 +81,16 @@ export const constantRoutes = [ children: [ { path: 'product-detail', - component: () => import('@/views/product/info/detail/index'), - name: 'Demo', + component: () => import('@/views/product/shop/index'), + name: 'ShopProduct', meta: {title: '商品详情', icon: 'dashboard', affix: true} } ] }, + { + path: '/gb', + component: detail + }, { path: '/user', component: Layout, diff --git a/src/views/product/info/detail/index.vue b/src/views/product/info/detail/index.vue index 3ed7ee2..20fcd85 100644 --- a/src/views/product/info/detail/index.vue +++ b/src/views/product/info/detail/index.vue @@ -2,32 +2,136 @@
首页 - {{breadcrumb}} + {{breadcrumb.name}} - + - - -

{{ item }}

+ + + 坏了 -
- -
- - - +
+ + +
+ +
+
+ +
+ + + +
+
+ +
+ + + + +
+
+ +
+ + + +
+
+
+ + {{receivedShop.projectInfo.name}} +

125

+ +
+ + + +
+
+ + + + {{value}} + + + + + + + 加入购物车 + 立即购买 + + + +
+ + + +
+ 商品详情 +
+ + kooriookami + 18100000000 + 苏州市 + + 学校 + + 江苏省苏州市吴中区吴中大道 1188 号 + + + kooriookami + 18100000000 + 苏州市 + + 学校 + + 江苏省苏州市吴中区吴中大道 1188 号 + + +
+ diff --git a/src/views/product/shop/index.vue b/src/views/product/shop/index.vue new file mode 100644 index 0000000..614632f --- /dev/null +++ b/src/views/product/shop/index.vue @@ -0,0 +1,229 @@ + + + +