From 67a3bcdaeeb93373fba5ec81f49f1ecad4f4d36b Mon Sep 17 00:00:00 2001 From: zjf <1799650030@qq.com> Date: Tue, 7 Jan 2025 10:17:08 +0800 Subject: [PATCH 1/7] . --- .env | 9 +++++---- package.json | 3 ++- src/sheep/api/user.ts | 1 + vite.config.ts | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 8360fc2..50f8917 100644 --- a/.env +++ b/.env @@ -16,15 +16,16 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' VITE_OAUTH2_ZZDSHAPP_CLIENT='zzdsh:zzdsh' -# VITE_APP_DEV_SERVICE =http://123.156.230.15:8089/api +VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 +#VITE_APP_DEV_SERVICE =http://123.156.230.15:8089/api # VITE_APP_DEV_SERVICE =http://123.156.230.15:8089/app-api # VITE_APP_DEV_SERVICE =http://123.156.228.134:48080/app-api # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api -VITE_APP_DEV_SERVICE = http://192.168.101.24:48080/app-api +#VITE_APP_DEV_SERVICE = http://192.168.101.24:48080/app-api # ******************** end 开发环境 end ******************** # ******************** start 生产环境 start ******************** #VITE_APP_PROD_SERVICE = http://123.156.228.134:48080/app-api -VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/app-api -# ******************** end 生产环境 end ******************** \ No newline at end of file +#VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/app-api +# ******************** end 生产环境 end ******************** diff --git a/package.json b/package.json index 9c3da15..d41bb0c 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "dayjs": "^1.11.13", "luch-request": "^3.1.1", "pinia": "^2.2.6", + "qs": "^6.13.1", "radash": "^12.1.0", "vue": "^3.3.11", "vue-i18n": "^9.1.9", @@ -86,4 +87,4 @@ "vite": "5.2.8", "vue-tsc": "^1.0.24" } -} \ No newline at end of file +} diff --git a/src/sheep/api/user.ts b/src/sheep/api/user.ts index 974650d..75e05fc 100644 --- a/src/sheep/api/user.ts +++ b/src/sheep/api/user.ts @@ -48,6 +48,7 @@ export default { params.grant_type = "password"; params.scope = "server"; params.code = ""; + request({ url: `/auth/oauth2/token`, method: "POST", diff --git a/vite.config.ts b/vite.config.ts index fff433a..aadf39b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -32,10 +32,10 @@ export default defineConfig(({ mode }) => { }, }, server: { - port: 8001, + port: 8088, hmr: true, // 启用热更新 proxy: { - "/api": { + '/api': { target: baseUrl, // 目标服务器地址 changeOrigin: true, // 是否修改请求头中的 Origin 字段 rewrite: (path) => path.replace(/^\/api/, ""), From 4f75a10dbf94419b29f274293a0f96914dea86c4 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 9 Jan 2025 09:21:52 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=E4=B8=8B=E5=8D=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +- src/pages/merchant/components/product-car.vue | 4 +- src/pages/merchant/detail.vue | 45 ++----- src/pages/merchant/food.vue | 6 +- src/pages/merchant/product-detail.vue | 119 ++++++++++-------- src/sheep/api/food.ts | 12 +- src/sheep/api/product.ts | 2 +- 7 files changed, 95 insertions(+), 97 deletions(-) diff --git a/.env b/.env index 853ae6a..e364819 100644 --- a/.env +++ b/.env @@ -22,8 +22,8 @@ VITE_IMAGE_BASE_PATH = http://localhost:9999 # ******************** start 开发环境 start ******************** # VITE_APP_DEV_SERVICE =http://123.156.228.134:48080/app-api # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api -VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地 -# VITE_APP_DEV_SERVICE = http://localhost:9999 +# VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地 +VITE_APP_DEV_SERVICE = http://localhost:9999 # ******************** end 开发环境 end ******************** # ******************** start 生产环境 start ******************** diff --git a/src/pages/merchant/components/product-car.vue b/src/pages/merchant/components/product-car.vue index 19a9b84..d8e464e 100644 --- a/src/pages/merchant/components/product-car.vue +++ b/src/pages/merchant/components/product-car.vue @@ -8,6 +8,8 @@ import { merchantApi } from "@@/api" import ProductRow from './product-row.vue' import ProductTotal from './product-total.vue' +import { filePath } from "@@/utils/file"; + const emit = defineEmits(["update:modelValue", "submit", "doContainer", "add", "remove"]) export type Props = { @@ -57,7 +59,7 @@ const getHeight = () => {