浏览代码

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

Xiao_123 7 月之前
父节点
当前提交
b46918bba9

+ 24 - 2
components/PositionList/index.vue

@@ -1,7 +1,7 @@
 <template>
   <view>
     <view v-if="list.length > 0">
-      <view v-for="(item, index) in list" :key="index">
+      <view v-for="(item, index) in list" :key="index" class="mList" :class="{ 'disable': item.job?.status === '1'}">
         <!-- 职位信息 -->
         <view class="list-shape" @click="toDetail(1, item)">
           <!-- 职位 -->
@@ -153,7 +153,7 @@ const toDetail = (isPosition, item) =>{
 }
 .list-shape {
 	padding: 10px 30rpx 10px;
-  margin-top: 10px;
+  // margin-top: 10px;
   background-color: #fff;
   .titleBox {
     display: flex;
@@ -195,6 +195,9 @@ const toDetail = (isPosition, item) =>{
 	overflow: hidden;
 	text-overflow: ellipsis;
 }
+.mList {
+  margin-top: 20rpx;
+}
 /* 列表触底暂无更多 */
 .noMore{ text-align:center; color:grey; }
 .mt { margin-top: 10rpx; }
@@ -203,4 +206,23 @@ const toDetail = (isPosition, item) =>{
 .mr { margin-right: 20rpx; }
 .mr-10{ margin-right: 10rpx; }
 .my-5{ margin: 5px 0; }
+.disable {
+  position: relative;
+  overflow: hidden;
+  &::after {
+    content: '已失效';
+    position: absolute;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 1.2em;
+    font-weight: bold;
+    color: #fc796f;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background-color: rgba(255, 255, 255, 0.75);
+  }
+}
 </style>

+ 6 - 1
components/ResumeStatus/index.vue

@@ -17,6 +17,7 @@
 import { ref, watch } from 'vue';
 import { getRecommendCount } from '@/api/position.js'
 import { getDict } from '@/hooks/useDictionaries.js'
+import { onShow } from '@dcloudio/uni-app'
 // const props = defineProps({
 // 	type: {
 // 		type: String,
@@ -35,6 +36,10 @@ watch(() => useUserStore.refreshToken, (newVal, oldVal) => {
 	}
 })
 
+onShow(() => {
+	recommendCount()
+})
+
 const items = ref([])
 
 const handleTo = (item) => {
@@ -67,7 +72,7 @@ async function recommendCount () {
 		// console.log(error)
 	}
 }
-recommendCount()
+
 </script>
 
 <style scoped lang="scss">

+ 57 - 0
custom-tab-bar/index.js

@@ -0,0 +1,57 @@
+Component({
+  data: {
+    selected: 0,
+		show: true,
+    color: "#7A7E83",
+    selectedColor: "#00897B",
+    list: [
+			{
+				"pagePath": "/pages/index/position",
+				"text": "求职",
+				"iconPath": "/static/img/position.png",
+				"selectedIconPath": "/static/img/position-fill.png"
+			},
+			{
+				"pagePath": "/pages/index/communicate",
+				"text": "沟通",
+				"iconPath": "/static/img/message.png",
+				"selectedIconPath": "/static/img/message-fill.png"
+			},
+			{
+				"pagePath": "/pages/index/welfare",
+				"text": "会员福利",
+        "center": true,
+				"iconPath": "/static/img/welfare.png",
+				"selectedIconPath": "/static/img/welfare.png"
+			},
+			{
+				"pagePath": "/pages/index/crowdsourcing",
+				"text": "赏金",
+				"iconPath": "/static/img/pin.png",
+				"selectedIconPath": "/static/img/pin-fill.png"
+			},
+			{
+				"pagePath": "/pages/index/my",
+				"text": "我的",
+				"iconPath": "/static/img/my.png",
+				"selectedIconPath": "/static/img/my-fill.png"
+			}
+		]
+  },
+  lifetimes: {  
+
+  },
+  methods: {
+    switchTab(e) {
+      const data = e.currentTarget.dataset
+      const url = data.path
+      wx.switchTab({
+        url
+      })
+      this.setData({  
+        selected: data.index  
+      })
+      console.log('select', this.data)
+    }
+  }
+})

+ 4 - 0
custom-tab-bar/index.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 14 - 0
custom-tab-bar/index.wxml

@@ -0,0 +1,14 @@
+<!--miniprogram/custom-tab-bar/index.wxml-->
+<view class="tab-bar" style="display: {{ show ? 'flex' : 'none'}}">
+  <view
+    wx:for="{{list}}"
+    wx:key="index"
+    class="tab-bar-item {{ item.center ? 'center' : ''}}"
+    data-path="{{item.pagePath}}"
+    data-index="{{index}}"
+    bindtap="switchTab"
+  >
+    <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
+    <view style="color: {{selected === index ? selectedColor : color}};z-index: 1;">{{item.text}}</view>
+  </view>
+</view>

+ 74 - 0
custom-tab-bar/index.wxss

@@ -0,0 +1,74 @@
+.tab-bar {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  height: 60px;
+  background: white;
+  display: flex;
+  padding-bottom: env(safe-area-inset-bottom);
+  border-radius: 20px 20px 0 0;
+  box-shadow: 0px 8px 20px 0px rgba(0,0,0,.5);
+  z-index: 0;
+}
+
+.tab-bar-border {
+  background-color: rgba(0, 0, 0, 0.33);
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 1px;
+  transform: scaleY(0.5);
+}
+
+.tab-bar-item {
+  flex: 1;
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+  position: relative;
+}
+
+.tab-bar-item.center {
+  margin-top: -20px;
+}
+.tab-bar-item.center image {
+  width: 56px;
+  height: 56px;
+  z-index: 3;
+  border-radius: 50%;
+}
+.tab-bar-item.center::before {
+  content: '';
+  width: 64px;
+  height: 32px;
+  position: absolute;
+  left: 50%;
+  top: 0;
+  transform: translate(-50%, 0px);
+  background: #FFF;
+  border-radius: 180px 180px 0 0 ;
+  box-shadow: 0px 8px 20px 0px rgba(0,0,0,.5);
+  /* clip-path: inset(0 0 66.66% 0); 裁剪三分之一高度 */
+}
+.tab-bar-item.center::after {
+  content: '';
+  width: 100px;
+  height: 40px;
+  position: absolute;
+  left: 50%;
+  top: 20px;
+  background: #FFF;
+  transform: translate(-50%, 0px);
+}
+.tab-bar-item image {
+  width: 27px;
+  height: 27px;
+}
+
+.tab-bar-item view {
+  font-size: 10px;
+}

+ 27 - 9
hooks/useModal.js

@@ -1,18 +1,36 @@
-import { modalStore } from '@/store/modal'; const modal = modalStore()
+import { modalStore } from '@/store/modal';
+const modal = modalStore()
 
 // 隐藏TabBar
 const hideBar = () => {
-  uni.hideTabBar({
-    success: () => {},
-    fail: () => {} // 捕获报错,防止没有tabbar页面调用后控制台报错
-  }) 
+  // 关闭tabBar
+  const currentPage = getCurrentPages()
+  if (!currentPage) {
+    return
+  }
+  const currentTabBar = currentPage[0]?.getTabBar?.();
+  // console.log('打开了', currentTabBar)
+  currentTabBar?.setData({ show: false });
+  // uni.hideTabBar({
+  //   success: () => {},
+  //   fail: () => {} // 捕获报错,防止没有tabbar页面调用后控制台报错
+  // }) 
 }
 // 显示TabBar
 const showBar = () => {
-  uni.showTabBar({
-    success: () => {},
-    fail: () => {} // 捕获报错,防止没有tabbar页面调用后控制台报错
-  }) 
+  
+  // 打开tabBar
+  const currentPage = getCurrentPages()
+  if (!currentPage) {
+    return
+  }
+  const currentTabBar = currentPage[0]?.getTabBar?.();
+  // console.log('打开了', currentTabBar)
+  currentTabBar?.setData({ show: true });
+  // uni.showTabBar({
+  //   success: () => {},
+  //   fail: () => {} // 捕获报错,防止没有tabbar页面调用后控制台报错
+  // }) 
 }
 
 // 打开授权弹框

+ 1 - 0
layout/index.vue

@@ -48,6 +48,7 @@ watch(() => useUserStore.accountInfo.userId, (newVal, oldVal) => {
     position: absolute;
     z-index: 1;
     width: 100%;
+    padding-bottom: 120rpx;
     min-height: 100%;
     display: flex;
     flex-direction: column;

+ 2 - 2
pages.json

@@ -123,13 +123,13 @@
 		"backgroundColor": "#ffffff"
 	},
 	"tabBar": {
-		"color": "#000",
+		"color": "#7A7E83",
 		"selectedColor": "#00897B",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"height": "65px",
 		"fontSize": "24rpx",
-
+		"custom": true,
 		"list": [
 			{
 				"pagePath": "pages/index/position",

+ 7 - 1
pages/index/communicate.vue

@@ -51,7 +51,8 @@ import { getUserAvatar } from '@/utils/avatar'
 import { timesTampChange } from '@/utils/date'
 import { userStore } from '@/store/user'
 import { useIMStore } from '@/store/im'
-  const IM = useIMStore()
+
+const IM = useIMStore()
 
 const useUserStore = userStore()
 
@@ -62,6 +63,11 @@ watch([() => useUserStore.refreshToken, () => IM.newMsg], () => {
 })
 
 onShow(() => {
+	const currentPage = getCurrentPages()[0];  // 获取当前页面实例
+	const currentTabBar = currentPage?.getTabBar?.();
+
+	// 设置当前tab页的下标index
+	currentTabBar?.setData({ selected: 1 });
 	init()
 })
 

+ 38 - 29
pages/index/crowdsourcing.vue

@@ -1,38 +1,38 @@
 <template>
   <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 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>
-			</view>
-			<view class="content-top-carousel">
-				<view class="content-top-carousel-box">
-					<SwiperAd :list="swiperAdList"></SwiperAd>
+				<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>
+							</template>
+						</resume-status>
+					</view>
+				</view>
+				</view>
+				<view class="content-main">
+				<view class="content-main-list">
+					<PositionList class="pb-10" :list="items" :noMore="items.length === total"></PositionList>
 				</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>
-						</template>
-					</resume-status>
 				</view>
 			</view>
-		  </view>
-		  <view class="content-main">
-			<view class="content-main-list">
-				<PositionList class="pb-10" :list="items" :noMore="items.length === total"></PositionList>
-			</view>
-		  </view>
-	  </view>
-	</scroll-view>
+		</scroll-view>
   </layout-page>
 </template>
 
@@ -48,7 +48,16 @@ import { getJobAdvertisedHire } from '@/api/position.js'
 import { getDict } from '@/hooks/useDictionaries.js'
 import { dealDictArrayData } from '@/utils/position.js'
 import PositionList from '@/components/PositionList'
+import { onShow } from '@dcloudio/uni-app'
+// 设置自定义tabbar选中值
+onShow(() => {
+    const currentPage = getCurrentPages()[0];  // 获取当前页面实例
+    const currentTabBar = currentPage?.getTabBar?.();
 
+    // 设置当前tab页的下标index
+    currentTabBar?.setData({ selected: 3 });
+		getList()
+})
 const swiperAdList = ref(swiperAdListTest)
 const items = reactive([])
 const pageInfo = ref({
@@ -105,7 +114,7 @@ async function getList () {
 	
 }
 
-getList()
+
 </script>
 
 <style scoped lang="scss">

+ 9 - 0
pages/index/my.vue

@@ -53,6 +53,15 @@ import { getUserAvatar } from '@/utils/avatar'
 import { getAccessToken } from '@/utils/request'
 import layoutPage from '@/layout'
 import { showAuthModal } from '@/hooks/useModal'
+import { onShow } from '@dcloudio/uni-app'
+// 设置自定义tabbar选中值
+onShow(() => {
+    const currentPage = getCurrentPages()[0];  // 获取当前页面实例
+    const currentTabBar = currentPage?.getTabBar?.();
+
+    // 设置当前tab页的下标index
+    currentTabBar?.setData({ selected: 4 });
+})
 
 const useUserStore = userStore()
 const baseInfo = computed(() => useUserStore?.baseInfo)

+ 10 - 2
pages/index/position.vue

@@ -30,15 +30,23 @@ import PositionList from '@/components/PositionList'
 import { swiperAdListTest } from '@/utils/testData'
 import { dealDictObjData } from '@/utils/position'
 import { getJobAdvertisedSearch } from '@/api/position';
+import { onShow } from '@dcloudio/uni-app'
 
 import { ref, reactive } from 'vue'
+// 设置自定义tabbar选中值
+onShow(() => {
+    const currentPage = getCurrentPages()[0];  // 获取当前页面实例
+    const currentTabBar = currentPage?.getTabBar?.();
+    // 设置当前tab页的下标index
+    currentTabBar?.setData({ selected: 0 });
+})
 
 const swiperAdList = ref(swiperAdListTest)
 const filterList = ref([
   { label: '城市', dictType: 'areaTreeData', key: 'areaIds', map: { text: 'name', value: 'id' } },
   { label: '行业', dictType: 'industryTreeData',key: 'industryIds', map: { text: 'nameCn', value: 'id' } },
   { label: '求职类型', dictType: 'menduner_job_type', key: 'jobType' },
-  { label: '薪资待遇', dictType: 'menduner_pay_scope', key: 'payType' },
+  { label: '薪资待遇', dictType: 'menduner_pay_scope', key: 'payScope' },
   { label: '工作经验', dictType: 'menduner_exp_type', key: 'expType' },
 ])
 
@@ -52,7 +60,7 @@ const query = reactive({
   areaIds: [],
   industryIds: [],
   jobType: [],
-  payType: [],
+  payScope: [],
   expType: []
 })
 //

+ 8 - 0
pages/index/welfare.vue

@@ -13,7 +13,15 @@ import layoutPage from '@/layout'
 import SwiperAd from '@/components/SwiperAd'
 
 import { swiperAdListTest } from '@/utils/testData'
+import { onShow } from '@dcloudio/uni-app'
+// 设置自定义tabbar选中值
+onShow(() => {
+    const currentPage = getCurrentPages()[0];  // 获取当前页面实例
+    const currentTabBar = currentPage?.getTabBar?.();
 
+    // 设置当前tab页的下标index
+    currentTabBar?.setData({ selected: 2 });
+})
 const swiperAdList = ref(swiperAdListTest)
 </script>
 

+ 14 - 1
pagesA/chart/index.vue

@@ -303,7 +303,6 @@ function setScrollBottom () {
 async function getInterviewInviteList () {
   if (!info.value.id) return
   const { data } = await getInterviewInviteListByInviteUserId(info.value.id)
-  console.log(data, statusList)
   interview.value = data.slice(0, 1).map(e => {
     const statusItem = statusList.value.find(_e => _e.value === e.status)
     const statusText = statusItem?.label || ''
@@ -384,6 +383,8 @@ function handleSendResume () {
     type: 1
   }
   send (JSON.stringify(text), channelItem.value, 105)
+  // 提交简历
+  // {jobId, title, type, url}
   popup.value.close()
 }
 
@@ -470,11 +471,23 @@ function handleUploadResume () {
   })
 }
 
+// 根据id检测是否有发过简历
+async function checkResume (jobId) {
+  try {
+    const { data } = await getJobFavoriteCheck({ jobId })
+    console.log(data)
+  } catch (error) {
+    
+  }
+}
+
 onLoad(async (options) => {
   info.value = Object.keys(options).reduce((r, k) => {
     r[k] = decodeURIComponent(options[k])
     return r
   }, {})
+  // console.log(info.value)
+  // await checkResume(info.value.enterpriseId)
   await init(options.id, options.enterpriseId)
   await getStatusList()
   getInterviewInviteList()

+ 1 - 0
pagesA/interview/index.vue

@@ -31,6 +31,7 @@ import { userStore } from '@/store/user'
 
 const useUserStore = userStore()
 const current = ref(0)
+// const controlList = ['已投递', '待同意', '待面试', '已完成', '已拒绝']
 const controlList = ['已投递', '待同意', '待面试', '已完成', '已拒绝']
 const statusList = [0, 1, 3, 98]
 

+ 4 - 4
pagesA/recommendation/index.vue

@@ -8,10 +8,10 @@
 		  </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>
+					src="https://minio.citupro.com/dev/static/nodata.png"
+					mode="widthFix"
+					style="width: 100vw"
+				></image>
 		  </view>
 		</scroll-view>
 	</layout-page>

+ 1 - 1
pagesB/positionDetail/index.vue

@@ -83,7 +83,7 @@
       </view>
     </scroll-view>
     <!-- 分享 投递 -->
-    <view class="bottom-sticky" v-if="!loading && jobId">
+    <view class="bottom-sticky" v-if="!loading && jobId && info.status === '0'">
       <view class="bottom-content">
         <view @click="handleClickShare" class="bottom-content-tool">
           <uni-icons type="redo-filled" size="24" color="#00897B"/>

二进制
static/img/message-fill.png


二进制
static/img/message.png


二进制
static/img/my-fill.png


二进制
static/img/my.png


二进制
static/img/pin-fill.png


二进制
static/img/pin.png


二进制
static/img/position-fill.png


二进制
static/img/position.png


二进制
static/img/welfare.png


+ 15 - 15
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,50 +1,50 @@
 {
-  "hash": "47dcb4f1",
+  "hash": "3fec5660",
   "configHash": "06645ce3",
-  "lockfileHash": "8c101f21",
-  "browserHash": "f0bed5f8",
+  "lockfileHash": "c6d0d79b",
+  "browserHash": "f75d13a9",
   "optimized": {
     "pinia-plugin-persistedstate": {
       "src": "../../../../../node_modules/pinia-plugin-persistedstate/dist/index.js",
       "file": "pinia-plugin-persistedstate.js",
-      "fileHash": "de8dc243",
+      "fileHash": "c2c4ea4f",
       "needsInterop": false
     },
     "luch-request": {
       "src": "../../../../../node_modules/luch-request/src/lib/luch-request.js",
       "file": "luch-request.js",
-      "fileHash": "c5810002",
+      "fileHash": "52606568",
       "needsInterop": false
     },
     "qs": {
       "src": "../../../../../node_modules/qs/lib/index.js",
       "file": "qs.js",
-      "fileHash": "e4fd86e6",
+      "fileHash": "a09ab1fe",
       "needsInterop": true
     },
     "lodash-es": {
       "src": "../../../../../node_modules/lodash-es/lodash.js",
       "file": "lodash-es.js",
-      "fileHash": "cc0e5b4c",
+      "fileHash": "2f28623f",
       "needsInterop": false
     },
-    "dayjs": {
-      "src": "../../../../../node_modules/dayjs/dayjs.min.js",
-      "file": "dayjs.js",
-      "fileHash": "faa24560",
-      "needsInterop": true
-    },
     "js-base64": {
       "src": "../../../../../node_modules/js-base64/base64.mjs",
       "file": "js-base64.js",
-      "fileHash": "9be10531",
+      "fileHash": "e48e3266",
       "needsInterop": false
     },
     "wukongimjssdk": {
       "src": "../../../../../node_modules/wukongimjssdk/lib/wukongimjssdk.esm.js",
       "file": "wukongimjssdk.js",
-      "fileHash": "1f9bb9cc",
+      "fileHash": "071728c3",
       "needsInterop": false
+    },
+    "dayjs": {
+      "src": "../../../../../node_modules/dayjs/dayjs.min.js",
+      "file": "dayjs.js",
+      "fileHash": "e5632627",
+      "needsInterop": true
     }
   },
   "chunks": {