zhengnaiwen_citu 8 meses atrás
pai
commit
19975ffbec

+ 27 - 0
api/position.js

@@ -93,3 +93,30 @@ export const jobCvRelSend = (data) => {
     }
   })
 }
+
+// 获取众聘职位分页
+export const getJobAdvertisedHire = (params) => {
+  return request({
+    url: '/app-api/menduner/system/job/advertised/get/hire',
+    method: 'GET',
+    params,
+    custom: {
+      showLoading: false,
+      auth: false
+    }
+  })
+}
+
+// 获取统计信息
+export const getRecommendCount = (params) => {
+  return request({
+    url: '/app-api/menduner/system/job-cv-rel/hire/get/recommend/count',
+    method: 'GET',
+    params,
+    custom: {
+      showLoading: false,
+      auth: false
+    }
+  })
+}
+

+ 61 - 0
components/ResumeStatus/index.vue

@@ -0,0 +1,61 @@
+<template>
+	<slot name="header"></slot>
+	<view class="content">
+		<view v-for="(item,index) in items" :key="item.title" class="content-box">
+			<view class="content-box-value">
+				{{ item.value }}
+			</view>
+			<view class="content-box-title">
+				{{ item.title }}
+			</view>
+		</view>
+	</view>
+	
+</template>
+
+<script setup>
+import { reactive } from 'vue';
+import { getRecommendCount } from '@/api/position.js'
+const items = reactive([
+	{
+		value: 0,
+		title: '已推荐',
+		key: '0'
+	},
+	{
+		value: 0,
+		title: '已入职',
+		key: '1'
+	},
+	{
+		value: 0,
+		title: '已结算',
+		key: '2'
+	}
+])
+
+async function recommendCount () {
+	const { data } = await getRecommendCount()
+	items.forEach(e => {
+		e.value = data.find(e => e.key === e.key)?.value || 0
+	})
+}
+recommendCount()
+</script>
+
+<style scoped lang="scss">
+.content {
+	display: flex;
+	justify-content: space-around;
+	padding: 36rpx 12rpx;
+	&-box {
+		font-size: 20rpx;
+		color: #999;
+		text-align: center;
+		&-value {
+			font-size: 1.8em;
+			color: #000;
+		}
+	}
+}
+</style>

+ 1 - 1
hooks/useDictionaries.js

