diff --git a/components/new-filter-page/new-filter-page.vue b/components/new-filter-page/new-filter-page.vue
new file mode 100644
index 0000000..cda9e06
--- /dev/null
+++ b/components/new-filter-page/new-filter-page.vue
@@ -0,0 +1,424 @@
+
+
+
+
+
+
+
+
+ {{ tab.label }}
+
+
+
+
+
+
+
+ handleSelect('education', e)">
+
+
+
+
+
+
+ handleSelect('experience', e)">
+
+
+
+
+
+
+ handleSelect('scale', e)">
+
+
+
+
+
+
+ handleSelect('area', e)">
+
+
+
+
+
+
+ handleSelect('jobType', e)">
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hook/useColumnCount.js b/hook/useColumnCount.js
index d96017e..c0f075a 100644
--- a/hook/useColumnCount.js
+++ b/hook/useColumnCount.js
@@ -32,25 +32,21 @@ export function useColumnCount(onChange = () => {}) {
// #endif
let count = 2
+ // #ifdef H5
+ // H5端固定显示2列
+ count = 2
+ // #endif
+ // #ifndef H5
if (width >= 1000) {
- // #ifdef H5
- count = 3 // H5端最多显示3列
- // #endif
- // #ifndef H5
count = 5
- // #endif
} else if (width >= 750) {
- // #ifdef H5
- count = 3 // H5端最多显示3列
- // #endif
- // #ifndef H5
count = 4
- // #endif
} else if (width >= 500) {
count = 3
} else {
count = 2
}
+ // #endif
if (count !== columnCount.value) {
columnCount.value = count
diff --git a/packageA/pages/nearby/components/four.vue b/packageA/pages/nearby/components/four.vue
index 7fd0921..43fed3e 100644
--- a/packageA/pages/nearby/components/four.vue
+++ b/packageA/pages/nearby/components/four.vue
@@ -120,7 +120,7 @@ const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
- { value: 3, text: '疆外' },
+ // { value: 3, text: '疆外' },
]);
function choosePosition(index) {
diff --git a/packageA/pages/nearby/components/one.vue b/packageA/pages/nearby/components/one.vue
index cc7277c..7958740 100644
--- a/packageA/pages/nearby/components/one.vue
+++ b/packageA/pages/nearby/components/one.vue
@@ -160,7 +160,7 @@ const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
- { value: 3, text: '疆外' },
+ // { value: 3, text: '疆外' },
]);
function changeRangeShow() {
diff --git a/packageA/pages/nearby/components/three.vue b/packageA/pages/nearby/components/three.vue
index 779c511..58ff43d 100644
--- a/packageA/pages/nearby/components/three.vue
+++ b/packageA/pages/nearby/components/three.vue
@@ -190,7 +190,7 @@ const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
- { value: 3, text: '疆外' },
+ // { value: 3, text: '疆外' },
]);
onLoad(() => {
getSubway();
diff --git a/packageA/pages/nearby/components/two.vue b/packageA/pages/nearby/components/two.vue
index 616c11e..7943a22 100644
--- a/packageA/pages/nearby/components/two.vue
+++ b/packageA/pages/nearby/components/two.vue
@@ -134,7 +134,7 @@ const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
- { value: 3, text: '疆外' },
+ // { value: 3, text: '疆外' },
]);
function choosePosition(index) {
diff --git a/packageRc/components/PopupLists.vue b/packageRc/components/PopupLists.vue
index 19f2a40..a52a462 100644
--- a/packageRc/components/PopupLists.vue
+++ b/packageRc/components/PopupLists.vue
@@ -1,5 +1,5 @@
-
+
-
清空
@@ -78,7 +69,7 @@
查询
@@ -103,7 +94,8 @@ export default {
params: "",
fijItem: "",
outData: [],
- nickName: ''
+ nickName: '',
+ isH5: false
};
},
watch: {
@@ -115,9 +107,17 @@ export default {
},
},
mounted() {
- if (uni.getStorageSync("userInfo")) {
- let userInfo = JSON.parse(uni.getStorageSync("userInfo"));
- this.nickName = userInfo.userName ? userInfo.userName : "";
+ // #ifdef H5
+ this.isH5 = true;
+ // #endif
+ const rawUserInfo = uni.getStorageSync("userInfo");
+ if (rawUserInfo) {
+ try {
+ let userInfo = typeof rawUserInfo === 'string' ? JSON.parse(rawUserInfo) : rawUserInfo;
+ this.nickName = userInfo.userName || userInfo.name || "";
+ } catch (e) {
+ console.error("解析用户信息失败", e);
+ }
}
},
methods: {
@@ -257,7 +257,7 @@ export default {
overflow: hidden;
flex-wrap: nowrap;
width: 100%;
- z-index: 9;
+ z-index: 105; /* 增加层级,确保在筛选条上方而不被遮挡 */
.tabItem {
line-height: 56rpx;
@@ -280,7 +280,7 @@ export default {
right: 0;
width: 87rpx;
height: 56rpx;
- // background: linear-gradient(270deg, #2A51DF 0%, rgba(66, 110, 230, 0) 100%);
+ z-index: 100; /* 确保图标可点击 */
}
.tabrightBtn {
@@ -309,7 +309,6 @@ export default {
border: 1rpx solid #CAD4E2;
box-sizing: border-box;
}
-
.popupItem-active {
padding: 0 32rpx;
text-align: center;
@@ -329,15 +328,6 @@ export default {
}
}
-.dispalyF {
- display: flex;
- align-items: center;
-}
-
-.rightView :last-child {
- margin-right: 100rpx !important;
-}
-
.bottom-search {
margin-top:56rpx;
display: flex;
@@ -372,4 +362,73 @@ export default {
justify-content: center;
}
}
+
+/* #ifdef H5 */
+.h5-pc-page {
+ .tabList {
+ padding: 12px 0 !important;
+ background: #f5f7fa !important;
+ border-radius: 12px !important;
+ white-space: nowrap !important;
+ overflow: hidden !important;
+ display: flex !important;
+ }
+ .tabList .tabItem {
+ display: inline-block !important;
+ font-size: 20px !important;
+ line-height: 48px !important;
+ height: 48px !important;
+ padding: 0 24px !important;
+ border-radius: 24px !important;
+ width: auto !important;
+ min-width: 100px !important; /* 减小最小宽度,防止溢出 */
+ margin-right: 12px !important;
+ vertical-align: middle;
+ background-color: #ffffff !important;
+ flex-shrink: 0 !important;
+ box-sizing: border-box !important;
+ }
+ .tabItem.popupItem-active {
+ background-color: #1a62ce !important;
+ color: #fff !important;
+ }
+ .tabTitle {
+ font-size: 20px !important;
+ margin: 16px 0 12px !important;
+ font-weight: 600;
+ display: block !important;
+ }
+ .filter-options-container {
+ display: flex !important;
+ flex-wrap: wrap !important;
+ margin-top: 8px !important;
+ min-height: 40px !important;
+ }
+ /* 仅针对展开后的筛选列表应用网格项样式,避免影响顶部 Tab */
+ .popupList .popupItem,
+ .popupList .popupItem-active {
+ display: inline-flex !important;
+ align-items: center !important;
+ justify-content: center !important;
+ font-size: 20px !important;
+ line-height: 1.2 !important;
+ padding: 10px 24px !important;
+ margin: 0 16px 16px 0 !important;
+ border-radius: 8px !important;
+ border: 1px solid #CAD4E2 !important;
+ min-width: 140px !important;
+ height: auto !important;
+ }
+ .popupItem-active {
+ background-color: #1a62ce !important;
+ color: #fff !important;
+ border-color: #1a62ce !important;
+ }
+ .bottom-search .search-left, .bottom-search .search-right {
+ font-size: 20px !important;
+ height: 54px !important;
+ line-height: 54px !important;
+ }
+}
+/* #endif */
diff --git a/packageRc/pages/index/index.vue b/packageRc/pages/index/index.vue
index aa91a1d..479f683 100644
--- a/packageRc/pages/index/index.vue
+++ b/packageRc/pages/index/index.vue
@@ -5,7 +5,7 @@
-->
-
+
@@ -54,7 +54,7 @@
{{item.minSalary}}-{{item.maxSalary}}/月
- 发布日期:{{ item.postingDate }}
+ 发布日期:{{ item.postingDate }}
{{ item.jobTitle }}
@@ -67,7 +67,7 @@
{{ item.jobLocation }}
- {{item.vacancies}}人
+ {{item.vacancies}}人
{{ item.companyName }}
@@ -78,7 +78,7 @@
政策专区
- {{'查看更多 >'}}
+ {{'查看更多 >'}}
推荐
@@ -90,8 +90,8 @@
{{item.sourceUnit}}
- 发布日期:{{item.createTime}}
- 浏览量:{{item.viewNum || 0}}
+ 发布日期:{{item.createTime}}
+ 浏览量:{{item.viewNum || 0}}
@@ -103,6 +103,13 @@
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction');
+const isH5 = ref(false);
+const uniIconSize = ref(18);
+// #ifdef H5
+isH5.value = true;
+uniIconSize.value = 20;
+// #endif
+
import { getPolicyList } from '@/packageRc/apiRc/policy';
let policyList = ref([])
function getPolicy() {
@@ -341,10 +348,10 @@ view{box-sizing: border-box;display: block;}
position: relative;
.sign{
position: absolute;
- font-size: 24rpx;
+ font-size: 28rpx;
right: 0;
top: 0;
- padding: 4rpx 14rpx;
+ padding: 8rpx 20rpx;
border: 1rpx solid #EC4827;
background: rgba(227, 79, 49, 0.09);
border-top-right-radius: 24rpx;
@@ -428,65 +435,109 @@ view{box-sizing: border-box;display: block;}
/* #ifdef H5 */
.h5-pc-container {
& > view {
- width: 80% !important;
+ width: 100% !important;
margin: 0 auto !important;
- padding-left: 0 !important;
- padding-right: 0 !important;
+ padding-left: 32px !important;
+ padding-right: 32px !important;
+ padding-top: 0 !important; /* 彻底移除顶部补白 */
+ box-sizing: border-box !important;
}
.showtab {
- margin-bottom: 80rpx;
- height: 300rpx;
+ margin-top: 0 !important; /* 移除卡片顶部间距 */
+ margin-bottom: 120rpx;
+ height: 340rpx;
.tabItem {
- height: 300rpx !important;
+ height: 340rpx !important;
image:first-child {
width: 100%;
height: 100%;
object-fit: contain;
}
}
+ .activeImg {
+ width: 160rpx !important;
+ height: 20rpx !important;
+ bottom: -40rpx !important;
+ }
}
.tabs {
margin-bottom: 80rpx;
height: 120rpx;
+ border-radius: 20rpx !important;
+ background: #f8faff !important;
+ box-shadow: 0px 4rpx 15rpx rgba(0, 0, 0, 0.04);
.tab {
- line-height: 112rpx !important;
- font-size: 38rpx !important;
- font-weight: bold;
+ width: 33.3% !important;
+ line-height: 120rpx !important;
+ font-size: 20px !important;
+ border-radius: 16rpx !important;
}
}
.titles {
- margin-bottom: 80rpx;
+ margin-top: 40rpx;
+ margin-bottom: 60rpx;
.title-item {
- font-size: 42rpx !important;
- margin-right: 80rpx !important;
+ font-size: 24px !important;
+ font-weight: 600;
+ margin-right: 100rpx !important;
>view {
- padding: 0 24rpx !important;
+ padding: 0 16rpx !important;
}
+ &::after {
+ height: 24rpx !important;
+ bottom: -12rpx !important;
+ width: 110% !important;
+ }
+ }
+ .more-link {
+ font-size: 20px !important;
+ color: #A2A2A2;
}
}
.job-list {
- padding: 48rpx !important;
- margin-bottom: 40rpx !important;
+ padding: 48rpx 40rpx !important;
+ margin-bottom: 32rpx !important;
+ border-radius: 24rpx !important;
+ border: 1px solid #f0f0f0;
+ box-shadow: 0px 2rpx 10rpx rgba(0, 0, 0, 0.02);
+ .sign {
+ font-size: 20px !important;
+ padding: 8rpx 20rpx !important;
+ }
}
.title {
- font-size: 42rpx !important;
+ font-size: 24px !important;
+ font-weight: 600;
+ margin-bottom: 24rpx !important;
}
.infos view {
- font-size: 34rpx !important;
- line-height: 56rpx !important;
- padding: 8rpx 24rpx !important;
+ font-size: 20px !important;
+ line-height: 1.5 !important;
+ padding: 10rpx 24rpx !important;
+ margin-bottom: 12rpx;
+ background: #f5f5f5 !important;
+ border-radius: 12rpx !important;
}
.salary {
- font-size: 40rpx !important;
+ font-size: 24px !important;
+ font-weight: 600;
+ }
+ .time {
+ font-size: 20px !important; /* 发布日期字号放大 */
}
.bottom-line {
- font-size: 32rpx !important;
- margin-top: 24rpx !important;
+ font-size: 20px !important;
+ margin-top: 20rpx !important;
+ }
+ .view-more-btn {
+ font-size: 24px !important; /* 查看更多字号放大 */
+ padding: 20rpx 80rpx !important;
+ border-radius: 60rpx !important;
}
}
/* #endif */
diff --git a/packageRc/pages/policy/policyDetail.vue b/packageRc/pages/policy/policyDetail.vue
index 2ca71b0..e23bd2f 100644
--- a/packageRc/pages/policy/policyDetail.vue
+++ b/packageRc/pages/policy/policyDetail.vue
@@ -1,5 +1,5 @@
-
+
@@ -102,9 +102,15 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
return {
policyDetail: {},
loading: false,
+ isH5: false,
+ isPc: false,
}
},
onLoad(options) {
+ // #ifdef H5
+ this.isH5 = true;
+ this.isPc = true;
+ // #endif
this.getPolicy(options.id);
},
onShow() {
@@ -360,29 +366,52 @@ import { getPolicyDetail } from "@/packageRc/apiRc/policy";
padding-right: 0 !important;
}
.title-line {
- font-size: 52rpx !important;
+ font-size: 24px !important;
+ font-weight: 600;
line-height: 1.4 !important;
}
.infos {
- font-size: 38rpx !important;
+ font-size: 20px !important;
line-height: 1.8 !important;
.info {
margin-top: 10rpx !important;
}
}
.main-ceontent-list-item-title {
- font-size: 42rpx !important;
- line-height: 60rpx !important;
+ font-size: 24px !important;
+ font-weight: 600;
+ line-height: 1.6 !important;
margin-bottom: 24rpx !important;
}
.main-ceontent-list-item-content {
- font-size: 38rpx !important;
- line-height: 56rpx !important;
+ font-size: 20px !important;
+ line-height: 1.6 !important;
padding: 24rpx !important;
}
.tag {
- font-size: 34rpx !important;
+ font-size: 20px !important;
}
+ .main-ceontent-list-title {
+ font-size: 24px !important;
+ font-weight: 600 !important;
+ }
+ .part-title {
+ font-size: 24px !important;
+ font-weight: 600 !important;
+ }
+ .part-info {
+ font-size: 20px !important;
+ }
+ .notice-list .title {
+ font-size: 24px !important;
+ font-weight: 600 !important;
+ }
+ .notice-content {
+ font-size: 20px !important;
+ }
+ .enclosure-item {
+ font-size: 20px !important;
+ }
}
/* #endif */
diff --git a/packageRc/pages/policy/policyList.vue b/packageRc/pages/policy/policyList.vue
index 80f95e8..db1eff4 100644
--- a/packageRc/pages/policy/policyList.vue
+++ b/packageRc/pages/policy/policyList.vue
@@ -1,6 +1,6 @@
- 共 {{ total }} 条
+ 共 {{ total }} 条
{{ item.sourceUnit }}
- 发文日期:{{ item.publishTime }}
- 浏览量:{{ item.viewNum || 0 }}
+
+
+ 发文日期:{{ item.publishTime }}
+
+
+
+ 浏览量:{{ item.viewNum || 0 }}
+
@@ -85,11 +85,8 @@
src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
style="width: 100%; display: block; margin: 0 auto"
/>
-
- 加载中~
+
+
+
+ showNewFilter = value"
+ />
@@ -601,6 +608,7 @@ import useDictStore from '@/stores/useDictStore';
const { getTransformChildren, oneDictData, dictLabel: getDictLabel, industryLabel } = useDictStore();
import useLocationStore from '@/stores/useLocationStore';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
+import newFilterPage from '@/components/new-filter-page/new-filter-page.vue';
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
import { useScrollDirection } from '@/hook/useScrollDirection';
import { useColumnCount } from '@/hook/useColumnCount';
@@ -724,6 +732,7 @@ const inputText = ref('');
const showFilter = ref(false);
const selectFilterModel = ref(null);
const showModel = ref(false);
+const showNewFilter = ref(false);
// 选中的城市
const selectedCity = ref({ code: '', name: '' });
const rangeOptions = ref([
@@ -882,14 +891,7 @@ const handleLoginSuccess = () => {
getIsFourLevelLinkagePurview()
};
// H5环境下从URL获取token并自动登录
-onLoad(() => {
- // #ifdef H5
- const token = uni.getStorageSync('zkr-token');
- if (token) {
- useUserStore().loginSetToken(token);
- }
- // #endif
-});
+// onLoad 函数已移至下方,包含筛选参数处理
// 处理附近工作点击
const handleNearbyClick = (options ) => {
@@ -1088,34 +1090,65 @@ function navToService(serviceType) {
function openFilter() {
isInteractingWithFilter.value = true;
- showFilter.value = true;
+ showNewFilter.value = true;
emits('onShowTabbar', false);
- selectFilterModel.value?.open({
- title: '筛选',
- maskClick: true,
- success: (values) => {
- pageState.search = {
- ...pageState.search,
- };
- for (const [key, value] of Object.entries(values)) {
- // 特殊处理岗位类型,直接传递数字值
+}
+
+function handleNewFilterConfirm(values) {
+ pageState.search = {
+ ...pageState.search,
+ };
+ for (const [key, value] of Object.entries(values)) {
+ // 特殊处理岗位类型,直接传递数字值
+ if (key === 'jobType') {
+ pageState.search.type = value;
+ } else if (value) {
+ pageState.search[key] = value;
+ } else {
+ // 如果值为空,删除该搜索条件
+ delete pageState.search[key];
+ }
+ }
+ showNewFilter.value = false;
+ getJobList('refresh');
+ // 短暂延迟后解除交互锁,避免数据刷新导致顶部区域回弹
+ setTimeout(() => { isInteractingWithFilter.value = false; }, 400);
+ emits('onShowTabbar', true);
+}
+
+// 监听页面加载,接收筛选参数
+onLoad((options) => {
+ // #ifdef H5
+ const token = uni.getStorageSync('zkr-token');
+ if (token) {
+ useUserStore().loginSetToken(token);
+ }
+ // #endif
+
+ // 接收从筛选页面传递过来的参数
+ if (options.filterParams) {
+ try {
+ const filterParams = JSON.parse(options.filterParams);
+ console.log('filterParams:', filterParams);
+ for (const [key, value] of Object.entries(filterParams)) {
if (key === 'jobType') {
- pageState.search.type = value.join(',');
- } else {
- pageState.search[key] = value.join(',');
+ pageState.search.type = value;
+ } else if (value) {
+ pageState.search[key] = value;
}
}
- showFilter.value = false;
+ console.log('pageState.search:', pageState.search);
getJobList('refresh');
- // 短暂延迟后解除交互锁,避免数据刷新导致顶部区域回弹
- setTimeout(() => { isInteractingWithFilter.value = false; }, 400);
- },
- cancel: () => {
- showFilter.value = false;
- emits('onShowTabbar', true);
- setTimeout(() => { isInteractingWithFilter.value = false; }, 200);
- },
- });
+ } catch (error) {
+ console.error('解析筛选参数失败:', error);
+ }
+ }
+});
+
+function handleNewFilterClose() {
+ showNewFilter.value = false;
+ emits('onShowTabbar', true);
+ setTimeout(() => { isInteractingWithFilter.value = false; }, 200);
}
function handleFilterConfirm(e) {
diff --git a/stores/useDictStore.js b/stores/useDictStore.js
index eeead1d..f74bac9 100644
--- a/stores/useDictStore.js
+++ b/stores/useDictStore.js
@@ -50,7 +50,7 @@ const useDictStore = defineStore("dict", () => {
return data
})
}
- const [education, experience, area, scale, sex, affiliation, nature, noticeType] =
+ const [education, experience, area, scale, sex, affiliation, nature, noticeType] =
await Promise.all([
getDictSelectOption('education'),
getDictSelectOption('experience'),
@@ -74,6 +74,17 @@ const useDictStore = defineStore("dict", () => {
getIndustryDict() // 获取行业
} catch (error) {
console.error('Error fetching dictionary data:', error);
+ // 确保即使出错也能返回空数组
+ if (!dictType && !dictName) {
+ state.education = [];
+ state.experience = [];
+ state.area = [];
+ state.scale = [];
+ state.sex = [];
+ state.affiliation = [];
+ state.nature = [];
+ state.noticeType = [];
+ }
}
};
@@ -97,31 +108,31 @@ const useDictStore = defineStore("dict", () => {
return null
}
- function dictLabel(dictType, value) {
- if (state[dictType] && Array.isArray(state[dictType])) {
- for (let i = 0; i < state[dictType].length; i++) {
- let element = state[dictType][i];
- if (element.value === value) {
- return element.label
- }
- }
- }
- return ''
+ function dictLabel(dictType, value) {
+ if (state[dictType] && Array.isArray(state[dictType])) {
+ for (let i = 0; i < state[dictType].length; i++) {
+ let element = state[dictType][i];
+ if (element.value === value) {
+ return element.label
+ }
+ }
+ }
+ return ''
}
- function oneDictData(dictType, value) {
- if (!value) {
- return state[dictType]
- }
- if (state[dictType]) {
- for (let i = 0; i < state[dictType].length; i++) {
- let element = state[dictType][i];
- if (element.value === value) {
- return element
- }
- }
- }
- return null
+ function oneDictData(dictType, value) {
+ if (!value) {
+ return state[dictType]
+ }
+ if (state[dictType]) {
+ for (let i = 0; i < state[dictType].length; i++) {
+ let element = state[dictType][i];
+ if (element.value === value) {
+ return element
+ }
+ }
+ }
+ return null
}
function getTransformChildren(dictType, title = '', key = '') {
@@ -129,7 +140,7 @@ const useDictStore = defineStore("dict", () => {
return {
label: title,
key: key || dictType,
- options: state[dictType],
+ options: state[dictType] || [],
}
}
return null
diff --git a/utilsRc/config.js b/utilsRc/config.js
index 64eccf5..8813e80 100644
--- a/utilsRc/config.js
+++ b/utilsRc/config.js
@@ -11,6 +11,7 @@ let exports = {
// ========== baseUrl 配置方式选择 ==========
// 方式1:硬编码baseUrl(main分支使用,合并到main时不会影响现有功能)
baseUrl: 'https://www.xjksly.cn/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
+ // baseUrl: 'http://cffe7966.natappfree.cc', // 正式环境在济南人才上部署(不要轻易连接)
// baseUrl: 'http://10.160.0.5:8907', // 开发环境
// baseUrl: 'http://172.20.1.48:8903', // 开发环境