ws 1 年之前
父节点
当前提交
dd681c4f7b

+ 54 - 120
nnzwminiapp/pagesPublic/pages/tdcr/details/detail.js

@@ -19,95 +19,10 @@ Page({
     }],
     tabActive: 0,
     dataIndex: 0,
-    list: [{
-      longitude: 106.596361,
-      latitude: 29.579387,
-      name: '中西医结合医院地块',
-      img: 'zsyy.png',
-      time: '2024年4月',
-      description: '项目位于南岸区弹子石组团,南靠重庆卷烟厂,北邻弹子石新街,项目范围面积2.44公顷(36.6亩) 。项目周边以住宅小区为主,东北侧分布有弹子石、长嘉汇商业购物中心,其他主要以沿街生活配套性商业为主;周边2KM范围内分布有三所小学、四所中学、两处医院,公共配套设施较为完善。',
-      area: 36.6,
-      status: '已开始供地',
-      contstructionArea: 5.58,
-      use: '居民用地',
-      progress: '在第五人民医院搬迁至新址后,计划将中西医结合医院搬迁至原第五人民医院院区,目前第五人民医院新址办公楼正在修建,中西医结合医院预计2024年8月进行搬迁。地块内涉及2处未定级文保单位(文幼章故居、老教会楼),私房约300户(住宅291户,非住宅9户),面积住宅17428平方米,非住宅2321平方米。',
-      rate: 4,
-      dutyUnit: '区土储中心',
-      phoneNum: '12345',
-      polygon: [
-        {
-          longitude: 106.594297,
-          latitude: 29.578465
-        },
-        {
-          longitude: 106.594452,
-          latitude: 29.578218
-        },
-        {
-          longitude: 106.595821,
-          latitude: 29.577567
-        },
-        {
-          longitude: 106.596113,
-          latitude: 29.577515
-        },
-        {
-          longitude: 106.596965,
-          latitude: 29.578226
-        },
-        {
-          longitude: 106.597249,
-          latitude: 29.578383
-        },
-        {
-          longitude: 106.597334,
-          latitude: 29.578465
-        },
-        {
-          longitude: 106.597334,
-          latitude: 29.57869
-        },
-        {
-          longitude: 106.597275,
-          latitude: 29.578839
-        },
-        {
-          longitude: 106.597375,
-          latitude: 29.579041
-        },
-        {
-          longitude: 106.597103,
-          latitude: 29.579513
-        },
-        {
-          longitude: 106.595184,
-          latitude: 29.579925
-        },
-        {
-          longitude: 106.594943,
-          latitude: 29.57982
-        }
-      ],
-      peripherytabs: [{
-        label: '教育'
-      }, {
-        label: '商业'
-      }],
-      surroundingFacilities: [
-        {
-          id: 1, name: '重庆市第11中学', type: '教育',
-          longitude: 106.599916, latitude: 29.582458
-        }, {
-          id: 2, name: '弹子石老街景区', type: '商业',
-          longitude: 106.587890, latitude: 29.579806
-        }, {
-          id: 3, name: '泽科弹子石中心', type: '商业',
-          longitude: 106.591454, latitude: 29.583796
-        }
-      ]
-    }],
+    list: [],
     peripherytabsindex:0,
     markers: [],
