Showing
7 changed files
with
128 additions
and
13 deletions
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: hookehuyr hookehuyr@gmail.com | 2 | * @Author: hookehuyr hookehuyr@gmail.com |
| 3 | * @Date: 2022-05-27 15:57:59 | 3 | * @Date: 2022-05-27 15:57:59 |
| 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 5 | - * @LastEditTime: 2022-11-01 18:18:19 | 5 | + * @LastEditTime: 2022-11-14 13:19:36 |
| 6 | * @FilePath: /swx/src/app.config.js | 6 | * @FilePath: /swx/src/app.config.js |
| 7 | * @Description: | 7 | * @Description: |
| 8 | */ | 8 | */ |
| ... | @@ -40,6 +40,7 @@ export default { | ... | @@ -40,6 +40,7 @@ export default { |
| 40 | 'pages/auth/index', | 40 | 'pages/auth/index', |
| 41 | 'pages/joinVolunteerInfo/index', | 41 | 'pages/joinVolunteerInfo/index', |
| 42 | 'pages/apxUserInfo/index', | 42 | 'pages/apxUserInfo/index', |
| 43 | + 'pages/followList/index', | ||
| 43 | ], | 44 | ], |
| 44 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 | 45 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 |
| 45 | { | 46 | { | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-20 15:39:37 | 2 | * @Date: 2022-09-20 15:39:37 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2022-11-03 18:22:37 | 4 | + * @LastEditTime: 2022-11-14 14:42:15 |
| 5 | * @FilePath: /swx/src/components/activity-card.vue | 5 | * @FilePath: /swx/src/components/activity-card.vue |
| 6 | * @Description: 活动卡片组件 | 6 | * @Description: 活动卡片组件 |
| 7 | --> | 7 | --> |
| ... | @@ -62,6 +62,7 @@ | ... | @@ -62,6 +62,7 @@ |
| 62 | <view @tap="delActivity(data)" v-if="formatStatus(data) === '未发布' || formatStatus(data) === '已结束'" class="close-button">删除</view> | 62 | <view @tap="delActivity(data)" v-if="formatStatus(data) === '未发布' || formatStatus(data) === '已结束'" class="close-button">删除</view> |
| 63 | </view> | 63 | </view> |
| 64 | <view v-if="status === 'creator' && formatStatus(data) !== '已结束'" @tap="copyActivity(data.id)" class="copy-button">复制</view> | 64 | <view v-if="status === 'creator' && formatStatus(data) !== '已结束'" @tap="copyActivity(data.id)" class="copy-button">复制</view> |
| 65 | + <view v-if="status === 'follow'" @tap="followActivity(data)" class="follow-button">我陪伴报名列表</view> | ||
| 65 | </view> | 66 | </view> |
| 66 | </view> | 67 | </view> |
| 67 | <!-- <van-toast id="van-toast" /> --> | 68 | <!-- <van-toast id="van-toast" /> --> |
| ... | @@ -125,6 +126,11 @@ const finishActivity = ({ id }) => { | ... | @@ -125,6 +126,11 @@ const finishActivity = ({ id }) => { |
| 125 | const delActivity = ({ id }) => { | 126 | const delActivity = ({ id }) => { |
| 126 | emit('on-handle', { id, type: 'delete' }); | 127 | emit('on-handle', { id, type: 'delete' }); |
| 127 | } | 128 | } |
| 129 | + | ||
| 130 | +// 追踪活动列表 | ||
| 131 | +const followActivity = ({ id }) => { | ||
| 132 | + emit('on-handle', { id, type: 'follow' }); | ||
| 133 | +} | ||
| 128 | </script> | 134 | </script> |
| 129 | 135 | ||
| 130 | <style lang="less"> | 136 | <style lang="less"> |
| ... | @@ -161,6 +167,19 @@ const delActivity = ({ id }) => { | ... | @@ -161,6 +167,19 @@ const delActivity = ({ id }) => { |
| 161 | padding: 0.85rem; | 167 | padding: 0.85rem; |
| 162 | font-size: 0.85rem; | 168 | font-size: 0.85rem; |
| 163 | position: relative; | 169 | position: relative; |
| 170 | + .follow-button { | ||
| 171 | + position: absolute; | ||
| 172 | + right: 0; | ||
| 173 | + top: 0.5rem; | ||
| 174 | + background-color: #199A74; | ||
| 175 | + color: white; | ||
| 176 | + padding: 0.25rem; | ||
| 177 | + padding-left: 1rem; | ||
| 178 | + padding-right: 0.5rem; | ||
| 179 | + border-top-left-radius: 1rem; | ||
| 180 | + border-bottom-left-radius: 1rem; | ||
| 181 | + font-size: 0.85rem; | ||
| 182 | + } | ||
| 164 | .finish-button { | 183 | .finish-button { |
| 165 | position: absolute; | 184 | position: absolute; |
| 166 | right: 0; | 185 | right: 0; | ... | ... |
src/pages/followList/index.config.js
0 → 100755
| 1 | +/* | ||
| 2 | + * @Date: 2022-09-29 09:45:17 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2022-09-29 09:45:33 | ||
| 5 | + * @FilePath: /swx/src/pages/joinList/index.config.js | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | + */ | ||
| 8 | +export default { | ||
| 9 | + navigationBarTitleText: '报名列表', | ||
| 10 | + usingComponents: { | ||
| 11 | + }, | ||
| 12 | +} |
src/pages/followList/index.less
0 → 100644
| 1 | +.join-list-page { | ||
| 2 | + .join-list-header { | ||
| 3 | + background-color: #FFFFFF; | ||
| 4 | + .header-info { | ||
| 5 | + display: flex; | ||
| 6 | + text-align: center; | ||
| 7 | + padding-bottom: 1rem; | ||
| 8 | + margin-top: 0.5rem; | ||
| 9 | + .activity { | ||
| 10 | + flex: 1; | ||
| 11 | + height: 50rpx; | ||
| 12 | + line-height: 50rpx; | ||
| 13 | + } | ||
| 14 | + .job { | ||
| 15 | + flex: 1; | ||
| 16 | + border-right: 1px solid #F5F5F5; | ||
| 17 | + border-left: 1px solid #F5F5F5; | ||
| 18 | + height: 100rpx; | ||
| 19 | + line-height: 50rpx; | ||
| 20 | + } | ||
| 21 | + .sign { | ||
| 22 | + flex: 1; | ||
| 23 | + height: 50rpx; | ||
| 24 | + line-height: 50rpx; | ||
| 25 | + } | ||
| 26 | + } | ||
| 27 | + } | ||
| 28 | + .activity-title { | ||
| 29 | + background-color: #FFFFFF; | ||
| 30 | + .box { | ||
| 31 | + padding: 1rem 1rem 0.5rem 1rem; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + .bg-gradient { | ||
| 35 | + background: linear-gradient(#B3DDC9, #B3DDC9) no-repeat; | ||
| 36 | + /*调整下划线的宽度占百分之百 高度是3px */ | ||
| 37 | + background-size: 100% 1vw; | ||
| 38 | + /* 调整下划线的起始位置 左侧是0 上边是1.15em */ | ||
| 39 | + background-position: 0 1.1rem; | ||
| 40 | + } | ||
| 41 | + .inactivate { | ||
| 42 | + font-size: 1rem; | ||
| 43 | + color: #999999; | ||
| 44 | + } | ||
| 45 | + .list-item { | ||
| 46 | + background-color: white; | ||
| 47 | + padding: 0.75rem; | ||
| 48 | + border-radius: 0.65rem; | ||
| 49 | + position: relative; | ||
| 50 | + margin-bottom: 1rem; | ||
| 51 | + .avatar { | ||
| 52 | + width: 100%; | ||
| 53 | + height: 5rem; | ||
| 54 | + background-size: cover; | ||
| 55 | + background-repeat: no-repeat; | ||
| 56 | + background-position: center; | ||
| 57 | + border-radius: 0.5rem; | ||
| 58 | + } | ||
| 59 | + .content { | ||
| 60 | + padding: 0.5rem 1rem; | ||
| 61 | + .title { | ||
| 62 | + font-size: 1.25rem; | ||
| 63 | + } | ||
| 64 | + .phone { | ||
| 65 | + color: #199A74; | ||
| 66 | + margin-top: 0.5rem; | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | +} |
src/pages/followList/index.vue
0 → 100644
This diff is collapsed. Click to expand it.
| ... | @@ -47,8 +47,8 @@ | ... | @@ -47,8 +47,8 @@ |
| 47 | <view v-for="(item, index) in reg_list" :key="index" class="list-item"> | 47 | <view v-for="(item, index) in reg_list" :key="index" class="list-item"> |
| 48 | <van-row> | 48 | <van-row> |
| 49 | <van-col span="6"> | 49 | <van-col span="6"> |
| 50 | - <view v-if="item.avatar" @tap="goToUserInfo(item.member_id)" class="avatar" :style="{ backgroundImage: `url(${item.avatar})` }"></view> | 50 | + <view v-if="item.avatar" @tap="goToUserInfo(item)" class="avatar" :style="{ backgroundImage: `url(${item.avatar})` }"></view> |
| 51 | - <view v-else @tap="goToUserInfo(item.member_id)" class="avatar" :style="{ backgroundImage: `url('https://img.yzcdn.cn/vant/cat.jpeg')` }"></view> | 51 | + <view v-else @tap="goToUserInfo(item)" class="avatar" :style="{ backgroundImage: `url('https://img.yzcdn.cn/vant/cat.jpeg')` }"></view> |
| 52 | </van-col> | 52 | </van-col> |
| 53 | <van-col span="13"> | 53 | <van-col span="13"> |
| 54 | <view class="content"> | 54 | <view class="content"> |
| ... | @@ -100,12 +100,6 @@ const onPhoneClick = (number) => { | ... | @@ -100,12 +100,6 @@ const onPhoneClick = (number) => { |
| 100 | }) | 100 | }) |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | -const goToUserInfo = (member_id) => { | ||
| 104 | - Taro.navigateTo({ | ||
| 105 | - url: '../userInfo/index?member_id=' + member_id | ||
| 106 | - }) | ||
| 107 | -} | ||
| 108 | - | ||
| 109 | </script> | 103 | </script> |
| 110 | 104 | ||
| 111 | <script> | 105 | <script> |
| ... | @@ -156,7 +150,7 @@ export default { | ... | @@ -156,7 +150,7 @@ export default { |
| 156 | this.absent = true; | 150 | this.absent = true; |
| 157 | } | 151 | } |
| 158 | } | 152 | } |
| 159 | - const { code, data } = await listRegAPI({ activity_id: getCurrentPageParam().id, type: this.member_type, page: this.page, limit: this.limit }); | 153 | + const { code, data } = await listRegAPI({ activity_id: getCurrentPageParam().id, type: this.member_type, page: 0, limit: this.limit }); |
| 160 | if (code) { | 154 | if (code) { |
| 161 | this.reg_count = data.reg_count; | 155 | this.reg_count = data.reg_count; |
| 162 | this.volunteer_count = data.volunteer_count; | 156 | this.volunteer_count = data.volunteer_count; |
| ... | @@ -174,6 +168,15 @@ export default { | ... | @@ -174,6 +168,15 @@ export default { |
| 174 | } | 168 | } |
| 175 | }, | 169 | }, |
| 176 | methods: { | 170 | methods: { |
| 171 | + goToUserInfo({ status, member_id }) { | ||
| 172 | + if (status === 'request') return false; // 未审核的人没有信息,不能查看详情 | ||
| 173 | + Taro.navigateTo({ | ||
| 174 | + url: '../userInfo/index?member_id=' + member_id | ||
| 175 | + }) | ||
| 176 | + Taro.navigateTo({ | ||
| 177 | + url: '../userInfo/index?member_id=' + member_id | ||
| 178 | + }) | ||
| 179 | + }, | ||
| 177 | onScrollToLower () { | 180 | onScrollToLower () { |
| 178 | if(!this.flag){ | 181 | if(!this.flag){ |
| 179 | return | 182 | return | ... | ... |
| ... | @@ -45,7 +45,7 @@ | ... | @@ -45,7 +45,7 @@ |
| 45 | </view> | 45 | </view> |
| 46 | <scroll-view :scroll-y="true" :style="scrollStyle" @scrolltolower="onScrollToLower"> | 46 | <scroll-view :scroll-y="true" :style="scrollStyle" @scrolltolower="onScrollToLower"> |
| 47 | <view> | 47 | <view> |
| 48 | - <activity-card v-for="(item, index) in activity_list" :key="index" :data="item" style="margin-bottom: 1rem;"></activity-card> | 48 | + <activity-card @on-handle="onHandle" v-for="(item, index) in activity_list" :key="index" :data="item" :status="follow_status" style="margin-bottom: 1rem;"></activity-card> |
| 49 | </view> | 49 | </view> |
| 50 | </scroll-view> | 50 | </scroll-view> |
| 51 | </view> | 51 | </view> |
| ... | @@ -61,7 +61,7 @@ | ... | @@ -61,7 +61,7 @@ |
| 61 | </template> | 61 | </template> |
| 62 | 62 | ||
| 63 | <script setup> | 63 | <script setup> |
| 64 | -import { ref } from "vue"; | 64 | +import { ref, computed } from "vue"; |
| 65 | import icon_join from '@/images/icon/baoming@2x.png' | 65 | import icon_join from '@/images/icon/baoming@2x.png' |
| 66 | import icon_job from '@/images/icon/yigong@2x.png' | 66 | import icon_job from '@/images/icon/yigong@2x.png' |
| 67 | import icon_sign from '@/images/icon/qiandao@2x.png' | 67 | import icon_sign from '@/images/icon/qiandao@2x.png' |
| ... | @@ -148,6 +148,7 @@ export default { | ... | @@ -148,6 +148,7 @@ export default { |
| 148 | text: '活动结束', | 148 | text: '活动结束', |
| 149 | key: 'stop' | 149 | key: 'stop' |
| 150 | }], | 150 | }], |
| 151 | + follow_status: '' | ||
| 151 | }; | 152 | }; |
| 152 | }, | 153 | }, |
| 153 | methods: { | 154 | methods: { |
| ... | @@ -181,9 +182,11 @@ export default { | ... | @@ -181,9 +182,11 @@ export default { |
| 181 | if (type === 'player') { | 182 | if (type === 'player') { |
| 182 | this.activated = 1; | 183 | this.activated = 1; |
| 183 | this.role = 'player'; | 184 | this.role = 'player'; |
| 185 | + this.follow_status = ''; | ||
| 184 | } else { | 186 | } else { |
| 185 | this.activated = 2; | 187 | this.activated = 2; |
| 186 | this.role = 'volunteer'; | 188 | this.role = 'volunteer'; |
| 189 | + this.follow_status = 'follow'; | ||
| 187 | } | 190 | } |
| 188 | this.activity_list = []; | 191 | this.activity_list = []; |
| 189 | this.flag = true; | 192 | this.flag = true; |
| ... | @@ -203,7 +206,14 @@ export default { | ... | @@ -203,7 +206,14 @@ export default { |
| 203 | }, | 206 | }, |
| 204 | onStatusTypeCancel (event) { | 207 | onStatusTypeCancel (event) { |
| 205 | this.show_status_popup = false; | 208 | this.show_status_popup = false; |
| 209 | + }, | ||
| 210 | + onHandle ({ id, type }) { // 活动操作后回调 | ||
| 211 | + if (type === 'follow') { | ||
| 212 | + Taro.navigateTo({ | ||
| 213 | + url: '../followList/index?id=' + id | ||
| 214 | + }) | ||
| 206 | } | 215 | } |
| 207 | }, | 216 | }, |
| 217 | + }, | ||
| 208 | }; | 218 | }; |
| 209 | </script> | 219 | </script> | ... | ... |
-
Please register or login to post a comment