Browse Source

fix: 修改bug

yezhihao 4 months ago
parent
commit
69ce8571ab

+ 3 - 3
common/queue.js

@@ -517,7 +517,7 @@ module.exports = {
 		return years;
 	},
 	// 筛选求职列表
-	getFilterData: function() {
+	getFilterData: function(key = 'filter') {
 		const condition = {
 			education: '', //学历
 			experience: '', //经验
@@ -526,8 +526,8 @@ module.exports = {
 			companyPeople: '' //公司规模
 		}
 		//获取选中的筛选条件
-		if (uni.getStorageSync('filter') && (uni.getStorageSync('filter')).length > 0) {
-			let filter = uni.getStorageSync('filter')
+		if (uni.getStorageSync(key) && (uni.getStorageSync(key)).length > 0) {
+			let filter = uni.getStorageSync(key)
 			filter.map(item => {
 				let arr = []
 				item.list.map(ite => {

+ 3 - 0
package/screen/screen.vue

@@ -84,6 +84,9 @@
 			if (option.type) {
 				this.type = option.type;
 				this.storageKey = option.type == 1 ? 'filterSearch' : 'filter'
+			}
+			if (option.search) {
+				this.storageKey = 'filterSearch'
 			}
 			if (option.isBrowse) {
 				this.isBrowse = true;

+ 4 - 4
pages/index/game/gameList.vue

@@ -52,9 +52,9 @@
               <!-- 筛选 -->
               <view class="topbg-sx-box-filter flex align-center" :class="{ activeColor: filledFieldsCount }">
                 <text style="margin-right: 10rpx"
-                  @click="goNavs('/package/screen/screen')">筛选{{ filledFieldsCount }}</text>
+                  @click="goNavs('/package/screen/screen?search=1')">筛选{{ filledFieldsCount }}</text>
                 <u-icon name="arrow-down" :color="filledFieldsCount ? '#016bf6' : '#999999'" size="16"
-                  @click="goNavs('/package/screen/screen')"></u-icon>
+                  @click="goNavs('/package/screen/screen?search=1')"></u-icon>
               </view>
             </view>
           </view>
@@ -270,7 +270,7 @@ export default {
     })
     // 监听筛选条件触发getJobSearchList
     uni.$on('updateScreenFilterRecord', () => {
-      const condition = this.$queue.getFilterData()
+      const condition = this.$queue.getFilterData('filterSearch')
       this.education = condition.education //学历
       this.experience = condition.experience //经验
       this.industry = condition.industry //行业
@@ -290,7 +290,7 @@ export default {
     } else {
       this.city = ''
     }
-    const condition = this.$queue.getFilterData()
+    const condition = this.$queue.getFilterData('filterSearch')
     this.education = condition.education //学历
     this.experience = condition.experience //经验
     this.industry = condition.industry //行业

+ 3 - 1
pages/msg/im.vue

@@ -1173,7 +1173,9 @@
 			if (this.userType == 1) {
 				//获取用户是否有该岗位待接受的面试邀请
 				this.recordsInter = setInterval(() => {
-					this.getInterviewList()
+					if (uni.getStorageSync('token')) {
+						this.getInterviewList()
+					}
 				}, 5000)
 			}
 			this.getUserInfo()

+ 2 - 1
pages/msg/index.vue

@@ -398,6 +398,7 @@
 		},
 		onUnload() {
 			uni.$off('chatUnreadCount')
+			if (this.time) clearInterval(this.time)
 		},
 		// //下拉刷新
 		// onPullDownRefresh() {
@@ -859,7 +860,7 @@
 <style lang="scss" scoped>
 	.msg-box {
 		display: flex;
-		flex-direction: column;
+		flex-direction: column;
 		// height: 400px;
 		font-family: DM Sans;
 

+ 2 - 0
pages/my/switchRoles.vue

@@ -62,6 +62,8 @@ export default {
 							that.$Request.postT("/app/user/updateUserEntity", data).then((res) => {
 							  if (res.code == 0) {
 								  uni.setStorageSync("userType", 1);
+								  uni.removeStorageSync('filter')
+								  uni.removeStorageSync('filterSearch')
 								  uni.$emit('changeRole',{userType:index})
 								  uni.navigateBack()
 							  }