diff --git a/App.vue b/App.vue index 7601e92..620f282 100644 --- a/App.vue +++ b/App.vue @@ -10,6 +10,7 @@ const { $api, navTo, appendScriptTagElement, aes_Decrypt, sm2_Decrypt, safeReLau import config from '@/config.js'; import baseDB from '@/utils/db.js'; import { $confirm } from '@/utils/modal.js'; +import useLocationStore from '@/stores/useLocationStore'; usePageAnimation(); const appword = 'aKd20dbGdFvmuwrt'; // 固定值 let uQRListen = null; @@ -31,6 +32,7 @@ onLaunch((options) => { useUserStore().logOutApp(); useUserStore().changMiniProgramAppStatus(true); useUserStore().changMachineEnv(true); + useLocationStore().getLocation(); uQRListen = new IncreaseRevie(); inactivityManager = new GlobalInactivityManager(handleInactivity, 60 * 1000); inactivityManager.start(); diff --git a/components/tabbar/midell-box.vue b/components/tabbar/midell-box.vue index 9074a40..c399526 100644 --- a/components/tabbar/midell-box.vue +++ b/components/tabbar/midell-box.vue @@ -19,11 +19,14 @@ diff --git a/config.js b/config.js index b005721..81e429f 100644 --- a/config.js +++ b/config.js @@ -59,7 +59,7 @@ export default { allowedFileTypes: [ "text/plain", // .txt "text/markdown", // .md - "text/html", // .html + // "text/html", // .html "application/msword", // .doc "application/vnd.openxmlformats-officedocument.wordprocessingml.document", // .docx "application/pdf", // .pdf diff --git a/manifest.json b/manifest.json index e4373ed..a7a63da 100644 --- a/manifest.json +++ b/manifest.json @@ -1,105 +1,105 @@ -{ - "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": "./", - "mode": "hash" - }, - "title": "青岛智慧就业服务", - "optimization": { - "treeShaking": { - "enable": true - } - }, - "sdkConfigs": { - "maps": { - "amap": { - "key": "9cfc9370bd8a941951da1cea0308e9e3", - "securityJsCode": "7b16386c7f744c3ca05595965f2b037f", - "serviceHost": "" - } - } - }, - "devServer": { - "https": false - } - } -} \ No newline at end of file +{ + "name" : "qingdao-employment-service", + "appid" : "__UNI__2496162", + "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" : "./", + "mode" : "hash" + }, + "title" : "青岛智慧就业服务", + "optimization" : { + "treeShaking" : { + "enable" : true + } + }, + "sdkConfigs" : { + "maps" : { + "amap" : { + "key" : "9cfc9370bd8a941951da1cea0308e9e3", + "securityJsCode" : "7b16386c7f744c3ca05595965f2b037f", + "serviceHost" : "" + } + } + }, + "devServer" : { + "https" : false + } + } +} diff --git a/packageA/pages/addPosition/addPosition.vue b/packageA/pages/addPosition/addPosition.vue index 1b543ff..5993cb6 100644 --- a/packageA/pages/addPosition/addPosition.vue +++ b/packageA/pages/addPosition/addPosition.vue @@ -5,6 +5,7 @@ + @@ -74,7 +75,7 @@ const { $api, navBack } = inject('globalFunction'); import { storeToRefs } from 'pinia'; import useUserStore from '@/stores/useUserStore'; const { getUserResume } = useUserStore(); -const { userInfo, isMiniProgram } = storeToRefs(useUserStore()); +const { userInfo, isMiniProgram ,hasLogin,isMachineEnv} = storeToRefs(useUserStore()); const popup = ref(null); const selectJobsModel = ref(null); @@ -83,6 +84,7 @@ const dataSource = ref([]); const filterList = ref([]); const dataItem = ref(null); const inputVal = ref(''); +const searchFocus = ref(false); onLoad(() => { getTree(); @@ -93,12 +95,14 @@ function close() { } function handleBlur() { + searchFocus.value = false setTimeout(() => { filterList.value = []; }, 100); } function handleFocus() { + searchFocus.value = true const val = inputVal.value.toLowerCase(); if (val && dataSource.value) { filterList.value = dataSource.value.filter((item) => item.lable.toLowerCase().search(val) !== -1); @@ -141,6 +145,10 @@ function deleteItem(item, index) { } function changeJobs() { + if(isMachineEnv.value && !hasLogin.value){ + useUserStore().logOut() + return + } selectJobsModel.value?.open({ title: '添加岗位', maskClick: true, @@ -217,6 +225,7 @@ function flattenTree(treeData, parentPath = '') { align-items: center; padding: 0 24rpx; position: relative; + z-index:10; .search-input{ flex: 1; padding: 0 20rpx; @@ -261,6 +270,15 @@ function flattenTree(treeData, parentPath = '') { width: 100%; } } +.search-mask{ + position fixed; + width 100vw; + height:100vh; + top:0; + left:0 + z-index:9; + background: #33333355; +} .main{ padding: 54rpx 28rpx 28rpx 28rpx .content-list{ diff --git a/pages/chat/components/ai-paging.vue b/pages/chat/components/ai-paging.vue index d3d3011..e3e6101 100644 --- a/pages/chat/components/ai-paging.vue +++ b/pages/chat/components/ai-paging.vue @@ -44,7 +44,7 @@ class="msg-files btn-light" v-for="(file, vInex) in msg.files" :key="vInex" - @click="jumpUrl(file)" + @click="handleMsgFileClick(file)" > {{ file.name || '附件' }} @@ -216,9 +216,10 @@ > @@ -241,7 +242,7 @@ - + @@ -341,6 +342,10 @@ const audiowaveStyle = computed(() => { : '#f1f1f1'; }); +const leaveFileCount = computed(()=>{ //还剩多少文件可以上传 给扫码传参使用 + return config.allowedFileNumber - filesList.value.length +}) + onMounted(async () => { changeQueries(); scrollToBottom(); @@ -484,11 +489,40 @@ function isFile(type) { function jumpUrl(file) { if (file.url) { - window.open(file.url); + if(!isMachineEnv.value)window.open(file.url); + else $api.msg('该文件无法预览'); } else { $api.msg('文件地址丢失'); } } +function preViewImage(file) { + if (file.url) { + uni.previewImage({ + urls: [file.url] + }) + } else { + $api.msg('文件地址丢失'); + } +} +function handleMsgFileClick(file) { + if(isImage(file.type)){ + if (file.url) { + uni.previewImage({ + urls: [file.url] + }) + } else { + $api.msg('文件地址丢失'); + } + }else{ + if (file.url) { + if(!isMachineEnv.value)window.open(file.url); + else $api.msg('该文件无法预览'); + } else { + $api.msg('文件地址丢失'); + } + } +} + function VerifyNumberFiles(num) { if (filesList.value.length >= config.allowedFileNumber) { @@ -535,7 +569,7 @@ function getUploadFile(type = 'camera') { const allowedTypes = config.allowedFileTypes || []; const size = $api.formatFileSize(file.size); if (!allowedTypes.includes(file.type)) { - return $api.msg('仅支持 txt md html word pdf ppt csv excel 格式类型'); + return $api.msg('仅支持 txt md word pdf ppt csv excel 格式类型'); } // 继续上传 $api.uploadFile(tempFilePaths[0], true).then((resData) => { @@ -553,20 +587,19 @@ function getUploadFile(type = 'camera') { } const handleFileSend = (rows)=>{ - filesList.value = [] try { rows.map(item=>{ if(isImage(item.fileSuffix)){ filesList.value.push({ url: item.fileUrl, type: item.fileSuffix, - name: item.fileName, + name: item.originalName, }); }else{ filesList.value.push({ url: item.fileUrl, type: item.fileSuffix, - name: item.fileName, + name: item.originalName, }); } }) @@ -639,8 +672,12 @@ function changeVoice() { function changeShowFile() { if(isMachineEnv.value){ - qrcodeRef.value?.open() - return + if (filesList.value.length >= config.allowedFileNumber){ + return $api.msg(`最大上传文件数量 ${config.allowedFileNumber} 个`); + }else{ + qrcodeRef.value?.open() + return + } } showfile.value = !showfile.value; } @@ -1118,7 +1155,7 @@ image-margin-top = 40rpx color: #7B7B7B; max-width: 100% .file-iconImg - height: 100% + // height: 100% width: 100% .filerow display: flex diff --git a/pages/chat/components/fileText.vue b/pages/chat/components/fileText.vue index c65d2ce..c4b6c5f 100644 --- a/pages/chat/components/fileText.vue +++ b/pages/chat/components/fileText.vue @@ -32,7 +32,16 @@ const fileAbbreviation = computed(() => { 'xlsx': 'XLSX', 'md':'MD', 'txt':'TXT', - 'html':'HTML' + 'html':'HTML', + 'jpg':'JPG', + 'img':'IMG', + 'png':'PNG', + 'jpeg':'JPEG', + 'gif':'GIF', + 'webp':'WEBP', + 'svg':'SVG', + 'tiff':'TIFF', + }; return typeMap[props.type] || 'OTHER'; }); diff --git a/pages/chat/components/uploadQrcode.vue b/pages/chat/components/uploadQrcode.vue index 2951492..78d0b5f 100644 --- a/pages/chat/components/uploadQrcode.vue +++ b/pages/chat/components/uploadQrcode.vue @@ -1,36 +1,60 @@ - + \ No newline at end of file diff --git a/stores/useLocationStore.js b/stores/useLocationStore.js index 20c37f2..17ca3d5 100644 --- a/stores/useLocationStore.js +++ b/stores/useLocationStore.js @@ -84,6 +84,8 @@ const useLocationStore = defineStore("location", () => { latitudeVal } +},{ + unistorage: true, }) export default useLocationStore; \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index 1580170..4eac156 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,5 +9,5 @@ export default defineConfig({ // 只保留这一个自定义插件,它只负责改 template 字符串 viteInjectPopup(), uni(), - ] + ], }); \ No newline at end of file