|
@@ -20,9 +20,9 @@
|
|
|
@confirm="onSearch"
|
|
|
></uni-search-bar>
|
|
|
<!-- 可发布职位数 -->
|
|
|
- <!-- <view v-if="publishJobCount" class="publishJobCountBox">
|
|
|
+ <view class="publishJobCountBox">
|
|
|
<span>可发布职位数 <span class="color-primary">{{ publishJobCount }}</span> 个</span>
|
|
|
- </view> -->
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view v-if="!positionListData?.length && more !== 'loading'" class="d-flex flex-column align-center justify-center ss-m-t-30">
|
|
|
<view class="nodata-img-parent">
|
|
@@ -59,7 +59,7 @@ import { getJobAdvertisedList } from '@/api/new/position'
|
|
|
import { onShow, onLoad } from '@dcloudio/uni-app'
|
|
|
import { getAccessToken } from '@/utils/request'
|
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
|
-// import { userStore } from '@/store/user'
|
|
|
+import { userStore } from '@/store/user'; const useUserStore = userStore()
|
|
|
|
|
|
const tab = ref(1)
|
|
|
|
|
@@ -131,8 +131,16 @@ onShow(() => {
|
|
|
// 设置当前tab页的下标index
|
|
|
currentTabBar?.setData({ selected: 1 })
|
|
|
init()
|
|
|
+ getPublishJobCount()
|
|
|
})
|
|
|
|
|
|
+const publishJobCount = ref(0)
|
|
|
+const getPublishJobCount = async () => {
|
|
|
+ const info = await useUserStore.getUserInfos()
|
|
|
+ console.log('info:', info)
|
|
|
+ publishJobCount.value = info?.entitlement?.publishJobCount - 0 || 0
|
|
|
+}
|
|
|
+
|
|
|
const init = () => {
|
|
|
query.value.pageNo = 1
|
|
|
getData()
|
|
@@ -152,13 +160,10 @@ const loadingMore = () => {
|
|
|
getData()
|
|
|
}
|
|
|
|
|
|
-// reset: 刷新列表 updatePublishJobCount: 更新可发布职位数量
|
|
|
-const refresh = async ({ reset = false, updatePublishJobCount = false }) => {
|
|
|
+// reset: 刷新列表
|
|
|
+const refresh = async ({ reset = false }) => {
|
|
|
if (reset) query.value.pageNo = 1
|
|
|
getData()
|
|
|
- // if (updatePublishJobCount) {
|
|
|
- // userInfo.value = await useUserStore.getUserInfos()
|
|
|
- // }
|
|
|
}
|
|
|
|
|
|
const handleClickAdd = () => {
|