diff --git a/api/activity.js b/api/activity.js new file mode 100644 index 0000000..cf01da5 --- /dev/null +++ b/api/activity.js @@ -0,0 +1,44 @@ +import request from '../utils/request'; + +// 活动列表 +export function FetchActivityInfo(data) { + return request({ + url: '/api/weixin/initActivityInfo', + data + }) +} + +// 报名活动 +export function FetchSignActivity(data) { + return request({ + url: '/api/weixin/signActivity', + method: 'POST', + data + }) +} + +// 我的报名活动列表 +export function FetchMySignActivityInfo(data) { + return request({ + url: '/api/weixin/mySignActivityInfo', + data + }) +} + +// 取消报名 +export function FetchCancelSignActivity(data) { + return request({ + url: '/api/weixin/cancelSignActivity', + method: 'POST', + data + }) +} + +// 删除自己报名的活动 +export function FetchDeleteSignActivity(data) { + return request({ + url: '/api/weixin/deleteSignActivity', + method: 'POST', + data + }) +} diff --git a/pages.json b/pages.json index a17a5ed..d04c3fd 100644 --- a/pages.json +++ b/pages.json @@ -96,7 +96,8 @@ { "path": "pages/activity-list/activity-list", "style": { - "navigationBarTitleText": "活动列表" + "navigationBarTitleText": "活动列表", + "enablePullDownRefresh": true } }, { @@ -154,7 +155,7 @@ { "path": "pages/seat-booking/seat-booking", "style": { - "navigationBarTitleText": "座位预约" + "navigationBarTitleText": "预约登记" } }, { @@ -166,7 +167,14 @@ { "path": "pages/booking-record/booking-record", "style": { - "navigationBarTitleText": "预约座位记录" + "navigationBarTitleText": "预约入馆记录" + } + }, + { + "path": "pages/activity-record/activity-record", + "style": { + "navigationBarTitleText": "活动预约记录", + "enablePullDownRefresh": true } }, { diff --git a/pages/home/home.vue b/pages/home/home.vue index c0fde1b..2aa4af0 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -329,7 +329,7 @@ export default { if (res.code === 200 && res.data.length > 0) { this.isBindLibraryCard = true; - // 👉 默认证排第一位 + // 默认证排第一位 const defaultCard = res.data.find(item => item.bindDefault === true); const otherCards = res.data.filter(item => !item.bindDefault); // 合并:默认在前,其他在后 diff --git a/pages/home/home2.vue b/pages/home/home2.vue new file mode 100644 index 0000000..99d6990 --- /dev/null +++ b/pages/home/home2.vue @@ -0,0 +1,707 @@ + + + + + \ No newline at end of file diff --git a/pages/user/user.vue b/pages/user/user.vue index 8da23ec..84474c4 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -26,6 +26,10 @@ 入馆 + + + 活动 + @@ -82,6 +86,12 @@ export default { }); }, + toActivityRecord() { + uni.navigateTo({ + url: '/subpkg/pages/activity-record/activity-record' + }); + }, + async loadUserInfo() { if (this.loading) return; this.loading = true; @@ -269,11 +279,12 @@ export default { border-radius: 6px; box-shadow: 0px 2px 15px 0px rgba(0, 0, 0, .1); .menu-item{ + width: 25%; display: flex; flex-direction: column; align-items: center; justify-content: center; - padding: 0 30px; + // padding: 0 30px; height: 100px; .menu-icon{ width: 32px; diff --git a/static/images/menu-hd.png b/static/images/menu-hd.png new file mode 100644 index 0000000..c5632d5 Binary files /dev/null and b/static/images/menu-hd.png differ diff --git a/subpkg/pages/activity-detail/activity-detail.vue b/subpkg/pages/activity-detail/activity-detail.vue index 3172803..511d65c 100644 --- a/subpkg/pages/activity-detail/activity-detail.vue +++ b/subpkg/pages/activity-detail/activity-detail.vue @@ -1,25 +1,25 @@ @@ -127,13 +415,14 @@ export default { .rich-content { background: #fff; - padding: 10px 0; + padding: 10px; .content-title{ position: relative; font-size: 16px; font-weight: bold; color: #333; padding-left: 12px; + margin-bottom: 20px; &::before{ position: absolute; left: 0; @@ -145,6 +434,13 @@ export default { background-color: #01a4fe; } } + +} +.rich-text{ + ::v-deep p{ + line-height: 1.5; + margin: 15px 0; + } } .detail-bottom { @@ -184,4 +480,147 @@ export default { .disabled-btn { background: #ccc !important; } - + +.modal-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + justify-content: center; + z-index: 1000; +} + +.modal-content { + width: 85%; + background: #fff; + border-radius: 8px; + overflow: hidden; +} + +.modal-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 15px; + border-bottom: 1px solid #f0f0f0; + + .modal-title { + font-size: 16px; + font-weight: bold; + color: #333; + } + + .close-icon { + color: #999; + } +} + +.modal-body { + padding: 15px; +} + +.form-item { + margin-bottom: 15px; + + .form-label { + display: block; + font-size: 14px; + color: #333; + margin-bottom: 8px; + } + + .form-input { + width: calc(100% - 25px); + height: 40px; + background: #f8f8f8; + border-radius: 8px; + padding: 0 12px; + font-size: 14px; + } + + .select-wrapper { + width: calc(100% - 25px); + height: 40px; + background: #f8f8f8; + border-radius: 8px; + display: flex; + align-items: center; + padding: 0 12px; + font-size: 14px; + ::v-deep .picker-select{ + width: 100%; + } + + .select-value { + font-size: 14px; + color: #333; + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + + &::after { + content: ''; + width: 0; + height: 0; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #999; + } + } + } +} + +.modal-footer { + display: flex; + border-top: 1px solid #f0f0f0; + + .cancel-btn, + .submit-btn { + flex: 1; + height: 44px; + line-height: 44px; + text-align: center; + font-size: 15px; + border-radius: 0; + border: none; + margin: 0; + padding: 0; + &::after { + border: none; + border-radius: 0; + } + } + + .cancel-btn { + background: #f5f5f5; + color: #666; + // border-right: 1px solid #f0f0f0; + } + + .submit-btn { + background: #01a4fe; + color: #fff; + } +} + +.get-phone-btn { + font-size: 12px; + color: #fff; + background-color: #01a4fe; + width: 90px; + border-radius: 20px; + padding: 10px; + border: none; + line-height: 1.2; + margin-left: 10px; + + &::after { + border: none; + } +} + \ No newline at end of file diff --git a/subpkg/pages/activity-list/activity-list.vue b/subpkg/pages/activity-list/activity-list.vue index 7875aca..cd7c3db 100644 --- a/subpkg/pages/activity-list/activity-list.vue +++ b/subpkg/pages/activity-list/activity-list.vue @@ -17,242 +17,189 @@ - + - + + + + {{item.status}} + - {{ item.title }} + + {{ item.title }} + - {{ item.time }} + {{ item.startTime }} - {{ item.endTime }} - + {{ getBtnText(item.status) }} + --> - + 暂无{{ currentTab === 0 ? '进行中的活动' : '往期活动' }}~ + + + + 加载中... + 没有更多数据了 + + + \ No newline at end of file diff --git a/subpkg/pages/booking-record/booking-record.vue b/subpkg/pages/booking-record/booking-record.vue index 6c54ea7..79ff5e8 100644 --- a/subpkg/pages/booking-record/booking-record.vue +++ b/subpkg/pages/booking-record/booking-record.vue @@ -36,26 +36,29 @@ class="activity-item" v-for="item in displayList" :key="item.id" - @click="toActivityDetail(item)" > - {{ item.area }} + - 开始时间: + 入馆日期 {{ item.startTime }} - + + 入馆时间 + {{ item.startTime }} + + + +