Selaa lähdekoodia

Merge branch 'master' of https://git.citupro.com/zhengnaiwen_citu/menduner-uniapp

lifanagju_citu 6 kuukautta sitten
vanhempi
commit
78b24bfa25

+ 1 - 1
pagesA/collect/company.vue

@@ -58,7 +58,7 @@ const getList = async () => {
     list = dealDictArrayData([], list)
     items.value = items.value.concat(list)
   }
-  status.value = list?.length < queryParams.value.pageSize ? 'noMore' : 'more'
+  status.value = items.value?.length === +data.total ? 'noMore' : 'more'
 }
 getList()
 

+ 1 - 1
pagesA/collect/position.vue

@@ -35,7 +35,7 @@ const getList = async () => {
     })
     items.value = items.value.concat(list)
   }
-  status.value = list?.length < queryParams.value.pageSize ? 'noMore' : 'more'
+  status.value = items.value?.length === +data.total ? 'noMore' : 'more'
 }
 getList()
 

+ 1 - 2
pagesA/interview/index.vue

@@ -69,8 +69,7 @@ const getList = async () => {
     })
     items.value = items.value.concat(list)
   }
-  // more.value = list?.length < queryParams.value.pageSize ? 'noMore' : 'more'
-  more.value = list?.length === +data.total ? 'noMore' : 'more'
+  more.value = items.value?.length === +data.total ? 'noMore' : 'more'
 }
 
 const handleChange = (e) => {

+ 21 - 19
pagesA/recommendation/list.vue

@@ -1,23 +1,25 @@
 <template>
-	<view
-		class="list"
-		v-for="item in items"
-		:key="item.id"
-	>
-		<view class="list-top">
-			<text class="list-top-person">牛人:{{ item.sendPerson?.name }}</text>
-			<text class="list-top-time">{{ timesTampChange(item.createTime) }}</text>
-		</view>
-		<view class="list-remuneration">
-			薪酬:
-			{{ item.job?.payFrom }}
-			{{ item.job?.payFrom && item.job?.payTo ? ' - ' : '' }}
-			{{ item.job?.payTo }}
-		</view>
-		<view class="list-company">
-			<text>{{ item.enterprise?.anotherName }}</text>
-			<text>{{ item.enterprise?.anotherName && item.job?.name ? ' · ' : '' }}</text>
-			<text>{{ item.job?.name }}</text>
+	<view>
+		<view
+			class="list"
+			v-for="item in items"
+			:key="item.id"
+		>
+			<view class="list-top">
+				<text class="list-top-person">牛人:{{ item.sendPerson?.name }}</text>
+				<text class="list-top-time">{{ timesTampChange(item.createTime) }}</text>
+			</view>
+			<view class="list-remuneration">
+				薪酬:
+				{{ item.job?.payFrom }}
+				{{ item.job?.payFrom && item.job?.payTo ? ' - ' : '' }}
+				{{ item.job?.payTo }}
+			</view>
+			<view class="list-company">
+				<text>{{ item.enterprise?.anotherName }}</text>
+				<text>{{ item.enterprise?.anotherName && item.job?.name ? ' · ' : '' }}</text>
+				<text>{{ item.job?.name }}</text>
+			</view>
 		</view>
 	</view>
 </template>

+ 1 - 1
pagesA/seenMe/index.vue

@@ -75,7 +75,7 @@ const getList = async () => {
     })
     list.value = list.value.concat(arr)
   }
-  status.value = arr?.length < queryParams.value.pageSize ? 'noMore' : 'more'
+  status.value = list.value?.length === +res.data.total ? 'noMore' : 'more'
 }
 
 getList()

+ 2 - 25
pagesB/companyDetail/index.vue

@@ -5,10 +5,6 @@
         <image class="r-avatar" style="width: 80px; height: 80px;" :src="info.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
         <view class="f-straight ss-m-l-10" style="flex: 1;position: relative;">
           <view class="title-des font-weight-bold" style="max-width: 45vw;">{{ info.anotherName }}</view>
