From 1d670d819da93c3beaf8de53f3da061a3e7ad32c Mon Sep 17 00:00:00 2001 From: ancong <12345678> Date: Wed, 22 Oct 2025 09:36:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/alarm.ts | 27 ---------------- src/apis/camera.ts | 20 ------------ src/apis/demo.ts | 8 ----- src/apis/login/index.ts | 10 ------ src/apis/login/type.ts | 6 ---- src/apis/map.ts | 9 ------ src/apis/systemuser.ts | 54 ------------------------------- src/manifest.json | 4 +-- src/pages/zhixing/jianchabiao.vue | 3 +- src/utils/http.ts | 40 ++++++++++++----------- 10 files changed, 26 insertions(+), 155 deletions(-) delete mode 100644 src/apis/alarm.ts delete mode 100644 src/apis/camera.ts delete mode 100644 src/apis/demo.ts delete mode 100644 src/apis/login/index.ts delete mode 100644 src/apis/login/type.ts delete mode 100644 src/apis/map.ts delete mode 100644 src/apis/systemuser.ts diff --git a/src/apis/alarm.ts b/src/apis/alarm.ts deleted file mode 100644 index 8c0ea33..0000000 --- a/src/apis/alarm.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { request } from '@/utils/http' -export function getMarkersInfo(data: any) { - return request.http({ - url: '/forestplus/app/inter/getMarkers', - isPost: false, - data, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} -// 预警列表查询 -export function getWarn(data: any) { - return request.http({ - url: '/forestplus/app/inter/getWarnList', - isPost: false, - data - //timeout: 20000 - }) -} -// 预警列表详情 -export function getWarnDetail(data: any) { - return request.http({ - url: '/forestplus/app/inter/getWarnDetail?id=' + data, - isPost: false, - data - //timeout: 20000 - }) -} diff --git a/src/apis/camera.ts b/src/apis/camera.ts deleted file mode 100644 index b0a4b91..0000000 --- a/src/apis/camera.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { request } from '@/utils/http' -//监控列表查询 -export function getCamera(data: any) { - return request.http({ - url: '/forestplus/app/inter/getCameraList', - isPost: false, - data, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} - -// 监控列表详情 -export function getCameraDetail(data: any) { - return request.http({ - url: '/forestplus/app/inter/getPreviewUrls?id=' + data, - isPost: false, - data - //timeout: 20000 - }) -} diff --git a/src/apis/demo.ts b/src/apis/demo.ts deleted file mode 100644 index d07f982..0000000 --- a/src/apis/demo.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { request } from '@/utils/http' - -export function demo(data?: any) { - return request.http({ - url: '/lxx/list', - data - }) -} diff --git a/src/apis/login/index.ts b/src/apis/login/index.ts deleted file mode 100644 index f946898..0000000 --- a/src/apis/login/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { request } from '@/utils/http' -import type { userInfoInt } from './type' -export function loginApi(data: userInfoInt) { - return request.http({ - url: '/forestplus/app/inter/appLogin', - data, - isSinglePost: true, // 是否是单例模式默认可不传de - isToken: false - }) -} diff --git a/src/apis/login/type.ts b/src/apis/login/type.ts deleted file mode 100644 index 3d98a70..0000000 --- a/src/apis/login/type.ts +++ /dev/null @@ -1,6 +0,0 @@ -// 登录数据 -export interface userInfoInt { - username: string - password?: string - //code: string -} diff --git a/src/apis/map.ts b/src/apis/map.ts deleted file mode 100644 index 71b8a05..0000000 --- a/src/apis/map.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { request } from '@/utils/http' -export function getMarkersInfo(data: any) { - return request.http({ - url: '/forestplus/app/inter/getMarkers', - isPost: false, - data, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} diff --git a/src/apis/systemuser.ts b/src/apis/systemuser.ts deleted file mode 100644 index e131b10..0000000 --- a/src/apis/systemuser.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { request } from '@/utils/http' -export function getMarkersInfo(data: any) { - return request.http({ - url: '/forestplus/app/inter/getMarkers', - isPost: false, - data, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} - -//修改密码 -export function updateUserPwd(data: any) { - return request.http({ - url: '/forestplus/app/inter/changePwd', - isPost: true, - data, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} - -//查询用户个人信息 -export function getUserProfile(data: any) { - return request.http({ - url: '/forestplus/system/user/profile', - isPost: false, - data, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} - -//查询用户个人信息 -export function updateUserProfile(data: any) { - return request.http({ - url: '/forestplus/system/user/profile', - isPost: true, - data, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} - -//查询用户个人信息 -/** - * 根据参数键名查询参数值 获取app 文件 - * - * @param {string} configKey 参数键名 - * @returns - */ -export function getConfigKey(data: any) { - return request.http({ - url: '/forestplus/system/config/configKey/' + data, - isPost: false, - isSinglePost: true // 是否是单例模式默认可不传de - }) -} diff --git a/src/manifest.json b/src/manifest.json index f95465f..29bf5f7 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,8 +3,8 @@ "appid" : "__UNI__D31BBA7", "package" : "com.skzh.hzyjzaqyhglpt", "description" : "安全隐患排查app", - "versionName" : "1.0.3", - "versionCode" : 103, + "versionName" : "1.0.4", + "versionCode" : 104, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/src/pages/zhixing/jianchabiao.vue b/src/pages/zhixing/jianchabiao.vue index dc458c7..a503215 100644 --- a/src/pages/zhixing/jianchabiao.vue +++ b/src/pages/zhixing/jianchabiao.vue @@ -641,7 +641,8 @@ width: 100%;align-items: left; border-top:1px solid #eee;"> this.queryParams.projectname = result.selectedItem.lablename; this.queryParams.projectId = result.selectedItem.projectId; this.xmpickerVisible = false; - this.getlistinfo(); //查询列表 + // this.getlistinfo(); //查询列表 + this.qingchu(); }, xmhandleCancel() { // 处理取消项目 diff --git a/src/utils/http.ts b/src/utils/http.ts index bc56d82..018ceab 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -16,7 +16,7 @@ interface Response { let newhttp = import.meta.env.VITE_APP_BASE_URL let newpro = import.meta.env.VITE_APP_BASE_URLpro let newapi = import.meta.env.VITE_APP_BASE_PRE //请求的api开头 - +let htpurl = '' //正式的加htp的 // #ifdef APP-PLUS const configFileName = 'app_config.json' //const configFilePath = `${plus.io.PRIVATE_DOC}/${configFileName}`; // 私有目录 @@ -71,10 +71,29 @@ const requestObj = { if (isSinglePost && _this.isLock) { reject({ message: '加载中' }) } + // debugger _this.isLock = true - // #ifdef H5 + //debugger + // console.log('lsdfcs', userStore) + const header = { + 'content-type': 'application/json', + // 'content-type': 'application/x-www-form-urlencoded', + // Authorization: '' + Bearerauth: '' + } + // if (isPost == '3') { + // header['content-type'] = 'application/x-www-form-urlencoded' + // } + if (getToken() && isToken) { + // header['Authorization'] = 'Bearer ' + userStore.token + header['Bearerauth'] = 'Bearer ' + getToken() + } + + let htconfig = { url: url, data: data, isPost: isPost, isSinglePost: isSinglePost, isToken: isToken, timeout: timeout, header: header } + // #ifdef H5 + // debugger url = import.meta.env.VITE_APP_BASE_PRE + url // #endif // debugger @@ -97,23 +116,7 @@ const requestObj = { console.log('11111', url) // #endif - //debugger - // console.log('lsdfcs', userStore) - const header = { - 'content-type': 'application/json', - // 'content-type': 'application/x-www-form-urlencoded', - // Authorization: '' - Bearerauth: '' - } - // if (isPost == '3') { - // header['content-type'] = 'application/x-www-form-urlencoded' - // } - if (getToken() && isToken) { - // header['Authorization'] = 'Bearer ' + userStore.token - header['Bearerauth'] = 'Bearer ' + getToken() - } - let htconfig = { url: url, data: data, isPost: isPost, isSinglePost: isSinglePost, isToken: isToken, timeout: timeout, header: header } // debugger switch (isPost) { case '0': @@ -204,6 +207,7 @@ const handleTokenRefresh = (config: any) => { const userStore = useUserStore() return new Promise((resolve, reject) => { // 将当前请求添加到队列 + requestQueue.push({ resolve, reject,