Explorar el Código

📦 首页修改

imengyu hace 1 mes
padre
commit
3d82bcfb92

+ 51 - 7
src/api/CommonContent.ts

@@ -11,10 +11,28 @@ export class GetColumListParams extends DataModel<GetColumListParams> {
     this.setNameMapperCase('Camel', 'Snake');
   }
 
+  setModelId(val: number) {
+    this.modelId = val;
+    return this;
+  }
+  setMainBodyColumnId(val: number) {
+    this.mainBodyColumnId = val;
+    return this;
+  }
+  setFlag(val: 'hot'|'recommend'|'top') {
+    this.flag = val;
+    return this; 
+  }
+  setSize(val: number) {
+    this.size = val;
+    return this; 
+  }
+
+  modelId?: number;
   /**
    * 	主体栏目id
    */
-  mainBodyColumnId: number|number[] = 0;
+  mainBodyColumnId: number = 0;
   /**
    * 标志:hot=热门,recommend=推荐,top=置顶
    */
@@ -26,11 +44,6 @@ export class GetColumListParams extends DataModel<GetColumListParams> {
 }
 export class GetContentListParams extends DataModel<GetContentListParams> {
   
-  static TYPE_ARTICLE = 1;
-  static TYPE_AUDIO = 2;
-  static TYPE_VIDEO = 3;
-  static TYPE_ALBUM = 4;
-
   public constructor() {
     super(GetContentListParams);
     this.setNameMapperCase('Camel', 'Snake');
@@ -42,10 +55,41 @@ export class GetContentListParams extends DataModel<GetContentListParams> {
     }
   }
 
+
+  setMainBodyColumnId(val: number) {
+    this.mainBodyColumnId = val;
+    return this;
+  }
+  setFlag(val: 'hot'|'recommend'|'top') {
+    this.flag = val;
+    return this; 
+  }
+  setIds(val: number[]) {
+    this.ids = val;
+    return this; 
+  }
+  setType(val: 1|2|3|4) {
+    this.type = val;
+    return this;
+  }
+  setSize(val: number) {
+    this.size = val;
+    return this;
+  }
+  setKeywords(val: string) {
+    this.keywords = val;
+    return this; 
+  }
+  setModelId(val: number) {
+    this.modelId = val;
+    return this; 
+  }
+
+  modelId ?: number;
   /**
    * 主体栏目id
    */
-  mainBodyColumnId: number|number[] = 0;
+  mainBodyColumnId: number = 0;
   /**
    * 标志:hot=热门,recommend=推荐,top=置顶
    */

+ 58 - 3
src/api/inhert/VillageApi.ts

@@ -1,6 +1,6 @@
 import { CONVERTER_ADD_DEFAULT, DataModel, transformArrayDataModel } from '@imengyu/js-request-transform';
 import { AppServerRequestModule } from '../RequestModules';
-import ApiCofig from '@/common/config/ApiCofig';
+import { transformSomeToArray } from '@/common/request/utils/Utils';
 
 export class VillageListItem extends DataModel<VillageListItem> {
   constructor() {
@@ -20,10 +20,25 @@ export class VillageListItem extends DataModel<VillageListItem> {
         };
       return undefined;
     };
+    this._afterSolveServer = () => {
+      this.address = 
+        (this.province || '未知省') + 
+        (this.city || '未知市') + 
+        (this.district || '未知区') + 
+        (this.township || '未知村');
+      if (this.images && this.images && this.images.length > 0  ) {
+        this.image = this.images[0]
+      }
+    }
 
   }
 
   id !: number;
+  province = '' as string|null;
+  city = '' as string|null;
+  district = '' as string|null;
+  township = '' as string|null;
+  address = '';
   villageVolunteerId = null as number|null;
   villageId = null as number|null;
   claimReason = '';
@@ -33,6 +48,7 @@ export class VillageListItem extends DataModel<VillageListItem> {
   updatedAt = null as Date|null;
   deleteAt = null as Date|null;
   image = '';
+  images = [] as string[];
   villageName = '';
   volunteerName = '';
 }
@@ -89,6 +105,29 @@ export class VolunteerInfo extends DataModel<VolunteerInfo> {
   statusText = '';
 }
 
+export class VillageMenuListItem extends DataModel<VillageMenuListItem> {
+  constructor() {
+    super(VillageMenuListItem, "村落菜单列表");
+    this.setNameMapperCase('Camel', 'Snake');
+    this._convertTable = {
+      id: { clientSide: 'number', serverSide: 'number', clientSideRequired: true },
+    }
+    this._nameMapperServer = {
+    };
+    this._convertKeyType = (key, direction) => {
+      if (key.endsWith('At'))
+        return {
+          clientSide: 'date',
+          serverSide: 'string',
+        };
+      return undefined;
+    };
+
+  }
+  name = '';
+  logo = '';
+}
+
 export class VillageApi extends AppServerRequestModule<DataModel> {
 
   constructor() {
@@ -103,9 +142,10 @@ export class VillageApi extends AppServerRequestModule<DataModel> {
       .catch(e => { throw e });
   }
   async getCanClaimVallageList() {
-    return (this.get('/village/village/getList', '可认领村落列表', {
+    return (this.get('/village/village/getClaimList', '可认领村落列表', {
+      main_body_id: 2,
     })) 
-      .then(res => transformArrayDataModel<VillageListItem>(VillageListItem, res.data2, `村落`, true))
+      .then(res => transformArrayDataModel<VillageListItem>(VillageListItem, transformSomeToArray(res.data2), `村落`, true))
       .catch(e => { throw e });
   }
   async claimVallage(data: any) {
@@ -113,6 +153,13 @@ export class VillageApi extends AppServerRequestModule<DataModel> {
       ...data
     }, '认领村落')) ;
   }
+  async getVallageList() {
+    return (this.get('/village/village/getList', '村落列表', {
+      main_body_id: 2,
+    })) 
+      .then(res => transformArrayDataModel<VillageListItem>(VillageListItem, transformSomeToArray(res.data2), `村落`, true))
+      .catch(e => { throw e });
+  }
 
   async getVolunteerInfo() {
     return (await this.post('/village/volunteer/getInfo', {
@@ -125,6 +172,14 @@ export class VillageApi extends AppServerRequestModule<DataModel> {
       .then(res => transformArrayDataModel<VolunteerRanklistItem>(VolunteerRanklistItem, res.data2, ``, true))
       .catch(e => { throw e });
   }
+  
+  async getVillageMenuList(id: number) {
+    return (this.get('/village/menu/getList', '村落菜单列表', {
+      village_id: id,
+    })) 
+      .then(res => transformArrayDataModel<VillageMenuListItem>(VillageMenuListItem, res.data2, `村落菜单`, true))
+      .catch(e => { throw e });
+  }
 
 }
 

+ 10 - 0
src/common/composeabe/SwiperImagePreview.ts

@@ -0,0 +1,10 @@
+export function useSwiperImagePreview(getList: () => string[]) {
+  return {
+    onPreviewImage: (index: number) => {
+      uni.previewImage({
+        current: index,
+        urls: getList()
+      })
+    }
+  }
+}

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

@@ -4,7 +4,7 @@
  */
 export default {
   version: '0.0.1',
-  appId: 'wx6da2b44a4ddf5248',
+  appId: 'wx1845c7dab9e8b236',
 }
 
 /**

+ 6 - 2
src/common/scss/global/text.scss

@@ -76,8 +76,10 @@
 		overflow: hidden;
 		text-overflow: ellipsis;
 		/* #ifndef APP-NVUE */
-		display: block;
-		white-space: nowrap;
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 1;
+    line-clamp: 1;
 		/* #endif */
 	}
 	&-2 {
@@ -90,6 +92,7 @@
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
 		-webkit-line-clamp: 2;
+    line-clamp: 2;
 		/* #endif */
 	}
 	&-3 {
@@ -102,6 +105,7 @@
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
 		-webkit-line-clamp: 3;
+    line-clamp: 3;
 		/* #endif */
 	}
 	&-4 {

+ 561 - 0
src/libs/amap-wx.130.js

@@ -0,0 +1,561 @@
+function AMapWX(a) {
+  this.key = a.key;
+  this.requestConfig = {
+    key: a.key,
+    s: "rsx",
+    platform: "WXJS",
+    appname: a.key,
+    sdkversion: "1.2.0",
+    logversion: "2.0",
+  };
+  this.MeRequestConfig = {
+    key: a.key,
+    serviceName: "https://restapi.amap.com/rest/me",
+  };
+}
+AMapWX.prototype.getWxLocation = function (a, b) {
+  wx.getLocation({
+    type: "gcj02",
+    success: function (c) {
+      c = c.longitude + "," + c.latitude;
+      wx.setStorage({ key: "userLocation", data: c });
+      b(c);
+    },
+    fail: function (c) {
+      wx.getStorage({
+        key: "userLocation",
+        success: function (d) {
+          d.data && b(d.data);
+        },
+      });
+      a.fail({ errCode: "0", errMsg: c.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getMEKeywordsSearch = function (a) {
+  if (!a.options)
+    return a.fail({
+      errCode: "0",
+      errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570",
+    });
+  var b = a.options,
+    c = this.MeRequestConfig,
+    d = {
+      key: c.key,
+      s: "rsx",
+      platform: "WXJS",
+      appname: a.key,
+      sdkversion: "1.2.0",
+      logversion: "2.0",
+    };
+  b.layerId && (d.layerId = b.layerId);
+  b.keywords && (d.keywords = b.keywords);
+  b.city && (d.city = b.city);
+  b.filter && (d.filter = b.filter);
+  b.sortrule && (d.sortrule = b.sortrule);
+  b.pageNum && (d.pageNum = b.pageNum);
+  b.pageSize && (d.pageSize = b.pageSize);
+  b.sig && (d.sig = b.sig);
+  wx.request({
+    url: c.serviceName + "/cpoint/datasearch/local",
+    data: d,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (e) {
+      (e = e.data) && e.status && "1" === e.status && 0 === e.code
+        ? a.success(e.data)
+        : a.fail({ errCode: "0", errMsg: e });
+    },
+    fail: function (e) {
+      a.fail({ errCode: "0", errMsg: e.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getMEIdSearch = function (a) {
+  if (!a.options)
+    return a.fail({
+      errCode: "0",
+      errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570",
+    });
+  var b = a.options,
+    c = this.MeRequestConfig,
+    d = {
+      key: c.key,
+      s: "rsx",
+      platform: "WXJS",
+      appname: a.key,
+      sdkversion: "1.2.0",
+      logversion: "2.0",
+    };
+  b.layerId && (d.layerId = b.layerId);
+  b.id && (d.id = b.id);
+  b.sig && (d.sig = b.sig);
+  wx.request({
+    url: c.serviceName + "/cpoint/datasearch/id",
+    data: d,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (e) {
+      (e = e.data) && e.status && "1" === e.status && 0 === e.code
+        ? a.success(e.data)
+        : a.fail({ errCode: "0", errMsg: e });
+    },
+    fail: function (e) {
+      a.fail({ errCode: "0", errMsg: e.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getMEPolygonSearch = function (a) {
+  if (!a.options)
+    return a.fail({
+      errCode: "0",
+      errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570",
+    });
+  var b = a.options,
+    c = this.MeRequestConfig,
+    d = {
+      key: c.key,
+      s: "rsx",
+      platform: "WXJS",
+      appname: a.key,
+      sdkversion: "1.2.0",
+      logversion: "2.0",
+    };
+  b.layerId && (d.layerId = b.layerId);
+  b.keywords && (d.keywords = b.keywords);
+  b.polygon && (d.polygon = b.polygon);
+  b.filter && (d.filter = b.filter);
+  b.sortrule && (d.sortrule = b.sortrule);
+  b.pageNum && (d.pageNum = b.pageNum);
+  b.pageSize && (d.pageSize = b.pageSize);
+  b.sig && (d.sig = b.sig);
+  wx.request({
+    url: c.serviceName + "/cpoint/datasearch/polygon",
+    data: d,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (e) {
+      (e = e.data) && e.status && "1" === e.status && 0 === e.code
+        ? a.success(e.data)
+        : a.fail({ errCode: "0", errMsg: e });
+    },
+    fail: function (e) {
+      a.fail({ errCode: "0", errMsg: e.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getMEaroundSearch = function (a) {
+  if (!a.options)
+    return a.fail({
+      errCode: "0",
+      errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570",
+    });
+  var b = a.options,
+    c = this.MeRequestConfig,
+    d = {
+      key: c.key,
+      s: "rsx",
+      platform: "WXJS",
+      appname: a.key,
+      sdkversion: "1.2.0",
+      logversion: "2.0",
+    };
+  b.layerId && (d.layerId = b.layerId);
+  b.keywords && (d.keywords = b.keywords);
+  b.center && (d.center = b.center);
+  b.radius && (d.radius = b.radius);
+  b.filter && (d.filter = b.filter);
+  b.sortrule && (d.sortrule = b.sortrule);
+  b.pageNum && (d.pageNum = b.pageNum);
+  b.pageSize && (d.pageSize = b.pageSize);
+  b.sig && (d.sig = b.sig);
+  wx.request({
+    url: c.serviceName + "/cpoint/datasearch/around",
+    data: d,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (e) {
+      (e = e.data) && e.status && "1" === e.status && 0 === e.code
+        ? a.success(e.data)
+        : a.fail({ errCode: "0", errMsg: e });
+    },
+    fail: function (e) {
+      a.fail({ errCode: "0", errMsg: e.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getGeo = function (a) {
+  var b = this.requestConfig,
+    c = a.options;
+  b = {
+    key: this.key,
+    extensions: "all",
+    s: b.s,
+    platform: b.platform,
+    appname: this.key,
+    sdkversion: b.sdkversion,
+    logversion: b.logversion,
+  };
+  c.address && (b.address = c.address);
+  c.city && (b.city = c.city);
+  c.batch && (b.batch = c.batch);
+  c.sig && (b.sig = c.sig);
+  wx.request({
+    url: "https://restapi.amap.com/v3/geocode/geo",
+    data: b,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (d) {
+      (d = d.data) && d.status && "1" === d.status
+        ? a.success(d)
+        : a.fail({ errCode: "0", errMsg: d });
+    },
+    fail: function (d) {
+      a.fail({ errCode: "0", errMsg: d.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getRegeo = function (a) {
+  function b(d) {
+    var e = c.requestConfig;
+    wx.request({
+      url: "https://restapi.amap.com/v3/geocode/regeo",
+      data: {
+        key: c.key,
+        location: d,
+        extensions: "all",
+        s: e.s,
+        platform: e.platform,
+        appname: c.key,
+        sdkversion: e.sdkversion,
+        logversion: e.logversion,
+      },
+      method: "GET",
+      header: { "content-type": "application/json" },
+      success: function (g) {
+        if (g.data.status && "1" == g.data.status) {
+          g = g.data.regeocode;
+          var h = g.addressComponent,
+            f = [],
+            k = g.roads[0].name + "\u9644\u8fd1",
+            m = d.split(",")[0],
+            n = d.split(",")[1];
+          if (g.pois && g.pois[0]) {
+            k = g.pois[0].name + "\u9644\u8fd1";
+            var l = g.pois[0].location;
+            l &&
+              ((m = parseFloat(l.split(",")[0])),
+              (n = parseFloat(l.split(",")[1])));
+          }
+          h.provice && f.push(h.provice);
+          h.city && f.push(h.city);
+          h.district && f.push(h.district);
+          h.streetNumber && h.streetNumber.street && h.streetNumber.number
+            ? (f.push(h.streetNumber.street), f.push(h.streetNumber.number))
+            : f.push(g.roads[0].name);
+          f = f.join("");
+          a.success([
+            {
+              iconPath: a.iconPath,
+              width: a.iconWidth,
+              height: a.iconHeight,
+              name: f,
+              desc: k,
+              longitude: m,
+              latitude: n,
+              id: 0,
+              regeocodeData: g,
+            },
+          ]);
+        } else a.fail({ errCode: g.data.infocode, errMsg: g.data.info });
+      },
+      fail: function (g) {
+        a.fail({ errCode: "0", errMsg: g.errMsg || "" });
+      },
+    });
+  }
+  var c = this;
+  a.location
+    ? b(a.location)
+    : c.getWxLocation(a, function (d) {
+        b(d);
+      });
+};
+AMapWX.prototype.getWeather = function (a) {
+  function b(g) {
+    var h = "base";
+    a.type && "forecast" == a.type && (h = "all");
+    wx.request({
+      url: "https://restapi.amap.com/v3/weather/weatherInfo",
+      data: {
+        key: d.key,
+        city: g,
+        extensions: h,
+        s: e.s,
+        platform: e.platform,
+        appname: d.key,
+        sdkversion: e.sdkversion,
+        logversion: e.logversion,
+      },
+      method: "GET",
+      header: { "content-type": "application/json" },
+      success: function (f) {
+        if (f.data.status && "1" == f.data.status)
+          if (f.data.lives) {
+            if ((f = f.data.lives) && 0 < f.length) {
+              f = f[0];
+              var k = {
+                city: { text: "\u57ce\u5e02", data: f.city },
+                weather: { text: "\u5929\u6c14", data: f.weather },
+                temperature: { text: "\u6e29\u5ea6", data: f.temperature },
+                winddirection: {
+                  text: "\u98ce\u5411",
+                  data: f.winddirection + "\u98ce",
+                },
+                windpower: {
+                  text: "\u98ce\u529b",
+                  data: f.windpower + "\u7ea7",
+                },
+                humidity: { text: "\u6e7f\u5ea6", data: f.humidity + "%" },
+              };
+              k.liveData = f;
+              a.success(k);
+            }
+          } else
+            f.data.forecasts &&
+              f.data.forecasts[0] &&
+              a.success({ forecast: f.data.forecasts[0] });
+        else a.fail({ errCode: f.data.infocode, errMsg: f.data.info });
+      },
+      fail: function (f) {
+        a.fail({ errCode: "0", errMsg: f.errMsg || "" });
+      },
+    });
+  }
+  function c(g) {
+    wx.request({
+      url: "https://restapi.amap.com/v3/geocode/regeo",
+      data: {
+        key: d.key,
+        location: g,
+        extensions: "all",
+        s: e.s,
+        platform: e.platform,
+        appname: d.key,
+        sdkversion: e.sdkversion,
+        logversion: e.logversion,
+      },
+      method: "GET",
+      header: { "content-type": "application/json" },
+      success: function (h) {
+        if (h.data.status && "1" == h.data.status) {
+          h = h.data.regeocode;
+          if (h.addressComponent) var f = h.addressComponent.adcode;
+          else h.aois && 0 < h.aois.length && (f = h.aois[0].adcode);
+          b(f);
+        } else a.fail({ errCode: h.data.infocode, errMsg: h.data.info });
+      },
+      fail: function (h) {
+        a.fail({ errCode: "0", errMsg: h.errMsg || "" });
+      },
+    });
+  }
+  var d = this,
+    e = d.requestConfig;
+  a.city
+    ? b(a.city)
+    : d.getWxLocation(a, function (g) {
+        c(g);
+      });
+};
+AMapWX.prototype.getPoiAround = function (a) {
+  function b(e) {
+    e = {
+      key: c.key,
+      location: e,
+      s: d.s,
+      platform: d.platform,
+      appname: c.key,
+      sdkversion: d.sdkversion,
+      logversion: d.logversion,
+    };
+    a.querytypes && (e.types = a.querytypes);
+    a.querykeywords && (e.keywords = a.querykeywords);
+    wx.request({
+      url: "https://restapi.amap.com/v3/place/around",
+      data: e,
+      method: "GET",
+      header: { "content-type": "application/json" },
+      success: function (g) {
+        if (g.data.status && "1" == g.data.status) {
+          if ((g = g.data) && g.pois) {
+            for (var h = [], f = 0; f < g.pois.length; f++) {
+              var k = 0 == f ? a.iconPathSelected : a.iconPath;
+              h.push({
+                latitude: parseFloat(g.pois[f].location.split(",")[1]),
+                longitude: parseFloat(g.pois[f].location.split(",")[0]),
+                iconPath: k,
+                width: 22,
+                height: 32,
+                id: f,
+                name: g.pois[f].name,
+                address: g.pois[f].address,
+              });
+            }
+            a.success({ markers: h, poisData: g.pois });
+          }
+        } else a.fail({ errCode: g.data.infocode, errMsg: g.data.info });
+      },
+      fail: function (g) {
+        a.fail({ errCode: "0", errMsg: g.errMsg || "" });
+      },
+    });
+  }
+  var c = this,
+    d = c.requestConfig;
+  a.location
+    ? b(a.location)
+    : c.getWxLocation(a, function (e) {
+        b(e);
+      });
+};
+AMapWX.prototype.getStaticmap = function (a) {
+  function b(e) {
+    c.push("location=" + e);
+    a.zoom && c.push("zoom=" + a.zoom);
+    a.size && c.push("size=" + a.size);
+    a.scale && c.push("scale=" + a.scale);
+    a.markers && c.push("markers=" + a.markers);
+    a.labels && c.push("labels=" + a.labels);
+    a.paths && c.push("paths=" + a.paths);
+    a.traffic && c.push("traffic=" + a.traffic);
+    e = "https://restapi.amap.com/v3/staticmap?" + c.join("&");
+    a.success({ url: e });
+  }
+  var c = [];
+  c.push("key=" + this.key);
+  var d = this.requestConfig;
+  c.push("s=" + d.s);
+  c.push("platform=" + d.platform);
+  c.push("appname=" + d.appname);
+  c.push("sdkversion=" + d.sdkversion);
+  c.push("logversion=" + d.logversion);
+  a.location
+    ? b(a.location)
+    : this.getWxLocation(a, function (e) {
+        b(e);
+      });
+};
+AMapWX.prototype.getInputtips = function (a) {
+  var b = Object.assign({}, this.requestConfig);
+  a.location && (b.location = a.location);
+  a.keywords && (b.keywords = a.keywords);
+  a.type && (b.type = a.type);
+  a.city && (b.city = a.city);
+  a.citylimit && (b.citylimit = a.citylimit);
+  wx.request({
+    url: "https://restapi.amap.com/v3/assistant/inputtips",
+    data: b,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (c) {
+      c && c.data && c.data.tips && a.success({ tips: c.data.tips });
+    },
+    fail: function (c) {
+      a.fail({ errCode: "0", errMsg: c.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getDrivingRoute = function (a) {
+  var b = Object.assign({}, this.requestConfig);
+  a.origin && (b.origin = a.origin);
+  a.destination && (b.destination = a.destination);
+  a.strategy && (b.strategy = a.strategy);
+  a.waypoints && (b.waypoints = a.waypoints);
+  a.avoidpolygons && (b.avoidpolygons = a.avoidpolygons);
+  a.avoidroad && (b.avoidroad = a.avoidroad);
+  wx.request({
+    url: "https://restapi.amap.com/v3/direction/driving",
+    data: b,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (c) {
+      c &&
+        c.data &&
+        c.data.route &&
+        a.success({
+          paths: c.data.route.paths,
+          taxi_cost: c.data.route.taxi_cost || "",
+        });
+    },
+    fail: function (c) {
+      a.fail({ errCode: "0", errMsg: c.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getWalkingRoute = function (a) {
+  var b = Object.assign({}, this.requestConfig);
+  a.origin && (b.origin = a.origin);
+  a.destination && (b.destination = a.destination);
+  wx.request({
+    url: "https://restapi.amap.com/v3/direction/walking",
+    data: b,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (c) {
+      c && c.data && c.data.route && a.success({ paths: c.data.route.paths });
+    },
+    fail: function (c) {
+      a.fail({ errCode: "0", errMsg: c.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getTransitRoute = function (a) {
+  var b = Object.assign({}, this.requestConfig);
+  a.origin && (b.origin = a.origin);
+  a.destination && (b.destination = a.destination);
+  a.strategy && (b.strategy = a.strategy);
+  a.city && (b.city = a.city);
+  a.cityd && (b.cityd = a.cityd);
+  wx.request({
+    url: "https://restapi.amap.com/v3/direction/transit/integrated",
+    data: b,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (c) {
+      c &&
+        c.data &&
+        c.data.route &&
+        ((c = c.data.route),
+        a.success({
+          distance: c.distance || "",
+          taxi_cost: c.taxi_cost || "",
+          transits: c.transits,
+        }));
+    },
+    fail: function (c) {
+      a.fail({ errCode: "0", errMsg: c.errMsg || "" });
+    },
+  });
+};
+AMapWX.prototype.getRidingRoute = function (a) {
+  var b = Object.assign({}, this.requestConfig);
+  a.origin && (b.origin = a.origin);
+  a.destination && (b.destination = a.destination);
+  wx.request({
+    url: "https://restapi.amap.com/v3/direction/riding",
+    data: b,
+    method: "GET",
+    header: { "content-type": "application/json" },
+    success: function (c) {
+      c && c.data && c.data.route && a.success({ paths: c.data.route.paths });
+    },
+    fail: function (c) {
+      a.fail({ errCode: "0", errMsg: c.errMsg || "" });
+    },
+  });
+};
+
+export default {
+  AMapWX
+}

+ 1 - 1
src/manifest.json

@@ -50,7 +50,7 @@
 	"quickapp": {},
 	/* 小程序特有相关 */
 	"mp-weixin": {
-		"appid": "wx6da2b44a4ddf5248",
+		"appid": "wx1845c7dab9e8b236",
 		"setting": {
 			"urlCheck": false,
 			"es6": true,

+ 12 - 0
src/pages.json

@@ -90,6 +90,18 @@
       }
     },
     {
+      "path": "pages/inhert/village/list",
+      "style": {
+        "navigationBarTitleText": "村落列表"
+      }
+    },
+    {
+      "path": "pages/inhert/village/details",
+      "style": {
+        "navigationBarTitleText": "村落详情"
+      }
+    },
+    {
       "path": "pages/article/common/list",
       "style": {
         "navigationBarTitleText": "通用列表页"

+ 67 - 30
src/pages/home.vue

@@ -14,12 +14,21 @@
 
       <!-- 分栏 -->
       <view class="shadow-l radius-l bg-base p-3">
-        <image 
-          class="w-100"
-          src="/static/images/home/MainBanner.jpg"
-          mode="widthFix"
+        <view 
+          class="main-banner-box"
           @click="navTo('home/introduction')"
-        />
+        >
+          <text class="title">闽南文化生态保护区(厦门市)</text>
+          <text>世界闽南文化交流中心</text>
+          <view class="more">
+            <text>查看详情</text>
+          </view>
+          <image 
+            class="footer"
+            src="/static/images/home/MainBanner2.png"
+            mode="widthFix"
+          />
+        </view>
         <view class="position-relative d-flex flex-row flex-wrap justify-between mt-3">
           <view  
             v-for="(tab, k) in subTabs1" 
@@ -28,7 +37,7 @@
             @click="tab.onClick"
           >
             <image class="width-100" :src="tab.icon" mode="widthFix" />
-            <text class="color-second-text mt-2">{{ tab.name }}</text>
+            <text class="color-second-text mt-2 size-base text-align-center">{{ tab.name }}</text>
           </view>
 
           <Box1AudioPlay class="w-100 mt-3 mb-3" title="里厚吖:你好呀" />
@@ -40,7 +49,7 @@
             @click="tab.onClick"
           >
             <image class="width-100" :src="tab.icon" mode="widthFix" />
-            <text class="color-second-text mt-2">{{ tab.name }}</text>
+            <text class="color-second-text mt-2 text-align-center">{{ tab.name }}</text>
           </view>
         </view>
       </view>
@@ -165,8 +174,8 @@ const subTabs1 = [
     icon: MainBoxIcon2, 
     onClick: () => navTo('/pages/article/common/list', {
       title: '古早味',
-      mainBodyColumnId: 0,
-      modelId: 0,
+      mainBodyColumnId: 303,
+      modelId: 16,
       itemType: 'article-common',
       detailsPage: '/pages/article/details',
     }) 
@@ -177,8 +186,8 @@ const subTabs1 = [
     icon: MainBoxIcon4, 
     onClick: () => navTo('/pages/article/common/list', {
       title: '民俗活动', 
-      mainBodyColumnId: 0,
-      modelId: 0,
+      mainBodyColumnId: 299,
+      modelId: 18,
       itemType: 'article-common',
       detailsPage: '/pages/article/details',
     }) 
@@ -190,8 +199,8 @@ const subTabs2 = [
     icon: MainBoxIcon5 , 
     onClick: () => navTo('/pages/article/common/list', {
       title: '红砖厝韵',
-      mainBodyColumnId: 0,
-      modelId: 0,
+      mainBodyColumnId: 252,
+      modelId: 3,
       itemType: 'article-common',
       detailsPage: '/pages/article/details',
     }) 
@@ -199,35 +208,23 @@ const subTabs2 = [
   { 
     name: '薪传匠艺', 
     icon: MainBoxIcon6 , 
-    onClick: () => navTo('/pages/article/common/list', {
-      title: '薪传匠艺',
-      mainBodyColumnId: 0,
-      modelId: 0,
-      itemType: 'article-common',
-      detailsPage: '/pages/article/details',
-    }) 
+    onClick: () => navTo('/pages/inhert/intangible/list')
   },
   { 
     name: '工夫茶道', 
     icon: MainBoxIcon7 , 
     onClick: () => navTo('/pages/article/common/list', {
       title: '工夫茶道',
-      mainBodyColumnId: 0,
-      modelId: 0,
+      mainBodyColumnId: 311,
+      modelId: 3,
       itemType: 'article-common',
       detailsPage: '/pages/article/details',
     }) 
   },
   { 
-    name: '文化地图', 
+    name: '特色村社', 
     icon: MainBoxIcon8 , 
-    onClick: () => navTo('/pages/article/common/list', {
-      title: '文化地图',
-      mainBodyColumnId: 0,
-      modelId: 0,
-      itemType: 'article-common',
-      detailsPage: '/pages/article/details',
-    }) 
+    onClick: () => navTo('/pages/inhert/village/list')
   },
 ]
 
@@ -280,5 +277,45 @@ const recommendLoader = useSimpleDataLoader(async () => {
       right: 2rpx;
     }
   }
+  .main-banner-box {
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    border-radius: 15rpx;
+    background: linear-gradient(180deg, #E5CDAB 0%, #F0E3D6 100%), #F7F3E8;
+    padding: 20rpx;
+    font-family: "SongtiSCBlack";
+    color: #432A04;
+
+    .title {
+      font-size: 46rpx;
+    }
+    text {
+      font-size: 35rpx;
+      margin-top: 10rpx;
+    }
+    .more {
+      margin-top: 30rpx;
+      padding: 10rpx 20rpx;
+      width: 150rpx;
+      background-image: url('/static/images/home/MainBanner.png');
+      background-size: 100% auto;
+      background-repeat: no-repeat;
+
+      text {
+        font-family: initial;
+        font-size: 30rpx;
+      }
+    }
+    .footer {
+      position: absolute;
+      right: 0;
+      bottom: 0;
+      width: 370rpx;
+      z-index: 2;
+      height: auto;
+    }
+  }
 }
 </style>

+ 1 - 1
src/pages/inhert/artifact/details.vue

@@ -30,7 +30,7 @@
               </view>
               <view class="entry">
                 <view class="label">年代:</view>
-                <view class="value">{{ loader.content.value.age }} 年)</view>
+                <view class="value">{{ loader.content.value.age }}</view>
               </view>
               <view class="entry">
                 <view class="label">文物类型:</view>

+ 354 - 0
src/pages/inhert/village/details.vue

@@ -0,0 +1,354 @@
+<template>
+  <SimplePageContentLoader :loader="contentLoader">
+    <view v-if="contentLoader.loadStatus.value == 'finished'" style="padding-bottom: 120rpx;">
+      <view class="top-banner">
+        <view class="banner">
+          <swiper class="swiper" circular :indicator-dots="false" :autoplay="true" :interval="2000" :duration="1000">
+            <swiper-item v-for="(item, k) in data.images" :key="k">
+              <view class="item" @click="onPreviewImage(k)">
+                <image :src="item" mode="aspectFill"></image>
+              </view>
+            </swiper-item>
+          </swiper>
+        </view>
+        <view class="mask">
+          <view class="title">
+            <text>{{ data.villageName }}</text>
+          </view>
+        </view>
+      </view>
+      <view class="main">
+        <view class="intro-block">
+          <view class="title">
+            <view class="line"></view>
+            <text>村史馆起源</text>
+          </view>
+          <view class="desc">
+            <u-parse :content="data.overview" :tagStyle="commonParserStyle"></u-parse>
+            <text v-if="!data.overview" >无内容,请添加内容! {{ data.overview }}</text>
+          </view>
+        </view>
+        <view class="entrance">
+          <view 
+            v-for="(tag, key) in tagsData"
+            :key="key"
+            class="item"
+            @click="goList(tag)"
+          >
+            <image :src="tag.image" mode="aspectFill"></image>
+            <view class="title">{{ tag.title }}</view>
+          </view>
+        </view>
+        <view class="map-block">
+          <view class="map">
+            <map id="map"
+              style="width: 686rpx; height: 358rpx;"
+              :latitude="center[1]"
+              :longitude="center[0]"
+              :markers="markers"
+              :scale="15"
+            />
+          </view>
+          <view class="nav">
+            <text class="iconfont icon-navigation"></text>
+            <text class="address">{{ data.address }}</text>
+            <view class="go" @click="goAddress">
+              <text>去这里</text>
+              <view class="right">
+                <text class="iconfont icon-arrow-right"></text>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="category">
+          <view class="name">特色插画</view>
+          <view class="more">更多》</view>
+        </view>
+        <view class="banner painting">
+          <swiper class="swiper" circular :indicator-dots="false" :autoplay="true" :interval="2000" :duration="1000">
+            <swiper-item v-for="item in paintingList" :key="item.id">
+              <view class="item">
+                <image :src="item.image" mode="aspectFill"></image>
+              </view>
+            </swiper-item>
+          </swiper>
+        </view>
+        <view class="category">
+          <view class="name">乡村记忆</view>
+          <view class="more">更多》</view>
+        </view>
+        <view class="memories">
+          <view class="item" v-for="(item, i) in memories" :key="i">
+            <image mode="aspectFill" :src="item.image"></image>
+            <view class="info">
+              <view class="title">{{ item.name}}</view>
+              <view class="desc ellipsis-4">{{ item.desc }}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </SimplePageContentLoader>
+</template>
+
+<script setup lang="ts">
+import VillageApi from '@/api/inhert/VillageApi';
+import commonParserStyle from '@/common/style/commonParserStyle';
+import EmptyImage from '@/static/EmptyImage.png';
+import { ref } from 'vue';
+import { useLoadQuerys } from '@/common/composeabe/LoadQuerys';
+import { useSwiperImagePreview } from '@/common/composeabe/SwiperImagePreview';
+import { navTo } from '@/common/utils/PageAction';
+import uParse from '@/uni_modules/uview-plus/components/u-parse/u-parse.vue';
+import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
+import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
+
+const center = ref([118.15723, 24.48147]);
+const markers = ref<any>([]);
+const tagsData = ref<{ image: string, title: string }[]>([]);
+
+const paintingList = ref([
+  {
+    id: 1,
+    image: 'https://lucheng.app4lh.cn/static/tmp/static/tmp/banner_history.png',
+  },
+  {
+    id: 2,
+    image: 'https://lucheng.app4lh.cn/static/tmp/static/tmp/banner_history.png',
+  }
+]);
+const memories = ref([
+  {
+    id: 1,
+    image: 'https://lucheng.app4lh.cn/static/tmp/static/tmp/history_item.png',
+    name: '蒋氏家庙',
+    desc: '位于澳头西侧海边,修建于元至正十四(1354年),抗战时期,前落回廊被炸毁,1986年重修。坐东朝西,前后两落大厝',
+  },
+  {
+    id: 2,
+    image: 'https://lucheng.app4lh.cn/static/tmp/static/tmp/history_item.png',
+    name: '向东厝',
+    desc: '位于澳头东下海仔8号,建于清光绪年间,坐西朝东、是澳头唯一面向东的古大厝,故名“向东厝”。此建筑为土木砖石结构的“两落双边护”闽南红砖民居。',
+  },
+  {
+    id: 3,
+    image: 'https://lucheng.app4lh.cn/static/tmp/static/tmp/history_item.png',
+    name: '苏氏家庙',
+    desc: '位于澳头西海边,距“蒋氏家庙”后墙0.4米,始建于清代道光年间,1950年重修。厅堂悬挂宋代丞相魏国公苏颂“学研天人”巨匾及额匾“兵部侍郎”,落款“清嘉靖十九年”。 ',
+  }
+]);
+
+const { querys } = useLoadQuerys({ 
+  id: 0,
+}, () => contentLoader.loadData());
+
+const data = ref({
+  images: [
+    'https://lucheng.app4lh.cn/static/tmp/static/tmp/banner_history.png',
+    'https://lucheng.app4lh.cn/static/tmp/static/tmp/banner_history.png',
+  ],
+  overview: '',
+  longitude: 0,
+  latitude: 0,
+  address: '',
+  villageName: '',
+})
+function goAddress() {
+  navTo('/pages/article/nav/navto', {
+    latitude: data.value.latitude,
+    longitude: data.value.longitude,
+  })
+}
+const { onPreviewImage } = useSwiperImagePreview(() => data.value.images || [])
+
+function goList(tag: any) {
+  navTo('/pages/article/list', {
+    modelId: tag.modelId,
+    mainBodyColumnId: tag.mainBodyColumnId,
+  });
+}
+
+const contentLoader = useSimpleDataLoader(async () => {
+  data.value = {
+    ...data.value,
+    ...JSON.parse(uni.getStorageSync('VillageTemp') || '{}'),
+  };
+
+
+  if (data.value.longitude && data.value.latitude) {
+    center.value = [Number(data.value.longitude), Number(data.value.latitude)];
+  } else {
+    center.value = [118.11593, 24.467580];
+  }
+  markers.value = [
+    {
+      id: 1,
+      latitude: center.value[1],
+      longitude: center.value[0],
+      width: 40,
+      height: 40,
+      iconPath: '/static/images/icon_marker.png',
+    }
+  ];
+
+  const menu = await VillageApi.getVillageMenuList(querys.value.id);
+
+  tagsData.value = menu.filter((i) => i.platform == 2).map((item, index) => {
+    return {
+      title: item.name,
+      image: item.logo || EmptyImage,
+      modelId: item.modelId,
+      mainBodyColumnId: item.mainBodyColumnId,
+    };
+  });
+
+  console.log(data.value);
+}, false);
+
+</script>
+
+<style lang="scss" scoped>
+page {
+  background: #FFF3E1;
+}
+.banner {
+  .swiper {
+    height: 360rpx;
+  }
+}
+.entrance{
+  flex-wrap: wrap;
+  background:transparent;
+  justify-content: flex-start;
+  margin-top:52rpx;
+  margin-bottom: 44rpx;
+  margin-left:-15rpx;
+  margin-right:-15rpx;
+  padding: 0 20rpx;
+  .item{
+    width: 22%; // 从25%调整为23%
+    margin-bottom: 40rpx;
+    margin-left: 15rpx;
+    text-align: center;
+    image{
+      width: 95rpx;
+      height:95rpx;
+      display: block;
+      margin: 0 auto;
+    }
+    .title{
+      font-weight: 400;
+    }
+    &:nth-child(4n+1) { // 每行第一个
+      margin-left: 0;
+    }
+    &:nth-child(4n) { // 每行最后一个
+      margin-right: 0;
+    }
+  }
+}
+.memories{
+  .item{
+    background: #FFFFFF;
+    border-radius: 18rpx;
+    display: flex;
+    margin-bottom: 40rpx;
+    height:282rpx;
+    overflow: hidden;
+    image{
+      width: 262rpx;
+      height: 282rpx;
+      border-radius: 20rpx;
+      display: block;
+      flex-shrink: 0;
+    }
+    .info{
+      padding:32rpx 26rpx;
+      .title{
+        font-weight: 600;
+        font-size: 30rpx;
+        color: #312520;
+      }
+      .desc{
+        font-size: 28rpx;
+        color: #666666;
+        line-height: 48rpx;
+        text-align: justify;
+      }
+    }
+  }
+}
+.top-banner{
+  height: 780rpx;
+  .banner{
+    .swiper{
+      height: 780rpx!important;
+      image{
+        height: 100%;
+      }
+    }
+  }
+  .mask {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 750rpx;
+    height: 780rpx;
+    z-index: 99;
+    background: url('https://mn.wenlvti.net/uploads/20250313/684f313efcde825ecb5a4e5aecbf6ce4.png') center no-repeat;
+    background-size: cover;
+    .title{
+      position: absolute;
+      top: 23rpx;
+      left: 33rpx;
+      font-weight: 600;
+      font-size: 30rpx;
+      color: #FFFFFF;
+      background: #FF8719;
+      padding:10rpx 24rpx;
+      display: inline-block;
+      border-radius: 24rpx 24rpx 24rpx 0rpx;
+    }
+  }
+
+
+}
+.map-block{
+  background: #FFFFFF;
+  .nav{
+    background: #FFFFFF;
+    font-size: 24rpx;
+    color: #111111;
+    display: flex;
+    align-items: center;
+    padding:14rpx 20rpx;
+    text.icon-navigation{
+      display: inline-block;
+      margin-right: 12rpx;
+
+    }
+    .address{
+      flex:1;
+    }
+    .go{
+      color: #FF8719;
+      display: flex;
+      align-items: center;
+      .right{
+        width: 24rpx;
+        height: 24rpx;
+        border-radius: 50%;
+        background: #FF8719;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-left: 8rpx;
+        text.iconfont{
+          font-size: 18rpx;
+          color:#fff;
+        }
+      }
+    }
+  }
+}
+</style>

+ 63 - 0
src/pages/inhert/village/list.vue

@@ -0,0 +1,63 @@
+<template>
+  <view class="d-flex flex-column bg-base">
+    <u-navbar title="特色村社" autoBack placeholder bgColor="transparent" />
+    <view class="d-flex flex-col p-2">
+      <uni-search-bar 
+        v-model="searchValue"
+        radius="100" 
+        bgColor="#fff" 
+        placeholder="搜索特色村社" 
+        clearButton="auto" 
+        cancelButton="none"
+        @confirm="doSearch"
+      />
+    </view>
+    <view class="d-flex flex-row flex-wrap justify-between p-2">
+      <view
+        v-for="item in listLoader.list.value"
+        :key="item.id"
+        class="width-1-2"
+      >
+        <Box2LineLargeImageUserShadow 
+          classNames="ml-2 mb-3"
+          titleColor="title-text"
+          :image="item.image"
+          :title="item.name"
+          @click="goDetails(item.id)"
+        />
+      </view>
+    </view>
+    <SimplePageListLoader :loader="listLoader" />
+  </view>
+</template>
+
+<script setup lang="ts">
+import { ref, watch } from 'vue';
+import { useSimplePageListLoader } from '@/common/composeabe/SimplePageListLoader';
+import { navTo } from '@/common/utils/PageAction';
+import SimplePageListLoader from '@/common/components/SimplePageListLoader.vue';
+import Box2LineLargeImageUserShadow from '@/pages/parts/Box2LineLargeImageUserShadow.vue';
+import VillageApi from '@/api/inhert/VillageApi';
+
+const searchValue = ref('');
+const listLoader = useSimplePageListLoader<{
+  id: number,
+  image: string,
+  name: string
+}>(8, async (page, pageSize) => {
+  const res = await VillageApi.getVallageList();
+  return res.map((item) => {
+    return {
+      id: item.id,
+      image: item.image,
+      name: item.villageName,
+    }
+  })
+});
+function doSearch() {
+  listLoader.loadData(undefined, true);
+}
+function goDetails(id: number) {
+  navTo('details', { id })
+}
+</script>

+ 1 - 1
src/pages/parts/Box2LineImageRightShadow.vue

@@ -1,6 +1,6 @@
 <template>
   <view 
-    class="d-flex flex-row justify-between shadow-s radius-base mb-3 p-2 pt-3 pb-3"
+    class="d-flex flex-row justify-between shadow-s radius-base mb-3 p-2 pt-3 pb-3 overflow-hidden"
     @click="$emit('click')"
   >
     <view class="d-flex flex-row w-100">

+ 1 - 1
src/pages/parts/Box2LineLargeImageUserShadow.vue

@@ -1,6 +1,6 @@
 <template>
   <view 
-    :class="'position-relative grid4-item d-flex flex-col shadow-l radius-l bg-base p-2 mb-2 ' + classNames"
+    :class="'position-relative grid4-item d-flex flex-col shadow-l radius-l bg-base p-2 mb-2 overflow-hidden ' + classNames"
     @click="$emit('click')"
   >
     <image class="w-100 height-300 radius-base" :src="image" mode="aspectFill" />

+ 169 - 0
src/pages/travel/nav/navto.vue

@@ -0,0 +1,169 @@
+<template>
+  <view class="container">
+    <map
+      id="map"
+      class="map"
+      :latitude="querys.latitude"
+      :longitude="querys.longitude"
+      :polyline="polyline"
+      :markers="markers"
+      scale="15"
+      show-compass
+      show-traffic
+      show-locate
+    >
+    </map>
+    <cover-view class="map-info">
+      <cover-view class="title">{{ distance }}</cover-view>
+      <cover-view class="sub-title">{{ taxi_cost }}</cover-view>
+    </cover-view>
+  </view>
+</template>
+
+<script setup lang="ts">
+import { showError } from '@/common/composeabe/ErrorDisplay';
+import { useLoadQuerys } from '@/common/composeabe/LoadQuerys';
+import AppCofig from '@/common/config/AppCofig';
+import { back } from '@/common/utils/PageAction';
+import { ref } from 'vue';
+import amapFile from '@/libs/amap-wx.130';
+
+const mapCtx = uni.createMapContext('map');
+const polyline = ref();
+const markers = ref();
+const distance = ref('');
+const taxi_cost = ref('');
+const { querys } = useLoadQuerys({ 
+  latitude: 0,  
+  longitude: 0,
+}, async (querys) => {
+  uni.showLoading({ title: '加载中...' });
+  try {
+
+    const curretLocation = await new Promise<{ latitude: number, longitude: number }>((resolve, reject) => {
+      uni.getLocation({
+        type: 'gcj02',
+        success: function(res) {
+          const latitude = res.latitude;
+          const longitude = res.longitude;
+          resolve({ latitude, longitude });
+        }, 
+        fail: (err) => {
+          let message = err.errMsg
+          if (err.errMsg.includes('auth deny')) {
+            message = '请允许定位后,才能为您导航哦';
+          } else if (err.errMsg.includes('location service off')) {
+            message = '请未开启定位服务,才能为您导航哦';
+          } 
+          reject(message);
+        },
+      }) 
+    })
+
+    markers.value = [
+      {
+        id: 1,
+        latitude: querys.latitude,
+        longitude: querys.longitude, 
+        iconPath: '/static/images/icon_marker.png',
+        width: 40,
+        height: 40,
+      },
+      {
+        id: 2,
+        latitude: curretLocation.latitude,
+        longitude: curretLocation.longitude, 
+        iconPath: '/static/images/icon_marker2.png',
+        width: 50,
+        height: 50,
+      }
+    ];
+
+    polyline.value = await new Promise((resolve, reject) => {
+
+      const myAmapFun = new amapFile.AMapWX({key:  AppCofig.amapKey});
+      myAmapFun.getDrivingRoute({
+        origin: `${curretLocation.longitude.toFixed(5)},${curretLocation.latitude.toFixed(5)}`,
+        destination: `${querys.longitude.toFixed(5)},${querys.latitude.toFixed(5)}`,
+        nosteps: 1,
+        success: function(data: any){
+          var points = [];
+          if(data.paths && data.paths[0] && data.paths[0].steps){
+            var steps = data.paths[0].steps;
+            for(var i = 0; i < steps.length; i++){
+              var poLen = steps[i].polyline.split(';');
+              for(var j = 0;j < poLen.length; j++){
+                points.push({
+                  longitude: parseFloat(poLen[j].split(',')[0]),
+                  latitude: parseFloat(poLen[j].split(',')[1])
+                })
+              } 
+            }
+          } 
+          distance.value = '距离您约 ' + data.paths[0].distance + '米'
+          taxi_cost.value =  '打车约' + parseInt(data.taxi_cost) + '元'
+          resolve([{
+            points: points,
+            color: "#0091ff",
+            width: 6
+          }]);
+        },
+        fail: function(info: any) {
+          reject('路线规划失败:' + info);
+        }
+      })
+    });
+
+    mapCtx.includePoints({
+      points: [
+        { latitude: querys.latitude, longitude: querys.longitude },
+        { latitude: curretLocation.latitude, longitude: curretLocation.longitude }
+      ],
+      padding: [20, 20, 20, 20],
+    });
+  } catch (e) {
+    showError(e, undefined, () => back());
+  } finally {
+    uni.hideLoading();
+  }
+});
+
+</script>
+
+<style lang="scss">
+.container {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  padding-bottom: 0;
+  
+  #map {
+    width: 100%;
+    height: 100%;
+  }
+  .map-info {
+    position: absolute;
+    bottom: 50px;
+    left: 40rpx;
+    right: 40rpx;
+    display: flex;
+    flex-direction: column;
+    background-color: #fff;
+    border-radius: 8px;
+    padding: 20rpx;
+    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+
+    .title {
+      font-size: 34rpx;
+      font-weight: bold;
+      color: #333;
+    }
+    .sub-title {
+      font-size: 26rpx;
+      margin-top: 10rpx;
+      color: #666;
+    }
+  }
+}
+</style>

BIN
src/static/images/home/MainBanner.jpg


BIN
src/static/images/home/MainBanner.png


BIN
src/static/images/home/MainBanner2.png


BIN
src/static/images/home/MainBoxIcon8.png