From 42072a546ee22405cd5a4712201ab70f2518d144 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Fri, 7 Feb 2025 11:24:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/api/shop.js | 34 +++++------ jiuyi2/common/js/config.js | 8 +-- jiuyi2/pages/mine/mine.vue | 16 +++--- jiuyi2/pages/shop/collect.vue | 8 +-- .../components/jy-commodity-foot/index.vue | 4 +- jiuyi2/pages/shop/store/commodities.vue | 56 +++++++++++++++---- jiuyi2/vite.config.js | 5 +- 7 files changed, 84 insertions(+), 47 deletions(-) diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js index 0622a2ff..8143f839 100644 --- a/jiuyi2/api/shop.js +++ b/jiuyi2/api/shop.js @@ -73,13 +73,28 @@ const shop = { }, /** - * 商家发布商品 + * 保存商品信息 * @param {Object} param */ - releaseProduct(param) { + saveProduct(param) { return util.request({ - url: `/shopify/`, + url: `/shopify/webProduct/uploadProduct`, method: 'POST', + data: param.data, + load: true, + }) + }, + + /** + * 商家商品删除 + * @param {Object} param + */ + removeProduct(param) { + return util.request({ + url: `/webProduct`, + method: 'POST', + path: param.path, + load: true, }) }, @@ -180,19 +195,6 @@ const shop = { }) }, - /** - * 保存商品信息 - * @param {Object} param - */ - saveProduct(param) { - return util.request({ - url: `/shopify/webProduct/uploadProduct`, - method: 'POST', - data: param.data, - load: true, - }) - }, - /** * 商品收藏 * @param {Object} param diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index fde225b9..ef5cddbf 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -2,12 +2,12 @@ const config = { // 接口域名 // #ifdef H5 - // host: 'http://localhost:5173', - host: 'h5api', + host: 'http://localhost:5173', + // host: 'h5api', // #endif // #ifndef H5 - host: 'http://91f.xyz:8080', - // host: 'http://192.168.0.110:8080', + // host: 'http://91f.xyz:8080', + host: 'http://192.168.0.110:8080', // host: 'http://192.168.0.100:8080', // #endif // 支付方式配置 diff --git a/jiuyi2/pages/mine/mine.vue b/jiuyi2/pages/mine/mine.vue index a1e12a9b..843639d8 100644 --- a/jiuyi2/pages/mine/mine.vue +++ b/jiuyi2/pages/mine/mine.vue @@ -150,10 +150,10 @@ 历史浏览 - + @@ -164,13 +164,13 @@ -