|
@@ -26,8 +26,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="na-bottom adfacjb">
|
|
<view class="na-bottom adfacjb">
|
|
|
<view class="na-bottom-left adf" v-if="item.activeState===0||item.activeState===1">
|
|
<view class="na-bottom-left adf" v-if="item.activeState===0||item.activeState===1">
|
|
|
- <text class="na-bottom-status">报名中</text>
|
|
|
|
|
- <text class="na-bottom-count"> · 已报{{ item.recruitmentNow || 0 }}{{ item.recruitmentMax ? '/' + item.recruitmentMax : '' }}人</text>
|
|
|
|
|
|
|
+ <text class="na-bottom-status">{{ signupText }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- <view class="na-bottom-right" @click.stop="toApply">立即报名</view> -->
|
|
<!-- <view class="na-bottom-right" @click.stop="toApply">立即报名</view> -->
|
|
|
</view>
|
|
</view>
|
|
@@ -35,7 +34,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="nonprofitActivety">
|
|
<script setup name="nonprofitActivety">
|
|
|
- defineProps({
|
|
|
|
|
|
|
+ import { ref, computed } from 'vue'
|
|
|
|
|
+ const props = defineProps({
|
|
|
item:{
|
|
item:{
|
|
|
typeof:Object,
|
|
typeof:Object,
|
|
|
default:null
|
|
default:null
|
|
@@ -45,7 +45,6 @@
|
|
|
default:0
|
|
default:0
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- import { ref } from 'vue'
|
|
|
|
|
import { useUserStore } from '@/common/stores/user';
|
|
import { useUserStore } from '@/common/stores/user';
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
import { useGlobalShare } from '@/common/composables/useGlobalShare';
|
|
import { useGlobalShare } from '@/common/composables/useGlobalShare';
|
|
@@ -57,14 +56,22 @@
|
|
|
2:'进行中',
|
|
2:'进行中',
|
|
|
3:'已结束'
|
|
3:'已结束'
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 「报名中 · 已报 X 人」或「已报 X/Y 人」
|
|
|
|
|
+ const signupText = computed(() => {
|
|
|
|
|
+ const it = props.item || {}
|
|
|
|
|
+ const now = it.recruitmentNow || 0
|
|
|
|
|
+ const max = it.recruitmentMax
|
|
|
|
|
+ return `报名中 · 已报${now}${max ? '/' + max : ''}人`
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
const handleDetail = item => {
|
|
const handleDetail = item => {
|
|
|
if(!isLogin()) return
|
|
if(!isLogin()) return
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url:'/pagesHome/activityDetail?id='+item.id
|
|
url:'/pagesHome/activityDetail?id='+item.id
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const toApply = () => {
|
|
const toApply = () => {
|
|
|
userStore.openLoginModal();
|
|
userStore.openLoginModal();
|
|
|
}
|
|
}
|