Showing
4 changed files
with
121 additions
and
1 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-29 16:32:47 | 5 | + * @LastEditTime: 2022-09-30 09:55:07 |
| 6 | * @FilePath: /swx/src/app.config.js | 6 | * @FilePath: /swx/src/app.config.js |
| 7 | * @Description: | 7 | * @Description: |
| 8 | */ | 8 | */ |
| ... | @@ -31,6 +31,7 @@ export default { | ... | @@ -31,6 +31,7 @@ export default { |
| 31 | 'pages/joinInfo/index', | 31 | 'pages/joinInfo/index', |
| 32 | 'pages/joinList/index', | 32 | 'pages/joinList/index', |
| 33 | 'pages/userInfo/index', | 33 | 'pages/userInfo/index', |
| 34 | + 'pages/addRecord/index', | ||
| 34 | ], | 35 | ], |
| 35 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 | 36 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 |
| 36 | { | 37 | { | ... | ... |
src/pages/addRecord/index.config.js
0 → 100755
| 1 | +/* | ||
| 2 | + * @Date: 2022-09-30 09:53:14 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2022-09-30 09:53:39 | ||
| 5 | + * @FilePath: /swx/src/pages/addRecord/index.config.js | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | + */ | ||
| 8 | +export default { | ||
| 9 | + navigationBarTitleText: '陪伴记录', | ||
| 10 | + usingComponents: { | ||
| 11 | + }, | ||
| 12 | +} |
src/pages/addRecord/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.1rem; | ||
| 7 | +} | ||
| 8 | + | ||
| 9 | +.label-class { | ||
| 10 | + font-size: 1.05rem; | ||
| 11 | + color: #333 !important; | ||
| 12 | + margin-right: 16rpx; | ||
| 13 | + width: 172rpx; | ||
| 14 | + text-align: left; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.input-class { | ||
| 18 | + padding-left: 10rpx !important; | ||
| 19 | + font-size: 1.05rem; | ||
| 20 | +} |
src/pages/addRecord/index.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2022-09-30 09:53:14 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2022-09-30 11:50:17 | ||
| 5 | + * @FilePath: /swx/src/pages/addRecord/index.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <view style="padding: 1rem;"> | ||
| 10 | + <view style="background-color: white; border-radius: 0.65rem; padding: 1rem;overflow: auto; margin-bottom: 1px;"> | ||
| 11 | + <view style="display: inline-block; margin-right: 1rem; line-height: 60rpx;"> | ||
| 12 | + <view class="bg-gradient" style="font-size: 1.15rem;">添加记录</view> | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | + <view style="background-color: #FFFFFF; padding-bottom: 2rem; border-radius: 1rem;"> | ||
| 16 | + <!-- <AtInput disabled :border="true" title="用户名" type='text' placeholder='请输入姓名' v-model:value="username" /> --> | ||
| 17 | + <view class="at-input" style="margin-right: 1rem;"> | ||
| 18 | + <view class="at-input__container"> | ||
| 19 | + <label class="h5-label at-input__title at-input__title">用户名</label> | ||
| 20 | + <input class="h5-input at-input__input" placeholder-class="placeholder" :placeholder="username" :disabled="true"/> | ||
| 21 | + </view> | ||
| 22 | + </view> | ||
| 23 | + <view class="at-input" style="margin-right: 1rem;"> | ||
| 24 | + <view class="at-input__container"> | ||
| 25 | + <label class="h5-label at-input__title at-input__title">陪伴状态</label> | ||
| 26 | + <input @tap="show_popup=true" class="h5-input at-input__input" placeholder-class="placeholder" :value="user_status" placeholder="请选择陪伴状态" :disabled="true"/> | ||
| 27 | + <view style="margin-right: 0; margin-top: 0.5rem;"><van-icon :name="icon_sel" color="" /></view> | ||
| 28 | + </view> | ||
| 29 | + </view> | ||
| 30 | + <van-field :value="message" label-class="label-class" input-class="input-class" label="跟进内容" type="textarea" | ||
| 31 | + placeholder="请输入跟进记录详情" placeholder-style="color: #CCC; font-size: 1.05rem;" :autosize="{ maxHeight: 300, minHeight: 150 }" customStyle="" inputAlign="" | ||
| 32 | + rightIcon="" :required="false" :border="false" @change="onChange" /> | ||
| 33 | + </view> | ||
| 34 | + </view> | ||
| 35 | + <bottom-button @on-submit="onSubmit">保存</bottom-button> | ||
| 36 | + | ||
| 37 | + <!-- 陪伴状态弹出框 --> | ||
| 38 | + <van-popup :show="show_popup" position="bottom" custom-style="height: 40%;" :lock-scroll="true"> | ||
| 39 | + <van-picker :show-toolbar="true" title="" confirm-button-text="确定" :columns="columns" toolbar-class="picker-toolbar" | ||
| 40 | + @confirm="onConfirm" @cancel="onCancel" @change="onChange" /> | ||
| 41 | + </van-popup> | ||
| 42 | +</template> | ||
| 43 | + | ||
| 44 | +<script setup> | ||
| 45 | +import { ref } from "vue"; | ||
| 46 | + | ||
| 47 | +import icon_sel from '@/images/icon/sel@2x.png' | ||
| 48 | +import bottomButton from "@/components/bottom-button"; | ||
| 49 | +import Taro from '@tarojs/taro' | ||
| 50 | + | ||
| 51 | +const username = ref('精妙'); | ||
| 52 | +const message = ref(''); | ||
| 53 | + | ||
| 54 | +const onSubmit = (val) => { | ||
| 55 | + console.warn(val); | ||
| 56 | + Taro.showToast({ | ||
| 57 | + title: '请检查输入项', | ||
| 58 | + icon: 'error', | ||
| 59 | + duration: 2000 | ||
| 60 | + }); | ||
| 61 | + Taro.redirectTo({ | ||
| 62 | + url: '../joinSuccess/index' | ||
| 63 | + }) | ||
| 64 | +} | ||
| 65 | + | ||
| 66 | +const show_popup = ref(false); | ||
| 67 | +const user_status = ref(''); | ||
| 68 | +const columns = ref(['跟进', '引导']); | ||
| 69 | +const onChange = (event) => { | ||
| 70 | + const { picker, value, index } = event.detail; | ||
| 71 | +} | ||
| 72 | +const onConfirm = (event) => { | ||
| 73 | + const { picker, value, index } = event.detail; | ||
| 74 | + user_status.value = value; | ||
| 75 | + show_popup.value = false; | ||
| 76 | +} | ||
| 77 | +const onCancel = (event) => { | ||
| 78 | + show_popup.value = false; | ||
| 79 | +} | ||
| 80 | +</script> | ||
| 81 | + | ||
| 82 | +<script> | ||
| 83 | +import "./index.less"; | ||
| 84 | +export default { | ||
| 85 | + name: "demoPage", | ||
| 86 | +}; | ||
| 87 | +</script> |
-
Please register or login to post a comment