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-09-30 09:55:07 5 + * @LastEditTime: 2022-09-30 14:12:24
6 * @FilePath: /swx/src/app.config.js 6 * @FilePath: /swx/src/app.config.js
7 * @Description: 7 * @Description:
8 */ 8 */
...@@ -32,6 +32,7 @@ export default { ...@@ -32,6 +32,7 @@ export default {
32 'pages/joinList/index', 32 'pages/joinList/index',
33 'pages/userInfo/index', 33 'pages/userInfo/index',
34 'pages/addRecord/index', 34 'pages/addRecord/index',
35 + 'pages/editInfo/index',
35 ], 36 ],
36 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 37 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去
37 { 38 {
......
1 +/*
2 + * @Date: 2022-09-30 09:53:14
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-09-30 14:12:13
5 + * @FilePath: /swx/src/pages/editInfo/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.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 +}
1 +<!--
2 + * @Date: 2022-09-30 09:53:14
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-09-30 14:45:05
5 + * @FilePath: /swx/src/pages/editInfo/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 + <view class="at-input" style="margin-right: 1rem;">
31 + <view class="at-input__container">
32 + <label class="h5-label at-input__title at-input__title">类型</label>
33 + <input @tap="show_popup=true" class="h5-input at-input__input" placeholder-class="placeholder" :value="user_status" placeholder="请选择用户类型" :disabled="true"/>
34 + <view style="margin-right: 0; margin-top: 0.5rem;"><van-icon :name="icon_sel" color="" /></view>
35 + </view>
36 + </view>
37 + <view class="at-input" style="margin-right: 1rem;">
38 + <view class="at-input__container">
39 + <label class="h5-label at-input__title at-input__title">推荐人</label>
40 + <input class="h5-input at-input__input" placeholder-class="placeholder" placeholder="请输入推荐人姓名" :disabled="true"/>
41 + </view>
42 + </view>
43 + <view class="at-input" style="margin-right: 1rem;">
44 + <view class="at-input__container">
45 + <label class="h5-label at-input__title at-input__title">陪伴者</label>
46 + <input @tap="show_popup=true" class="h5-input at-input__input" placeholder-class="placeholder" :value="user_status" placeholder="请选择跟踪人" :disabled="true"/>
47 + <view style="margin-right: 0; margin-top: 0.5rem;"><van-icon :name="icon_sel" color="" /></view>
48 + </view>
49 + </view>
50 + </view>
51 + </view>
52 + <bottom-button @on-submit="onSubmit">保存</bottom-button>
53 +
54 + <!-- 陪伴状态弹出框 -->
55 + <van-popup :show="show_popup" position="bottom" custom-style="height: 40%;" :lock-scroll="true">
56 + <van-picker :show-toolbar="true" title="" confirm-button-text="确定" :columns="columns" toolbar-class="picker-toolbar"
57 + @confirm="onConfirm" @cancel="onCancel" @change="onChange" />
58 + </van-popup>
59 +</template>
60 +
61 +<script setup>
62 +import { ref } from "vue";
63 +
64 +import icon_sel from '@/images/icon/sel@2x.png'
65 +import bottomButton from "@/components/bottom-button";
66 +import Taro from '@tarojs/taro'
67 +
68 +const username = ref('精妙');
69 +const message = ref('');
70 +
71 +const onSubmit = (val) => {
72 + console.warn(val);
73 + Taro.showToast({
74 + title: '请检查输入项',
75 + icon: 'error',
76 + duration: 2000
77 + });
78 + Taro.redirectTo({
79 + url: '../joinSuccess/index'
80 + })
81 +}
82 +
83 +const show_popup = ref(false);
84 +const user_status = ref('');
85 +const columns = ref(['跟进', '引导']);
86 +const onChange = (event) => {
87 + const { picker, value, index } = event.detail;
88 +}
89 +const onConfirm = (event) => {
90 + const { picker, value, index } = event.detail;
91 + user_status.value = value;
92 + show_popup.value = false;
93 +}
94 +const onCancel = (event) => {
95 + show_popup.value = false;
96 +}
97 +</script>
98 +
99 +<script>
100 +import "./index.less";
101 +export default {
102 + name: "demoPage",
103 +};
104 +</script>
1 <!-- 1 <!--
2 * @Date: 2022-09-29 16:32:03 2 * @Date: 2022-09-29 16:32:03
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-09-30 10:01:09 4 + * @LastEditTime: 2022-09-30 14:14:44
5 * @FilePath: /swx/src/pages/userInfo/index.vue 5 * @FilePath: /swx/src/pages/userInfo/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 </view> 20 </view>
21 </van-col> 21 </van-col>
22 <van-col span="7"> 22 <van-col span="7">
23 - <view style="background-color: #DABE73; color: white; padding: 0.5rem 0; border-radius: 1rem; text-align: center; font-size: 0.9rem;margin-top: 1rem;">修改资料</view> 23 + <view @tap="editInfo()" style="background-color: #DABE73; color: white; padding: 0.5rem 0; border-radius: 1rem; text-align: center; font-size: 0.9rem;margin-top: 1rem;">修改资料</view>
24 </van-col> 24 </van-col>
25 </van-row> 25 </van-row>
26 </view> 26 </view>
...@@ -128,6 +128,12 @@ const onStatusTypeCancel = (event) => { ...@@ -128,6 +128,12 @@ const onStatusTypeCancel = (event) => {
128 show_status_popup.value = false; 128 show_status_popup.value = false;
129 } 129 }
130 130
131 +const editInfo = (val) => {
132 + Taro.navigateTo({
133 + url: '../editInfo/index'
134 + })
135 +}
136 +
131 const onSubmit = (val) => { 137 const onSubmit = (val) => {
132 Taro.navigateTo({ 138 Taro.navigateTo({
133 url: '../addRecord/index' 139 url: '../addRecord/index'
......