hookehuyr

✨ feat: 新增查看义工报名信息页

...@@ -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-10-13 19:16:36 5 + * @LastEditTime: 2022-10-20 17:39:30
6 * @FilePath: /swx/src/app.config.js 6 * @FilePath: /swx/src/app.config.js
7 * @Description: 7 * @Description:
8 */ 8 */
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
43 'pages/userSearch/index', 43 'pages/userSearch/index',
44 'pages/editProject/index', 44 'pages/editProject/index',
45 'pages/auth/index', 45 'pages/auth/index',
46 + 'pages/joinVolunteerInfo/index',
46 ], 47 ],
47 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 48 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去
48 { 49 {
......
1 <!-- 1 <!--
2 * @Date: 2022-09-26 16:10:35 2 * @Date: 2022-09-26 16:10:35
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-10-20 16:22:36 4 + * @LastEditTime: 2022-10-20 17:38:25
5 * @FilePath: /swx/src/components/activity-bar.vue 5 * @FilePath: /swx/src/components/activity-bar.vue
6 * @Description: 活动详情页底部导航栏 6 * @Description: 活动详情页底部导航栏
7 --> 7 -->
...@@ -52,7 +52,8 @@ const props = defineProps({ ...@@ -52,7 +52,8 @@ const props = defineProps({
52 // volunteer_only=只能报名义工 52 // volunteer_only=只能报名义工
53 // creator=创建人,可管理活动 53 // creator=创建人,可管理活动
54 userType: String, 54 userType: String,
55 - regId: String 55 + regId: String,
56 + memberRole : String,
56 }) 57 })
57 58
58 const goTo = (type) => { 59 const goTo = (type) => {
...@@ -69,9 +70,15 @@ const goTo = (type) => { ...@@ -69,9 +70,15 @@ const goTo = (type) => {
69 url: '../joinVolunteer/index?id=' + getCurrentPageParam().id 70 url: '../joinVolunteer/index?id=' + getCurrentPageParam().id
70 }) 71 })
71 } else if (type === 'info') { // 报名信息 72 } else if (type === 'info') { // 报名信息
72 - Taro.navigateTo({ 73 + if (props.memberRole === 'player') { // 普通用户报名详情页
73 - url: '../joinInfo/index?reg_id=' + props.regId 74 + Taro.navigateTo({
74 - }) 75 + url: '../joinInfo/index?reg_id=' + props.regId
76 + })
77 + } else { // 义工报名详情页
78 + Taro.navigateTo({
79 + url: '../joinVolunteerInfo/index?reg_id=' + props.regId
80 + })
81 + }
75 } else if (type === 'list') { // 报名列表 82 } else if (type === 'list') { // 报名列表
76 Taro.navigateTo({ 83 Taro.navigateTo({
77 url: '../joinList/index?id=' 84 url: '../joinList/index?id='
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
106 </view> 106 </view>
107 </view> 107 </view>
108 <view style="height: 6rem;"></view> 108 <view style="height: 6rem;"></view>
109 - <activity-bar :user-type="userType" :reg-id="reg_id" /> 109 + <activity-bar :user-type="userType" :reg-id="reg_id" :member-role="member_role" />
110 110
111 <van-action-sheet 111 <van-action-sheet
112 :z-index="10" 112 :z-index="10"
......
1 +/*
2 + * @Date: 2022-09-27 17:13:05
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-09-28 16:56:20
5 + * @FilePath: /swx/src/pages/joinInfo/index.config.js
6 + * @Description: 文件描述
7 + */
8 +export default {
9 + navigationBarTitleText: '报名信息',
10 + usingComponents: {
11 + },
12 +}
1 +.bg-gradient {
2 + background: linear-gradient(#B3DDC9, #B3DDC9) no-repeat;
3 + /*调整下划线的宽度占百分之百 高度是3px */
4 + background-size: 100% 1vw;
5 + /* 调整下划线的起始位置 左侧是0 上边是1.15em */
6 + background-position: 0 1.25rem;
7 +}
8 +
9 +.join-activity-page {
10 + background-color: #FFFFFF;
11 + .activity-title {
12 + background-color: #FFFFFF;
13 + .box {
14 + padding: 1rem 1rem 0.5rem 1rem;
15 + text-align: center;
16 + }
17 + }
18 +
19 +
20 +}
21 +
22 +.confirm-wrapper-page {
23 + background-color: #FFFFFF;
24 + box-shadow: 0rem -0.17rem 0.67rem 0rem rgba(0,0,0,0.05);
25 + position: fixed;
26 + bottom: 0;
27 + width: 100%;
28 + display: flex;
29 + .box {
30 + padding: 1rem 0;
31 + margin: 1rem;
32 + padding-bottom: 2rem;
33 + margin-top: 0;
34 + text-align: center;
35 + width: 50%;
36 + .button {
37 + color: #FFFFFF;
38 + background-color: #199A74;
39 + padding: 0.65rem 1rem;
40 + border-radius: 1.5rem;
41 + }
42 + }
43 +}
1 +<!--
2 + * @Date: 2022-09-27 17:13:05
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-10-20 17:48:47
5 + * @FilePath: /swx/src/pages/joinVolunteerInfo/index.vue
6 + * @Description: 活动报名
7 +-->
8 +<template>
9 + <view class="join-activity-page">
10 + <view class="activity-title">
11 + <view class="box">
12 + <text class="bg-gradient" style="font-size: 1.25rem;">义工报名信息</text>
13 + </view>
14 + </view>
15 + <view class="at-input">
16 + <view class="at-input__container">
17 + <label class="h5-label at-input__title at-input__title">岗位</label>
18 + <input class="h5-input at-input__input" placeholder-class="placeholder" :value="extend" placeholder="" :disabled="true"/>
19 + </view>
20 + </view>
21 + <view class="at-input">
22 + <view class="at-input__container">
23 + <label class="h5-label at-input__title at-input__title">姓名</label>
24 + <input class="h5-input at-input__input" placeholder-class="placeholder" :value="username" placeholder="" :disabled="true"/>
25 + </view>
26 + </view>
27 + <view class="at-input">
28 + <view class="at-input__container">
29 + <label class="h5-label at-input__title at-input__title">手机号</label>
30 + <input class="h5-input at-input__input" placeholder-class="placeholder" :value="phone" placeholder="" :disabled="true"/>
31 + </view>
32 + </view>
33 + <view class="at-input">
34 + <view class="at-input__container">
35 + <label class="h5-label at-input__title at-input__title">年龄段</label>
36 + <input class="h5-input at-input__input" placeholder-class="placeholder" :value="age_group" placeholder="" :disabled="true"/>
37 + </view>
38 + </view>
39 + <view class="at-input">
40 + <view class="at-input__container">
41 + <label class="h5-label at-input__title at-input__title">性别</label>
42 + <input class="h5-input at-input__input" placeholder-class="placeholder" :value="user_sex" placeholder="" :disabled="true"/>
43 + </view>
44 + </view>
45 + </view>
46 +
47 + <view class="confirm-wrapper-page">
48 + <view class="box">
49 + <view @tap="cancelJoin" class="button">取消报名</view>
50 + </view>
51 + <view class="box">
52 + <view @tap="editJoin" class="button">确认修改报名</view>
53 + </view>
54 + </view>
55 +</template>
56 +
57 +<script setup>
58 +import { ref, onMounted } from "vue";
59 +import "taro-ui-vue3/dist/style/components/input.scss";
60 +import Taro from '@tarojs/taro'
61 +import { myInfoAPI } from '@/api/Reg/index';
62 +import { getCurrentPageParam } from "@/utils/weapp";
63 +
64 +const username = ref('');
65 +const phone = ref('');
66 +const age_group = ref('');
67 +const user_sex = ref('');
68 +const extend = ref([]);
69 +
70 +onMounted(async () => {
71 + const { code, data } = await myInfoAPI({ i: getCurrentPageParam().reg_id });
72 + if (code) {
73 + username.value = data.name;
74 + phone.value = data.phone;
75 + age_group.value = data.age_group;
76 + user_sex.value = data.gender === 'man' ? '男士' : '女士';
77 + // 额外信息
78 + if (data.extend) {
79 + for (const key in data.extend) {
80 + extend.value.push({
81 + title: key,
82 + value: data.extend[key],
83 + });
84 + }
85 + }
86 + }
87 +})
88 +
89 +const cancelJoin = (val) => {
90 + Taro.showToast({
91 + title: '取消成功',
92 + icon: 'success',
93 + duration: 2000
94 + });
95 +}
96 +
97 +const editJoin = (val) => {
98 + Taro.navigateTo({
99 + url: '../joinActivity/index'
100 + })
101 +}
102 +</script>
103 +
104 +<script>
105 +import "./index.less";
106 +export default {
107 + name: "demoPage",
108 +};
109 +</script>