|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
- <view class="defaultBgc ss-p-x-20" style="height: 100vh;">
|
|
|
|
- <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore">
|
|
|
|
|
|
+ <view class="defaultBgc ss-p-x-20" style="height: 100vh; position: relative;">
|
|
|
|
+ <scroll-view v-if="showList" class="scrollBox" scroll-y="true" @scrolltolower="loadingMore">
|
|
<view v-if="list.length > 0">
|
|
<view v-if="list.length > 0">
|
|
<view v-for="(item, index) in list" :key="index" class="ss-m-t-20" @click="jumpToEnterpriseDetail(item.enterprise.id)">
|
|
<view v-for="(item, index) in list" :key="index" class="ss-m-t-20" @click="jumpToEnterpriseDetail(item.enterprise.id)">
|
|
<view class="sub-li-bottom">
|
|
<view class="sub-li-bottom">
|
|
@@ -49,22 +49,36 @@
|
|
<image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
|
|
<image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+ <view v-else class="noviewlist">
|
|
|
|
+ <view v-if="userInfo?.vipExpireDate > Date.now() && !userInfo?.entitlement?.viewersList">
|
|
|
|
+ 当前会员套餐的权益不包含谁关注我,<span class="text-line" @tap.stop="handleToBuyVip">点击去升级</span>
|
|
|
|
+ </view>
|
|
|
|
+ <view v-if="!userInfo?.vipExpireDate || (userInfo?.vipExpireDate && userInfo?.vipExpireDate < Date.now())">
|
|
|
|
+ 谁关注我为会员权益内容,<span class="text-line" @tap.stop="handleToBuyVip">点击去开通</span>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref } from 'vue'
|
|
|
|
|
|
+import { ref, computed } from 'vue'
|
|
import { getInterestedMePage } from '@/api/user'
|
|
import { getInterestedMePage } from '@/api/user'
|
|
import { dealDictObjData, jumpToEnterpriseDetail } from '@/utils/position'
|
|
import { dealDictObjData, jumpToEnterpriseDetail } from '@/utils/position'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { formatName } from '@/utils/getText'
|
|
import { formatName } from '@/utils/getText'
|
|
|
|
+import { userStore } from '@/store/user'
|
|
|
|
+import { onShow } from '@dcloudio/uni-app'
|
|
|
|
|
|
const status = ref('more')
|
|
const status = ref('more')
|
|
const queryParams = ref({
|
|
const queryParams = ref({
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 10
|
|
pageSize: 10
|
|
})
|
|
})
|
|
|
|
+const useUserStore = userStore()
|
|
|
|
+const userInfo = computed(() => useUserStore?.userInfo)
|
|
|
|
+// 当前会员套餐是否可查看此模块
|
|
|
|
+const showList = computed(() => (new Date().getTime() < useUserStore?.userInfo?.vipExpireDate) && useUserStore?.userInfo?.entitlement?.viewersList)
|
|
|
|
|
|
const list = ref([])
|
|
const list = ref([])
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
@@ -79,14 +93,24 @@ const getList = async () => {
|
|
status.value = list.value?.length === +res.data.total ? 'noMore' : 'more'
|
|
status.value = list.value?.length === +res.data.total ? 'noMore' : 'more'
|
|
}
|
|
}
|
|
|
|
|
|
-getList()
|
|
|
|
|
|
+onShow(() => {
|
|
|
|
+ // 有会员权益能查看才请求接口
|
|
|
|
+ if (showList.value) getList()
|
|
|
|
+})
|
|
|
|
|
|
-// 加载跟多
|
|
|
|
|
|
+// 加载更多
|
|
const loadingMore = () => {
|
|
const loadingMore = () => {
|
|
status.value = 'loading'
|
|
status.value = 'loading'
|
|
queryParams.value.pageNo++
|
|
queryParams.value.pageNo++
|
|
getList()
|
|
getList()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 跳转会员套餐
|
|
|
|
+const handleToBuyVip = () => {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pagesA/vipPackage/index'
|
|
|
|
+ })
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -109,4 +133,19 @@ const loadingMore = () => {
|
|
width: 70vw;
|
|
width: 70vw;
|
|
max-width: 70vw;
|
|
max-width: 70vw;
|
|
}
|
|
}
|
|
|
|
+.noviewlist {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: 50%;
|
|
|
|
+ width: 98%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
+ color: #666;
|
|
|
|
+}
|
|
|
|
+.text-line {
|
|
|
|
+ color: #00897b;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ padding-bottom: 2px;
|
|
|
|
+ border-bottom: 1px solid #00897b;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|