修改完善

This commit is contained in:
ancong 2025-10-22 09:36:40 +08:00
parent cbccdb853f
commit 1d670d819d
10 changed files with 26 additions and 155 deletions

View File

@ -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
})
}

View File

@ -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
})
}

View File

@ -1,8 +0,0 @@
import { request } from '@/utils/http'
export function demo(data?: any) {
return request.http({
url: '/lxx/list',
data
})
}

View File

@ -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
})
}

View File

@ -1,6 +0,0 @@
// 登录数据
export interface userInfoInt {
username: string
password?: string
//code: string
}

View File

@ -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
})
}

View File

@ -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
})
}

View File

@ -3,8 +3,8 @@
"appid" : "__UNI__D31BBA7", "appid" : "__UNI__D31BBA7",
"package" : "com.skzh.hzyjzaqyhglpt", "package" : "com.skzh.hzyjzaqyhglpt",
"description" : "安全隐患排查app", "description" : "安全隐患排查app",
"versionName" : "1.0.3", "versionName" : "1.0.4",
"versionCode" : 103, "versionCode" : 104,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -641,7 +641,8 @@ width: 100%;align-items: left; border-top:1px solid #eee;">
this.queryParams.projectname = result.selectedItem.lablename; this.queryParams.projectname = result.selectedItem.lablename;
this.queryParams.projectId = result.selectedItem.projectId; this.queryParams.projectId = result.selectedItem.projectId;
this.xmpickerVisible = false; this.xmpickerVisible = false;
this.getlistinfo(); // // this.getlistinfo(); //
this.qingchu();
}, },
xmhandleCancel() { xmhandleCancel() {
// //

View File

@ -16,7 +16,7 @@ interface Response {
let newhttp = import.meta.env.VITE_APP_BASE_URL let newhttp = import.meta.env.VITE_APP_BASE_URL
let newpro = import.meta.env.VITE_APP_BASE_URLpro let newpro = import.meta.env.VITE_APP_BASE_URLpro
let newapi = import.meta.env.VITE_APP_BASE_PRE //请求的api开头 let newapi = import.meta.env.VITE_APP_BASE_PRE //请求的api开头
let htpurl = '' //正式的加htp的
// #ifdef APP-PLUS // #ifdef APP-PLUS
const configFileName = 'app_config.json' const configFileName = 'app_config.json'
//const configFilePath = `${plus.io.PRIVATE_DOC}/${configFileName}`; // 私有目录 //const configFilePath = `${plus.io.PRIVATE_DOC}/${configFileName}`; // 私有目录
@ -71,10 +71,29 @@ const requestObj = {
if (isSinglePost && _this.isLock) { if (isSinglePost && _this.isLock) {
reject({ message: '加载中' }) reject({ message: '加载中' })
} }
// debugger // debugger
_this.isLock = true _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 url = import.meta.env.VITE_APP_BASE_PRE + url
// #endif // #endif
// debugger // debugger
@ -97,23 +116,7 @@ const requestObj = {
console.log('11111', url) console.log('11111', url)
// #endif // #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 // debugger
switch (isPost) { switch (isPost) {
case '0': case '0':
@ -204,6 +207,7 @@ const handleTokenRefresh = (config: any) => {
const userStore = useUserStore() const userStore = useUserStore()
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 将当前请求添加到队列 // 将当前请求添加到队列
requestQueue.push({ requestQueue.push({
resolve, resolve,
reject, reject,