Parcourir la source

⚙ 更换更新配置服务器地址

快乐的梦鱼 il y a 3 semaines
Parent
commit
5395a81bb6
3 fichiers modifiés avec 3 ajouts et 98 suppressions
  1. 2 2
      src/api/RequestModules.ts
  2. 0 95
      src/api/map/TenMapApi.ts
  3. 1 1
      src/common/config/ApiCofig.ts

+ 2 - 2
src/api/RequestModules.ts

@@ -25,7 +25,7 @@ export class AppServerRequestModule<T extends DataModel> extends BaseAppServerRe
  */
 export class MengyuServerRequestModule<T extends DataModel> extends BaseAppServerRequestModule<T> {
   constructor() {
-    super('https://update-server1.imengyu.top');
+    super('https://subserver.wenlvti.net/update');
     //super('http://localhost:3012');
     this.config.requestInterceptor = (url, req) => {
       req.headers['token'] = getApp().globalData?.token ?? '';
@@ -173,7 +173,7 @@ export class TencentMengyuServerRequestModule<T extends DataModel> extends BaseA
  */
 export class UpdateServerRequestModule<T extends DataModel> extends BaseAppServerRequestModule<T> {
   constructor() {
-    super("https://update-server1.imengyu.top");
+    super("https://subserver.wenlvti.net/update");
     this.config.requestInterceptor = (url, req) => {
       if (!req.headers)
         req.headers = {};

+ 0 - 95
src/api/map/TenMapApi.ts

@@ -1,95 +0,0 @@
-import type { DataModel } from "@imengyu/js-request-transform";
-import { TencentMengyuServerRequestModule } from "../RequestModules";
-
-export class TenMapApi extends TencentMengyuServerRequestModule<DataModel> {
-  constructor() {
-    super();
-  }
-
-  /**
-   * 逆地址解析(坐标位置描述)
-   * 
-   * 文档:https://lbs.qq.com/service/webService/webServiceGuide/address/Gcoder
-   * 
-   * 说明:
-   * 本接口提供由经纬度到文字地址及相关位置信息的转换能力,广泛应用于物流、出行、O2O、社交等场景。服务响应速度快、稳定,支撑亿级调用。
-   * 支持根据输入经纬度,获取:
-   * 1 . 经纬度所在省、市、区、乡镇、门牌号、行政区划代码,及周边参考位置信息,如道路及交叉口、河流、湖泊、桥等
-   * 2 . 通过知名地点、地标组合形成的易于理解的地址,如:北京市海淀区中钢国际广场(欧美汇购物中心北)。
-   * 3 . 商圈、附近知名的一级地标、代表当前位置的二级地标等。
-   * 4 . 周边POI(AOI)列表。
-   * 
-   * @param location 经纬度(GCJ02坐标系),格式:location=lat<纬度>,lng<经度>
-   * @param radius 半径,单位:米
-   * @param get_poi 是否获取周边POI(AOI)列表
-   * @param poi_options 周边POI(AOI)列表选项,格式:poi_options=type<POI类型>,radius<半径>,数量<数量>
-   * @returns 
-   */
-  async geocoder(location: string, radius?: number, get_poi?: boolean, poi_options?: string) {
-    return (await this.get<{
-      address: string;
-      formatted_addresses: {
-        recommend: string;
-        rough: string;
-        standard_address: string;
-      };
-      address_component: {
-        nation: string;
-        province: string;
-        city: string;
-        district: string;
-        street: string;
-        street_number: string;
-      };
-    }>('/ws/geocoder/v1/', '逆地址解析(坐标位置描述)', {
-      location,
-      radius,
-      get_poi: get_poi ? 1 : 0,
-      poi_options,
-    })).data;
-  }
-
-  /**
-   * 地址解析(地址转坐标)
-   *
-   * 文档:https://lbs.qq.com/service/webService/webServiceGuide/address/Geocoder
-   *
-   * 说明:
-   * 本接口提供由文字地址到经纬度的转换能力,并同时提供结构化的省市区地址信息。
-   * 为提升解析准确率,地址中请至少包含城市名称;地址请尽量完整、具体(包括省市区乡镇/街道门牌及详细地点信息)。
-   *
-   * @param address 要解析的输入地址(建议包含城市,尽量完整;若包含 # 等特殊字符需先 URL 编码)
-   * @param policy 解析策略:0 标准(默认,地址须包含城市);1 宽松(允许缺失城市,准确性可能受影响)
-   * @returns 解析结果,含坐标(GCJ02)、省市区等结构化信息及可信度、解析级别
-   */
-  async geocodeAddress(
-    address: string,
-    policy?: 0 | 1
-  ) {
-    return (await this.get<{
-      /** [废弃] 最终用于坐标解析的地址或地点名称,仅供参考 */
-      title: string;
-      /** 解析到的坐标(GCJ02 坐标系) */
-      location: { lat: number; lng: number };
-      /** 解析后的地址部件 */
-      address_components: {
-        province: string;
-        city: string;
-        district: string;
-        street: string;
-        street_number: string;
-      };
-      /** 行政区划信息 */
-      ad_info: { adcode: string };
-      /** 可信度 1–10,>=7 时解析结果较为准确 */
-      reliability: number;
-      /** 解析精度级别,一般 >=9 即可采用(定位到点) */
-      level?: number;
-    }>('/ws/geocoder/v1/', '地址解析(地址转坐标)', {
-      address,
-      ...(policy !== undefined && { policy }),
-    })).data;
-  }
-}
-
-export default new TenMapApi();

+ 1 - 1
src/common/config/ApiCofig.ts

@@ -11,7 +11,7 @@ export default {
   platformId: 330,
   mapKey: 'QDOBZ-B6N6Q-2LL57-2QZVU-MPHA6-A3B2G',
   bugReport: {
-    server: 'https://update-server1.imengyu.top/bug-submit',
+    server: 'https://subserver.wenlvti.net/update/bug-submit',
     appId: 1,
     appKey: 'PSzTR2h8c547pNZGERsH3pJRTPhexzc6WSZwdGrQdJFHmXR2',
   },