Showing
5 changed files
with
193 additions
and
3 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-09-28 15:04:19 | 5 | + * @LastEditTime: 2022-09-28 15:46:04 |
| 6 | * @FilePath: /swx/src/app.config.js | 6 | * @FilePath: /swx/src/app.config.js |
| 7 | * @Description: | 7 | * @Description: |
| 8 | */ | 8 | */ |
| ... | @@ -27,6 +27,7 @@ export default { | ... | @@ -27,6 +27,7 @@ export default { |
| 27 | 'pages/post/index', | 27 | 'pages/post/index', |
| 28 | 'pages/joinActivity/index', | 28 | 'pages/joinActivity/index', |
| 29 | 'pages/joinSuccess/index', | 29 | 'pages/joinSuccess/index', |
| 30 | + 'pages/joinVolunteer/index', | ||
| 30 | ], | 31 | ], |
| 31 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 | 32 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 |
| 32 | { | 33 | { | ... | ... |
| 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-09-27 17:22:03 | 4 | + * @LastEditTime: 2022-09-28 15:47:42 |
| 5 | * @FilePath: /swx/src/components/activity-bar.vue | 5 | * @FilePath: /swx/src/components/activity-bar.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -18,7 +18,7 @@ | ... | @@ -18,7 +18,7 @@ |
| 18 | </van-col> | 18 | </van-col> |
| 19 | <van-col span="19"> | 19 | <van-col span="19"> |
| 20 | <view v-if="userType === '1'" class="user-not-reg"> | 20 | <view v-if="userType === '1'" class="user-not-reg"> |
| 21 | - <view class="button">义工报名</view> | 21 | + <view class="button" @tap="goTo('volunteer')">义工报名</view> |
| 22 | <view class="button" @tap="goTo('join')">活动报名</view> | 22 | <view class="button" @tap="goTo('join')">活动报名</view> |
| 23 | </view> | 23 | </view> |
| 24 | <view v-if="userType === '2'" class="user-reg"> | 24 | <view v-if="userType === '2'" class="user-reg"> |
| ... | @@ -58,6 +58,10 @@ const goTo = (type) => { | ... | @@ -58,6 +58,10 @@ const goTo = (type) => { |
| 58 | Taro.navigateTo({ | 58 | Taro.navigateTo({ |
| 59 | url: '../joinActivity/index' | 59 | url: '../joinActivity/index' |
| 60 | }) | 60 | }) |
| 61 | + } else if (type === 'volunteer') { // 义工报名 | ||
| 62 | + Taro.navigateTo({ | ||
| 63 | + url: '../joinVolunteer/index' | ||
| 64 | + }) | ||
| 61 | } | 65 | } |
| 62 | } | 66 | } |
| 63 | 67 | ... | ... |
src/pages/joinVolunteer/index.config.js
0 → 100755
| 1 | +/* | ||
| 2 | + * @Date: 2022-09-27 17:13:05 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2022-09-28 15:46:33 | ||
| 5 | + * @FilePath: /swx/src/pages/joinVolunteer/index.config.js | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | + */ | ||
| 8 | +export default { | ||
| 9 | + navigationBarTitleText: '报名信息', | ||
| 10 | + usingComponents: { | ||
| 11 | + }, | ||
| 12 | +} |
src/pages/joinVolunteer/index.less
0 → 100644
| 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 | +.form-item { | ||
| 23 | + padding: 0.5rem 1rem; | ||
| 24 | + background-color: #FFFFFF; | ||
| 25 | + .form-item-title { | ||
| 26 | + font-size: 1rem; | ||
| 27 | + &.border { | ||
| 28 | + padding-bottom: 0.5rem; | ||
| 29 | + border-bottom: 1px solid #F2F2F2; | ||
| 30 | + } | ||
| 31 | + &.required::before { | ||
| 32 | + color: red; | ||
| 33 | + content: "*"; | ||
| 34 | + font-size: 0.9rem; | ||
| 35 | + left: 0.5rem; | ||
| 36 | + position: absolute; | ||
| 37 | + } | ||
| 38 | + .sub { | ||
| 39 | + color: #999; | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +.limit-wrapper { | ||
| 45 | + .border { | ||
| 46 | + overflow: auto; | ||
| 47 | + border-bottom: 1px solid #F2F2F2; | ||
| 48 | + .fix { | ||
| 49 | + float: left; | ||
| 50 | + padding-top: 0.6rem; | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | +} | ||
| 54 | +.limit-button-wrapper { | ||
| 55 | + padding: 1rem 0; | ||
| 56 | + margin: 1rem; | ||
| 57 | + text-align: center; | ||
| 58 | + .button { | ||
| 59 | + padding: 0.5rem 1rem; border-radius: 1rem; | ||
| 60 | + } | ||
| 61 | + .cancel { | ||
| 62 | + color: #199A74; | ||
| 63 | + border: 1px solid #199A74; | ||
| 64 | + } | ||
| 65 | + .confirm { | ||
| 66 | + color: #FFFFFF; | ||
| 67 | + background-color: #199A74; | ||
| 68 | + } | ||
| 69 | +} |
src/pages/joinVolunteer/index.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2022-09-27 17:13:05 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2022-09-28 16:35:18 | ||
| 5 | + * @FilePath: /swx/src/pages/joinVolunteer/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 @tap="show_post_popup=true" class="h5-input at-input__input" placeholder-class="placeholder" :value="age_range" placeholder="请选择义工岗位" :disabled="true"/> | ||
| 19 | + <view style="margin-right: 1rem; margin-top: 0.5rem;"><van-icon :name="icon_sel" color="" /></view> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + <AtInput :border="true" title="姓名" type='text' placeholder='请输入姓名' v-model:value="username" /> | ||
| 23 | + <AtInput :border="true" title="手机号" type='phone' placeholder='请输入手机号' v-model:value="phone" /> | ||
| 24 | + <view class="at-input"> | ||
| 25 | + <view class="at-input__container"> | ||
| 26 | + <label class="h5-label at-input__title at-input__title">性别</label> | ||
| 27 | + <van-radio-group | ||
| 28 | + :value="user_sex" | ||
| 29 | + @change="onSexChange" | ||
| 30 | + direction="horizontal" | ||
| 31 | + > | ||
| 32 | + <van-radio name="female" checked-color="#199A74">男士</van-radio> | ||
| 33 | + <van-radio name="male" checked-color="#199A74">女士</van-radio> | ||
| 34 | + </van-radio-group> | ||
| 35 | + </view> | ||
| 36 | + </view> | ||
| 37 | + </view> | ||
| 38 | + <bottom-button @on-submit="onSubmit">确认报名</bottom-button> | ||
| 39 | + | ||
| 40 | + <!-- 年龄段弹出框 --> | ||
| 41 | + <van-popup :show="show_post_popup" position="bottom" custom-style="height: 40%;" :lock-scroll="true"> | ||
| 42 | + <van-picker :show-toolbar="true" title="" confirm-button-text="确定" :columns="columns" toolbar-class="picker-toolbar" | ||
| 43 | + @confirm="onPostConfirm" @cancel="onPostCancel" @change="onPostChange" /> | ||
| 44 | + </van-popup> | ||
| 45 | +</template> | ||
| 46 | + | ||
| 47 | +<script setup> | ||
| 48 | +import { ref, onMounted } from "vue"; | ||
| 49 | +import { AtInput } from 'taro-ui-vue3' | ||
| 50 | +import "taro-ui-vue3/dist/style/components/input.scss"; | ||
| 51 | +import icon_sel from '@/images/icon/sel@2x.png' | ||
| 52 | +import bottomButton from "@/components/bottom-button"; | ||
| 53 | +import Taro from '@tarojs/taro' | ||
| 54 | + | ||
| 55 | +const username = ref(''); | ||
| 56 | +const phone = ref(''); | ||
| 57 | +const age_range = ref(''); | ||
| 58 | +const user_sex = ref(''); | ||
| 59 | + | ||
| 60 | +onMounted(() => { | ||
| 61 | +}) | ||
| 62 | + | ||
| 63 | +// const handleInput = (value) => { | ||
| 64 | +// console.warn(arr.value); | ||
| 65 | +// } | ||
| 66 | +const onSexChange = ({ detail }) => { | ||
| 67 | + user_sex.value = detail; | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +const show_post_popup = ref(false); | ||
| 71 | +const post_status = ref('前台'); | ||
| 72 | +const columns = ref(['前台', '后台']); | ||
| 73 | +const onPostChange = (event) => { | ||
| 74 | + const { picker, value, index } = event.detail; | ||
| 75 | + console.warn(value); | ||
| 76 | + console.warn(index); | ||
| 77 | + post_status.value = value; | ||
| 78 | +} | ||
| 79 | +const onPostConfirm = (event) => { | ||
| 80 | + show_post_popup.value = false; | ||
| 81 | +} | ||
| 82 | +const onPostCancel = (event) => { | ||
| 83 | + show_post_popup.value = false; | ||
| 84 | +} | ||
| 85 | + | ||
| 86 | +const onSubmit = (val) => { | ||
| 87 | + console.warn(val); | ||
| 88 | + Taro.showToast({ | ||
| 89 | + title: '请检查输入项', | ||
| 90 | + icon: 'error', | ||
| 91 | + duration: 2000 | ||
| 92 | + }); | ||
| 93 | + // Taro.redirectTo({ | ||
| 94 | + // url: '../joinSuccess/index' | ||
| 95 | + // }) | ||
| 96 | +} | ||
| 97 | +</script> | ||
| 98 | + | ||
| 99 | +<script> | ||
| 100 | +import "./index.less"; | ||
| 101 | +export default { | ||
| 102 | + name: "demoPage", | ||
| 103 | +}; | ||
| 104 | +</script> |
-
Please register or login to post a comment