From 25664afcd618b50f8594a575dd43183fabd4b472 Mon Sep 17 00:00:00 2001 From: joker <13158980+ndne@user.noreply.gitee.com> Date: Wed, 27 Aug 2025 20:45:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4appName=20=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + README.md | 20 ++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- src/api/cart.ts | 12 ++++++------ src/api/catogory.ts | 8 ++++---- src/api/common.ts | 6 +++--- src/api/coupon.ts | 6 +++--- src/api/delivery.ts | 2 +- src/api/favorite.ts | 6 +++--- src/api/goods.ts | 8 ++++---- src/api/home.ts | 8 ++++---- src/api/login.ts | 18 +++++++++--------- src/api/member.ts | 16 ++++++++-------- src/api/order.ts | 6 +++--- src/api/pay.ts | 4 ++-- src/api/recharge.ts | 6 +++--- src/config.ts | 6 +++--- 18 files changed, 70 insertions(+), 69 deletions(-) diff --git a/.gitignore b/.gitignore index 62500e0..3b2e8de 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ node_modules dist .DS_Store *.local +README_files diff --git a/README.md b/README.md index 0b3406a..a65192d 100644 --- a/README.md +++ b/README.md @@ -54,12 +54,7 @@ https:://apis.haibao.shop ```shell 10. 蓝湖设计稿 -(https://lanhuapp.com/link/#/invite?sid=lX0Wgp6X -分享人: yishanglangu -团队名称: 海保世贸的团队的团队 -相关项目: 国际保税贸易系统 -链接有效期: 长期 -) +(https://lanhuapp.com/link/#/ 分享人: yishanglangu团队名称: 海保世贸的团队的团队相关项目: 国际保税贸易系统链接有效期: 长期) ``` ```shell @@ -68,18 +63,23 @@ https:://apis.haibao.shop ``` ```shell -12. PC端首页 https://apis.haibao.shop +12. PC端首页 https://www.haibao.shop 13. 后台地址 https://apis.haibao.shop/index.html#/admin 14. 部分原型 [](https://haimaoproj.helloai001.com/) 16. 系统 介绍,脑图等资料归档 https://www.tapd.cn/34542034/personal_documents/show/1134542034001000049?file_type=word 17. 公众号 “保税贸易” 小程序 “海保世贸” -18. 系统logo 域名| apis.haibao.shop/static/logo.png 系统名称 海保世贸 -19. 在线上传小程序素材接口: https://apis.haibao.shop/apidoc/#/api?appKey=shop&key=app%255Cshop%255Ccontroller%255CCommonController%2540uploadStatic&title=%25E4%25B8%2593%25E9%2597%25A8%25E4%25B8%258A%25E4%25BC%25A0%25E5%2589%258D%25E7%25AB%25AF%25E7%25B4%25A0%25E6%259D%2590-%25E4%25B8%258D%25E7%2599%25BB%25E9%2599%2586&shareKey= - 前端可以定一个 素材域名: htts://apis.haibao.shop 然后拼接url; 后期上cdn 再改配置域名即可 +18. 系统域名 https://apis.haibao.shop +19. 系统logo https://haibao.shop/static/logo.png 系统名称 海保世贸 +20. 在线上传小程序素材接口: https://apis.haibao.shop.haibao.shop/apidoc/#/api?appKey=shop&key=app%255Cshop%255Ccontroller%255CCommonController%2540uploadStatic&title=%25E4%25B8%2593%25E9%2597%25A8%25E4%25B8%258A%25E4%25BC%25A0%25E5%2589%258D%25E7%25AB%25AF%25E7%25B4%25A0%25E6%259D%2590-%25E4%25B8%258D%25E7%2599%25BB%25E9%2599%2586&shareKey= + 前端可以定一个 素材域名: htts://apis.haibao.shop.haibao.shop 然后拼接url; 后期上cdn 再改配置域名即可 20. 阿里巴巴子图库在线链接 https://at.alicdn.com/t/c/font_5002758_yrm4fmoyoo.css +21. 系统图片不能放在 本地 专门上传素材 接口:https://apis.haibao.shop/apidoc/#/api?appKey=shop&key=app%255Cshop%255Ccontroller%255CCommonController%2540uploadStatic&title=%25E4%25B8%2593%25E9%2597%25A8%25E4%25B8%258A%25E4%25BC%25A0%25E5%2589%258D%25E7%25AB%25AF%25E7%25B4%25A0%25E6%259D%2590-%25E4%25B8%258D%25E7%2599%25BB%25E9%2599%2586&shareKey= +![](README_files/1.jpg) + + ``` diff --git a/package-lock.json b/package-lock.json index 2d6e903..1e35113 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "uni-app-joy-shop", + "name": "海保世贸", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "uni-app-joy-shop", + "name": "uni-app-hbsm", "version": "1.0.0", "dependencies": { "@dcloudio/uni-app": "3.0.0-alpha-3081220230802001", diff --git a/package.json b/package.json index 38c8a2c..126b624 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "uni-app-joyshop", + "name": "uni-app-hbsm", "version": "1.0.0", "scripts": { "dev:app": "uni -p app", diff --git a/src/api/cart.ts b/src/api/cart.ts index 35f1d05..3bb1087 100644 --- a/src/api/cart.ts +++ b/src/api/cart.ts @@ -14,7 +14,7 @@ export const addCartApi = (data: addCartItem) => { } >({ method: 'POST', - url: '/userCart/add', + url: 'shop/userCart/add', data, }) } @@ -30,7 +30,7 @@ export const getCartApi = (data: PageParams) => { } >({ method: 'GET', - url: '/userCart', + url: 'shop/userCart', data, }) } @@ -43,7 +43,7 @@ export const getCartApi = (data: PageParams) => { export const deleteCartApi = (data: { id: string[] | number[] }) => { return request({ method: 'POST', - url: '/userCart/delete', + url: 'shop/userCart/delete', data, }) } @@ -57,7 +57,7 @@ export const deleteCartApi = (data: { id: string[] | number[] }) => { export const putCartApi = (data: editCartItem) => { return request({ method: 'POST', - url: `/userCart/edit`, + url: `shop/userCart/edit`, data, }) } @@ -70,7 +70,7 @@ export const putCartApi = (data: editCartItem) => { export const putCartSelectedAllApi = (data: { selected: boolean }) => { return request({ method: 'POST', - url: '/userCart/selectAll', + url: 'shop/userCart/selectAll', data, }) } @@ -78,6 +78,6 @@ export const putCartSelectedAllApi = (data: { selected: boolean }) => { export const getCartTotalNumApi = () => { return request({ method: 'GET', - url: '/userCart/totalNum', + url: 'shop/userCart/totalNum', }) } diff --git a/src/api/catogory.ts b/src/api/catogory.ts index cee676c..50b47db 100644 --- a/src/api/catogory.ts +++ b/src/api/catogory.ts @@ -6,14 +6,14 @@ import { request } from '@/utils/request' export const getCategoryApi = () => { return request({ method: 'GET', - url: '/goods/classify', + url: 'shop/goods/classify', }) } export const getTopCategoryApi = () => { return request({ method: 'GET', - url: '/goods/topClassify', + url: 'shop/goods/topClassify', }) } @@ -24,7 +24,7 @@ export const getClassifyDetailApi = ( ) => { return request>({ method: 'GET', - url: '/goods/classifyDetail', + url: 'shop/goods/classifyDetail', data, }) } @@ -32,6 +32,6 @@ export const getClassifyDetailApi = ( export const getAllClassifyADatapi = () => { return request({ method: 'GET', - url: '/goods/allClassify', + url: 'shop/goods/allClassify', }) } diff --git a/src/api/common.ts b/src/api/common.ts index 2b0683c..f7e05cf 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -20,7 +20,7 @@ export const uploadApi = (filePath: string): Promise => { return new Promise((resolve, reject) => { uni.uploadFile({ - url: `/common/upload?driver=${uploadSetting.mode}`, + url: `shop/common/upload?driver=${uploadSetting.mode}`, filePath, name: 'file', success: (res) => { @@ -95,7 +95,7 @@ export const sendSmsCode = (data: { password?: string }) => { return request({ - url: '/common/sendSmsCode', + url: 'shop/common/sendSmsCode', method: 'POST', data, }) @@ -103,7 +103,7 @@ export const sendSmsCode = (data: { export const getAreaDataApi = () => { return request({ - url: '/common/area', + url: 'shop/common/area', method: 'GET', }) } diff --git a/src/api/coupon.ts b/src/api/coupon.ts index f79dd7e..dd15503 100644 --- a/src/api/coupon.ts +++ b/src/api/coupon.ts @@ -5,7 +5,7 @@ import { request } from '@/utils/request' // 领券中心 export const getCouponListApi = (data: PageParams) => { return request>({ - url: '/coupon/center', + url: 'shop/coupon/center', method: 'GET', data, }) @@ -14,7 +14,7 @@ export const getCouponListApi = (data: PageParams) => { // 领券操作 export const receiveCouponApi = (id: number) => { return request<{ id: number }>({ - url: '/coupon/receive', + url: 'shop/coupon/receive', method: 'POST', data: { id, @@ -29,7 +29,7 @@ export const getMyCouponListApi = ( }, ) => { return request>({ - url: '/userCoupon/list', + url: 'shop/userCoupon/list', method: 'GET', data, }) diff --git a/src/api/delivery.ts b/src/api/delivery.ts index c6d9fd3..7162f0f 100644 --- a/src/api/delivery.ts +++ b/src/api/delivery.ts @@ -4,6 +4,6 @@ import { request } from '@/utils/request' export const getDeliveryCompanyApi = () => { return request({ method: 'GET', - url: '/delivery/company', + url: 'shop/delivery/company', }) } diff --git a/src/api/favorite.ts b/src/api/favorite.ts index 6460b84..9de639d 100644 --- a/src/api/favorite.ts +++ b/src/api/favorite.ts @@ -4,7 +4,7 @@ import { request } from '@/utils/request' export const getFavoriteListApi = (data: PageParams) => { return request>({ - url: '/userFavorite/list', + url: 'shop/userFavorite/list', method: 'GET', data, }) @@ -12,7 +12,7 @@ export const getFavoriteListApi = (data: PageParams) => { export const postAddFavoriteApi = (data: { goods_id: number }) => { return request({ - url: '/userFavorite/add', + url: 'shop/userFavorite/add', method: 'POST', data, }) @@ -20,7 +20,7 @@ export const postAddFavoriteApi = (data: { goods_id: number }) => { export const postCancelFavoriteApi = (data: { goods_id: string | number; is_all?: boolean }) => { return request({ - url: '/userFavorite/delete', + url: 'shop/userFavorite/delete', method: 'POST', data, }) diff --git a/src/api/goods.ts b/src/api/goods.ts index a209ad0..f5eef8d 100644 --- a/src/api/goods.ts +++ b/src/api/goods.ts @@ -11,7 +11,7 @@ import { request } from '@/utils/request' export const getGoodsListApi = (data?: PageParams & goodsListParams) => { return request>({ method: 'GET', - url: '/goods', + url: 'shop/goods', data, }) } @@ -19,7 +19,7 @@ export const getGoodsListApi = (data?: PageParams & goodsListParams) => { export const getGoodsByIdApi = (id: number) => { return request({ method: 'GET', - url: '/goods/detail', + url: 'shop/goods/detail', data: { id, }, @@ -29,7 +29,7 @@ export const getGoodsByIdApi = (id: number) => { export const getGoodsServiceApi = (service_ids: string) => { return request({ method: 'GET', - url: '/goods/service', + url: 'shop/goods/service', data: { service_ids, }, @@ -39,7 +39,7 @@ export const getGoodsServiceApi = (service_ids: string) => { export const getShareInfoApi = (id: number) => { return request({ method: 'GET', - url: '/goods/share', + url: 'shop/goods/share', data: { id, }, diff --git a/src/api/home.ts b/src/api/home.ts index 39893c9..2681731 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -9,7 +9,7 @@ import { request } from '@/utils/request' export const getBannerApi = (type: number = 1) => { return request({ method: 'GET', - url: '/advert/banner', + url: 'shop/advert/banner', data: { type, }, @@ -24,7 +24,7 @@ export const getBannerApi = (type: number = 1) => { export const getGoodsListApi = (data?: PageParams) => { return request>({ method: 'GET', - url: '/goods', + url: 'shop/goods', data, }) } @@ -37,13 +37,13 @@ export const getGoodsListApi = (data?: PageParams) => { export const getNoticeBartApi = () => { return request({ method: 'GET', - url: '/advert/noticeBar', + url: 'shop/advert/noticeBar', }) } export const getHotRecommendApi = () => { return request({ method: 'GET', - url: '/advert/hotRecommend', + url: 'shop/advert/hotRecommend', }) } diff --git a/src/api/login.ts b/src/api/login.ts index 9337e35..6670af0 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -10,7 +10,7 @@ type loginParams = { export const testLoginApi = (phone: string) => { return request({ method: 'POST', - url: '/login/testLogin', + url: 'shop/login/testLogin', data: { phone, }, @@ -28,7 +28,7 @@ export const getSessionByLoginCodeApi = (login_code: string) => { unionid: string }>({ method: 'GET', - url: '/login/getSessionByLoginCode', + url: 'shop/login/getSessionByLoginCode', data: { login_code, }, @@ -41,7 +41,7 @@ export const getSessionByLoginCodeApi = (login_code: string) => { export const miniAppLoginApi = (data: loginParams) => { return request({ method: 'POST', - url: '/login/miniAppLogin', + url: 'shop/login/miniAppLogin', data, }) } @@ -51,7 +51,7 @@ export const checkLoginIegalityApi = (login_code: string) => { login_by_phone: boolean }>({ method: 'POST', - url: '/login/checkLoginIegality', + url: 'shop/login/checkLoginIegality', data: { login_code, }, @@ -62,7 +62,7 @@ export const quickLoginApi = (login_code: string) => { return request( { method: 'POST', - url: '/login/quickLogin', + url: 'shop/login/quickLogin', data: { login_code, }, @@ -75,7 +75,7 @@ export const quickLoginApi = (login_code: string) => { export const logout = () => { return request({ method: 'POST', - url: '/login/logout', + url: 'shop/login/logout', data: { refresh_token: useMemberStore().profile?.refresh_token, }, @@ -85,7 +85,7 @@ export const logout = () => { export const loginByPhone = (data: { phone: string; sms_captcha_code: string }) => { return request({ method: 'POST', - url: '/login/phone', + url: 'shop/login/phone', data, }) } @@ -106,7 +106,7 @@ export const registerApi = (data: { }) => { return request({ method: 'POST', - url: '/login/register', + url: 'shop/login/register', data, }) } @@ -117,7 +117,7 @@ export const bindWxInfo = (data: { }) => { return request({ method: 'POST', - url: '/login/bind', + url: 'shop/login/bind', data, }) } diff --git a/src/api/member.ts b/src/api/member.ts index 5a657f5..ea0f4ab 100644 --- a/src/api/member.ts +++ b/src/api/member.ts @@ -10,14 +10,14 @@ import { request } from '@/utils/request' export const getMemberProfileApi = () => { return request({ method: 'GET', - url: '/user/info', + url: 'shop/user/info', }) } export const putMemberProfileApi = (data: profileParams) => { return request({ method: 'POST', - url: '/user/edit', + url: 'shop/user/edit', data, }) } @@ -25,7 +25,7 @@ export const putMemberProfileApi = (data: profileParams) => { export const getBalanceLogApi = (data: balanceLogParams) => { return request({ method: 'GET', - url: '/user/balanceLog', + url: 'shop/user/balanceLog', data, }) } @@ -34,7 +34,7 @@ export const getBalanceLogApi = (data: balanceLogParams) => { export const getDashboardApi = () => { return request({ method: 'GET', - url: '/user/dashboard', + url: 'shop/user/dashboard', }) } @@ -46,7 +46,7 @@ export const getDashboardApi = () => { export const changePasswordApi = (data: { old_password: string; new_password: string }) => { return request({ method: 'POST', - url: '/user/changePassword', + url: 'shop/user/changePassword', data, }) } @@ -63,7 +63,7 @@ export const resetPasswordApi = (data: { }) => { return request({ method: 'POST', - url: '/user/resetPassword', + url: 'shop/user/resetPassword', data, }) } @@ -73,7 +73,7 @@ export const verificationApi = (data: { password: string; sms_captcha_code: stri verificationToken: string }>({ method: 'POST', - url: '/user/verification', + url: 'shop/user/verification', data, }) } @@ -85,7 +85,7 @@ export const changeBindApi = (data: { }) => { return request({ method: 'POST', - url: '/user/changeBind', + url: 'shop/user/changeBind', data, }) } diff --git a/src/api/order.ts b/src/api/order.ts index b1f6a9f..307e4ea 100644 --- a/src/api/order.ts +++ b/src/api/order.ts @@ -17,9 +17,9 @@ import type { } from '@/types/order' import { request } from '@/utils/request' -const orderUrl = '/order' -const refundUrl = '/orderRefund' -const evaluateUrl = '/orderEvaluate' +const orderUrl = 'shop/order' +const refundUrl = 'shop/orderRefund' +const evaluateUrl = 'shop/orderEvaluate' /** * 获取购物车下单前信息 diff --git a/src/api/pay.ts b/src/api/pay.ts index 8d733db..a8601f6 100644 --- a/src/api/pay.ts +++ b/src/api/pay.ts @@ -4,7 +4,7 @@ export const payOrderApi = (data: { id: number; pay_way: string }) => { return request( { method: 'POST', - url: '/order/pay', + url: 'shop/order/pay', data, }, false, @@ -15,7 +15,7 @@ export const postPayNotifyApi = (data: { id: number; pay_way: string }) => { return request( { method: 'POST', - url: '/order/payNotify', + url: 'shop/order/payNotify', data, }, false, diff --git a/src/api/recharge.ts b/src/api/recharge.ts index 588e892..d69ca40 100644 --- a/src/api/recharge.ts +++ b/src/api/recharge.ts @@ -5,7 +5,7 @@ import { request } from '@/utils/request' export const getRechargeCenterApi = () => { return request({ method: 'GET', - url: '/recharge/center', + url: 'shop/recharge/center', }) } @@ -17,7 +17,7 @@ export const getRechargeCenterApi = () => { export const postRechargeApi = (data: rechargePlanParams) => { return request({ method: 'POST', - url: '/recharge/recharge', + url: 'shop/recharge/recharge', data, }) } @@ -30,7 +30,7 @@ export const postRechargeApi = (data: rechargePlanParams) => { export const getRechargeOrderListApi = (data: PageParams) => { return request>({ method: 'GET', - url: '/recharge/orderList', + url: 'shop/recharge/orderList', data, }) } diff --git a/src/config.ts b/src/config.ts index 48044ab..72dc7a4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -5,10 +5,10 @@ const url = ref('') if (isDev) { // dev模式请求域名 - url.value = 'http://localhost:8000' + url.value = 'http://api-test.haibao.shop' } else { // build模式请求域名 - url.value = 'http://localhost:8000' + url.value = 'http://api.haibao.shop' } /** @@ -19,4 +19,4 @@ export const apiUrl = url.value /** * api应用名 */ -export const apiName = '/shop' +export const apiName = '/'