hookehuyr

新增新建主办方页面

...@@ -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-08 15:41:01 5 + * @LastEditTime: 2022-10-09 09:25:56
6 * @FilePath: /swx/src/app.config.js 6 * @FilePath: /swx/src/app.config.js
7 * @Description: 7 * @Description:
8 */ 8 */
...@@ -37,6 +37,7 @@ export default { ...@@ -37,6 +37,7 @@ export default {
37 'pages/myCreateActivity/index', 37 'pages/myCreateActivity/index',
38 'pages/myFollowUser/index', 38 'pages/myFollowUser/index',
39 'pages/projectManage/index', 39 'pages/projectManage/index',
40 + 'pages/createProject/index',
40 ], 41 ],
41 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 42 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去
42 { 43 {
......
1 +/*
2 + * @Date: 2022-10-08 18:29:20
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-10-08 18:30:17
5 + * @FilePath: /swx/src/pages/createProject/index.config.js
6 + * @Description: 文件描述
7 + */
8 +export default {
9 + navigationBarTitleText: '新建主办方',
10 + usingComponents: {
11 + },
12 +}
1 +.create-project-page {
2 + background-color: #FFFFFF;
3 + height: 100%;
4 + overflow: scroll;
5 + .activity-title {
6 + background-color: #FFFFFF;
7 + .box {
8 + padding: 1rem 1rem 0.5rem 1rem;
9 + text-align: center;
10 + }
11 + }
12 + .bg-gradient {
13 + background: linear-gradient(#B3DDC9, #B3DDC9) no-repeat;
14 + /*调整下划线的宽度占百分之百 高度是3px */
15 + background-size: 100% 1vw;
16 + /* 调整下划线的起始位置 左侧是0 上边是1.15em */
17 + background-position: 0 1.25rem;
18 + }
19 + .sign-box {
20 + width: 100%;
21 + display: flex;
22 + flex-wrap: wrap;
23 + background-color: #FFFFFF;
24 + padding-bottom: 1rem;
25 + .sign-item {
26 + flex: 1;
27 + width: 27%;
28 + min-width: 27%;
29 + max-width: 27%;
30 + border: 1px solid #999999;
31 + color: #999999;
32 + margin: 1rem;
33 + margin-right: 0;
34 + margin-bottom: 0;
35 + text-align: center;
36 + padding: 0.5rem 0;
37 + text {
38 + position: relative;
39 + &.required::before {
40 + color: red;
41 + content: "*";
42 + font-size: 0.9rem;
43 + left: -0.5rem;
44 + position: absolute;
45 + }
46 + }
47 + &.checked {
48 + border: 1px solid #199A74;
49 + color: #199A74;
50 + }
51 + }
52 + }
53 +}
54 +.sign-wrapper {
55 + display: flex;
56 + align-items: center;
57 + justify-content: center;
58 + height: 100%;
59 + .block {
60 + background-color: #fff;
61 + border-radius: 0.6rem;
62 + .title {
63 + padding: 1rem 1rem 0.5rem 1rem;
64 + text-align: center;
65 + text {
66 + font-size: 1.15rem;
67 + }
68 + }
69 + .border {
70 + overflow: auto;
71 + border-bottom: 1px solid #F2F2F2;
72 + .fix {
73 + float: left;
74 + padding-top: 0.5rem;
75 + }
76 + }
77 + .cancel-box {
78 + padding: 1rem 0;
79 + margin: 1rem;
80 + text-align: center;
81 + .button {
82 + color: #199A74;
83 + border: 1px solid #199A74;
84 + padding: 0.5rem 1rem;
85 + border-radius: 1rem;
86 + }
87 + }
88 + .confirm-box {
89 + padding: 1rem 0;
90 + margin: 1rem;
91 + text-align: center;
92 + .button {
93 + color: #FFFFFF;
94 + background-color: #199A74;
95 + padding: 0.5rem 1rem;
96 + border-radius: 1rem;
97 + }
98 + }
99 + }
100 +}
1 +<!--
2 + * @Date: 2022-09-19 14:11:06
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-10-09 11:25:53
5 + * @FilePath: /swx/src/pages/createProject/index.vue
6 + * @Description: 文件描述
7 +-->
8 +<template>
9 + <view class="create-project-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 + <AtInput :border="true" title="主办方名称" type='text' placeholder='请输入主办方名称' v-model:value="username" />
16 + <view style="padding-top: 1rem;">
17 + <text style="font-size: 32rpx; margin-left: 1rem;">用户类型</text>
18 + <view class="sign-box">
19 + <view @tap="onTapType(item)" @longpress="onLongPressType(item)" v-for="(item, index) in userType" :key="index"
20 + class="sign-item" :class="{ 'checked': item.checked }"><text>{{ item.label }}</text></view>
21 + <view class="sign-item" @tap="addSign">
22 + <van-icon name="plus" color="" />
23 + </view>
24 + </view>
25 + <view style="margin: 0 1rem; border-bottom: 1px solid #F2F2F2;"></view>
26 + </view>
27 +
28 + <view style="padding-top: 1rem;">
29 + <text style="font-size: 32rpx; margin-left: 1rem;">用户状态</text>
30 + <view class="sign-box">
31 + <view @tap="onTapStatus(item)" @longpress="onLongPressStatus(item)" v-for="(item, index) in userStatus" :key="index"
32 + class="sign-item" :class="{ 'checked': item.checked }"><text>{{ item.label }}</text></view>
33 + <view class="sign-item" @tap="addStatus">
34 + <van-icon name="plus" color="" />
35 + </view>
36 + </view>
37 + <view style="margin: 0 1rem; border-bottom: 1px solid #F2F2F2;"></view>
38 + </view>
39 + <view style="height: 6rem;"></view>
40 + <bottom-button @on-submit="onSubmit">保存</bottom-button>
41 + </view>
42 +
43 + <!-- 用户类型弹出框 -->
44 + <van-overlay :show="show_edit_type" z-index="999">
45 + <view class="sign-wrapper">
46 + <view class="block">
47 + <view class="title">
48 + <text class="bg-gradient">用户类型</text>
49 + </view>
50 + <view style="width: 22rem;">
51 + <van-field :value="message" label-class="label-class" input-class="input-class" rows="1" autosize label="字段名称"
52 + type="textarea" placeholder="请输入字段名称(6个字以内)" placeholder-style="color: #999;" customStyle="" inputAlign=""
53 + rightIcon="" :required="true" :maxlength="6" :border="true" @change="onChangeType" />
54 + <van-row>
55 + <van-col span="12">
56 + <view class="cancel-box">
57 + <view class="button" @tap="closeEditType">取消</view>
58 + </view>
59 + </van-col>
60 + <van-col span="12">
61 + <view class="confirm-box">
62 + <view class="button" @tap="confirmEditType">确定</view>
63 + </view>
64 + </van-col>
65 + </van-row>
66 + </view>
67 + </view>
68 + </view>
69 + </van-overlay>
70 +
71 + <!-- 用户状态弹出框 -->
72 + <van-overlay :show="show_edit_status" z-index="999">
73 + <view class="sign-wrapper">
74 + <view class="block">
75 + <view class="title">
76 + <text class="bg-gradient">用户状态</text>
77 + </view>
78 + <view style="width: 22rem;">
79 + <van-field :value="message" label-class="label-class" input-class="input-class" rows="1" autosize label="字段名称"
80 + type="textarea" placeholder="请输入字段名称(6个字以内)" placeholder-style="color: #999;" customStyle="" inputAlign=""
81 + rightIcon="" :required="true" :maxlength="6" :border="true" @change="onChangeStatus" />
82 + <van-row>
83 + <van-col span="12">
84 + <view class="cancel-box">
85 + <view class="button" @tap="closeEditStatus">取消</view>
86 + </view>
87 + </van-col>
88 + <van-col span="12">
89 + <view class="confirm-box">
90 + <view class="button" @tap="confirmEditStatus">确定</view>
91 + </view>
92 + </van-col>
93 + </van-row>
94 + </view>
95 + </view>
96 + </view>
97 + </van-overlay>
98 +</template>
99 +
100 +<script setup>
101 +import Taro from '@tarojs/taro'
102 +import { ref } from "vue";
103 +import { AtInput } from 'taro-ui-vue3'
104 +import "taro-ui-vue3/dist/style/components/input.scss";
105 +import bottomButton from "@/components/bottom-button";
106 +
107 +const username = ref('');
108 +const onSubmit = (val) => {
109 + console.warn(val);
110 + Taro.showToast({
111 + title: '请检查输入项',
112 + icon: 'error',
113 + duration: 2000
114 + });
115 + // Taro.redirectTo({
116 + // url: '../joinSuccess/index'
117 + // })
118 +}
119 +
120 +const userType = ref([{
121 + key: '首次参与',
122 + label: '首次参与',
123 + checked: 1,
124 +}, {
125 + key: '老用户',
126 + label: '老用户',
127 + checked: 1,
128 +}]);
129 +const userStatus = ref([{
130 + key: '跟踪',
131 + label: '跟踪',
132 + checked: 1,
133 +}, {
134 + key: '引导',
135 + label: '引导',
136 + checked: 1,
137 +}]);
138 +
139 +
140 +
141 +// 用户类型
142 +const onTapType = (item) => {
143 + item.checked = !item.checked
144 +}
145 +
146 +const onLongPressType = (item) => {
147 + console.warn(item);
148 + show_edit_type.value = true;
149 +}
150 +
151 +const show_edit_type = ref(false)
152 +
153 +const onChangeType = ({ detail }) => {
154 + console.warn(detail);
155 + checked.value = detail;
156 +}
157 +
158 +const closeEditType = () => {
159 + show_edit_type.value = false;
160 +}
161 +const confirmEditType = () => {
162 + show_edit_type.value = false;
163 + userType.value.push({
164 + key: '推荐人',
165 + label: '推荐人',
166 + checked: 1,
167 + })
168 +}
169 +
170 +const addSign = () => {
171 + show_edit_type.value = true;
172 +}
173 +
174 +// 用户状态
175 +const onTapStatus = (item) => {
176 + item.checked = !item.checked
177 +}
178 +
179 +const onLongPressStatus = (item) => {
180 + console.warn(item);
181 + show_edit_status.value = true;
182 +}
183 +
184 +const show_edit_status= ref(false)
185 +
186 +const onChangeStatus = ({ detail }) => {
187 + console.warn(detail);
188 + checked.value = detail;
189 +}
190 +
191 +const closeEditStatus = () => {
192 + show_edit_status.value = false;
193 +}
194 +const confirmEditStatus = () => {
195 + show_edit_status.value = false;
196 + userStatus.value.push({
197 + key: '关注',
198 + label: '关注',
199 + checked: 1,
200 + })
201 +}
202 +
203 +const addStatus = () => {
204 + show_edit_status.value = true;
205 +}
206 +
207 +</script>
208 +
209 +<script>
210 +import "./index.less";
211 +
212 +export default {
213 + name: "createProjectPage",
214 +};
215 +</script>
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-10-08 16:54:15 4 + * @LastEditTime: 2022-10-09 09:50:24
5 * @FilePath: /swx/src/pages/projectManage/index.vue 5 * @FilePath: /swx/src/pages/projectManage/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -70,7 +70,9 @@ const joinProject = ref([{ ...@@ -70,7 +70,9 @@ const joinProject = ref([{
70 }]); 70 }]);
71 71
72 const onSubmit = () => { 72 const onSubmit = () => {
73 - 73 + Taro.navigateTo({
74 + url: '../createProject/index'
75 + })
74 } 76 }
75 </script> 77 </script>
76 78
......