hookehuyr

新增我陪伴的报名列表功能和页面

...@@ -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;
......
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 +}
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 +}
1 +<template>
2 + <view class="join-list-page">
3 + <!-- <view id="page-header" class="join-list-header">
4 + <view class="activity-title">
5 + <view class="box">
6 + <text class="bg-gradient" style="font-size: 1.15rem;">报名统计</text>
7 + </view>
8 + </view>
9 + <view class="header-info">
10 + <view class="activity">
11 + <view><text style="font-size: 1.25rem;">{{ reg_count }}</text>人</view>
12 + <view>
13 + <van-icon :name="icon_join" size="1.5rem" color="" style="vertical-align: sub;" />
14 + <text style="font-size: 0.9rem; color: #999999;">活动报名</text>
15 + </view>
16 + </view>
17 + <view class="job">
18 + <text style="font-size: 1.25rem;">{{ volunteer_count }}</text>人
19 + <view>
20 + <van-icon :name="icon_job" size="1.25rem" color="" style="vertical-align: sub;" />
21 + <text style="font-size: 0.9rem; color: #999999;">岗位报名</text>
22 + </view>
23 + </view>
24 + <view class="sign">
25 + <view><text style="font-size: 1.25rem;">{{ sign_count }}</text>人</view>
26 + <view>
27 + <van-icon :name="icon_sign" size="1.25rem" color="" style="vertical-align: sub;" />
28 + <text style="font-size: 0.9rem; color: #999999;">用户签到</text>
29 + </view>
30 + </view>
31 + </view>
32 + </view> -->
33 + <view class="list-wrapper" style="margin: 1rem;">
34 + <view id="page-filter" style="background-color: white; border-radius: 0.65rem; padding: 1rem;overflow: auto; margin-bottom: 1px;">
35 + <view style="display: inline-block; margin-right: 1rem; line-height: 60rpx;">
36 + <view @tap="toggleColum('activity')" :class="[activated === 1 ? 'bg-gradient' : 'inactivate']" style="font-size: 1rem;">活动报名</view>
37 + </view>
38 + <!-- <view style="display: inline-block; line-height: 60rpx;">
39 + <view @tap="toggleColum('join')" :class="[activated === 2 ? 'bg-gradient' : 'inactivate']">岗位报名</view>
40 + </view> -->
41 + <view @tap="show_status_popup=true" style="float: right; color: #666666; font-size: 0.9rem; border: 1px solid #DBDBDB; border-radius: 1rem; padding: 0.3rem 1rem 0.3rem 1rem;">
42 + &nbsp;{{ status_type === '' ? '全部' : status_type }}&nbsp;&nbsp;
43 + <van-icon :name="icon_sel2" size="0.8rem" color="" style="vertical-align: middle;" />
44 + </view>
45 + </view>
46 + <scroll-view :scroll-y="true" :style="scrollStyle" @scrolltolower="onScrollToLower">
47 + <view v-for="(item, index) in reg_list" :key="index" class="list-item">
48 + <van-row>
49 + <van-col span="6">
50 + <view v-if="item.avatar" @tap="goToUserInfo(item)" class="avatar" :style="{ backgroundImage: `url(${item.avatar})` }"></view>
51 + <view v-else @tap="goToUserInfo(item)" class="avatar" :style="{ backgroundImage: `url('https://img.yzcdn.cn/vant/cat.jpeg')` }"></view>
52 + </van-col>
53 + <van-col span="13">
54 + <view class="content">
55 + <view class="title">{{ item.name }}</view>
56 + <view class="phone" @tap="onPhoneClick(item.phone)">
57 + <van-icon :name="icon_tel" color="" size="1.25rem" style="vertical-align: sub;" />
58 + {{ item.phone }}
59 + </view>
60 + </view>
61 + </van-col>
62 + <van-col span="5">
63 + <van-tag @tap="changeStatus('apply', item.id)" v-if="item.status === 'apply'" :round="true" color="#D7F3FF" text-color="#0091FD" size="large">已报名</van-tag>
64 + <van-tag @tap="changeStatus('enable', item.id)" v-if="item.status === 'enable'" :round="true" color="#D7FFD7" text-color="#019200" size="large">已签到</van-tag>
65 + <van-tag @tap="changeStatus('absent', item.id)" v-if="item.status === 'absent'" :round="true" color="#FFF5E4" text-color="#FF7300" size="large">未出席</van-tag>
66 + <van-tag @tap="changeStatus('request', item.id)" v-if="item.status === 'request'" :round="true" color="#FFF5E4" text-color="#FF7300" size="large">待审核</van-tag>
67 + <van-tag @tap="changeStatus('reject', item.id)" v-if="item.status === 'reject'" :round="true" color="#FFF5E4" text-color="#FF7300" size="large">已拒绝</van-tag>
68 + </van-col>
69 + </van-row>
70 + </view>
71 + </scroll-view>
72 + </view>
73 + <view style="height: 2rem;"></view>
74 + </view>
75 +
76 + <!-- 切换状态弹出框 -->
77 + <van-popup :show="show_status_popup" position="bottom" custom-style="height: 50%;" :lock-scroll="true">
78 + <van-picker :show-toolbar="true" title="" confirm-button-text="确定" :columns="status_type_columns"
79 + toolbar-class="picker-toolbar" @confirm="onStatusTypeConfirm" @cancel="onStatusTypeCancel" />
80 + </van-popup>
81 +
82 + <van-toast id="van-toast" />
83 + <van-dialog id="van-dialog" />
84 +</template>
85 +
86 +<script setup>
87 +import { ref, getCurrentInstance } from "vue";
88 +import icon_join from '@/images/icon/baoming@2x.png'
89 +import icon_job from '@/images/icon/yigong@2x.png'
90 +import icon_sign from '@/images/icon/qiandao@2x.png'
91 +import icon_sel2 from '@/images/icon/sel02@2x.png'
92 +import icon_tel from '@/images/icon/tel@2x.png'
93 +import Taro from '@tarojs/taro'
94 +import { getCurrentPageParam } from "@/utils/weapp";
95 +import Toast from '@/components/vant-weapp/toast/toast';
96 +
97 +const onPhoneClick = (number) => {
98 + Taro.makePhoneCall({
99 + phoneNumber: number
100 + })
101 +}
102 +
103 +</script>
104 +
105 +<script>
106 +import "./index.less";
107 +import { listRegAPI, statusRegAPI } from '@/api/Reg/index';
108 +import moment from '@/utils/moment.min.js'
109 +import { activityInfoAPI } from '@/api/Host/index';
110 +import { $ } from '@tarojs/extend'
111 +import Dialog from '@/components/vant-weapp/dialog/dialog';
112 +
113 +export default {
114 + name: "joinListPage",
115 + mounted () {
116 + // 设置滚动列表可视高度
117 + const windowHeight = wx.getSystemInfoSync().windowHeight;
118 + setTimeout(async () => {
119 + // const headerHeight = await $('#page-header').height();
120 + const navHeight = await $('#page-filter').height();
121 + this.scrollStyle = {
122 + // height: windowHeight - headerHeight - navHeight - 70 + 'px'
123 + height: windowHeight - navHeight - 70 + 'px'
124 + }
125 + }, 500);
126 + },
127 + data () {
128 + return {
129 + reg_count: 0,
130 + volunteer_count: 0,
131 + sign_count: 0,
132 + reg_list: [],
133 + absent: false, // 超时标识
134 + flag: true,
135 + status: '',
136 + page: 0,
137 + limit: 10,
138 + member_type: 'player',
139 + scrollStyle: { height: '1000rpx' },
140 + activated: 1,
141 + show_status_popup: false,
142 + status_type: '',
143 + status_type_columns: [],
144 + }
145 + },
146 + async onShow () {
147 + const info = await activityInfoAPI({ i: getCurrentPageParam().id });
148 + if (info.code) {
149 + // 判断是否超过活动时间
150 + if (info.data.activity.activity_time > info.data.server_time) {
151 + this.absent = true;
152 + }
153 + }
154 + const { code, data } = await listRegAPI({ activity_id: getCurrentPageParam().id, type: this.member_type, page: 0, limit: this.limit });
155 + if (code) {
156 + this.reg_count = data.reg_count;
157 + this.volunteer_count = data.volunteer_count;
158 + this.sign_count = data.sign_count;
159 + this.reg_list = data.reg_list;
160 + if (this.absent) {
161 + // 活动超时翻状态
162 + this.reg_list.forEach(item => {
163 + item.status = item.status === 'apply' ? 'absent' : item.status;
164 + });
165 + this.status_type_columns = ['全部', '已签到', '未出席']
166 + } else {
167 + this.status_type_columns = ['全部', '已签到', '已报名']
168 + }
169 + }
170 + },
171 + methods: {
172 + goToUserInfo ({ status, member_id }) {
173 + if (status === 'request') return false; // 未审核的人没有信息,不能查看详情
174 + Taro.navigateTo({
175 + url: '../userInfo/index?member_id=' + member_id
176 + })
177 + },
178 + onScrollToLower () {
179 + if(!this.flag){
180 + return
181 + }
182 + this.flag = false;
183 + this.getList();
184 + },
185 + async getList () {
186 + Taro.showLoading({
187 + title: '加载中'
188 + })
189 + // 获取推荐活动列表
190 + const { code, data } = await listRegAPI({ activity_id: getCurrentPageParam().id, type: this.member_type, status: this.status, page: this.page, limit: this.limit });
191 + if (code) {
192 + if (data.reg_list.length) {
193 + this.reg_list = this.reg_list.concat(data.reg_list);
194 + this.page = this.page + 1;
195 + this.flag = true;
196 + } else {
197 + Toast('没有数据')
198 + }
199 + Taro.hideLoading()
200 + }
201 + },
202 + toggleColum (type) {
203 + if (type === 'activity') { // 活动报名
204 + this.member_type = 'player';
205 + this.activated = 1;
206 + if (this.absent) {
207 + this.status_type_columns = ['全部', '已签到', '未出席']
208 + } else {
209 + this.status_type_columns = ['全部', '已签到', '已报名']
210 + }
211 + } else { // 岗位报名
212 + this.member_type = 'volunteer';
213 + this.activated = 2;
214 + if (this.absent) {
215 + this.status_type_columns = ['全部', '已签到', '未出席', '待审核', '已拒绝']
216 + } else {
217 + this.status_type_columns = ['全部', '已签到', '已报名', '待审核', '已拒绝']
218 + }
219 + }
220 + // 重置条件
221 + this.status_type = '';
222 + this.status = '';
223 + this.page = 0;
224 + this.reg_list = [];
225 + this.flag = false;
226 + this.getList();
227 + },
228 + onStatusTypeConfirm (event) {
229 + const { picker, value, index } = event.detail;
230 + this.show_status_popup = false;
231 + this.status_type = value;
232 + if (this.status_type === '全部') {
233 + this.status = '';
234 + }
235 + if (this.status_type === '已签到') {
236 + this.status = 'enable';
237 + }
238 + if (this.status_type === '未出席' || this.status_type === '已报名') {
239 + this.status = 'apply';
240 + }
241 + if (this.status_type === '待审核') {
242 + this.status = 'request';
243 + }
244 + if (this.status_type === '已拒绝') {
245 + this.status = 'reject';
246 + }
247 + // 重置条件
248 + this.page = 0;
249 + this.reg_list = [];
250 + this.flag = false;
251 + this.getList();
252 + },
253 + onStatusTypeCancel (event) {
254 + this.show_status_popup = false;
255 + },
256 + async handleStatusReg (id, status) {
257 + // 改变状态操作接口请求及后续更新
258 + const { code, data } = await statusRegAPI({ i: id, status });
259 + if (code) {
260 + Taro.showToast({
261 + title: '修改成功',
262 + icon: 'success',
263 + duration: 2000
264 + });
265 + // 手动翻状态-显示
266 + this.reg_list.forEach(item => {
267 + if (item.id === id) {
268 + item.status = status;
269 + }
270 + });
271 + // 更新用户统计
272 + const { code, data } = await listRegAPI({ activity_id: getCurrentPageParam().id, type: this.member_type, page: this.page, limit: this.limit });
273 + if (code) {
274 + this.reg_count = data.reg_count;
275 + this.volunteer_count = data.volunteer_count;
276 + this.sign_count = data.sign_count;
277 + }
278 + }
279 + },
280 + changeStatus (status, id) {
281 + // 已签到不能修改状态
282 + if (status === 'enable') {
283 + Toast('无需修改状态')
284 + }
285 + // 未签到, 已报名 修改状态已签到
286 + if (status === 'absent' || status === 'apply') {
287 + Dialog.confirm({
288 + title: '温馨提示',
289 + message: '是否确认修改状态为已签到?',
290 + confirmButtonColor: '#199a74'
291 + })
292 + .then(async () => {
293 + // on confirm
294 + this.handleStatusReg(id, 'enable');
295 + })
296 + .catch(() => {
297 + // on cancel
298 + });
299 + }
300 + if (status === 'request') {
301 + Dialog.confirm({
302 + title: '温馨提示',
303 + message: '是否审核通过,报名者成为义工?',
304 + confirmButtonColor: '#199a74',
305 + confirmButtonText: '同意',
306 + cancelButtonText: '不同意',
307 + })
308 + .then(async () => {
309 + // on confirm
310 + this.handleStatusReg(id, 'apply');
311 + })
312 + .catch(async () => {
313 + // on cancel
314 + this.handleStatusReg(id, 'reject');
315 + });
316 + }
317 + }
318 + }
319 +};
320 +</script>
...@@ -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;
206 - } 209 + },
210 + onHandle ({ id, type }) { // 活动操作后回调
211 + if (type === 'follow') {
212 + Taro.navigateTo({
213 + url: '../followList/index?id=' + id
214 + })
215 + }
216 + },
207 }, 217 },
208 }; 218 };
209 </script> 219 </script>
......