hookehuyr

fix 创建者才有活动管理按钮

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:21:01 4 + * @LastEditTime: 2022-11-03 18:22:37
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: 0.95rem; text-align: justify;">{{ data.name }}</view> 17 + <view style="font-size: 1rem; 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>
...@@ -57,8 +57,10 @@ ...@@ -57,8 +57,10 @@
57 </view> 57 </view>
58 </van-col> 58 </van-col>
59 </van-row> 59 </van-row>
60 + <view v-if="status === 'creator'">
60 <view @tap="finishActivity(data)" v-if="formatStatus(data) === '报名未开始' || formatStatus(data) === '报名中' || formatStatus(data) === '报名结束' || formatStatus(data) === '活动进行中'" class="finish-button">结束</view> 61 <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> 62 <view @tap="delActivity(data)" v-if="formatStatus(data) === '未发布' || formatStatus(data) === '已结束'" class="close-button">删除</view>
63 + </view>
62 <view v-if="status === 'creator' && formatStatus(data) !== '已结束'" @tap="copyActivity(data.id)" class="copy-button">复制</view> 64 <view v-if="status === 'creator' && formatStatus(data) !== '已结束'" @tap="copyActivity(data.id)" class="copy-button">复制</view>
63 </view> 65 </view>
64 </view> 66 </view>
...@@ -134,7 +136,7 @@ const delActivity = ({ id }) => { ...@@ -134,7 +136,7 @@ const delActivity = ({ id }) => {
134 margin-bottom: 1rem; 136 margin-bottom: 1rem;
135 .card-main { 137 .card-main {
136 padding: 0.8rem; 138 padding: 0.8rem;
137 - padding-right: 0; 139 + padding-right: 0.5rem;
138 border-bottom: 1px solid #F2F2F2; 140 border-bottom: 1px solid #F2F2F2;
139 position: relative; 141 position: relative;
140 .card-main-text { 142 .card-main-text {
......