ws 1 year ago
parent
commit
3acc122620

+ 17 - 49
nnzwminiapp/pagesPublic/pages/tdcr/details/detail.js

@@ -8,7 +8,6 @@ Page({
   data: {
     imgPath: imgUrl + 'tdcr/',
     headerStyle: {},
-    title: '廖家山地块',
     tabs: [{
       label: '概况',
     }, {
@@ -19,10 +18,6 @@ Page({
       label: '其他地块',
     }],
     tabActive: 0,
-    map: {
-      longitude: 106.644341,
-      latitude: 29.501202
-    },
     dataIndex: 0,
     list: [{
       longitude: 106.596361,
@@ -38,7 +33,7 @@ Page({
       progress: '在第五人民医院搬迁至新址后,计划将中西医结合医院搬迁至原第五人民医院院区,目前第五人民医院新址办公楼正在修建,中西医结合医院预计2024年8月进行搬迁。地块内涉及2处未定级文保单位(文幼章故居、老教会楼),私房约300户(住宅291户,非住宅9户),面积住宅17428平方米,非住宅2321平方米。',
       rate: 4,
       dutyUnit: '区土储中心',
-      phoneNum: 12345,
+      phoneNum: '12345',
       polygon: [
         {
           longitude: 106.594297,
@@ -93,49 +88,22 @@ Page({
           latitude: 29.57982
         }
       ],
-      "surroundingFacilities": [
+      peripherytabs: [{
+        label: '教育'
+      }, {
+        label: '商业'
+      }],
+      surroundingFacilities: [
         {
-          "name": "重庆市第11中学", "type": "教育"
+          name: '重庆市第11中学', type: '教育'
         }, {
-          "name": "弹子石老街景区", "type": "商业"
+          name: '弹子石老街景区', type: '商业'
         }, {
-          "name": "泽科弹子石中心", "type": "商业"
+          name: '泽科弹子石中心', type: '商业'
         }
       ]
-    }]
-	tabActive: 1,
-	map: {
-		longitude: 106.644341,
-		latitude: 29.501202
-	  },
-	peripherytabs:[{
-		label:'交通'
-	},
-	{
-		label:'医疗'
-	},
-	{
-		label:'生话'
-	},
-	{
-		label:'购物'
-	},
-	{
-		label:'美食'
-	},
-	{
-		label:'娱乐'
-	}],
-	peripherytabsindex:0,
-	peripherylist:[{name:"武警交通",distanc:0.5},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7}],
-	peripherylistdata:[
-		[{name:"武警交通",distanc:0.5},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7}],
-		[{name:"武警医疗",distanc:0.5},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7}],
-		[{name:"武警生活",distanc:0.5},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7}],
-		[{name:"武警购物",distanc:0.5},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7}],
-		[{name:"武警美食",distanc:0.5},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7}],
-		[{name:"武警娱乐",distanc:0.5},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7},{name:"武警医院",distanc:0.7}]
-	]
+    }],
+	  peripherytabsindex:0,
   },
 
   /**
@@ -209,11 +177,8 @@ Page({
     })
   },
   peripherytabEvent(e){
-	let a =  e.target.dataset.index
-	console.log(this.data.peripherylistdata[a]);
 	this.setData({
-		peripherytabsindex: a,
-		peripherylist: this.data.peripherylistdata[a]
+		peripherytabsindex: e.target.dataset.index,
 	})
   },
   goBack() {
@@ -222,7 +187,10 @@ 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);
+      }
     })
   }
 })

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

@@ -1,6 +1,6 @@
 <!--pagesPublic/pages/tdcr/details/detail.wxml-->
 <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" />{{title}}</view>
+  <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="{{list[dataIndex].longitude}}" latitude="{{list[dataIndex].latitude}}" polygons="{{polygons}}"></map>
   </view>

+ 6 - 6
nnzwminiapp/pagesPublic/pages/tdcr/details/wxml/periphery.wxml

@@ -1,14 +1,14 @@
 <view class="ppy-bg">
 	<view class="ppy_top">
-		<view wx:for="{{peripherytabs}}"  data-index="{{index}}" style="{{peripherytabsindex == index ? 'background-color: #00A4FF;' : ''}}" bindtap="peripherytabEvent" class="ppy_item">{{item.label}}</view>
+		<view wx:for="{{list[dataIndex].peripherytabs}}"  data-index="{{index}}" style="{{peripherytabsindex == index ? 'background-color: #00A4FF;' : ''}}" bindtap="peripherytabEvent" class="ppy_item">{{item.label}}</view>
 	</view>
 	<view class="ppy-body">
-		<view wx:for="{{peripherylist}}"  class="ppy-body-item">
-			<view style="width: 50rpx;height: 50rpx; display: flex; align-items: center;justify-content: center;">
+		<view wx:for="{{list[dataIndex].surroundingFacilities}}"  class="ppy-body-item" wx:if="{{item.type == list[dataIndex].peripherytabs[peripherytabsindex].label}}">
+			<!-- <view style="width: 50rpx;height: 50rpx; display: flex; align-items: center;justify-content: center;">
 				<image style="display: block; width: 30rpx; height: 30rpx;" src="{{imgPath}}/other/ohter3.png"></image>
-			</view>
-			<view style="width: 55%; text-align: left;">{{item.name}}</view>
-			<view style="width: 35%; text-align: right;">直线{{item.distanc}}km</view>
+			</view> -->
+			<view style="width: 100%; text-align: left;margin: 0 15rpx;">{{item.name}}</view>
+			<!-- <view style="width: 35%; text-align: right;">直线{{item.distanc}}km</view> -->
 		</view>
 	</view>
 </view>

+ 7 - 7
nnzwminiapp/pagesPublic/pages/tdcr/tdcr-list/index.js

@@ -18,7 +18,7 @@ Page({
   },
   list: [{
     left: 18.5,
-    top: 23,
+    top: 21,
     nameStyle: {
       txt: '中西医结合医院',
       img: 'tdcrlist7.png'
@@ -34,7 +34,7 @@ Page({
     }
   }, {
     left: 27,
-    top: 29.5,
+    top: 28.5,
     nameStyle: {
       txt: '廖家山地块',
       img: 'tdcrlist7.png'
@@ -50,7 +50,7 @@ Page({
     }
   }, {
     left: 30,
-    top: 36.5,
+    top: 34.5,
     nameStyle: {
       txt: '南坪东路588号',
       img: 'tdcrlist8.png',
@@ -68,16 +68,16 @@ Page({
     }
   }, {
     left: 41,
-    top: 49,
+    top: 48,
     nameStyle: {
       txt: '四公里片区',
       img: 'tdcrlist7.png',
-      top: 24.5
+      top: 25.5
     },
     lineStyle: {
       height: 8,
       left: 3,
-      top: 12
+      top: 13
     },
     postionStyle: {
       top: -0.5,
@@ -85,7 +85,7 @@ Page({
     }
   }, {
     left: 27,
-    top: 47.5,
+    top: 46.5,
     nameStyle: {
       txt: '双峰山1号地块',
       img: 'tdcrlist7.png',

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

@@ -8,7 +8,7 @@
     <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="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}}tdcrlist/tdcrlist11.png');left: {{item.postionStyle.left}}vw;top: {{item.postionStyle.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>
 	</view>
 </view>

+ 1 - 1
nnzwminiapp/pagesPublic/pages/tdcr/tdcr-list/index.wxss

@@ -37,7 +37,7 @@
 }
 .map-block-item .item-postion {
   width: 40rpx;
-	height: 40rpx;
+	height: 70rpx;
   background-size: 100%;
   position: relative;
 }