wkw 7 meses atrás
pai
commit
9aaeee873b

+ 80 - 54
components/nav-bar/index.vue

@@ -1,60 +1,86 @@
 <template>
-  <view class="nav-bar" :style="{ paddingTop: 12 + BarHeight + 'px' }">
-    <view class="go-back">
-      <u-icon name="arrow-leftward" :color="color" size="32" @click="goBack"></u-icon>
-    </view>
-    <view class="nav-title" :style="{color:color}">
-      {{ title }}
-    </view>
-	<view class="go-back">
-		<slot name="right"></slot>
+	<view class="nav-bar" :style="{ paddingTop: 12 + BarHeight + 'px' }">
+		<view class="go-back">
+			<u-icon name="arrow-leftward" :color="color" size="32" @click="goBack"></u-icon>
+		</view>
+		<view class="nav-title" :style="{color:color}">
+			{{ title }}
+		</view>
+		<view class="go-back">
+			<slot name="right"></slot>
+		</view>
 	</view>
-  </view>
 </template>
 <script>
-export default {
-  data() {
-    return {
-		BarHeight:'',
-        goBack(){
-            uni.navigateBack()
-        }
-    };
-  },
-  props: {
-    title: "",
-    color:''
-  },
-  mounted(){
-	// #ifdef APP-PLUS
-	let systemInfo = uni.getSystemInfoSync();
-	this.BarHeight = systemInfo.statusBarHeight;
-	// #endif
-  }
-};
+	export default {
+		props: {
+			title: "",
+			color: '',
+			backUrl: {
+			    type: String,
+			    default: ''
+			}
+		},
+		data() {
+			return {
+				BarHeight: '',
+			};
+		},
+		mounted() {
+			// #ifdef APP-PLUS
+			let systemInfo = uni.getSystemInfoSync();
+			this.BarHeight = systemInfo.statusBarHeight;
+			// #endif
+		},
+		methods:{
+			goBack() {
+				if (this.backUrl) {
+					const isTabPage = [
+						'/pages/index/index',
+						'/pages/index/game/gameList',
+						'/pages/msg/index',
+						'/pages/my/index'
+					].includes(this.backUrl)
+					if (isTabPage) {
+						uni.switchTab({
+							url: this.backUrl
+						})
+					} else {
+						uni.redirectTo({
+							url: this.backUrl
+						})
+					}
+				} else {
+					uni.navigateBack()
+				}
+			}
+		}
+	};
 </script>
 <style lang="scss" scoped>
-.nav-bar {
-  width: 100%;
-  padding: 24rpx 32rpx 20rpx 32rpx;
-  box-sizing: border-box;
-  color: rgba(255, 255, 255, 1);
-  font-family: DM Sans;
-  font-size: 30rpx;
-  font-weight: 700;
-  line-height: 26px;
-  display: flex;
-  // justify-content: center;
-  align-items: center;
-  position: relative;
-  z-index: 9999;
-  .go-back{
-    width: 32.61px;
-	height: 26px;
-  }
-  .nav-title{
-	flex: 1;
-	text-align: center;
-  }
-}
-</style>
+	.nav-bar {
+		width: 100%;
+		padding: 24rpx 32rpx 20rpx 32rpx;
+		box-sizing: border-box;
+		color: rgba(255, 255, 255, 1);
+		font-family: DM Sans;
+		font-size: 30rpx;
+		font-weight: 700;
+		line-height: 26px;
+		display: flex;
+		// justify-content: center;
+		align-items: center;
+		position: relative;
+		z-index: 9999;
+
+		.go-back {
+			width: 32.61px;
+			height: 26px;
+		}
+
+		.nav-title {
+			flex: 1;
+			text-align: center;
+		}
+	}
+</style>

+ 2 - 1
pages/index/index.vue

@@ -1316,8 +1316,9 @@
 							// 	url: '/pages/my/jobPosting?companyId=' + data.companyId + '&status=' + this
 							// 		.companyStatus + '&companyName=' + this.companyName
 							// })
+							let backUrl = '/pages/my/index'
 							uni.navigateTo({
-								url: '/pages/jobManagement/jobManagement'
+								url: `/pages/jobManagement/jobManagement?backUrl=${backUrl}`
 							})
 
 						}

+ 32 - 61
pages/jobManagement/jobManagement.vue

@@ -1,18 +1,7 @@
 <template>
 	<view class="job-management-page">
-		<!-- 固定顶部导航栏和标签页 -->
 		<view class="fixed-header">
-			<!-- 自定义导航栏 -->
-			<view class="custom-navbar">
-				<view class="navbar-content">
-					<view class="nav-left" @click="goBack">
-						<u-icon name="arrow-leftward" color="#333" size="32"></u-icon>
-					</view>
-					<view class="nav-title">职位管理</view>
-					<view class="nav-right"></view>
-				</view>
-			</view>
-			
+			<navBar title="职位管理" color="#000" :backUrl="backUrl"/>
 			<!-- 标签页导航 - 使用uview的u-tabs组件 -->
 			<view class="sticky-tabs">
 				<u-tabs 
