hookehuyr

✨ feat: 新增我参加的活动页面

1 <!-- 1 <!--
2 * @Date: 2022-09-20 15:39:37 2 * @Date: 2022-09-20 15:39:37
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-09-26 14:40:18 4 + * @LastEditTime: 2022-09-30 17:13:41
5 * @FilePath: /swx/src/components/activity-card.vue 5 * @FilePath: /swx/src/components/activity-card.vue
6 * @Description: 活动卡片组件 6 * @Description: 活动卡片组件
7 --> 7 -->
...@@ -15,8 +15,12 @@ ...@@ -15,8 +15,12 @@
15 <van-col :span="14"> 15 <van-col :span="14">
16 <view class="card-main-text"> 16 <view class="card-main-text">
17 <view style="font-size: 1.1rem;">{{ data.title }}</view> 17 <view style="font-size: 1.1rem;">{{ data.title }}</view>
18 - <view class="status-text"> 18 + <!-- <view class="status-text">
19 <text>网络活动</text> 19 <text>网络活动</text>
20 + </view> -->
21 + <view class="status-text">
22 + <van-tag :round="true" color="#E9FAF4" text-color="#199A74" size="large">网络活动</van-tag>
23 + <van-tag :round="true" color="#D7FFD7" text-color="#019200" size="large">报名中</van-tag>
20 </view> 24 </view>
21 <view style="font-size: 0.95rem;"> 25 <view style="font-size: 0.95rem;">
22 <van-icon name="clock-o" color="#BBBBBB" />&nbsp;2022-08-25 14:00 26 <van-icon name="clock-o" color="#BBBBBB" />&nbsp;2022-08-25 14:00
...@@ -24,6 +28,7 @@ ...@@ -24,6 +28,7 @@
24 </view> 28 </view>
25 </van-col> 29 </van-col>
26 </van-row> 30 </van-row>
31 + <view style="position: absolute; right: 0; bottom: 1rem; background-color: #BBBBBB; color: white; padding: 0.25rem; padding-left: 1rem; padding-right: 0.5rem; border-top-left-radius: 1rem; border-bottom-left-radius: 1rem; font-size: 0.85rem;">编辑</view>
27 </view> 32 </view>
28 <view class="card-sub"> 33 <view class="card-sub">
29 <van-row v-if="data.address"> 34 <van-row v-if="data.address">
...@@ -41,12 +46,13 @@ ...@@ -41,12 +46,13 @@
41 <text>岗位:333</text> 46 <text>岗位:333</text>
42 </view> 47 </view>
43 </van-col> 48 </van-col>
44 - <van-col :span="5"> 49 + <van-col v-if="type === 'home'" :span="5">
45 <view @tap="goTo()" class="status-button"> 50 <view @tap="goTo()" class="status-button">
46 <text>我要报名</text> 51 <text>我要报名</text>
47 </view> 52 </view>
48 </van-col> 53 </van-col>
49 </van-row> 54 </van-row>
55 + <view style="position: absolute; right: 0; bottom: 1rem; background-color: #199A74; color: white; padding: 0.25rem; padding-left: 1rem; padding-right: 0.5rem; border-top-left-radius: 1rem; border-bottom-left-radius: 1rem;">复制</view>
50 </view> 56 </view>
51 </view> 57 </view>
52 </template> 58 </template>
...@@ -59,7 +65,8 @@ import icon_address from '@/images/icon/address@2x.png' ...@@ -59,7 +65,8 @@ import icon_address from '@/images/icon/address@2x.png'
59 import Taro from '@tarojs/taro' 65 import Taro from '@tarojs/taro'
60 66
61 const props = defineProps({ 67 const props = defineProps({
62 - data: Object 68 + data: Object,
69 + type: String
63 }) 70 })
64 71
65 const goTo = () => { 72 const goTo = () => {
...@@ -78,6 +85,7 @@ const goTo = () => { ...@@ -78,6 +85,7 @@ const goTo = () => {
78 .card-main { 85 .card-main {
79 padding: 0.8rem; 86 padding: 0.8rem;
80 border-bottom: 1px solid #F2F2F2; 87 border-bottom: 1px solid #F2F2F2;
88 + position: relative;
81 .card-main-text { 89 .card-main-text {
82 padding: 0 0.5rem; 90 padding: 0 0.5rem;
83 } 91 }
...@@ -85,6 +93,7 @@ const goTo = () => { ...@@ -85,6 +93,7 @@ const goTo = () => {
85 .card-sub { 93 .card-sub {
86 padding: 0.85rem; 94 padding: 0.85rem;
87 font-size: 0.85rem; 95 font-size: 0.85rem;
96 + position: relative;
88 } 97 }
89 } 98 }
90 99
......
1 +.my-page {
2 + .bg-header {
3 + height: 12rem;
4 + width: 100%;
5 + background-image: url(http://gyzs.onwall.cn/userinfo_bg-top%402x.png);
6 + background-size: contain;
7 + background-repeat: no-repeat;
8 + }
9 + .header-info {
10 + display: flex;
11 + text-align: center;
12 + .activity {
13 + flex: 1;
14 + height: 50rpx;
15 + line-height: 50rpx;
16 + }
17 + .job {
18 + flex: 1;
19 + height: 100rpx;
20 + line-height: 50rpx;
21 + }
22 + .sign {
23 + flex: 1;
24 + height: 50rpx;
25 + line-height: 50rpx;
26 + }
27 + }
28 +}
......
1 <!-- 1 <!--
2 * @Date: 2022-09-21 14:51:44 2 * @Date: 2022-09-21 14:51:44
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-09-21 16:13:17 4 + * @LastEditTime: 2022-09-30 17:17:49
5 * @FilePath: /swx/src/pages/my/index.vue 5 * @FilePath: /swx/src/pages/my/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
8 <template> 8 <template>
9 - <view>my</view> 9 + <view class="my-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="17">
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: 30%;">
17 + <text style="font-size: 1.15rem;">微信昵称</text>
18 + <van-icon :name="icon_vip" size="1rem" color="" class="vip-icon" />
19 + </view>
20 + </view>
21 + </van-col>
22 + <van-col span="7">
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>
25 + </van-row>
26 + </view>
27 + <view style="background-color: white; margin: 1rem; padding: 1rem; border-radius: 1rem;">
28 + <view style="display: flex; text-align: center;">
29 + <view style="flex: 1; line-height: 60rpx;">
30 + <view>
31 + <van-icon :name="icon_join" size="3rem" color="" style="vertical-align: sub;" />
32 + </view>
33 + <view>
34 + <text style="font-size: 1rem; color: #222;">参加的活动</text>
35 + </view>
36 + </view>
37 + <view style="flex: 1; line-height: 60rpx;">
38 + <view>
39 + <van-icon :name="icon_create" size="3rem" color="" style="vertical-align: sub;" />
40 + </view>
41 + <view>
42 + <text style="font-size: 1rem; color: #222;">创建的活动</text>
43 + </view>
44 + </view>
45 + <view style="flex: 1; line-height: 60rpx;">
46 + <view>
47 + <van-icon :name="icon_user" size="3rem" color="" style="vertical-align: sub;" />
48 + </view>
49 + <view>
50 + <text style="font-size: 1rem; color: #222;">陪伴的用户</text>
51 + </view>
52 + </view>
53 + </view>
54 + </view>
55 + </view>
56 + <view style="padding: 1rem; padding-top: 0;">
57 + <view v-for="(item, index) in activity_list" :key="index">
58 + <view style="padding: 1rem 0.5rem; display: flex;">
59 + <van-icon :name="icon_company" size="2.5rem" color="" style="vertical-align: sub; margin-right: 0.5rem;" /><text style="color: #222222; font-size: 1.15rem; margin-top: 0.5rem;">星光读书会</text>
60 + </view>
61 + <activity-card :data="item" type="me"></activity-card>
62 + </view>
63 + </view>
64 + </view>
65 + <view style="height: 6rem;"></view>
10 <navbar activated="my" /> 66 <navbar activated="my" />
11 -
12 </template> 67 </template>
13 68
14 <script setup> 69 <script setup>
15 import { ref } from "vue"; 70 import { ref } from "vue";
71 +import icon_vip from '@/images/icon/vip@2x.png'
72 +import Taro from '@tarojs/taro'
73 +import { AtAvatar } from 'taro-ui-vue3'
74 +import "taro-ui-vue3/dist/style/components/avatar.scss"
75 +import icon_join from '@/images/icon/canjia@2x.png'
76 +import icon_create from '@/images/icon/chuangjian@2x.png'
77 +import icon_user from '@/images/icon/peiban@2x.png'
78 +import icon_company from '@/images/icon/zhubanfang@2x.png'
16 import navbar from '@/components/navbar.vue' 79 import navbar from '@/components/navbar.vue'
80 +import activityCard from '@/components/activity-card.vue'
17 81
82 +const activity_list = ref([{
83 + title: '智慧没有烦恼',
84 + address: '上海市杨浦区军工路100号A座05室',
85 +}, {
86 + title: '万人共乘浪漫热气球',
87 + address: '',
88 +}, {
89 + title: '八段锦',
90 + address: '',
91 +}, {
92 + title: '智慧没有烦恼',
93 + address: '上海市杨浦区军工路100号A座05室',
94 +}, {
95 + title: '万人共乘浪漫热气球',
96 + address: '',
97 +}, {
98 + title: '八段锦',
99 + address: '',
100 +}]);
18 </script> 101 </script>
19 102
20 <script> 103 <script>
......