hookehuyr

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

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