Bläddra i källkod

Merge branch 'master' of http://116.63.33.55/git/nazw

# Conflicts:
#	nnzwminiapp/pages/map/map.js
#	nnzwminiapp/pages/map/map.wxml
xyg 2 år sedan
förälder
incheckning
b28895f93c

+ 3 - 5
nnzwminiapp/pages/map/item.wxml

@@ -23,14 +23,12 @@
           </text>
         </view>
 
-        <view class="check-info">
-          点击查看详情
-        </view>
+        <view class="check-info" bindtap="changeItem" data-value="none">点击查看详情</view>
       </view>
     </view>
     <view class="item-btns">
-      <view class="item-bus">公交</view>
-      <view class="item-car">自驾</view>
+      <view class="item-bus" bindtap="changeItem">公交</view>
+      <view class="item-car" bindtap="changeItem">自驾</view>
     </view>
   </view>
 <!-- </scroll-view> -->

+ 34 - 10
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,
     showTraffic: true,
     height: 0,
@@ -73,6 +65,8 @@ Page({
     navigateArr: ['百度地图导航', '高德地图导航'],
     showSection: true,
     index: 0,
+    isList:true,
+    showSet:false
   },
   
   onLoad: function () {
@@ -133,8 +127,21 @@ Page({
   callNumber(e){
 
   },
-
-    getSearchVal(e) {
+// list跳转info
+  changeItem(e){
+    let value = e.currentTarget.dataset.value;
+    if (value==="none"){
+      this.setData({
+        isList:false
+      })
+    }else{
+      this.setData({
+        isList:false,
+        showSet:true
+      })
+    }
+  },
+  getSearchVal(e) {
         this.setData({
             searchVal: e.detail.value
         });
@@ -198,4 +205,21 @@ Page({
     bindPickerChange(e){
         console.info(e)
     },
+    },
+
+    backSearch(){
+      if(!this.data.isList){
+        this.setData({
+          isList:true,
+          showSet:false
+        })
+      }else{
+        if(!this.data.showTraffic){
+          this.setData({
+            showTraffic:true
+          })
+        }
+      }
+      
+    }
 })

+ 13 - 3
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>
@@ -48,10 +58,10 @@
       <view class="wrap_result">
           <view class="title-second" style="border-radius: 30rpx; position: absolute; left: 22rpx; top: 330px; width: 708rpx; height: 120rpx;">
             <text style="font-size: 16px;font-weight: 400;color: #2775CC;">搜索结果</text>
-            <button type="button" class="back_btn" bindtap="searchResultBack">返回</button>
+            <button type="button" class="back_btn" bindtap="backSearch">返回</button>
           </view>
           <view class="pad_box">
-            <include wx:if="{{fasle}}" src="./item"></include>
+            <include wx:if="{{isList}}" src="./item"></include>
             <include wx:else src="./item-info"></include>
           </view>
         </view>

+ 4 - 0
nnzwminiapp/pages/map/map.wxss

@@ -1362,8 +1362,12 @@ a {
 
 .item-bus {
   background-color: #2775CC;
+  box-shadow: 0px 4px 25px 2px rgb(39 117 204 / 34%);
+  border-radius: 5rpx;
 }
 
 .item-car {
   background-color: #10B891;
+  box-shadow: 0px 4px 25px 2px rgb(16 184 145 / 34%);
+  border-radius: 5rpx;
 }