+    scale: '16',
     centerPoint: {
       longitude: 106.596361,
       latitude: 29.579387,
@@ -119,41 +34,18 @@ Page({
    */
   onLoad(options) {
     const _this = this
-    let markers = []
-    _this.data.list.forEach(item => {
-      item.surroundingFacilities.forEach(map => {
-        markers.push({
-          id: map.id,
-          latitude: map.latitude,
-          longitude: map.longitude,
-          callout: {
-            content: map.name,
-            fontSize: 11,
-            padding: 5,
-            borderRadius: 5,
-            display: 'ALWAYS'
-          },
-          iconPath: imgUrl + '/location.png',
-          width: 20,
-          height: 25,
+    wx.request({
+      url: imgUrl + 'tdcr/details/data.json',
+      success: (res) => {
+        _this.setData({
+          headerStyle: wx.getMenuButtonBoundingClientRect(),
+          dataIndex: options.index,
+          list: res.data,
         })
-      })
-    })
-    this.setData({
-      headerStyle: wx.getMenuButtonBoundingClientRect(),
-      dataIndex: options.index,
-      markers,
-      polygons: [{
-        dashArray: [10, 10],
-        strokeColor: '#ffe20063',
-        fillColor: '#ffe20063',
-        points: _this.data.list[options.index].polygon
-      }],
-      centerPoint: {
-        longitude: _this.data.list[options.index].longitude,
-        latitude: _this.data.list[options.index].latitude,
+        _this.initPage()
       }
     })
+
   },
 
   /**
@@ -223,7 +115,7 @@ Page({
   callPhone() {
     const _this = this
     wx.makePhoneCall({
-      phoneNumber: _this.data.list[_this.data.dataIndex].phoneNum,
+      phoneNumber: _this.data.list[_this.data.dataIndex].phoneNum + '',
       fail: (e) => {
         console.log(e);
       }
@@ -237,5 +129,47 @@ Page({
         latitude: map[0].latitude,
       }
     })
+  },
+  switchDetail(e) {
+    console.log(e);
+    this.setData({
+      dataIndex: e.target.dataset.index || e.currentTarget.dataset.index,
+      tabActive: 0
+    })
+    this.initPage()
+  },
+  initPage() {
+    let markers = []
+    this.data.list[this.data.dataIndex].surroundingFacilities.forEach(map => {
+      markers.push({
+        id: map.id,
+        latitude: map.latitude,
+        longitude: map.longitude,
+        callout: {
+          content: map.name,
+          fontSize: 11,
+          padding: 5,
+          borderRadius: 5,
+          display: 'ALWAYS'
+        },
+        iconPath: imgUrl + 'location.png',
+        width: 20,
+        height: 25,
+      })
+    })
+    this.setData({
+      markers,
+      scale: this.data.list[this.data.dataIndex].scale || '16',
+      polygons: [{
+        dashArray: [10, 10],
+        strokeColor: '#ffe20063',
+        fillColor: '#ffe20063',
+        points: this.data.list[this.data.dataIndex].polygon
+      }],
+      centerPoint: {
+        longitude: this.data.list[this.data.dataIndex].longitude,
+        latitude: this.data.list[this.data.dataIndex].latitude,
+      },
+    })
   }
 })

+ 1 - 1
nnzwminiapp/pagesPublic/pages/tdcr/details/detail.wxml

@@ -2,7 +2,7 @@
 <view class="main" style="background-image: url({{imgPath}}/index/bg.png);">
   <view class="header" style="height: {{headerStyle.height}}px;line-height: {{headerStyle.height}}px;margin-top: {{headerStyle.top}}px;"><image class="go-back" bindtap="goBack" src="{{imgPath}}/details/back.png" />{{list[dataIndex].name}}</view>
   <view class="map-content" style="background-image: url({{imgPath}}/details/map-border.png);">
-    <map class="map" enable-satellite="true" longitude="{{centerPoint.longitude}}" latitude="{{centerPoint.latitude}}" polygons="{{polygons}}" markers="{{markers}}"></map>
+    <map class="map" enable-satellite="true" longitude="{{centerPoint.longitude}}" latitude="{{centerPoint.latitude}}" polygons="{{polygons}}" markers="{{markers}}" scale="{{scale}}"></map>
   </view>
   <view class="tab">
     <view class="tab-item" wx:for="{{tabs}}" style="{{tabActive == index ? 'background-image: url(' + imgPath + '/details/tab-bg.png);' : ''}}" data-index="{{index}}" bindtap="tabEvent">{{item.label}}</view>

+ 5 - 5
nnzwminiapp/pagesPublic/pages/tdcr/details/wxml/other.wxml

@@ -1,24 +1,24 @@
 <view class="ohter_bg">
 	<scroll-view class="ohter_sc">
-		<view wx:for="i in 20" class="ohter_item_bg" style="background-image: url('{{imgPath}}/other/ohter1.png'); ">
+		<view wx:for="{{list}}" wx:if="{{index != dataIndex}}" class="ohter_item_bg" style="background-image: url('{{imgPath}}/other/ohter1.png'); " bindtap="switchDetail" data-index="{{index}}">
 			<view class="ohter_item_imge_bg" >
-				<image class="ohter_item_imge"  src="{{imgPath}}other/tp1.jpg"></image>
+				<image class="ohter_item_imge"  src="{{imgPath}}/details/img/{{item.img}}"></image>
 			</view>
 			<view class="ohter-left">
-				<view class="ohter-left-top">双峰山1号地块</view>
+				<view class="ohter-left-top">{{item.name}}</view>
 				<view class="ohter-left-bottom">
 					<view class="ohter_gymj_h">
 						<view style="width: 40rpx; height: 25rpx;">
 							<image style="display: block; width: 25rpx; height: 25rpx;" src="{{imgPath}}/other/ohter2.png"></image>
 						</view>
-						<view style="color: #fff; font-size: 25rpx; font-weight: bold;">供应面积/26亩</view>
+						<view style="color: #fff; font-size: 25rpx; font-weight: bold;">供应面积/{{item.area}}亩</view>
 					</view>
 					<view class="ohter_jhgdyt_h" >
 						<view style="width: 40rpx; height: 25rpx;">
 							<image style="display: block; width: 25rpx; height: 25rpx;" src="{{imgPath}}/other/ohter3.png"></image>
 						</view>
 						<view style="color: #fff; font-size: 25rpx; font-weight: bold;">计划供地用途</view>
-						<view style="margin-left: 10rpx; height: 30rpx; border:solid 1rpx #00FFFF; color: #00FFFF; border-radius: 10rpx;">居住用地</view>
+						<view style="margin-left: 10rpx; height: 30rpx; border:solid 1rpx #00FFFF; color: #00FFFF; border-radius: 10rpx;">{{item.use}}</view>
 					</view>
 				</view>
 			</view>

+ 1 - 1
nnzwminiapp/pagesPublic/pages/tdcr/details/wxml/survey.wxml

@@ -8,7 +8,7 @@
       <view class="s-item-f">供应面积</view>
     </view>
     <view class="s-item">
-      <view class="s-item-t"><text class="s-item-num">{{list[dataIndex].contstructionArea}}</text>㎡</view>
+      <view class="s-item-t"><text class="s-item-num">{{list[dataIndex].contstructionArea}}</text>㎡</view>
       <view  class="s-item-f">建筑面积</view>
     </view>
     <view class="s-item">

+ 2 - 2
nnzwminiapp/pagesPublic/pages/tdcr/index.wxml

@@ -3,13 +3,13 @@
   capture-bind:touchmove="handleTouchmove"
   capture-bind:touchstart="handleTouchstart"
   capture-catch:touchend="handleTouchend"
-  class="main" style="background-image: url({{imgPath}}/index/bg.png);">
+  class="main" style="background-image: url({{imgPath}}/index/bg.gif);">
   <image class="main-header" src="{{imgPath}}/index/header.png" />
   <view class="cursor-guy">
     <image class="cursor-size" wx:for="{{cursorGuys}}" src="{{imgPath}}/index/cursor.png" 
     style="margin-left: {{item.left}}vw;margin-top: {{item.top}}vh;"/>
   </view>
-  <view class="main-content" style="background-image: url({{imgPath}}/index/content-bg.png);">
+  <view class="main-content">
     <view class="item" wx:for="{{cursors}}" style="left: {{item.left}}vw;top: {{item.top}}vh;">
       <view class="item-title">
         <text>{{item.txt}}</text>

+ 21 - 18
nnzwminiapp/pagesPublic/pages/tdcr/tdcr-list/index.js

@@ -20,6 +20,7 @@ Page({
   list: [{
     left: 18.5,
     top: 21,
+    zIndex: 1,
     nameStyle: {
       txt: '中西医结合医院',
       img: 'tdcrlist7.png'
@@ -33,25 +34,10 @@ Page({
       top: -0.5,
       left: 0.5
     }
-  }, {
-    left: 27,
-    top: 28.5,
-    nameStyle: {
-      txt: '廖家山地块',
-      img: 'tdcrlist7.png'
-    },
-    lineStyle: {
-      height: 13,
-      left: 3,
-      top: -0.5
-    },
-    postionStyle: {
-      top: -0.5,
-      left: 0.5
-    }
-  }, {
+  },{
     left: 30,
     top: 34.5,
+    zIndex: 3,
     nameStyle: {
       txt: '南坪东路588号',
       img: 'tdcrlist8.png',
@@ -68,6 +54,23 @@ Page({
       left: 2.5
     }
   }, {
+    left: 27,
+    top: 28.5,
+    zIndex: 2,
+    nameStyle: {
+      txt: '廖家山地块',
+      img: 'tdcrlist7.png'
+    },
+    lineStyle: {
+      height: 13,
+      left: 3,
+      top: -0.5
+    },
+    postionStyle: {
+      top: -0.5,
+      left: 0.5
+    }
+  }, {
     left: 41,
     top: 48,
     nameStyle: {
@@ -213,7 +216,7 @@ Page({
     })
   },
   gotoDetail(e) {
-    if (e.target.dataset.index != 0) return
+    console.log(e);
     wx.navigateTo({
       url: '../details/detail?index=' + e.target.dataset.index,
     })

+ 2 - 2
nnzwminiapp/pagesPublic/pages/tdcr/tdcr-list/index.wxml

@@ -6,8 +6,8 @@
   class="main" style="background-image: url('{{imgUrl}}tdcrlist/tdcrlist3.png');">
   <view class="header" style="height: {{headerStyle.height}}px;line-height: {{headerStyle.height}}px;top: {{headerStyle.top}}px;">2024年土地出让</view>
 	<view class="map-block" style="background-image: url('{{imgUrl}}tdcrlist/tdcrlist1.png');">
-    <view class="map-block-item" wx:for="{{list}}" style="top: {{item.top}}vh;left: {{item.left}}vw;">
-      <view bindtap="gotoDetail" data-index="{{index}}" class="item-name" style="background-image:url('{{imgUrl}}tdcrlist/{{item.nameStyle.img}}');{{item.nameStyle.color ? 'color: ' + item.nameStyle.color + ';' : ''}}{{item.nameStyle.top ? 'top: ' + item.nameStyle.top + 'vh;' : ''}}{{item.nameStyle.left ? 'left: ' + item.nameStyle.left + 'vw;' : ''}}{{item.nameStyle.x ? 'background-position-x: ' + item.nameStyle.x + 'vw;' : ''}}">{{item.nameStyle.txt}}</view>
+    <view class="map-block-item" wx:for="{{list}}" style="top: {{item.top}}vh;left: {{item.left}}vw;{{item.zIndex ? 'z-index: ' + item.zIndex : ''}}">
+      <view bindtap="gotoDetail" data-index="{{index}}" data-scale="{{item.scale}}" class="item-name" style="background-image:url('{{imgUrl}}tdcrlist/{{item.nameStyle.img}}');{{item.nameStyle.color ? 'color: ' + item.nameStyle.color + ';' : ''}}{{item.nameStyle.top ? 'top: ' + item.nameStyle.top + 'vh;' : ''}}{{item.nameStyle.left ? 'left: ' + item.nameStyle.left + 'vw;' : ''}}{{item.nameStyle.x ? 'background-position-x: ' + item.nameStyle.x + 'vw;' : ''}}">{{item.nameStyle.txt}}</view>
       <view class="item-line" style="height: {{item.lineStyle.height}}vh;left: {{item.lineStyle.left}}vw;top: {{item.lineStyle.top}}vh;"></view>
       <view class="item-postion" style="background-image: url('{{imgUrl}}tdcr/sign.gif');left: {{item.postionStyle.left}}vw;top: {{item.postionStyle.top}}vh;"></view>
     </view>