@@ -24,7 +24,7 @@ export const getDict = (type, params, apiType = 'dict') => {
     return new Promise((resolve) => {
       const item = uni.getStorageSync(type)
       const catchData = item ? JSON.parse(item) : null
-      if (catchData && catchData.expire && (Date.now() <= catchData.expire)) {
+      if (catchData && catchData.expire && (Date.now() <= catchData.expire) && catchData.data) {
         return resolve({ data: catchData.data })
       }
       // 传参按照规范参数传

+ 1 - 1
package-lock.json

@@ -1,5 +1,5 @@
 {
-  "name": "门墩招聘小程序",
+  "name": "menduner-uniapp-recruit",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {

+ 342 - 4
pages/index/crowdsourcing.vue

@@ -1,12 +1,350 @@
 <template>
-  <view class="nodata-img-parent">
-    <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
-  </view>
+  <layout-page>
+    <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
+	  <view class="content defaultBgc">
+		  <view class="content-top">
+			<view class="content-top-title">
+				<view class="content-top-title-label">
+					<text class="content-top-title-label-l">猎聘</text>
+					<text class="content-top-title-label-s">全球海量岗位 | 推荐有赏</text>
+				</view>
+				<view class="content-top-title-local" @tap="handleMap">
+					<uni-icons type="icon-map" custom-prefix="iconfont" color="#999"/>
+					{{ useUserStore.isLogin ? localtion : null }}
+				</view>
+			</view>
+			<view class="content-top-carousel">
+				<view class="content-top-carousel-box">
+					<SwiperAd :list="swiperAdList"></SwiperAd>
+				</view>
+			</view>
+			<view class="content-top-recommend">
+				<view class="content-top-recommend-box">
+					<resume-status>
+						<template #header>
+							<view class="content-top-recommend-box-title">
+								<text class="title">我的推荐</text>
+								<view class="route">
+									<text>推荐好友入职得赏金</text>
+									<uni-icons type="icon-right" custom-prefix="iconfont" color="#999"/>
+								</view>
+							</view>
+						</template>
+						
+					</resume-status>
+				</view>
+			</view>
+		  </view>
+		  <view class="content-main">
+			<!-- <view class="content-main-filter">
+				<view class="content-main-filter-type">
+					<text
+						v-for="item in chooseItems"
+						:key="item"
+						class="content-main-filter-type-item"
+						:class="{ active: item === chooseItem}"
+						@tap="handleChoose(item)"
+					>{{ item}}</text>
+				</view>
+				<view class="content-main-filter-filter">
+					<text>筛选</text>
+					<uni-icons type="icon-Filter" custom-prefix="iconfont" color="#999"/>
+				</view>
+				
+			</view> -->
+			<view class="content-main-list">
+				<PositionList class="pb-10" :list="items" :noMore="items.length === total"></PositionList>
+				<!-- template v-if="items.length === 0">
+					<view class="nodata-img-parent">
+					  <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
+					</view>
+				</template>
+				<view v-for="(item,index) in items" :key="item.id" class="content-main-list-box">
+					<view class="top">
+						<view class="title">{{ item.name }}</view>
+						<text class="remuneration">
+							{{ item.payFrom }}
+							{{ item.payTo ? ' - ' : ''}}
+							{{ item.payTo }}
+							{{ item.payName }}
+						</text>
+					</view>
+					<view class="main">
+						<view class="tag blue">
+							赏 
+							<uni-icons
+								type="icon-renminbi1688"
+								size="10"
+								custom-prefix="iconfont"
+								color="royalblue"
+							/>
+							{{ item.hirePrice }}
+						</view>
+						<view v-for="tag in item.tagList" :key="tag + index" class="tag">
+							{{ tag }}
+						</view>
+					</view>
+					<view class="bottom">
+						<view class="origin">
+							<text>{{ item.anotherName }}</text>
+							<text class="interval">·</text>
+							<text>{{ item.areaName }}</text>
+						</view>
+					</view>
+				</view>
+				<template v-if="items.length === total">
+					<view class="noMore">
+						没有更多了
+					</view>
+				</template> -->
+			</view>
+		  </view>
+		<!-- <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image> -->
+	  </view>
+	</scroll-view>
+  </layout-page>
 </template>
 
 <script setup>
+import { ref, reactive } from 'vue'
+import SwiperAd from '@/components/SwiperAd'
+import { showAuthModal } from '@/hooks/useModal'
+import { swiperAdListTest } from '@/utils/testData'
+import { userStore } from '@/store/user'
+import layoutPage from '@/layout'
+import ResumeStatus from '@/components/ResumeStatus'
+import { getJobAdvertisedHire } from '@/api/position.js'
+import { getDict } from '@/hooks/useDictionaries.js'
+import { dealDictArrayData } from '@/utils/position.js'
+import PositionList from '@/components/PositionList'
+
+const swiperAdList = ref(swiperAdListTest)
+const useUserStore = userStore()
+const localtion = ref('全国')
+const chooseItem = ref('同城')
+const chooseItems = reactive(['同城','最新'])
+
+const items = reactive([])
+const unitDict = ref([])
+const areaDict = ref([])
+
+const pageInfo = ref({
+	pageNo: 1,
+	pageSize: 10
+})
+
+const total = ref(0)
+
+// 选择地区
+const handleMap = () => {
+	// 检测是否登录	
+	// 未登录
+	if (!useUserStore.isLogin) {
+		console.log(111)
+		showAuthModal()
+		return
+	}
+	// 已登录
+	
+}
+// 切换同城、最新
+const handleChoose = (item) => {
+	chooseItem.value = item
+}
+
+const loadingMore = (e) => {
+	console.log(total.value, items.length)
+	if (total.value === items.length) {
+		return
+	}
+	pageInfo.value.pageNo++
+	getList()
+}
+
+async function getRatio () {}
+
+async function getDictionaries () {
+
+	const { data } = await getDict('menduner_pay_unit')
+	unitDict.value =  data.data
+	
+	const { data: _data } = await getDict('menduner_area_type')
+	areaDict.value = _data.data
+	getList()
+}
+
+
+async function getList () {
+	const { data } = await getJobAdvertisedHire({
+		...pageInfo.value
+	})
+	if (!data.list) {
+		pageInfo.pageNo--
+		return
+	}
+	const _items = dealDictArrayData([], data.list)
+	items.push(..._items.map(e => {
+		return {
+			job: e,
+			enterprise: {
+				welfareList: e.tagList,
+				logoUrl: e.logoUrl,
+				anotherName: e.anotherName,
+				industryName: e.industryName,
+				scaleName: e.scaleName
+			}
+		}
+	}))
+	console.log(items)
+	total.value = +data.total
+}
+
+getDictionaries()
 </script>
 
 <style scoped lang="scss">
-
+$defaultColor: #999;
+@mixin box {
+	border-radius: 24rpx;
+	width: 100%;
+	height: 100%;
+	background: #FFF;
+	overflow: hidden;
+}
+.content {
+	&-top {		
+		&-title {
+			padding: 24rpx;
+			box-sizing: border-box;
+			width: 100%;
+			display: flex;
+			justify-content: space-between;
+			align-items: flex-end;
+			background-color: #FFF;
+			&-label {
+				display: flex;
+				align-items: flex-end;
+				&-l {
+					font-size: 46rpx;
+					margin-right: 16rpx;
+				}
+				&-s {
+					font-size: 24rpx;
+					color: $defaultColor;
+				}
+			}
+			&-local {
+				color: $defaultColor;
+				display: flex;
+				align-items: flex-end;
+			}
+		}
+		&-carousel {
+			padding: 24rpx;
+			height: 300rpx;
+			&-box {
+				@include box;
+			}
+		}
+		&-recommend {
+			padding: 24rpx;
+			&-box {
+				@include box;
+				&-title {
+					display: flex;
+					justify-content: space-between;
+					align-items: flex-end;
+					padding: 20rpx;
+					font-size: 30rpx;
+					.route {
+						color: $defaultColor;
+						font-size: .75em;
+					}
+				}
+			}
+		}
+	}
+	&-main {
+		&-filter {
+			padding: 24rpx;
+			font-size: 30rpx;
+			color: $defaultColor;
+			display: flex;
+			justify-content: space-between;
+			&-type{
+				&-item {
+					padding: 20rpx;
+					&.active {
+						color: #000;
+					}
+				}
+			}
+		}
+		&-list {
+			width: 100%;
+			padding: 0 24rpx 24rpx 24rpx;
+			box-sizing: border-box;
+			&-box {
+				padding: 24rpx;
+				margin-bottom: 24rpx;
+				box-sizing: border-box;
+				@include box;
+				.top {
+					width: 100%;
+					display: flex;
+					justify-content: space-between;
+					.title {
+						flex: 1;
+						overflow: hidden; /* 隐藏超出部分 */  
+						white-space: nowrap; /* 不换行 */  
+						text-overflow: ellipsis; /* 超出部分显示省略号 */  
+					}
+					.remuneration {
+						color: aquamarine;
+					}
+				}
+				.main {
+					display: flex;
+					font-size: 24rpx;
+					margin: 28rpx 0;
+					.tag {
+						&.blue {
+							background: aliceblue;
+							color: royalblue;
+						}
+						font-size: 20rpx;
+						border-radius: 8rpx;
+						color: #666;
+						background: #eee;
+						padding: 6rpx 10rpx;
+						margin-right: 20rpx;
+					}
+				}
+				.bottom {
+					color: #666;
+					display: flex;
+					justify-content: space-between;
+					.origin {
+						font-size: 0.8em;
+						.interval {
+							padding: 0 16rpx;
+						}
+					}
+					.local {
+						color: #aaa;
+						font-size: 0.6em;
+					}
+				}
+			}
+			.noMore {
+				font-size: 24rpx;
+				color: $defaultColor;
+				text-align: center;
+			}
+		}
+	}
+}
+.scrollBox {
+	height: 100vh;
+}
 </style>

+ 29 - 0
project.config.json

@@ -0,0 +1,29 @@
+{
+  "compileType": "miniprogram",
+  "setting": {
+    "coverView": true,
+    "es6": true,
+    "postcss": true,
+    "minified": true,
+    "enhance": true,
+    "showShadowRootInWxmlPanel": true,
+    "packNpmRelationList": [],
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "ignoreUploadUnusedFiles": true
+  },
+  "condition": {},
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  },
+  "libVersion": "3.5.8",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "appid": "wx5dd538ccc752b03a"
+}

+ 7 - 0
project.private.config.json

@@ -0,0 +1,7 @@
+{
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "projectname": "menduner-uniapp-recruit",
+  "setting": {
+    "compileHotReLoad": true
+  }
+}

BIN
static/iconfont.ttf


+ 12 - 68
static/iconfont.wxss

@@ -11,40 +11,28 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
-.icon-ClearFilter:before {
-  content: "\e611";
-}
-
-.icon-docx-:before {
-  content: "\e646";
-}
-
-.icon-pdf-:before {
-  content: "\e649";
-}
-
-.icon-doc:before {
-  content: "\e639";
+.icon-renminbi1688:before {
+  content: "\e6cb";
 }
 
-.icon-icon-test1:before {
-  content: "\e602";
+.icon-right:before {
+  content: "\e840";
 }
 
-.icon-icon-test:before {
-  content: "\e627";
+.icon-Filter:before {
+  content: "\e605";
 }
 
-.icon-qiye1:before {
-  content: "\e640";
+.icon-map:before {
+  content: "\e6a2";
 }
 
-.icon-zhiwei:before {
-  content: "\e60a";
+.icon-pin:before {
+  content: "\e647";
 }
 
-.icon-zhiweisvg:before {
-  content: "\eac0";
+.icon-ClearFilter:before {
+  content: "\e611";
 }
 
 .icon-dunpai1:before {
@@ -71,47 +59,3 @@
   content: "\e621";
 }
 
-.icon-wode:before {
-  content: "\e60f";
-}
-
-.icon-xiaoxi:before {
-  content: "\e62c";
-}
-
-.icon-sousuo:before {
-  content: "\e653";
-}
-
-.icon-jianli:before {
-  content: "\e6b2";
-}
-
-.icon-jianli1:before {
-  content: "\e608";
-}
-
-.icon-xiaoxi1:before {
-  content: "\e614";
-}
-
-.icon-qiye:before {
-  content: "\e91d";
-}
-
-.icon-sousuo1:before {
-  content: "\f8b0";
-}
-
-.icon-icon-myself-1:before {
-  content: "\e601";
-}
-
-.icon-shouye-:before {
-  content: "\e629";
-}
-
-.icon-shouye:before {
-  content: "\e6fa";
-}
-

+ 34 - 6
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,15 +1,43 @@
 {
-  "hash": "62488134",
-  "configHash": "fe45daba",
-  "lockfileHash": "b09eb1c5",
-  "browserHash": "a43a12fe",
+  "hash": "2451f7ed",
+  "configHash": "06645ce3",
+  "lockfileHash": "c1c0b714",
+  "browserHash": "99c7de3e",
   "optimized": {
     "pinia-plugin-persistedstate": {
       "src": "../../../../../node_modules/pinia-plugin-persistedstate/dist/index.js",
       "file": "pinia-plugin-persistedstate.js",
-      "fileHash": "d7221025",
+      "fileHash": "d4080918",
       "needsInterop": false
+    },
+    "luch-request": {
+      "src": "../../../../../node_modules/luch-request/src/lib/luch-request.js",
+      "file": "luch-request.js",
+      "fileHash": "ab4c6db6",
+      "needsInterop": false
+    },
+    "qs": {
+      "src": "../../../../../node_modules/qs/lib/index.js",
+      "file": "qs.js",
+      "fileHash": "7e614962",
+      "needsInterop": true
+    },
+    "lodash-es": {
+      "src": "../../../../../node_modules/lodash-es/lodash.js",
+      "file": "lodash-es.js",
+      "fileHash": "4a6d2fd9",
+      "needsInterop": false
+    },
+    "dayjs": {
+      "src": "../../../../../node_modules/dayjs/dayjs.min.js",
+      "file": "dayjs.js",
+      "fileHash": "1433011a",
+      "needsInterop": true
     }
   },
-  "chunks": {}
+  "chunks": {
+    "chunk-Y2F7D3TJ": {
+      "file": "chunk-Y2F7D3TJ.js"
+    }
+  }
 }