From a15b83ed3638f3ac403f301109cfa26517275734 Mon Sep 17 00:00:00 2001
From: sunshine7058 <2564255161@qq.com>
Date: Mon, 25 Mar 2024 16:03:07 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=B9=E9=85=8D=E7=BD=AE=E8=BF=9B?=
=?UTF-8?q?=E8=A1=8C=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 6a46cc5..e2217b6 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"author": "若依",
"license": "MIT",
"scripts": {
- "dev": "vue-cli-service serve",
+ "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
From cd59604314d0b48aea0c299033d74538e6ffc4ad Mon Sep 17 00:00:00 2001
From: sunshine7058 <2564255161@qq.com>
Date: Mon, 25 Mar 2024 19:14:21 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=95=86=E5=93=81?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/product/info.js | 8 ++
src/components/Editor/index.vue | 3 +
src/layout-shop/index.vue | 74 ++++++++++
src/router/index.js | 16 ++-
src/views/product/info/detail/index.vue | 177 ++++++++++++++++++++++++
5 files changed, 277 insertions(+), 1 deletion(-)
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..b45f9d8 100644
--- a/src/api/product/info.js
+++ b/src/api/product/info.js
@@ -1,4 +1,5 @@
import request from '@/utils/request'
+import * as url from "url";
// 查询商品信息列表
export function listInfo(query) {
@@ -42,3 +43,10 @@ export function delInfo(id) {
method: 'delete'
})
}
+
+export function getDetailInfo(id){
+ return request({
+ url: '/product/info/detail/' + id,
+ method: 'get'
+ })
+}
diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue
index 4d10bd8..d4ebbf3 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..1bc5ddd 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -2,7 +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 +73,20 @@ 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..cce1156
--- /dev/null
+++ b/src/views/product/info/detail/index.vue
@@ -0,0 +1,177 @@
+
+
+
+ 首页
+ {{categoryInfo.name}}
+
+ {{projectDetail.projectInfo.name}}
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 456/2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 商品名称
+ 商品规格(内存-储存-颜色)
+ ¥125
+
+
+
+ {{value}}
+
+
+
+
+
+
+ 加入购物车
+ 立即购买
+
+
+
+
+
+
+
+ 商品详情
+
+
+ kooriookami
+ 18100000000
+ 苏州市
+
+ 学校
+
+ 江苏省苏州市吴中区吴中大道 1188 号
+
+
+ kooriookami
+ 18100000000
+ 苏州市
+
+
+
+
+
+
+
+
+
+
+
+
+