routes.wxml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <view class="flex-style">
  2. <view class="flex-item {{cindex=='0' ? 'active' : ''}}" data-id="0" bindtouchstart="changeType">驾车</view>
  3. <view class="flex-item {{cindex=='1' ? 'active' : ''}}" data-id="1" bindtouchstart="changeType">步行</view>
  4. <view class="flex-item {{cindex=='3' ? 'active' : ''}}" data-id="3" bindtouchstart="changeType">骑行</view>
  5. </view>
  6. <view class="map_box" wx:if="{{cindex!=2}}">
  7. <map id="navi_map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" markers="{{markers}}" polyline="{{polyline}}"
  8. show-location="true"></map>
  9. </view>
  10. <view class="text_box" wx:if="{{cindex!=2}}">
  11. <view class="text">{{distance}}</view>
  12. <view class="text">{{cost}}</view>
  13. <view class="detail_button" bindtouchstart="goDetail">详情</view>
  14. <view class="detail_button2" bindtouchstart="nav">导航</view>
  15. </view>
  16. <!-- <view class="flex-style">
  17. <view class="flex-item {{cindex=='0' ? 'active' : ''}}" data-id="0" bindtouchstart="changeType">驾车</view>
  18. <view class="flex-item {{cindex=='1' ? 'active' : ''}}" data-id="1" bindtouchstart="changeType">步行</view>
  19. <view class="flex-item {{cindex=='2' ? 'active' : ''}}" data-id="2" bindtouchstart="changeType">公交</view>
  20. <view class="flex-item {{cindex=='3' ? 'active' : ''}}" data-id="3" bindtouchstart="changeType">骑行</view>
  21. </view>
  22. <view class="map_box" wx:if="{{cindex!=2}}">
  23. <map id="navi_map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" markers="{{markers}}" polyline="{{polyline}}"
  24. show-location="true"></map>
  25. </view>
  26. <view class="text_box" wx:if="{{cindex!=2}}">
  27. <view class="text">{{distance}}</view>
  28. <view class="text">{{cost}}</view>
  29. <view class="detail_button" bindtouchstart="goDetail">详情</view>
  30. <view class="detail_button2" bindtouchstart="nav">导航</view>
  31. </view>
  32. <view class="bus_box" wx:for="{{transits}}" wx:for-item="i" wx:key="key1" wx:if="{{cindex==2}}">
  33. <text class="bus_item" wx:for="{{i.transport}}" wx:for-item="j" wx:key="key2">
  34. {{j}}
  35. </text>
  36. </view> -->