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 10:30:29 5 + * @LastEditTime: 2022-10-08 11:56:16
6 * @FilePath: /swx/src/app.config.js 6 * @FilePath: /swx/src/app.config.js
7 * @Description: 7 * @Description:
8 */ 8 */
...@@ -34,6 +34,7 @@ export default { ...@@ -34,6 +34,7 @@ export default {
34 'pages/addRecord/index', 34 'pages/addRecord/index',
35 'pages/editInfo/index', 35 'pages/editInfo/index',
36 'pages/myActivityList/index', 36 'pages/myActivityList/index',
37 + 'pages/myCreateActivity/index',
37 ], 38 ],
38 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 39 subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去
39 { 40 {
......
1 +/*
2 + * @Date: 2022-10-08 11:04:11
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-10-08 11:33:12
5 + * @FilePath: /swx/src/pages/myCreateActivity/index.config.js
6 + * @Description: 文件描述
7 + */
8 +export default {
9 + navigationBarTitleText: '创建的活动',
10 + usingComponents: {
11 + },
12 +}
1 +.my-create-activity-header {
2 + background-color: white;
3 + margin: 1rem;
4 + padding: 0.5rem;
5 + border-radius: 1rem;
6 + .header-info {
7 + display: flex;
8 + text-align: center;
9 + padding-bottom: 1rem;
10 + margin-top: 0.5rem;
11 + .activity {
12 + flex: 1;
13 + height: 50rpx;
14 + line-height: 50rpx;
15 + }
16 + .job {
17 + flex: 1;
18 + border-right: 1px solid #F5F5F5;
19 + border-left: 1px solid #F5F5F5;
20 + height: 100rpx;
21 + line-height: 50rpx;
22 + }
23 + .sign {
24 + flex: 1;
25 + height: 50rpx;
26 + line-height: 50rpx;
27 + }
28 + }
29 +}
30 +
31 +.activity-title {
32 + background-color: #FFFFFF;
33 + .box {
34 + padding: 1rem 1rem 0.5rem 1rem;
35 + }
36 +}
37 +
38 +.bg-gradient {
39 + background: linear-gradient(#B3DDC9, #B3DDC9) no-repeat;
40 + /*调整下划线的宽度占百分之百 高度是3px */
41 + background-size: 100% 1vw;
42 + /* 调整下划线的起始位置 左侧是0 上边是1.15em */
43 + background-position: 0 1.1rem;
44 +}
1 +<!--
2 + * @Date: 2022-09-19 14:11:06
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-10-08 13:47:07
5 + * @FilePath: /swx/src/pages/myCreateActivity/index.vue
6 + * @Description: 文件描述
7 +-->
8 +<template>
9 + <div class="my-create-activity-page">
10 + <view style="width: 100%; background-image: url(http://gyzs.onwall.cn/userinfo_bg-top%402x.png); background-size: contain; background-repeat: no-repeat;">
11 + <view style="height: 4rem; padding: 1rem;">
12 + <van-row>
13 + <van-col span="18">
14 + <view style="position: relative;">
15 + <AtAvatar circle size="large" image='https://jdc.jd.com/img/200' style="display: inline-block;"></AtAvatar>
16 + <view style="display: inline-block; position: absolute; top: 30%; left: 28%;">
17 + <text style="font-size: 1.05rem;">周三读书会(主办方)</text>
18 + <van-icon :name="icon_vip" size="1rem" color="" class="vip-icon" />
19 + </view>
20 + </view>
21 + </van-col>
22 + <van-col span="6">
23 + <view @tap="editInfo()" style="background-color: #DABE73; color: white; padding: 0.5rem 0; border-radius: 1rem; text-align: center; font-size: 0.85rem;margin-top: 1rem;">切换主办方</view>
24 + </van-col>
25 + </van-row>
26 + </view>
27 + <view class="my-create-activity-header">
28 + <view class="activity-title">
29 + <view class="box">
30 + <text class="bg-gradient" style="font-size: 1.15rem;">活动统计</text>
31 + </view>
32 + </view>
33 + <view class="header-info">
34 + <view class="activity">
35 + <view><text style="font-size: 1.25rem;">5</text>场</view>
36 + <view>
37 + <van-icon :name="icon_join" size="1.5rem" color="" style="vertical-align: sub;" />
38 + <text style="font-size: 0.9rem; color: #999999;">活动总数</text>
39 + </view>
40 + </view>
41 + <view class="job">
42 + <text style="font-size: 1.25rem;">24</text>人
43 + <view>
44 + <van-icon :name="icon_job" size="1.25rem" color="" style="vertical-align: sub;" />
45 + <text style="font-size: 0.9rem; color: #999999;">岗位人数</text>
46 + </view>
47 + </view>
48 + <view class="sign">
49 + <view><text style="font-size: 1.25rem;">233</text>人</view>
50 + <view>
51 + <van-icon :name="icon_sign" size="1.25rem" color="" style="vertical-align: sub;" />
52 + <text style="font-size: 0.9rem; color: #999999;">用户总数</text>
53 + </view>
54 + </view>
55 + </view>
56 + </view>
57 + </view>
58 + <view style="padding: 0 1rem;">
59 + <view style="background-color: white; border-radius: 0.65rem; padding: 1rem;overflow: auto; margin-bottom: 1px;">
60 + <view @tap="show_status_popup=true" style="float: left; color: #666666; font-size: 0.9rem; border: 1px solid #DBDBDB; border-radius: 1rem; padding: 0.3rem 1rem 0.3rem 1rem;">
61 + &nbsp;{{ status_type === '' ? '全部' : status_type }}&nbsp;&nbsp;
62 + <van-icon :name="icon_sel2" size="0.8rem" color="" style="vertical-align: middle;" />
63 + </view>
64 + </view>
65 + <view style="">
66 + <activity-card v-for="(item, index) in activity_list" :key="index" :data="item" status="edit" style="margin-bottom: 1rem;"></activity-card>
67 + </view>
68 + <view style="height: 3rem;"></view>
69 + </view>
70 + </div>
71 +
72 + <!-- 切换状态弹出框 -->
73 + <van-popup :show="show_status_popup" position="bottom" custom-style="height: 45%;" :lock-scroll="true">
74 + <van-picker :show-toolbar="true" title="" confirm-button-text="确定" :columns="status_type_columns"
75 + toolbar-class="picker-toolbar" @confirm="onStatusTypeConfirm" @cancel="onStatusTypeCancel" @change="onStatusTypeChange" />
76 + </van-popup>
77 +</template>
78 +
79 +<script setup>
80 +import { ref } from "vue";
81 +import icon_vip from '@/images/icon/vip@2x.png'
82 +import Taro from '@tarojs/taro'
83 +import { AtAvatar } from 'taro-ui-vue3'
84 +import "taro-ui-vue3/dist/style/components/avatar.scss"
85 +import icon_join from '@/images/icon/baoming@2x.png'
86 +import icon_job from '@/images/icon/yigong@2x.png'
87 +import icon_sign from '@/images/icon/qiandao@2x.png'
88 +import icon_sel2 from '@/images/icon/sel02@2x.png'
89 +import activityCard from '@/components/activity-card.vue'
90 +
91 +const show_status_popup = ref(false);
92 +const status_type = ref('');
93 +const status_type_columns = ref(['一个月之内', '三个月之内', '一年之内']);
94 +const onStatusTypeChange = (event) => {
95 + const { picker, value, index } = event.detail;
96 +}
97 +const onStatusTypeConfirm = (event) => {
98 + const { picker, value, index } = event.detail;
99 + show_status_popup.value = false;
100 + status_type.value = value;
101 + console.warn('查询新数据');
102 +}
103 +const onStatusTypeCancel = (event) => {
104 + show_status_popup.value = false;
105 +}
106 +
107 +const activity_list = ref([{
108 + title: '智慧没有烦恼',
109 + address: '上海市杨浦区军工路100号A座05室',
110 +}, {
111 + title: '万人共乘浪漫热气球',
112 + address: '',
113 +}, {
114 + title: '八段锦',
115 + address: '',
116 +}, {
117 + title: '智慧没有烦恼',
118 + address: '上海市杨浦区军工路100号A座05室',
119 +}, {
120 + title: '万人共乘浪漫热气球',
121 + address: '',
122 +}, {
123 + title: '八段锦',
124 + address: '',
125 +}]);
126 +</script>
127 +
128 +<script>
129 +import "./index.less";
130 +export default {
131 + name: "demoPage",
132 +};
133 +</script>