diff --git a/App.vue b/App.vue index c672275..816483e 100644 --- a/App.vue +++ b/App.vue @@ -25,9 +25,9 @@ onLaunch((options) => { }); }); } else { - uni.redirectTo({ - url: '/pages/login/login', - }); + // uni.redirectTo({ + // url: '/pages/login/login', + // }); } }); diff --git a/components/selectFilter/selectFilter.vue b/components/selectFilter/selectFilter.vue index 5741750..ed0d4d3 100644 --- a/components/selectFilter/selectFilter.vue +++ b/components/selectFilter/selectFilter.vue @@ -75,10 +75,10 @@ const { getTransformChildren } = useDictStore(); // 岗位类型数据 const getJobTypeData = () => { return [ - { label: '常规岗位', value: 'regular', text: '常规岗位' }, - { label: '就业见习岗位', value: 'internship', text: '就业见习岗位' }, - { label: '实习实训岗位', value: 'training', text: '实习实训岗位' }, - { label: '社区实践岗位', value: 'community', text: '社区实践岗位' } + { label: '常规岗位', value: 0, text: '常规岗位' }, + { label: '就业见习岗位', value: 1, text: '就业见习岗位' }, + { label: '实习实训岗位', value: 2, text: '实习实训岗位' }, + { label: '社区实践岗位', value: 3, text: '社区实践岗位' } ]; }; diff --git a/manifest.json b/manifest.json index ad1d54f..5d93f05 100644 --- a/manifest.json +++ b/manifest.json @@ -1,102 +1,102 @@ -{ - "name": "qingdao-employment-service", - "appid": "__UNI__C939371", - "description": "招聘", - "versionName": "1.0.0", - "versionCode": "100", - "transformPx": false, - /* 5+App特有相关 */ - "app-plus": { - "usingComponents": true, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - /* 模块配置 */ - "modules": {}, - /* 应用发布信息 */ - "distribute": { - /* android打包配置 */ - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - /* ios打包配置 */ - "ios": {}, - /* SDK配置 */ - "sdkConfigs": {} - } - }, - /* 快应用特有相关 */ - "quickapp": {}, - /* 小程序特有相关 */ - "mp-weixin": { - "appid": "", - "setting": { - "urlCheck": false, - "es6": true, - "postcss": true, - "minified": true - }, - "usingComponents": true, - "permission": { - "scope.userLocation": { - "desc": "用于用户选择地图查看位置" - } - } - }, - "mp-alipay": { - "usingComponents": true - }, - "mp-baidu": { - "usingComponents": true - }, - "mp-toutiao": { - "usingComponents": true - }, - "uniStatistics": { - "enable": false - }, - "vueVersion": "3", - "locale": "zh-Hans", - "h5": { - "router": { - "base": "/ks_app/", - "mode": "hash" - }, - "title": "青岛智慧就业服务", - "optimization": { - "treeShaking": { - "enable": true - } - }, - "sdkConfigs": { - "maps": { - "amap": { - "key": "9cfc9370bd8a941951da1cea0308e9e3", - "securityJsCode": "7b16386c7f744c3ca05595965f2b037f", - "serviceHost": "" - } - } - } - } -} \ No newline at end of file +{ + "name" : "qingdao-employment-service", + "appid" : "__UNI__C939371", + "description" : "招聘", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx9d1cbc11c8c40ba7", + "setting" : { + "urlCheck" : false, + "es6" : true, + "postcss" : true, + "minified" : true + }, + "usingComponents" : true, + "permission" : { + "scope.userLocation" : { + "desc" : "用于用户选择地图查看位置" + } + } + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3", + "locale" : "zh-Hans", + "h5" : { + "router" : { + "base" : "/ks_app/", + "mode" : "hash" + }, + "title" : "青岛智慧就业服务", + "optimization" : { + "treeShaking" : { + "enable" : true + } + }, + "sdkConfigs" : { + "maps" : { + "amap" : { + "key" : "9cfc9370bd8a941951da1cea0308e9e3", + "securityJsCode" : "7b16386c7f744c3ca05595965f2b037f", + "serviceHost" : "" + } + } + } + } +} diff --git a/pages/index/components/index-one.vue b/pages/index/components/index-one.vue index d2472be..cb79017 100644 --- a/pages/index/components/index-one.vue +++ b/pages/index/components/index-one.vue @@ -373,12 +373,21 @@ function clearfindJob(job) { } function nextDetail(job) { - // 记录岗位类型,用作数据分析 - if (job.jobCategory) { - const recordData = recommedIndexDb.JobParameter(job); - recommedIndexDb.addRecord(recordData); + // 登录 + let token = uni.getStorageSync('token') || ''; // 同步获取 缓存信息 + if (token) { + // 记录岗位类型,用作数据分析 + if (job.jobCategory) { + const recordData = recommedIndexDb.JobParameter(job); + recommedIndexDb.addRecord(recordData); + } + navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`); + } else { + uni.redirectTo({ + url: '/pages/login/login', + }); } - navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`); + } function navToService(serviceType) { @@ -422,7 +431,12 @@ function openFilter() { ...pageState.search, }; for (const [key, value] of Object.entries(values)) { - pageState.search[key] = value.join(','); + // 特殊处理岗位类型,直接传递数字值 + if (key === 'jobType') { + pageState.search.type = value.join(','); + } else { + pageState.search[key] = value.join(','); + } } showFilter.value = false; getJobList('refresh'); diff --git a/pages/index/index.vue b/pages/index/index.vue index 46e0c9a..b7282a7 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -22,7 +22,7 @@ import { useReadMsg } from '@/stores/useReadMsg'; const { unreadCount } = storeToRefs(useReadMsg()); onLoad(() => { - useReadMsg().fetchMessages(); + // useReadMsg().fetchMessages(); }); diff --git a/pages/login/login.vue b/pages/login/login.vue index 3e0f4c0..3ceab23 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -56,9 +56,17 @@ 学历 - + 身份证 - + + {{ idCardError }} + ✓ 身份证格式正确 下一步 @@ -130,7 +138,7 @@ const openSelectPopup = inject('openSelectPopup'); // console.log(config.appInfo.areaName); // status const selectJobsModel = ref(); -const tabCurrent = ref(0); +const tabCurrent = ref(1); const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100]; const state = reactive({ station: [], @@ -154,6 +162,9 @@ const fromValue = reactive({ idcard: '', }); +// 身份证校验相关 +const idCardError = ref(''); + onLoad((parmas) => { getTreeselect(); }); @@ -163,6 +174,26 @@ onMounted(() => {}); function changeSex(sex) { fromValue.sex = sex; } + +// 身份证实时校验 +function validateIdCard() { + const idCard = fromValue.idcard.trim(); + + // 如果为空,清除错误信息 + if (!idCard) { + idCardError.value = ''; + return; + } + + // 使用身份证校验器进行校验 + const result = IdCardValidator.validate(idCard); + + if (result.valid) { + idCardError.value = ''; + } else { + idCardError.value = result.message; + } +} function changeExperience() { openSelectPopup({ title: '工作经验', @@ -239,6 +270,19 @@ function changeJobs() { } function nextStep() { + // 校验身份证号码 + const idCard = fromValue.idcard.trim(); + if (!idCard) { + $api.msg('请输入身份证号码'); + return; + } + + const result = IdCardValidator.validate(idCard); + if (!result.valid) { + $api.msg(result.message); + return; + } + tabCurrent.value += 1; } @@ -451,6 +495,19 @@ function complete() { border-radius: 2rpx background: #697279; transform: rotate(45deg) + .error-message + color: #ff4757; + font-size: 24rpx; + margin-top: 10rpx; + line-height: 1.4; + .success-message + color: #2ed573; + font-size: 24rpx; + margin-top: 10rpx; + line-height: 1.4; + .input-error + .input-con2 + border-bottom-color: #ff4757; .content-sex height: 110rpx; display: flex diff --git a/stores/useUserStore.js b/stores/useUserStore.js index 776df76..1ca1a52 100644 --- a/stores/useUserStore.js +++ b/stores/useUserStore.js @@ -101,7 +101,7 @@ const useUserStore = defineStore("user", () => { token.value = value uni.setStorageSync('token', value); // 获取消息列表 - useReadMsg().fetchMessages() + // useReadMsg().fetchMessages() // 获取用户信息 return getUserResume() } diff --git a/unpackage/dist/dev/mp-weixin/project.config.json b/unpackage/dist/dev/mp-weixin/project.config.json index ce243f5..aedc1c8 100644 --- a/unpackage/dist/dev/mp-weixin/project.config.json +++ b/unpackage/dist/dev/mp-weixin/project.config.json @@ -13,7 +13,7 @@ }, "compileType": "miniprogram", "libVersion": "", - "appid": "touristappid", + "appid": "wx9d1cbc11c8c40ba7", "projectname": "qingdao-employment-service", "condition": { "search": {