index.wxml 1.0 KB

12345678910111213141516171819202122232425
  1. <!--index.wxml-->
  2. <view class="container">
  3. <!-- 引入组件 -->
  4. <import src="/component/hot/hot.wxml"/>
  5. <!-- <import src="/component/follow/follow.wxml"/> -->
  6. <!-- <import src="/component/my/my.wxml"/> -->
  7. <!--调用组件-->
  8. <!--<template is="{{templates}}" data="{{lookData: lookData, searchData: searchData, myData: myData}}"></template>-->
  9. <view class="template" wx:if="{{templates == 'hot'}}">
  10. <template is="{{templates}}" data="{{hotData: hotData}}"></template>
  11. </view>
  12. <view class="template" wx:elif="{{templates == 'follow'}}">
  13. <template is="{{templates}}" data="{{followData: followData}}"></template>
  14. </view>
  15. <view class="template" wx:else="{{templates == 'my'}}">
  16. <template is="{{templates}}" data="{{myData: myData}}"></template>
  17. </view>
  18. <view class="top-tab">
  19. <block wx:for="{{tab}}" wx:key="{{index}}">
  20. <view class="tabbar {{index == ind ? 'select':' '}}" bindtap="switcher" data-ind="{{index}}">
  21. <text>{{item.name}}</text>
  22. </view>
  23. </block>
  24. </view>
  25. </view>