Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-11-15 10:55:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
06209ec78c19c195b83f802d0884549b0e226e1b
06209ec7
1 parent
3d2508ee
✨ feat(活动显示组件): 报名按钮显示可配置,优化显示占位问题
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
src/components/activity-card.vue
src/pages/my/index.vue
src/pages/myActivityList/index.vue
src/components/activity-card.vue
View file @
06209ec
<!--
* @Date: 2022-09-20 15:39:37
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-11-1
4 14:42:15
* @LastEditTime: 2022-11-1
5 10:46:48
* @FilePath: /swx/src/components/activity-card.vue
* @Description: 活动卡片组件
-->
...
...
@@ -43,7 +43,16 @@
</view>
</van-col>
</van-row>
<van-row>
<van-row v-if="sign === 'none'">
<van-col :span="24" offset="0">
<view style="line-height: 2;">
<text>浏览:{{ data.view_count }}</text>
<text>报名:{{ data.reg_count }}/<text v-if="data.reg_max === 0">无限</text><text v-else>{{ data.reg_max }}</text></text>
<text v-if="data.extend.length">岗位:{{ data.extend && data.extend.join(',') }}</text>
</view>
</van-col>
</van-row>
<van-row v-else>
<van-col :span="19" offset="0">
<view style="line-height: 2;">
<text>浏览:{{ data.view_count }}</text>
...
...
@@ -76,7 +85,8 @@ import { formatDate } from '@/utils/tools.js'
const props = defineProps({
data: Object,
status: String
status: String,
sign: String,
});
// const register = computed(() => { // 报名中状态显示
...
...
src/pages/my/index.vue
View file @
06209ec
<!--
* @Date: 2022-09-21 14:51:44
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-11-1
2 00:01:52
* @LastEditTime: 2022-11-1
5 10:51:10
* @FilePath: /swx/src/pages/my/index.vue
* @Description: 我的页面
-->
...
...
@@ -59,7 +59,7 @@
<view style="padding: 1rem 0.5rem; display: flex;">
<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;">{{ item.host?.name }}</text>
</view>
<activity-card :data="item" type="me"></activity-card>
<activity-card :data="item"
sign="none"
type="me"></activity-card>
</view>
</view>
</view>
...
...
src/pages/myActivityList/index.vue
View file @
06209ec
...
...
@@ -45,7 +45,15 @@
</view>
<scroll-view :scroll-y="true" :style="scrollStyle" @scrolltolower="onScrollToLower">
<view>
<activity-card @on-handle="onHandle" v-for="(item, index) in activity_list" :key="index" :data="item" :status="follow_status" style="margin-bottom: 1rem;"></activity-card>
<activity-card
@on-handle="onHandle"
v-for="(item, index) in activity_list"
:key="index"
:data="item"
:status="follow_status"
sign="none"
style="margin-bottom: 1rem;"
/>
</view>
</scroll-view>
</view>
...
...
Please
register
or
login
to post a comment