Compare commits

..

No commits in common. "08096350cb445158fb08b26d72d7a3919e75ea4d" and "c6f47c873044d8bcd527d22063997a7f0ae14c43" have entirely different histories.

7 changed files with 41 additions and 64 deletions

View File

@ -516,7 +516,6 @@ const getEquipmentList = async (sbmc) => {
sbmc: sbmc, sbmc: sbmc,
pageNum: 1, pageNum: 1,
pageSize: 9999, pageSize: 9999,
requestSource: 'app', // web: Webapp
}; };
const res = await request({ const res = await request({
url: "/snow-ops-platform/yjsb/list", url: "/snow-ops-platform/yjsb/list",

View File

@ -298,7 +298,6 @@ const getMaterialList = async (wzmc) => {
wzmc, wzmc,
paageNum: 1, paageNum: 1,
paageSize: 9999, paageSize: 9999,
requestSource: 'app', // web: Webapp
}; };
const res = await request({ const res = await request({
url: "/snow-ops-platform/yjwz/list", url: "/snow-ops-platform/yjwz/list",
@ -462,47 +461,37 @@ const afterRead = async (file) => {
// //
const handleGetLocation = async () => { const handleGetLocation = async () => {
const location = await request({ // AMap
url: "/v3/ip", if (!window.AMap) {
method: "get", await loadAMap();
params:{ }
key: 'c30e9ebd414fd6a4dfcc1ba8c2060dbb' const loadingToast = showLoadingToast({
}, message: "正在获取位置",
isThirdPartyAPI: true // forbidClick: true,
duration: 0, // 0
zIndex: 9999,
}); });
console.log("location", toRaw(location));
// // AMap AMap.plugin("AMap.Geolocation", () => {
// if (!window.AMap) { const geolocation = new AMap.Geolocation({
// await loadAMap(); enableHighAccuracy: true,
// } timeout: 5000,
// const loadingToast = showLoadingToast({ showMarker: false,
// message: "", zoomToAccuracy: true,
// forbidClick: true, });
// duration: 0, // 0
// zIndex: 9999,
// });
// AMap.plugin("AMap.Geolocation", () => { geolocation.getCurrentPosition((status, result) => {
// const geolocation = new AMap.Geolocation({ if (status === "complete") {
// enableHighAccuracy: true, form.material.jd = result.position.lng.toFixed(6);
// timeout: 5000, form.material.wd = result.position.lat.toFixed(6);
// showMarker: false, loadingToast.close();
// zoomToAccuracy: true, } else {
// }); loadingToast.close();
showToast("定位失败 请检查网络情况后重试");
// geolocation.getCurrentPosition((status, result) => { console.log("result", result);
// if (status === "complete") { }
// form.material.jd = result.position.lng.toFixed(6); });
// form.material.wd = result.position.lat.toFixed(6); });
// loadingToast.close();
// } else {
// loadingToast.close();
// showToast(" ");
// console.log("result", result);
// }
// });
// });
}; };
watch( watch(

View File

@ -75,12 +75,7 @@ export default defineConfig(({ command, mode }) => {
target: 'http://8.137.54.85:8661/', target: 'http://8.137.54.85:8661/',
changeOrigin: true, changeOrigin: true,
}, },
'/v3':{ }
target: 'https://restapi.amap.com/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/v3/, '/v3') // 显式声明路径
}
},
}, },
build: { build: {
outDir: 'dist', outDir: 'dist',

View File

@ -185,7 +185,6 @@ const getyhzsbList = async (qxmc, yhzid, filterData) => {
sbzt: filterData?.sbzt || '', sbzt: filterData?.sbzt || '',
pageNum: pagination.current, pageNum: pagination.current,
pageSize: pagination.pageSize, pageSize: pagination.pageSize,
requestSource: 'web', // web: Web端请求app移动端请求
} }
const res = await request({ const res = await request({
url: '/snow-ops-platform/yjsb/list', url: '/snow-ops-platform/yjsb/list',
@ -248,10 +247,6 @@ const columns = [
prop: 'qxmc', prop: 'qxmc',
label: '所属区县', label: '所属区县',
}, },
{
prop: 'yhzmc',
label: '所属服务站',
},
{ {
label: '上传时间', label: '上传时间',
width: 160, width: 160,

View File

@ -200,7 +200,6 @@ const getyhzwzList = async (qxmc, yhzid, filterData) => {
wzmc: filterData?.wzmc || '', wzmc: filterData?.wzmc || '',
pageNum: pagination.current, pageNum: pagination.current,
pageSize: pagination.pageSize, pageSize: pagination.pageSize,
requestSource: 'web', // web: Web端请求app移动端请求
} }
const res = await request({ const res = await request({
url: '/snow-ops-platform/yjwz/list', url: '/snow-ops-platform/yjwz/list',

View File

@ -174,7 +174,7 @@ const formatDate = (date) => {
const getyhzeventList = async (qxmc, yhzid, filterData) => { const getyhzeventList = async (qxmc, yhzid, filterData) => {
try { try {
const data = { const data = {
district: qxmc, qxmc: qxmc,
serviceStationId: yhzid, serviceStationId: yhzid,
routeNo: filterData?.routeNo || '', routeNo: filterData?.routeNo || '',
stakeNo: filterData?.stakeNo || '', stakeNo: filterData?.stakeNo || '',

View File

@ -17,16 +17,16 @@ service.interceptors.request.use(config => {
}); });
export async function request(config) { export async function request(config) {
try { try {
const res = await service(config) const res = await service(config)
if (config.isThirdPartyAPI) { // 添加第三方API标识 if (res === null || res === undefined) {
return res // 直接返回完整响应 return res
}
if (Object.prototype.hasOwnProperty.call(res, 'data')) {
return res.data
}
} catch (error) {
console.log(error)
return null
} }
if (Object.prototype.hasOwnProperty.call(res, 'data')) {
return res.data
}
} catch (error) {
console.log(error)
return null
}
} }