Showing
2 changed files
with
21 additions
and
16 deletions
| 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-11-03 18:05:26 | 4 | + * @LastEditTime: 2022-11-03 18:21:01 |
| 5 | * @FilePath: /swx/src/components/activity-card.vue | 5 | * @FilePath: /swx/src/components/activity-card.vue |
| 6 | * @Description: 活动卡片组件 | 6 | * @Description: 活动卡片组件 |
| 7 | --> | 7 | --> |
| ... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
| 14 | </van-col> | 14 | </van-col> |
| 15 | <van-col :span="14" offset="0"> | 15 | <van-col :span="14" offset="0"> |
| 16 | <view @tap="goTo(data.id, formatStatus(data))" class="card-main-text"> | 16 | <view @tap="goTo(data.id, formatStatus(data))" class="card-main-text"> |
| 17 | - <view style="font-size: 1.1rem;">{{ data.name }}</view> | 17 | + <view style="font-size: 0.95rem; text-align: justify;">{{ data.name }}</view> |
| 18 | <view class="status-text"> | 18 | <view class="status-text"> |
| 19 | <van-tag v-if="data.mode === 'offline'" :round="true" color="#E9FAF4" text-color="#199A74" size="large">现场活动</van-tag> | 19 | <van-tag v-if="data.mode === 'offline'" :round="true" color="#E9FAF4" text-color="#199A74" size="large">现场活动</van-tag> |
| 20 | <van-tag v-if="data.mode === 'online'" :round="true" color="#E9FAF4" text-color="#199A74" size="large">线上活动</van-tag> | 20 | <van-tag v-if="data.mode === 'online'" :round="true" color="#E9FAF4" text-color="#199A74" size="large">线上活动</van-tag> |
| ... | @@ -22,19 +22,20 @@ | ... | @@ -22,19 +22,20 @@ |
| 22 | <van-tag v-else-if="formatStatus(data) === '已结束'" :round="true" color="#EDEDED" text-color="#909090" size="large">{{ formatStatus(data) }}</van-tag> | 22 | <van-tag v-else-if="formatStatus(data) === '已结束'" :round="true" color="#EDEDED" text-color="#909090" size="large">{{ formatStatus(data) }}</van-tag> |
| 23 | <van-tag v-else-if="formatStatus(data)" :round="true" color="#D7FFD7" text-color="#019200" size="large">{{ formatStatus(data) }}</van-tag> | 23 | <van-tag v-else-if="formatStatus(data)" :round="true" color="#D7FFD7" text-color="#019200" size="large">{{ formatStatus(data) }}</van-tag> |
| 24 | </view> | 24 | </view> |
| 25 | - <view style="font-size: 0.95rem;"> | 25 | + <!-- <view style="font-size: 0.95rem;"> |
| 26 | <van-icon name="clock-o" color="#BBBBBB" /> {{ formatDate(data.activity_time) }} | 26 | <van-icon name="clock-o" color="#BBBBBB" /> {{ formatDate(data.activity_time) }} |
| 27 | - </view> | 27 | + </view> --> |
| 28 | </view> | 28 | </view> |
| 29 | </van-col> | 29 | </van-col> |
| 30 | </van-row> | 30 | </van-row> |
| 31 | <view v-if="status === 'creator'"> | 31 | <view v-if="status === 'creator'"> |
| 32 | <view @tap="editActivity(data)" class="edit-button">编辑</view> | 32 | <view @tap="editActivity(data)" class="edit-button">编辑</view> |
| 33 | - <view @tap="finishActivity(data)" v-if="formatStatus(data) === '报名未开始' || formatStatus(data) === '报名中' || formatStatus(data) === '报名结束' || formatStatus(data) === '活动进行中'" class="finish-button">结束</view> | ||
| 34 | - <view @tap="delActivity(data)" v-if="formatStatus(data) === '未发布' || formatStatus(data) === '已结束'" class="close-button">删除</view> | ||
| 35 | </view> | 33 | </view> |
| 36 | </view> | 34 | </view> |
| 37 | <view class="card-sub"> | 35 | <view class="card-sub"> |
| 36 | + <view style="font-size: 0.9rem; margin-bottom: 0.25rem;"> | ||
| 37 | + <van-icon name="clock-o" color="#BBBBBB" /> {{ formatDate(data.activity_time) }} | ||
| 38 | + </view> | ||
| 38 | <van-row v-if="data.address"> | 39 | <van-row v-if="data.address"> |
| 39 | <van-col :span="24" offset="0"> | 40 | <van-col :span="24" offset="0"> |
| 40 | <view> | 41 | <view> |
| ... | @@ -56,6 +57,8 @@ | ... | @@ -56,6 +57,8 @@ |
| 56 | </view> | 57 | </view> |
| 57 | </van-col> | 58 | </van-col> |
| 58 | </van-row> | 59 | </van-row> |
| 60 | + <view @tap="finishActivity(data)" v-if="formatStatus(data) === '报名未开始' || formatStatus(data) === '报名中' || formatStatus(data) === '报名结束' || formatStatus(data) === '活动进行中'" class="finish-button">结束</view> | ||
| 61 | + <view @tap="delActivity(data)" v-if="formatStatus(data) === '未发布' || formatStatus(data) === '已结束'" class="close-button">删除</view> | ||
| 59 | <view v-if="status === 'creator' && formatStatus(data) !== '已结束'" @tap="copyActivity(data.id)" class="copy-button">复制</view> | 62 | <view v-if="status === 'creator' && formatStatus(data) !== '已结束'" @tap="copyActivity(data.id)" class="copy-button">复制</view> |
| 60 | </view> | 63 | </view> |
| 61 | </view> | 64 | </view> |
| ... | @@ -131,6 +134,7 @@ const delActivity = ({ id }) => { | ... | @@ -131,6 +134,7 @@ const delActivity = ({ id }) => { |
| 131 | margin-bottom: 1rem; | 134 | margin-bottom: 1rem; |
| 132 | .card-main { | 135 | .card-main { |
| 133 | padding: 0.8rem; | 136 | padding: 0.8rem; |
| 137 | + padding-right: 0; | ||
| 134 | border-bottom: 1px solid #F2F2F2; | 138 | border-bottom: 1px solid #F2F2F2; |
| 135 | position: relative; | 139 | position: relative; |
| 136 | .card-main-text { | 140 | .card-main-text { |
| ... | @@ -139,7 +143,7 @@ const delActivity = ({ id }) => { | ... | @@ -139,7 +143,7 @@ const delActivity = ({ id }) => { |
| 139 | .edit-button { | 143 | .edit-button { |
| 140 | position: absolute; | 144 | position: absolute; |
| 141 | right: 0; | 145 | right: 0; |
| 142 | - bottom: 1rem; | 146 | + bottom: 1.2rem; |
| 143 | background-color: #BBBBBB; | 147 | background-color: #BBBBBB; |
| 144 | color: white; | 148 | color: white; |
| 145 | padding: 0.25rem; | 149 | padding: 0.25rem; |
| ... | @@ -149,10 +153,16 @@ const delActivity = ({ id }) => { | ... | @@ -149,10 +153,16 @@ const delActivity = ({ id }) => { |
| 149 | border-bottom-left-radius: 1rem; | 153 | border-bottom-left-radius: 1rem; |
| 150 | font-size: 0.85rem; | 154 | font-size: 0.85rem; |
| 151 | } | 155 | } |
| 156 | + | ||
| 157 | + } | ||
| 158 | + .card-sub { | ||
| 159 | + padding: 0.85rem; | ||
| 160 | + font-size: 0.85rem; | ||
| 161 | + position: relative; | ||
| 152 | .finish-button { | 162 | .finish-button { |
| 153 | position: absolute; | 163 | position: absolute; |
| 154 | right: 0; | 164 | right: 0; |
| 155 | - bottom: 4rem; | 165 | + bottom: 3.5rem; |
| 156 | background-color: #DABE73; | 166 | background-color: #DABE73; |
| 157 | color: white; | 167 | color: white; |
| 158 | padding: 0.25rem; | 168 | padding: 0.25rem; |
| ... | @@ -165,7 +175,7 @@ const delActivity = ({ id }) => { | ... | @@ -165,7 +175,7 @@ const delActivity = ({ id }) => { |
| 165 | .close-button { | 175 | .close-button { |
| 166 | position: absolute; | 176 | position: absolute; |
| 167 | right: 0; | 177 | right: 0; |
| 168 | - bottom: 4rem; | 178 | + bottom: 3.5rem; |
| 169 | background-color: #E32525; | 179 | background-color: #E32525; |
| 170 | color: white; | 180 | color: white; |
| 171 | padding: 0.25rem; | 181 | padding: 0.25rem; |
| ... | @@ -175,11 +185,6 @@ const delActivity = ({ id }) => { | ... | @@ -175,11 +185,6 @@ const delActivity = ({ id }) => { |
| 175 | border-bottom-left-radius: 1rem; | 185 | border-bottom-left-radius: 1rem; |
| 176 | font-size: 0.85rem; | 186 | font-size: 0.85rem; |
| 177 | } | 187 | } |
| 178 | - } | ||
| 179 | - .card-sub { | ||
| 180 | - padding: 0.85rem; | ||
| 181 | - font-size: 0.85rem; | ||
| 182 | - position: relative; | ||
| 183 | .copy-button { | 188 | .copy-button { |
| 184 | position: absolute; | 189 | position: absolute; |
| 185 | right: 0; | 190 | right: 0; | ... | ... |
| 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-11-03 16:13:18 | 4 | + * @LastEditTime: 2022-11-03 18:14:22 |
| 5 | * @FilePath: /swx/src/pages/my/index.vue | 5 | * @FilePath: /swx/src/pages/my/index.vue |
| 6 | * @Description: 我的页面 | 6 | * @Description: 我的页面 |
| 7 | --> | 7 | --> |
| ... | @@ -169,7 +169,7 @@ export default { | ... | @@ -169,7 +169,7 @@ export default { |
| 169 | url: '../myFollowUser/index?host_id=' + this.join_hosts[0]['id'] | 169 | url: '../myFollowUser/index?host_id=' + this.join_hosts[0]['id'] |
| 170 | }) | 170 | }) |
| 171 | } else { | 171 | } else { |
| 172 | - Toast('您还未加入过义工') | 172 | + Toast('您还不是义工') |
| 173 | } | 173 | } |
| 174 | } | 174 | } |
| 175 | } | 175 | } | ... | ... |
-
Please register or login to post a comment