From 17e56ce31f2f4cc4e71f893f0a3d455c8c70c45e Mon Sep 17 00:00:00 2001 From: lewis <604446095@qq.com> Date: Fri, 5 Sep 2025 15:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/.env | 2 +- src/api/user.ts | 12 +++ src/pages.json | 7 ++ src/pages/my/components/wx-login.vue | 7 ++ src/pages/my/uploadProduct.vue | 123 +++++++++++++++++++++++++++ 5 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 src/api/user.ts create mode 100644 src/pages/my/uploadProduct.vue diff --git a/env/.env b/env/.env index 05b3b56..c6383aa 100644 --- a/env/.env +++ b/env/.env @@ -12,7 +12,7 @@ VITE_LOGIN_URL = '/pages/login/index' # 数字乡村 VITE_SERVER_BASEURL = 'http://test.data-middle.lihaink.cn' -VITE_UPLOAD_BASEURL = 'http://test.data-middle.lihaink.cn/upload' +VITE_UPLOAD_BASEURL = 'http://test.data-middle.lihaink.cn/api/upload/image' # 商城 VITE_SHOP_SERVER_BASEURL = 'https://shop.lihaink.cn' diff --git a/src/api/user.ts b/src/api/user.ts new file mode 100644 index 0000000..7a4d8fb --- /dev/null +++ b/src/api/user.ts @@ -0,0 +1,12 @@ +import { http } from '@/utils/http' + +export function userListApi(data: { code: any }) { + return http.get('/api/user/list', data) +} + +export function userInfoApi() { + return http.get('/api/user/info') +} +export function commitProduct(data) { + return http.post('/api/user/commitProduct', data) +} diff --git a/src/pages.json b/src/pages.json index 02588d7..55887bc 100644 --- a/src/pages.json +++ b/src/pages.json @@ -117,6 +117,13 @@ "navigationBarTitleText": "设置" } }, + { + "path": "pages/my/uploadProduct", + "type": "page", + "style": { + "navigationBarTitleText": "上传商品" + } + }, { "path": "pages/service/find", "type": "page" diff --git a/src/pages/my/components/wx-login.vue b/src/pages/my/components/wx-login.vue index 3457cd1..42caec1 100644 --- a/src/pages/my/components/wx-login.vue +++ b/src/pages/my/components/wx-login.vue @@ -92,6 +92,13 @@ icon: '/static/icons/my7.png', color: 'red', }, + { + name: '上传商品', + url: '/pages/my/uploadProduct', + type: 1, + icon: '/static/icons/rural_ecommerce.png', + color: 'red', + }, ]" > diff --git a/src/pages/my/uploadProduct.vue b/src/pages/my/uploadProduct.vue new file mode 100644 index 0000000..7805e27 --- /dev/null +++ b/src/pages/my/uploadProduct.vue @@ -0,0 +1,123 @@ + +{ + style: { navigationBarTitleText: '上传商品' }, +} + + + + +