index.wxml 1.2 KB

123456789101112131415161718192021222324252627
  1. <!--index.wxml-->
  2. <view class="container">
  3. <!-- 引入组件 -->
  4. <import src="/component/look/look.wxml"/>
  5. <import src="/component/search/search.wxml"/>
  6. <import src="/component/mys/mys.wxml"/>
  7. <!--调用组件-->
  8. <!--<template is="{{templates}}" data="{{lookData: lookData, searchData: searchData, myData: myData}}"></template>-->
  9. <view class="template" wx:if="{{templates == 'look'}}">
  10. <template is="{{templates}}" data="{{lookData: lookData}}"></template>
  11. </view>
  12. <view class="template" wx:elif="{{templates == 'search'}}">
  13. <template is="{{templates}}" data="{{searchData: searchData}}"></template>
  14. </view>
  15. <view class="template" wx:else="{{templates == 'mys'}}">
  16. <template is="{{templates}}" data="{{myData: myData}}"></template>
  17. </view>
  18. <button class="jurisdiction" hidden="{{jurisdictionFlag}}" open-type="getUserInfo" bindtap="jurisdiction">点击授权</button>
  19. <view class="bottom-tab">
  20. <block wx:for="{{tab}}" wx:key="{{index}}">
  21. <view class="tabbar {{index == ind ? 'select':' '}}" bindtap="switcher" data-ind="{{index}}">
  22. <image src="{{index == ind ? item.selectimg : item.img}}"></image>
  23. <text>{{item.name}}</text>
  24. </view>
  25. </block>
  26. </view>
  27. </view>