-          <!-- <view class="ss-m-b-5">
-            <uni-icons :color="statusInfo.color" size="20" custom-prefix="iconfont"  :type="statusInfo.mdi" />
-            <span :style="{'color': statusInfo.color,'font-size': '14px'}" class="font-weight-bold">{{ statusInfo.label }}</span>
-          </view> -->
           <view class="color-999 ellipsis font-size-14" style="max-width: 60vw;">
             <span>{{ !!info.industryName? info.industryName : ''}}</span>
             <span class="ss-m-x-10" v-if="info?.industryName && info?.scaleName"> | </span>
@@ -112,9 +108,9 @@
 </template>
 
 <script setup>
-import { ref, computed } from 'vue'
+import { ref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
-import { getEnterpriseDetails, enterpriseClick, getEnterpriseSubscribeCheck, getEnterpriseUnsubscribe, getEnterpriseSubscribe, getEnterpriseAuthDetails } from '@/api/user'
+import { getEnterpriseDetails, enterpriseClick, getEnterpriseSubscribeCheck, getEnterpriseUnsubscribe, getEnterpriseSubscribe } from '@/api/user'
 import { dealDictObjData } from '@/utils/position'
 import { timesTampChange } from '@/utils/date'
 import { getJobAdvertisedSearch } from '@/api/position'
@@ -138,13 +134,6 @@ const queryParams = ref({
   enterpriseId: id.value
 })
 const positionList = ref([])
-// const authInfo = ref({})
-// const statusList = [
-//   { label: '未认证', color: '#fb8c00', value: null, mdi: 'icon-dunpai1' },
-//   { label: '审核中', color: '#fb8c00', value: '0', mdi: 'icon-dunpai' },
-//   { label: '已认证', color: '#00897B', value: '1', mdi: 'icon-mn_dunpai_fill' },
-//   { label: '已驳回', color: '#fe574a', value: '2', mdi: 'icon-hongsedunpai' }
-// ]
 
 // 预览
 const previewImage = (i) => {
@@ -154,11 +143,6 @@ const previewImage = (i) => {
   })
 }
 
