From d4ceceee8c4f99fd419c5d33186483fbea58de4c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 26 Dec 2022 21:29:19 +0800 Subject: [PATCH] =?UTF-8?q?uniapp=EF=BC=9A=E3=80=90=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E3=80=91=E5=AF=B9=E6=8E=A5=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/api/product.js | 2 +- .../yd-cart-product/yd-cart-product.vue | 2 +- .../yd-order-product/yd-order-product.vue | 2 +- .../yd-product-box/yd-product-box.vue | 2 +- .../yd-product-more/yd-product-more.vue | 2 +- yudao-ui-app/pages.json | 12 +- yudao-ui-app/pages/product/product.vue | 109 ++++++------------ 7 files changed, 49 insertions(+), 82 deletions(-) diff --git a/yudao-ui-app/api/product.js b/yudao-ui-app/api/product.js index 824aede9d..627013c46 100644 --- a/yudao-ui-app/api/product.js +++ b/yudao-ui-app/api/product.js @@ -5,4 +5,4 @@ const { http } = uni.$u export const productSpuPage = params => http.get('product/spu/page', { params }) // 查询商品 -export const productSpu = id => http.get('product/spu/get-detail?id=' + id, { }) +export const getSpuDetail = id => http.get('product/spu/get-detail?id=' + id, { }) diff --git a/yudao-ui-app/components/yd-cart-product/yd-cart-product.vue b/yudao-ui-app/components/yd-cart-product/yd-cart-product.vue index c6cc674b8..634afb243 100644 --- a/yudao-ui-app/components/yd-cart-product/yd-cart-product.vue +++ b/yudao-ui-app/components/yd-cart-product/yd-cart-product.vue @@ -49,7 +49,7 @@ export default { methods: { handleProductItemClick(productId) { uni.$u.route('/pages/product/product', { - productId: productId + id: productId }) }, handleItemCartClick(productId) { diff --git a/yudao-ui-app/components/yd-order-product/yd-order-product.vue b/yudao-ui-app/components/yd-order-product/yd-order-product.vue index 6e662baec..e6f06eba1 100644 --- a/yudao-ui-app/components/yd-order-product/yd-order-product.vue +++ b/yudao-ui-app/components/yd-order-product/yd-order-product.vue @@ -39,7 +39,7 @@ export default { methods: { handleProductItemClick(productId) { uni.$u.route('/pages/product/product', { - productId: productId + id: productId }) } } diff --git a/yudao-ui-app/components/yd-product-box/yd-product-box.vue b/yudao-ui-app/components/yd-product-box/yd-product-box.vue index ad35b968f..04b216ee7 100644 --- a/yudao-ui-app/components/yd-product-box/yd-product-box.vue +++ b/yudao-ui-app/components/yd-product-box/yd-product-box.vue @@ -76,7 +76,7 @@ export default { methods: { handleProdItemClick(productId) { uni.$u.route('/pages/product/product', { - productId: productId + id: productId }) } } diff --git a/yudao-ui-app/components/yd-product-more/yd-product-more.vue b/yudao-ui-app/components/yd-product-more/yd-product-more.vue index e908cade8..ab9a3a91a 100644 --- a/yudao-ui-app/components/yd-product-more/yd-product-more.vue +++ b/yudao-ui-app/components/yd-product-more/yd-product-more.vue @@ -62,7 +62,7 @@ export default { methods: { handleProdItemClick(productId) { uni.$u.route('/pages/product/product', { - productId: productId + id: productId }) } } diff --git a/yudao-ui-app/pages.json b/yudao-ui-app/pages.json index 3bda77165..71093ac94 100644 --- a/yudao-ui-app/pages.json +++ b/yudao-ui-app/pages.json @@ -62,12 +62,12 @@ "navigationBarTitleText": "账户设置" } }, - { - "path": "pages/product/product", - "style": { - "navigationBarTitleText": "商品详情" - } - }, + { + "path": "pages/product/product", + "style": { + "navigationBarTitleText": "商品详情" + } + }, { "path": "pages/checkout/checkout", "style": { diff --git a/yudao-ui-app/pages/product/product.vue b/yudao-ui-app/pages/product/product.vue index fa0a1fa63..d9d3a9dd2 100644 --- a/yudao-ui-app/pages/product/product.vue +++ b/yudao-ui-app/pages/product/product.vue @@ -1,20 +1,22 @@