Parcourir la source

添加第三层

elis il y a 2 ans
Parent
commit
0e11a4d315
2 fichiers modifiés avec 20 ajouts et 15 suppressions
  1. 9 14
      nnzwminiapp/pages/map/map.js
  2. 11 1
      nnzwminiapp/pages/map/map.wxml

+ 9 - 14
nnzwminiapp/pages/map/map.js

@@ -56,14 +56,6 @@ Page({
       [{"id":1,"name":"商业服务","image":imgUrl+"fbmfw.png"},{"id":2,"name":"便民公厕","image":imgUrl+"fgc.png"},{"id":3,"name":"停车泊车","image":imgUrl+"ftc.png"}]
     ],
     popData:[],
-    cur: {},
-    position: [
-      { value: 'top', text: '顶部弹出' },
-      { value: 'left', text: '左侧弹出' },
-      { value: 'center', text: '中间弹出' },
-      { value: 'bottom', text: '底部弹出' },
-      { value: 'right', text: '右侧弹出' },
-    ],
     showIndex: false,
     isSearch: false,
     height: 0,
@@ -190,13 +182,16 @@ Page({
     backSearch(){
       if(!this.data.isList){
         this.setData({
-          isList:true
-        })
-      }
-      if(!this.data.showTraffic){
-        this.setData({
-          showTraffic:true
+          isList:true,
+          showSet:false
         })
+      }else{
+        if(!this.data.showTraffic){
+          this.setData({
+            showTraffic:true
+          })
+        }
       }
+      
     }
 })

+ 11 - 1
nnzwminiapp/pages/map/map.wxml

@@ -12,12 +12,22 @@
     </view>
   </view>
   <view class="main">
-    <view class="top_search">
+    <view wx:if="{{!showSet}}" class="top_search">
       <view class="input-icon">
         <input type="text" enterkeyhint="search" name="" id="" value="{{searchVal}}" bindinput="getSearchVal" class="inp" placeholder="请输入您要搜索的内容" />
         <image src="{{imgUrl}}/ss2.png" class="inp-icon1" bindtap="searchTap"></image>
       </view>
     </view>
+    <view wx:else class="right-search" style="position: absolute; left: 22rpx; top: 10px; width: 708rpx; height: 300rpx; display: block; box-sizing: border-box; padding-top: 10rpx;">
+        <t-tabs defaultValue="{{0}}" theme="tag" style="height: 292rpx; ">
+          <t-tab-panel label="公交" value="0" style=" height: 180rpx; ">
+            <include src="./quert"></include>
+          </t-tab-panel>
+          <t-tab-panel label="自驾" value="1">
+            <include src="./quert"></include>
+          </t-tab-panel>
+        </t-tabs>
+    </view>
 
     <view class="right-map" id="right-map">
       <map id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="14" show-location="true" markers="{{markers}}" bindmarkertap="makertap" class="map"></map>