-// const statusInfo = computed(() => {
-//   const obj = (authInfo.value && Object.keys(authInfo.value).length) ? statusList.find(e => e.value === authInfo.value.status) : statusList[0]
-//   return obj
-// })
-
 // 企业埋点
 const enterpriseClickFn = async () => {
   if (!id.value) return
@@ -182,18 +166,11 @@ const handleFollow = async () => {
   getCollectionStatus()
 }
 
-// 企业认证详情
-// const getEnterpriseAuthInfo = async () => {
-//   const { data } = await getEnterpriseAuthDetails(id.value)
-//   authInfo.value = data
-// }
-
 // 企业详情
 const getData = async () => {
   const { data } = await getEnterpriseDetails(id.value)
   info.value = data.enterprise ? { ...data, ...dealDictObjData({}, data.enterprise) } : data
   getCollectionStatus()
-  // getEnterpriseAuthInfo()
 }
 
 // 招聘职位列表

+ 21 - 19
pagesB/inviteRecord/list.vue

@@ -1,23 +1,25 @@
 <template>
-	<view
-		class="list"
-		v-for="item in items"
-		:key="item.id"
-	>
-		<view class="list-top">
-			<text class="list-top-person">牛人:{{ item.sendPerson?.name }}</text>
-			<text class="list-top-time">{{ timesTampChange(item.createTime) }}</text>
-		</view>
-		<view class="list-remuneration">
-			薪酬:
-			{{ item.job?.payFrom }}
-			{{ item.job?.payFrom && item.job?.payTo ? ' - ' : '' }}
-			{{ item.job?.payTo }}
-		</view>
-		<view class="list-company">
-			<text>{{ item.enterprise?.anotherName }}</text>
-			<text>{{ item.enterprise?.anotherName && item.job?.name ? ' · ' : '' }}</text>
-			<text>{{ item.job?.name }}</text>
+	<view>
+		<view
+			class="list"
+			v-for="item in items"
+			:key="item.id"
+		>
+			<view class="list-top">
+				<text class="list-top-person">牛人:{{ item.sendPerson?.name }}</text>
+				<text class="list-top-time">{{ timesTampChange(item.createTime) }}</text>
+			</view>
+			<view class="list-remuneration">
+				薪酬:
+				{{ item.job?.payFrom }}
+				{{ item.job?.payFrom && item.job?.payTo ? ' - ' : '' }}
+				{{ item.job?.payTo }}
+			</view>
+			<view class="list-company">
+				<text>{{ item.enterprise?.anotherName }}</text>
+				<text>{{ item.enterprise?.anotherName && item.job?.name ? ' · ' : '' }}</text>
+				<text>{{ item.job?.name }}</text>
+			</view>
 		</view>
 	</view>
 </template>

+ 66 - 46
pagesB/recommendEnterprise/index.vue

@@ -1,48 +1,56 @@
 <template>
   <view style="padding-bottom: 30px;">
-    <uni-card v-for="(val, index) in list" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
-      <view class="d-flex align-center" @click="handleToEnterprise(val)">
-        <image class="enterAvatar" :src="val.enterprise.logoUrl ? val.enterprise.logoUrl : 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
-        <view class="ss-m-l-20" style="flex: 1;">
-          <view class="font-size-16 enterpriseName">{{ val.enterprise.anotherName || val.enterprise.name }}</view>
-          <view class="ss-m-t-5">
-            <span class="color-999">{{ val.enterprise?.industryName || '' }}</span>
-            <span class="divider tag-gap1" v-if="val.enterprise?.industryName && val.enterprise?.scaleName"> | </span>
-            <span class="color-999">{{ val.enterprise?.scaleName || '' }}</span>
+    <scroll-view scroll-y="true" @scrolltolower="loadingMore" style="height: 100vh;">
+      <view v-if="items.length">
+        <uni-card v-for="(val, index) in items" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
+          <view class="d-flex align-center" @click="handleToEnterprise(val)">
+            <image class="enterAvatar" :src="val.enterprise.logoUrl ? val.enterprise.logoUrl : 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
+            <view class="ss-m-l-20" style="flex: 1;">
+              <view class="font-size-16 enterpriseName">{{ val.enterprise.anotherName || val.enterprise.name }}</view>
+              <view class="ss-m-t-5">
+                <span class="color-999">{{ val.enterprise?.industryName || '' }}</span>
+                <span class="divider tag-gap1" v-if="val.enterprise?.industryName && val.enterprise?.scaleName"> | </span>
+                <span class="color-999">{{ val.enterprise?.scaleName || '' }}</span>
+              </view>
+              <view class="ss-m-t-10">
+                <uni-tag 
+                  v-for="(tag,i) in val.enterprise?.welfareList || []"
+                  :key="i"
+                  class="tag-gap ss-m-r-5"
+                  :text="tag"
+                  inverted="false"
+                  size="mini"
+                  custom-style="background-color: #ececec; color: #666; border-color: #ececec; display: inline-block;"
+                />
+              </view>
+            </view>
           </view>
-          <view class="ss-m-t-10">
-            <uni-tag 
-              v-for="(tag,i) in val.enterprise?.welfareList || []"
-              :key="i"
-              class="tag-gap ss-m-r-5"
-              :text="tag"
-              inverted="false"
-              size="mini"
-              custom-style="background-color: #ececec; color: #666; border-color: #ececec; display: inline-block;"
-            />
+          <view class="line ss-m-y-20"></view>
+          <view>
+            <view class="list-shape" v-for="(k, i) in val.jobList" :key="k.id" @click="handleToPosition(k)" :style="{'padding-bottom': i !== val.jobList.length - 1 ? '10px' : ''}">
+              <view class="titleBox my-5">
+                <view class="job-name">{{ k.name }}</view>
+                <span v-if="!k.payFrom && !k.payTo" class="salary-text">面议</span>
+                <span v-else class="salary-text">{{ k.payFrom }}-{{ k.payTo }}{{ k.payName ? '/' + k.payName : '' }}</span>
+              </view>
+              <view style="font-size: 13px;" class="ss-m-t-5">
+                <span class="tag-gap" style="color: #808080;">
+                  <span>{{ k.areaName }}</span>
+                  <span class="ss-m-x-10" v-if="k.areaName && k.eduName">|</span>
+                  <span>{{ k.eduName }}</span>
+                  <span class="ss-m-x-10" v-if="k.expName">|</span>
+                  <span>{{ k.expName }}</span>
+                </span>
+              </view>
+            </view>
           </view>
-        </view>
+        </uni-card>
+        <uni-load-more :status="more" />
       </view>
-      <view class="line ss-m-y-20"></view>
-      <view>
-        <view class="list-shape" v-for="(k, i) in val.jobList" :key="k.id" @click="handleToPosition(k)" :style="{'padding-bottom': i !== val.jobList.length - 1 ? '10px' : ''}">
-          <view class="titleBox my-5">
-            <view class="job-name">{{ k.name }}</view>
-            <span v-if="!k.payFrom && !k.payTo" class="salary-text">面议</span>
-            <span v-else class="salary-text">{{ k.payFrom }}-{{ k.payTo }}{{ k.payName ? '/' + k.payName : '' }}</span>
-          </view>
-          <view style="font-size: 13px;" class="ss-m-t-5">
-            <span class="tag-gap" style="color: #808080;">
-              <span>{{ k.areaName }}</span>
-              <span class="ss-m-x-10" v-if="k.areaName && k.eduName">|</span>
-              <span>{{ k.eduName }}</span>
-              <span class="ss-m-x-10" v-if="k.expName">|</span>
-              <span>{{ k.expName }}</span>
-            </span>
-          </view>
-        </view>
+      <view v-else class="nodata-img-parent">
+        <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
       </view>
-    </uni-card>
+    </scroll-view>
   </view>
 </template>
 
@@ -51,7 +59,8 @@ import { ref }  from 'vue'
 import { getHotEnterprise } from '@/api/enterprise'
 import { dealDictObjData, dealDictArrayData } from '@/utils/position'
 
-const list = ref([])
+const more = ref('more')
+const items = ref([])
 const query = ref({
   pageNo: 1,
   pageSize: 10
@@ -59,19 +68,30 @@ const query = ref({
 
 // 精选企业列表
 const getPopularEnterprise = async () => {
-  try {
-    const { data } = await getHotEnterprise(query.value)
-    list.value = data.list.map(e => {
+  const { data } = await getHotEnterprise(query.value)
+  const list = data?.list || []
+  if (!list.length && query.value.pageNo === 1) {
+    items.value = []
+    return
+  }
+  if (list?.length) {
+    list.forEach(e => {
       e.enterprise = dealDictObjData({}, e.enterprise)
       if (e.jobList && e.jobList.length) e.jobList = dealDictArrayData([], e.jobList).slice(0, 2)
-      return e
     })
-  } catch (err) {
-    uni.showToast({ icon: 'none', title: err.msg })
+    items.value = items.value.concat(list)
   }
+  more.value = items.value.length === +data.total ? 'noMore' : 'more'
 }
 getPopularEnterprise()
 
+// 加载更多
+const loadingMore = () => {
+  more.value = 'loading'
+  query.value.pageNo++
+  getPopularEnterprise()
+}
+
 // 企业详情
 const handleToEnterprise = (val) => {
   uni.navigateTo({