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 @@
+
+
+
+
+
+
+
+
+
+ 全部
+
+
+ 牛类
+
+
+ 羊类
+
+
+ 猪类
+
+
+ 鸡类
+
+
+ 其他
+
+
+
+
+
+
+
+ {{ sortOptions[currentSort] }}
+
+
+
+ 筛选
+
+
+
+
+
+
+
+
+
+ {{ animal.name }}
+ {{ animal.species }}
+ {{ animal.location }}
+
+ 认养价格
+ ¥{{ animal.price }}
+
+
+ {{ getStatusText(animal.status) }}
+ 热门
+
+
+
+
+
+
+
+ 加载中...
+
+
+ 没有更多数据了
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ codeCountdown > 0 ? `${codeCountdown}s` : '获取验证码' }}
+
+
+
+
+
+
+
+
+
+
+ 一键授权,快速登录
+
+
+
+
+
+
+
+ 其他登录方式
+
+
+
+
+ 手机验证码登录
+
+
+
+
+ 微信一键登录
+
+
+
+
+ 密码登录
+
+
+
+
+
+
+
+
+ 我已阅读并同意
+
+ 《用户服务协议》
+ 和
+ 《隐私政策》
+
+
+
+
+
+ 先逛逛,稍后登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+ 全部
+
+
+ 爱情鲜花
+
+
+ 生日祝福
+
+
+ 友情鲜花
+
+
+ 祝贺鲜花
+
+
+ 道歉鲜花
+
+
+
+
+
+
+
+ {{ sortOptions[currentSort] }}
+
+
+
+ 筛选
+
+
+
+
+
+
+
+
+
+ {{ flower.name }}
+ {{ flower.description }}
+
+ ¥
+ {{ flower.price }}
+
+
+ {{ getCategoryText(flower.category) }}
+ 库存 {{ flower.stock }} 件
+ 已售罄
+
+
+
+
+
+
+
+ 加载中...
+
+
+ 没有更多数据了
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ promotionData.totalReward || 0 }}
+ 累计奖励(元)
+
+
+ {{ promotionData.invitedCount || 0 }}
+ 已邀请好友
+
+
+ {{ promotionData.successCount || 0 }}
+ 成功邀请
+
+
+
+
+ 我的邀请码
+ {{ promotionData.inviteCode || '加载中...' }}
+
+
+ 复制
+
+
+
+
+
+
+ 邀请方式
+
+
+
+
+
+
+ 微信好友
+
+
+
+
+
+
+ 朋友圈
+
+
+
+
+
+
+ 保存二维码
+
+
+
+
+
+
+ 复制链接
+
+
+
+
+
+
+ 奖励规则
+
+
+
+
+ 每成功邀请1位新用户注册,您可获得10元奖励
+
+
+
+
+ 好友完成首单消费,您再获得20元奖励
+
+
+
+
+ 好友成为活跃用户,您额外获得20元奖励
+
+
+
+
+ 奖励累计满50元即可提现
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ record.username }}
+ {{ record.inviteTime }}
+
+
+ {{ getStatusText(record.status) }}
+ +{{ record.reward }}元
+
+
+
+
+
+ 暂无邀请记录
+
+
+
+
+
+
+ 活动分享
+
+ 分享您参与的活动,邀请好友一起参加,可获得额外奖励!
+
+
+
+
+
+
+
+
+ 认养分享
+
+ 分享您认养的动物,邀请好友一起认养,可获得丰厚奖励!
+
+
+
+
+
+
+
+
+ 多人认养
+
+ 邀请好友共同认养一个动物,享受更多乐趣和优惠!
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+ 全部
+
+
+ 旅行计划
+
+
+ 动物认养
+
+
+ 鲜花配送
+
+
+ 用户
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+ 找到 {{ totalCount }} 条相关结果
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+ {{ item.destination }}
+
+ {{ item.startDate }} - {{ item.endDate }}
+ ¥{{ item.budget }}
+
+
+
+
+ 暂无相关旅行计划
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.species }}
+
+ {{ item.location }}
+ ¥{{ item.price }}
+
+
+
+
+ 暂无相关动物
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.description }}
+
+ {{ item.category }}
+ ¥{{ item.price }}
+
+
+
+
+ 暂无相关鲜花
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.nickname }}
+ {{ item.bio || '暂无简介' }}
+
+
+ {{ item.isFollowing ? '已关注' : '关注' }}
+
+
+
+ 暂无相关用户
+
+
+
+
+
+
+ 加载中...
+
+
+ 没有更多数据了
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+ 全部
+
+
+ 招募中
+
+
+ 进行中
+
+
+ 已完成
+
+
+
+
+
+
+
+
+ {{ travel.title }}
+ {{ travel.destination }}
+
+ {{ travel.startDate }} - {{ travel.endDate }}
+ ¥{{ travel.budget }}
+
+
+ {{ getStatusText(travel.status) }}
+ {{ travel.currentMembers }}/{{ travel.maxMembers }}人
+
+
+
+
+
+
+
+ 加载中...
+
+
+ 没有更多数据了
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file