From 5b5d65e072ccbec99a60f3778861a4431c22f887 Mon Sep 17 00:00:00 2001 From: mapleaf Date: Sun, 31 Aug 2025 21:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=99=BB=E5=BD=95=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-system/src/assets/logo.png | Bin 0 -> 4317 bytes mini-program/api/config.js | 34 ++ mini-program/api/services.js | 78 +++ mini-program/pages.json | 108 +++- mini-program/pages/animal/list.vue | 645 ++++++++++++++++++++ mini-program/pages/auth/login.vue | 712 ++++++++++++++++++++++ mini-program/pages/flower/list.vue | 649 ++++++++++++++++++++ mini-program/pages/promotion/invite.vue | 657 ++++++++++++++++++++ mini-program/pages/search/index.vue | 767 ++++++++++++++++++++++++ mini-program/pages/travel/list.vue | 340 +++++++++++ 10 files changed, 3984 insertions(+), 6 deletions(-) create mode 100644 admin-system/src/assets/logo.png create mode 100644 mini-program/pages/animal/list.vue create mode 100644 mini-program/pages/auth/login.vue create mode 100644 mini-program/pages/flower/list.vue create mode 100644 mini-program/pages/promotion/invite.vue create mode 100644 mini-program/pages/search/index.vue create mode 100644 mini-program/pages/travel/list.vue diff --git a/admin-system/src/assets/logo.png b/admin-system/src/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..20140bb279f65045def584ee2b2cf1b9b0140915 GIT binary patch literal 4317 zcmcgwcT`j9whtJ(f&~RZAp{W+QcijzK}qOMN)!v(?!m%%-}1e=_n()QlXK4Z?fu*BxA(VJwt0Cv&C)c` zL?95eT%7HF;5&BeQdfn4{c5bJ@J&PP>@P(iwB}7+N{D^=`Ur$-vw*W!w${U)!4pMd zxu7Tn!p265VQB=yW<{)+%L|8Os1PVrAY`In*Iq)S1RxXbNA|#bh}lq>z&Tz5`Nn&4 zc=6#pI*49ji?WGjzyOhujEjnmj1Wp0u}t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 diff --git a/mini-program/api/config.js b/mini-program/api/config.js index 9c8d17b..19379e3 100644 --- a/mini-program/api/config.js +++ b/mini-program/api/config.js @@ -78,6 +78,40 @@ const endpoints = { CONFIG: '/system/config', NOTICE: '/system/notice', FEEDBACK: '/system/feedback' + }, + + // 搜索相关 + SEARCH: { + GLOBAL: '/search/global', + SUGGESTIONS: '/search/suggestions', + TRAVEL: '/search/travel', + ANIMAL: '/search/animal', + FLOWER: '/search/flower', + USER: '/search/user' + }, + + // 推广相关 + PROMOTION: { + DATA: '/promotion/data', + RECORDS: '/promotion/records', + ALL_RECORDS: '/promotion/all-records', + QRCODE: '/promotion/qrcode', + REWARD_DETAILS: '/promotion/reward-details', + WITHDRAW: '/promotion/withdraw', + WITHDRAW_RECORDS: '/promotion/withdraw-records' + }, + + // 认证相关 + AUTH: { + PHONE_LOGIN: '/auth/phone-login', + WECHAT_LOGIN: '/auth/wechat-login', + PASSWORD_LOGIN: '/auth/password-login', + SEND_SMS_CODE: '/auth/send-sms-code', + CHECK_TOKEN: '/auth/check-token', + REFRESH_TOKEN: '/auth/refresh-token', + BIND_PHONE: '/auth/bind-phone', + CHANGE_PASSWORD: '/auth/change-password', + RESET_PASSWORD: '/auth/reset-password' } } diff --git a/mini-program/api/services.js b/mini-program/api/services.js index 1da5db5..429efa1 100644 --- a/mini-program/api/services.js +++ b/mini-program/api/services.js @@ -145,6 +145,81 @@ export const homeService = { getFeaturedFlowers: () => request.get('/home/featured-flowers') } +// 搜索服务 +export const searchService = { + // 全局搜索 + search: (params = {}) => request.get(endpoints.SEARCH.GLOBAL, params), + + // 获取搜索建议 + getSuggestions: (keyword) => request.get(endpoints.SEARCH.SUGGESTIONS, { keyword }), + + // 旅行计划搜索 + searchTravel: (params = {}) => request.get(endpoints.SEARCH.TRAVEL, params), + + // 动物搜索 + searchAnimal: (params = {}) => request.get(endpoints.SEARCH.ANIMAL, params), + + // 花束搜索 + searchFlower: (params = {}) => request.get(endpoints.SEARCH.FLOWER, params), + + // 用户搜索 + searchUser: (params = {}) => request.get(endpoints.SEARCH.USER, params) +} + +// 推广服务 +export const promotionService = { + // 获取推广数据 + getPromotionData: () => request.get(endpoints.PROMOTION.DATA), + + // 获取邀请记录 + getRecentRecords: (params = {}) => request.get(endpoints.PROMOTION.RECORDS, params), + + // 获取所有邀请记录 + getAllRecords: (params = {}) => request.get(endpoints.PROMOTION.ALL_RECORDS, params), + + // 生成邀请二维码 + generateQRCode: () => request.get(endpoints.PROMOTION.QRCODE), + + // 获取奖励明细 + getRewardDetails: (params = {}) => request.get(endpoints.PROMOTION.REWARD_DETAILS, params), + + // 提现申请 + applyWithdraw: (data) => request.post(endpoints.PROMOTION.WITHDRAW, data), + + // 获取提现记录 + getWithdrawRecords: (params = {}) => request.get(endpoints.PROMOTION.WITHDRAW_RECORDS, params) +} + +// 认证服务 +export const authService = { + // 手机号登录 + phoneLogin: (data) => request.post(endpoints.AUTH.PHONE_LOGIN, data), + + // 微信登录 + wechatLogin: (data) => request.post(endpoints.AUTH.WECHAT_LOGIN, data), + + // 密码登录 + passwordLogin: (data) => request.post(endpoints.AUTH.PASSWORD_LOGIN, data), + + // 发送短信验证码 + sendSmsCode: (phone) => request.post(endpoints.AUTH.SEND_SMS_CODE, { phone }), + + // 验证token + checkToken: (token) => request.post(endpoints.AUTH.CHECK_TOKEN, { token }), + + // 刷新token + refreshToken: (refreshToken) => request.post(endpoints.AUTH.REFRESH_TOKEN, { refreshToken }), + + // 绑定手机号 + bindPhone: (data) => request.post(endpoints.AUTH.BIND_PHONE, data), + + // 修改密码 + changePassword: (data) => request.post(endpoints.AUTH.CHANGE_PASSWORD, data), + + // 重置密码 + resetPassword: (data) => request.post(endpoints.AUTH.RESET_PASSWORD, data) +} + // 工具函数 export const apiUtils = { // 生成分页参数 @@ -185,5 +260,8 @@ export default { paymentService, systemService, homeService, + authService, + searchService, + promotionService, apiUtils } \ No newline at end of file diff --git a/mini-program/pages.json b/mini-program/pages.json index 869105d..f42684c 100644 --- a/mini-program/pages.json +++ b/mini-program/pages.json @@ -1,17 +1,113 @@ { - "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + "pages": [ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "uni-app" + "navigationBarTitleText": "结伴客", + "navigationBarBackgroundColor": "#007aff", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/travel/list", + "style": { + "navigationBarTitleText": "旅行计划", + "navigationBarBackgroundColor": "#007aff", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/animal/list", + "style": { + "navigationBarTitleText": "动物认养", + "navigationBarBackgroundColor": "#007aff", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/flower/list", + "style": { + "navigationBarTitleText": "鲜花配送", + "navigationBarBackgroundColor": "#ff6b8b", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/promotion/invite", + "style": { + "navigationBarTitleText": "邀请好友", + "navigationBarBackgroundColor": "#667eea", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/search/index", + "style": { + "navigationBarTitleText": "搜索", + "navigationBarBackgroundColor": "#007aff", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/auth/login", + "style": { + "navigationBarTitleText": "登录", + "navigationBarBackgroundColor": "#007aff", + "navigationBarTextStyle": "white" } } ], "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" + "navigationBarTextStyle": "white", + "navigationBarTitleText": "结伴客", + "navigationBarBackgroundColor": "#007aff", + "backgroundColor": "#f8f9fa", + "app-plus": { + "titleNView": { + "backgroundColor": "#007aff", + "titleColor": "#ffffff", + "titleSize": "17px" + } + } + }, + + "tabBar": { + "color": "#7A7E83", + "selectedColor": "#007aff", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/index/index", + "iconPath": "static/tabbar/home.png", + "selectedIconPath": "static/tabbar/home-active.png", + "text": "首页" + }, + { + "pagePath": "pages/travel/list", + "iconPath": "static/tabbar/travel.png", + "selectedIconPath": "static/tabbar/travel-active.png", + "text": "旅行" + }, + { + "pagePath": "pages/animal/list", + "iconPath": "static/tabbar/animal.png", + "selectedIconPath": "static/tabbar/animal-active.png", + "text": "认养" + }, + { + "pagePath": "pages/flower/list", + "iconPath": "static/tabbar/flower.png", + "selectedIconPath": "static/tabbar/flower-active.png", + "text": "鲜花" + }, + { + "pagePath": "pages/user/center", + "iconPath": "static/tabbar/user.png", + "selectedIconPath": "static/tabbar/user-active.png", + "text": "我的" + } + ] }, "uniIdRouter": {} } diff --git a/mini-program/pages/animal/list.vue b/mini-program/pages/animal/list.vue new file mode 100644 index 0000000..71fa6f7 --- /dev/null +++ b/mini-program/pages/animal/list.vue @@ -0,0 +1,645 @@ + + + + + \ No newline at end of file diff --git a/mini-program/pages/auth/login.vue b/mini-program/pages/auth/login.vue new file mode 100644 index 0000000..950c3b8 --- /dev/null +++ b/mini-program/pages/auth/login.vue @@ -0,0 +1,712 @@ + + + + + \ No newline at end of file diff --git a/mini-program/pages/flower/list.vue b/mini-program/pages/flower/list.vue new file mode 100644 index 0000000..0c48fb7 --- /dev/null +++ b/mini-program/pages/flower/list.vue @@ -0,0 +1,649 @@ + + + + + \ No newline at end of file diff --git a/mini-program/pages/promotion/invite.vue b/mini-program/pages/promotion/invite.vue new file mode 100644 index 0000000..49e9e72 --- /dev/null +++ b/mini-program/pages/promotion/invite.vue @@ -0,0 +1,657 @@ + + + + + \ No newline at end of file diff --git a/mini-program/pages/search/index.vue b/mini-program/pages/search/index.vue new file mode 100644 index 0000000..0843a03 --- /dev/null +++ b/mini-program/pages/search/index.vue @@ -0,0 +1,767 @@ + + + + + \ No newline at end of file diff --git a/mini-program/pages/travel/list.vue b/mini-program/pages/travel/list.vue new file mode 100644 index 0000000..779df17 --- /dev/null +++ b/mini-program/pages/travel/list.vue @@ -0,0 +1,340 @@ + + + + + \ No newline at end of file