@@ -37,7 +26,7 @@
 			<!-- 有数据时显示列表 -->
 			<scroll-view 
 			  scroll-y="true" 
-			  style="width: 100%;height: 70vh;" 
+			  style="width: 100%;height: 100%;" 
 			  v-if="jobList.length > 0"
 			  @scrolltolower="loadMore"
 			  lower-threshold="50"
@@ -58,7 +47,7 @@
 								</view>
 							</view>
 							<view class="job-status" :class="getJobStatusClass(job)">
-								<text class="status-text">{{job.statusName || job.status}}</text>
+								<text class="status-text">{{job.status | statusText}}</text>
 							</view>
 						</view>
 						<view class="job-info">
@@ -86,9 +75,13 @@
 </template>
 
 <script>
+	import navBar from "@/components/nav-bar/index.vue";
 import empty from '@/components/empty.vue'
 
 export default {
+	components: {
+		navBar,
+	},
   data() {
     return {
       tabIndex: 0,
@@ -107,9 +100,24 @@ export default {
       count: 0,       // 总条数
       companyId: '',
       isLoading: false, // 防止重复请求标记
+	  backUrl:''
     }
   },
-  onLoad() {
+  filters: {
+      statusText(value) {
+        switch (value) {
+          case 1: return '待审核'
+          case 2: return '审核通过'
+          case 3: return '审核不通过'
+		  case 4: return '已取消'
+		  case 5: return '已关闭'
+		  case 6: return '暂存'
+          default: return '暂无数据'
+        }
+      }
+    },
+  onLoad(options) {
+	  this.backUrl = options.backUrl;
     this.companyId = uni.getStorageSync('companyId');
     this.getJobList();
     this.setBodyHeight();
@@ -205,8 +213,8 @@ sticky生效条件:
 */
 .sticky-tabs {
 	z-index: 990;
-	position: sticky;
-	top: var(--window-top);
+	// position: sticky;
+	// top: var(--window-top);
 	background-color: #fff;
 }
 
@@ -215,52 +223,20 @@ page {
 }
 .job-management-page {
 	background-color: #ffffff;
+	display: flex;
+	flex-direction: column;
+	height: 100vh;
 }
 
 .fixed-header {
-	position: fixed;
-	top: 0;
-	left: 0;
-	right: 0;
-	z-index: 9999;
 	background-color: #ffffff;
 }
 
-.custom-navbar {
-	padding-top: 80rpx;
-	background-color: #ffffff;
-	box-sizing: border-box;
-	
-	.navbar-content {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		height: 88rpx;
-		padding: 0 40rpx;
-		
-		.nav-left, .nav-right {
-			width: 60rpx;
-			height: 60rpx;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-		}
-		
-		.nav-title {
-            color: rgba(51, 51, 51, 1);
-            font-family: DM Sans;
-            font-size: 30rpx;
-            font-weight: 700;
-            line-height: 52px;
-            letter-spacing: 0.5%;
-            text-align: center;
-		}
-	}
-}
-
 .job-list {
-	padding: 0 40rpx;
-	margin-top: 280rpx;
+	padding: 20rpx 40rpx 0;
+	flex: 1;
+	display: flex;
+	flex-direction: column;
 	
 	.job-card {
 		background: #ffffff;
@@ -424,13 +400,8 @@ page {
 }
 
 .bottom-action {
-	position: fixed;
-	bottom: 0;
-	left: 0;
-	right: 0;
 	padding: 30rpx 40rpx;
 	background: #ffffff;
-	z-index: 9999;
 	
 	.publish-btn {
 		width: 100%;

+ 1 - 0
pages/my/index.vue

@@ -848,6 +848,7 @@
 				that.userId = "";
 				that.userType = 1;
 				that.money = 0;
+				that.chatCount = 0;
 				that.deliveryCount = 0;
 				that.browseCount = 0;
 				that.collectionCount = 0;

+ 18 - 13
pages/recruitmentData/communicationRecords.vue

@@ -298,19 +298,24 @@ export default {
   },
    computed: {
      groupedRecords() {
-       const groups = {}
-       this.communicationRecords.forEach(record => {
-        const date = record.lastTime.substring(0, 10) 
-         if (!groups[date]) {
-           groups[date] = {
-             date: date,
-             records: []
-           }
-         }
-         groups[date].records.push(record)
-       })
-       return Object.values(groups)
-     },
+         const records = Array.isArray(this.communicationRecords)
+           ? this.communicationRecords
+           : []
+     
+         const groups = {}
+     
+         records
+           .filter(r => r && r.lastTime) // 过滤掉 null 或没有 lastTime 的数据
+           .forEach(record => {
+             const date = record.lastTime.substring(0, 10)
+             if (!groups[date]) {
+               groups[date] = { date, records: [] }
+             }
+             groups[date].records.push(record)
+           })
+     
+         return Object.values(groups)
+       },
      // 当前周的星期名称
      currentWeekDays() {
        const weekDays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']