diff --git a/admin-system/src/assets/logo.png b/admin-system/src/assets/logo.png new file mode 100644 index 0000000..20140bb Binary files /dev/null and b/admin-system/src/assets/logo.png differ 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