From 9cda4eacb3214db12b492307315da46f7691fa90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E8=BE=89?= <13935151924@163.com> Date: Fri, 14 Nov 2025 12:08:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=91=E5=B8=83=E8=81=8C?= =?UTF-8?q?=E4=BD=8D=E9=80=89=E6=8B=A9=E5=AE=9A=E4=BD=8D=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 23 +++++++++++++- components/keypress/keypress.vue | 52 ++++++++++++++++++++++++++++++++ pages/job/publishJob.vue | 36 ++++++++++++++++++++-- stores/useLocationStore.js | 4 +-- 4 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 components/keypress/keypress.vue diff --git a/.gitignore b/.gitignore index 4dfbe21..7f97abd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,25 @@ /node_modules/ /docs/ /.qoder/ -/.idea/ \ No newline at end of file +/.idea/ +.DS_Store +/dist/ +/build/ +.vscode/ +*.log +*.tmp +*.swp +.env +.env.* +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +/coverage/ +/.nyc_output/ +/.turbo/ +/cache/ +/output/ +/hs_err_pid* +*.local +yarn.lock \ No newline at end of file diff --git a/components/keypress/keypress.vue b/components/keypress/keypress.vue new file mode 100644 index 0000000..4c8de7f --- /dev/null +++ b/components/keypress/keypress.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/pages/job/publishJob.vue b/pages/job/publishJob.vue index 47e8e67..e8ba499 100644 --- a/pages/job/publishJob.vue +++ b/pages/job/publishJob.vue @@ -117,8 +117,8 @@ placeholder="请输入具体工作地址" v-model="formData.jobLocation" /> - - 选择位置 + + @@ -226,6 +226,7 @@ import { storeToRefs } from 'pinia'; import { createRequest } from '@/utils/request'; import useDictStore from '@/stores/useDictStore'; import useUserStore from '@/stores/useUserStore'; +import UniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'; const userStore = useUserStore(); const cachedUserInfo = uni.getStorageSync('userInfo') || {}; // 表单数据 @@ -790,6 +791,37 @@ const validateForm = () => { border-top: 8rpx solid #999; } } + + // 工作地点输入容器样式 + .location-input-container { + display: flex; + align-items: center; + position: relative; + + .location-input { + flex: 1; + padding-right: 80rpx; + } + + .location-icon-btn { + position: absolute; + right: -3px; + top: 20%; + transform: translateY(-50%); + width: 80rpx; + height: 80rpx; + display: flex; + align-items: center; + justify-content: center; + background: transparent; + border: none; + border-radius: 8rpx; + z-index: 99; + &:active { + background: #f0f0f0; + } + } + } } // 企业选择器样式 diff --git a/stores/useLocationStore.js b/stores/useLocationStore.js index e4d2d05..0d2d64c 100644 --- a/stores/useLocationStore.js +++ b/stores/useLocationStore.js @@ -30,12 +30,12 @@ const useLocationStore = defineStore("location", () => { if (config.UsingSimulatedPositioning) { // 使用模拟定位 longitudeVal.value = resd.longitude latitudeVal.value = resd.latitude - msg('用户位置获取成功') + // msg('用户位置获取成功') resole(resd) } else { longitudeVal.value = res.longitude latitudeVal.value = res.latitude - msg('用户位置获取成功') + // msg('用户位置获取成功') resole(res) } },