12345678910111213141516171819202122232425 |
- <!--index.wxml-->
- <view class="container">
- <!-- 引入组件 -->
- <import src="/component/hot/hot.wxml"/>
- <!-- <import src="/component/follow/follow.wxml"/> -->
- <!-- <import src="/component/my/my.wxml"/> -->
- <!--调用组件-->
- <!--<template is="{{templates}}" data="{{lookData: lookData, searchData: searchData, myData: myData}}"></template>-->
- <view class="template" wx:if="{{templates == 'hot'}}">
- <template is="{{templates}}" data="{{hotData: hotData}}"></template>
- </view>
- <view class="template" wx:elif="{{templates == 'follow'}}">
- <template is="{{templates}}" data="{{followData: followData}}"></template>
- </view>
- <view class="template" wx:else="{{templates == 'my'}}">
- <template is="{{templates}}" data="{{myData: myData}}"></template>
- </view>
- <view class="top-tab">
- <block wx:for="{{tab}}" wx:key="{{index}}">
- <view class="tabbar {{index == ind ? 'select':' '}}" bindtap="switcher" data-ind="{{index}}">
- <text>{{item.name}}</text>
- </view>
- </block>
- </view>
- </view>
|