Commit e8622c65023904eea4599c536f36b66a7345b985

Authored by 史婷婷
1 parent 4b5110b9

feat: 徽智制联-deepSeek-配置信息

Showing 1 changed file with 3 additions and 104 deletions
@@ -5,112 +5,11 @@ export function setFavicon (logoPath: string) { @@ -5,112 +5,11 @@ export function setFavicon (logoPath: string) {
5 document.head.appendChild(link); 5 document.head.appendChild(link);
6 } 6 }
7 7
8 -// 每个园区都有独立的分支 这里需要更换成对应的corpCode  
9 -export const currentCorpCode = () => {  
10 - return 'test'; 8 +// deepSeek版本 base 基础版本(红色模版, 红色机器人 不带联通logo)
  9 +export const currentV = () => {
  10 + return 'base';
11 }; 11 };
12 12
13 -export const _baseUrl = "http://36.34.99.80:8088";  
14 -// export const _baseUrl = "https://test.qgutech.com";  
15 -  
16 -export const handleSearch = (search: any) => {  
17 - const _search = decodeURIComponent(search);  
18 - const index = _search.indexOf('?');  
19 - const baseUrl = index === -1? _search : _search.slice(index,_search?.length);  
20 - const _str = baseUrl?.replace('?', '');  
21 - const _arr = _str?.split('&');  
22 - let _params: any;  
23 - _arr?.forEach((item: any) => {  
24 - if (item.includes('=')) {  
25 - const _key = item?.split('=')?.[0];  
26 - const _value = item?.split('=')?.[1];  
27 - let _item = {  
28 - [_key]: _value === 'undefined' ? null : _value,  
29 - };  
30 - _params = {  
31 - ..._params,  
32 - ..._item,  
33 - };  
34 - }  
35 - });  
36 - return _params;  
37 -};  
38 -  
39 -  
40 -// 百度坐标系转大地坐标系  
41 -export const BD09II2WGS84 = (bdLon: number, bdLat: number) => {  
42 - let x_pi = 3.14159265358979324 * 3000.0 / 180.0;  
43 - //百度坐标转成火星坐标  
44 - let mars_point = { lat: 0, lon: 0,};  
45 - let x = bdLon - 0.0065;  
46 - let y = bdLat - 0.006;  
47 - let z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);  
48 - let theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);  
49 - mars_point.lat = z * Math.sin(theta);  
50 - mars_point.lon = z * Math.cos(theta);  
51 -  
52 - //把火星坐标GCJ02转地球坐标系WGS84  
53 - let gcjLat = mars_point.lat;  
54 - let gcjLon = mars_point.lon;  
55 - let d = delta(gcjLat, gcjLon)  
56 - return {  
57 - 'lat': ( gcjLat - d.lat ),  
58 - 'lon': ( gcjLon - d.lon )  
59 - }  
60 -}  
61 -  
62 -// 伪墨卡托投影 转 天地图(Tianditu) WGS84 经纬度坐标系  
63 -export const webMercatorToWGS84 = (x: any, y: any) => {  
64 - // 地球半径(Web Mercator 投影的参数)  
65 - const earthRadius = 20037508.34;  
66 -  
67 - // 经度转换  
68 - const longitude = (x / earthRadius) * 180;  
69 -  
70 - // 纬度转换  
71 - let latitude = (y / earthRadius) * 180;  
72 - latitude = (180 / Math.PI) * (2 * Math.atan(Math.exp((latitude * Math.PI) / 180)) - Math.PI / 2);  
73 -  
74 - return { latitude, longitude };  
75 -}  
76 -  
77 -  
78 -const delta = (lat: number, lon: number) => {  
79 - let PI = 3.14159265358979324;  
80 - let a = 6378245.0  
81 - let ee = 0.00669342162296594323  
82 - let dLat = transformLat(lon - 105.0, lat - 35.0)  
83 - let dLon = transformLon(lon - 105.0, lat - 35.0)  
84 - let radLat = lat / 180.0 * PI  
85 - let magic = Math.sin(radLat)  
86 - magic = 1 - ee * magic * magic  
87 - let sqrtMagic = Math.sqrt(magic)  
88 - dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * PI)  
89 - dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * PI)  
90 - return {  
91 - 'lat': dLat,  
92 - 'lon': dLon  
93 - }  
94 -}  
95 -  
96 -const transformLat = (x: number, y: number) => {  
97 - let PI = 3.14159265358979324;  
98 - let ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x))  
99 - ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0  
100 - ret += (20.0 * Math.sin(y * PI) + 40.0 * Math.sin(y / 3.0 * PI)) * 2.0 / 3.0  
101 - ret += (160.0 * Math.sin(y / 12.0 * PI) + 320 * Math.sin(y * PI / 30.0)) * 2.0 / 3.0  
102 - return ret  
103 -}  
104 -  
105 -const transformLon = (x: number, y: number) => {  
106 - let PI = 3.14159265358979324;  
107 - let ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x))  
108 - ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0  
109 - ret += (20.0 * Math.sin(x * PI) + 40.0 * Math.sin(x / 3.0 * PI)) * 2.0 / 3.0  
110 - ret += (150.0 * Math.sin(x / 12.0 * PI) + 300.0 * Math.sin(x / 30.0 * PI)) * 2.0 / 3.0  
111 - return ret  
112 -}  
113 -  
114 13
115 // 十六进制颜色 转换成 rgba 14 // 十六进制颜色 转换成 rgba
116 export const hexToRgba = (hex: string | null | undefined, alpha: any) => { 15 export const hexToRgba = (hex: string | null | undefined, alpha: any) => {