123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <wxs src="../../../utils/nova.wxs" module="nova" />
- <!-- 导航:预加载各类导航组件并设置TAB显示对应关系 -->
- <view class="{{active == 0 ? 'indexPage' : '' }}">
- <block wx:for="{{tabbarList}}" wx:key="index" wx:item="item">
- <view hidden="{{active == index ? false:true}}">
- <block wx:if="{{nova.novapath(item,'module')=='comp'}}">
- <template is="{{nova.novapath(item,'tag')}}"
- data="{{ ...{id:index},...{isInit:isInit},...{options: nova.novapath(item,'params')} }}" />
- </block>
- </view>
- </block>
- </view>
- <!-- 注入:组件注入到template中,方便路演变量转tag后加载调用 -->
- <block wx:if="{{ template.style == 1 }}">
- <template name="nova-home-template1">
- <nova-home-template1 id="comp{{id}}" />
- </template>
- <template name="nova-gourmet-template1">
- <nova-gourmet-template1 id="comp{{id}}" />
- </template>
- <template name="nova-homestay-template1">
- <nova-homestay-template1 id="comp{{id}}" />
- </template>
- <template name="nova-shop-template1">
- <nova-shop-template1 id="comp{{id}}" />
- </template>
- <template name="nova-my-template1">
- <nova-my-template1 id="comp{{id}}" />
- </template>
- </block>
- <block wx:elif="{{ template.style == 2 }}">
- <template name="nova-home-template2">
- <nova-home-template2 id="comp{{id}}" />
- </template>
- <template name="nova-gourmet-template2">
- <nova-gourmet-template2 id="comp{{id}}" />
- </template>
- <template name="nova-homestay-template2">
- <nova-homestay-template2 id="comp{{id}}" />
- </template>
- <template name="nova-shop-template2">
- <nova-shop-template2 id="comp{{id}}" />
- </template>
- <template name="nova-my-template2">
- <nova-my-template2 id="comp{{id}}" />
- </template>
- </block>
- <block wx:else>
- <template name="nova-tourism-pages-my-index">
- <nova-tourism-pages-my-index id="comp{{id}}" />
- </template>
- <template name="nova-tourism-pages-shop-index">
- <nova-tourism-pages-shop-index id="comp{{id}}" />
- </template>
- <template name="nova-tourism-pages-home-index">
- <nova-tourism-pages-home-index id="comp{{id}}" />
- </template>
- <template name="nova-tourism-pages-gourmet-index">
- <nova-tourism-pages-gourmet-index id="comp{{id}}" />
- </template>
- <template name="nova-tourism-pages-homestay-index">
- <nova-tourism-pages-homestay-index id="comp{{id}}" />
- </template>
- </block>
- <!-- 底部导航 -->
- <!-- #009de1 -->
- <van-tabbar active="{{ active }}" bind:change="onChange"
- active-color="{{tabbarOption.activeColor ? tabbarOption.activeColor : '#009de1' }}"
- inactive-color="{{tabbarOption.inactiveColor ? tabbarOption.inactiveColor : '#000000' }}">
- <block wx:for="{{tabbarList}}" wx:key="index">
- <van-tabbar-item name="{{index}}" wx:if="{{item.open}}">
- <image slot="icon" src="{{ item.iconPath }}" mode="aspectFit" style="width:40rpx;height:40rpx;" />
- <image slot="icon-active" src="{{ item.selectedIconPath }}" mode="aspectFit"
- style="width:40rpx;height:40rpx;" />
- {{item.text}}
- </van-tabbar-item>
- </block>
- </van-tabbar>
- <!-- <view class="tarbar-module" style="bottom:{{bottomHeight + 10}}rpx">
- <view class="tarbar" style="grid-template-columns:repeat({{tabbarList.length}} , {{660 / tabbarList.length + 'rpx'}});">
- <block wx:for="{{tabbarList}}" wx:key="index">
- <view
- class="tarbar-item"
- wx:if="{{item.open}}"
- data-index="{{index}}"
- bind:tap="onChange"
- >
- <image
- wx:if="{{index == active}}"
- src="{{ item.selectedIconPath }}"
- mode="aspectFit"
- class="icon active-icon"
- />
- <image
- wx:else
- src="{{ item.iconPath }}"
- mode="aspectFit"
- class="icon"
- />
- <view style="color:{{index == active ? tabbarOption.activeColor || '#009de1' : tabbarOption.inactiveColor || '#000000'}}" class="tarbar-text {{index == active ? 'active-text' : ''}}">
- {{item.text}}
- </view>
- </view>
- </block>
- </view>
- </view> -->
|