<!--
 * WordPres版微信小程序
 * author: jianbo
 * organization: 守望轩  www.watch-life.net
 * github:    https://github.com/iamxjb/winxin-app-watch-life.net
 * 技术支持微信号：iamxjb
 * 开源协议：MIT
 * Copyright (c) 2017 https://www.watch-life.net All rights reserved.
* 星尘 基于微慕开源小程序二开
 * author：yinfegrui
 * organization：枫瑞博客网 www.frbkw.coms
  *星尘 技术维护微信号：qaz449275996
 -->

<import src="../../templates/common-list.wxml" />
<import src="../../templates/copyright.wxml" />
<import src="../../templates/loading.wxml" />

<!-- 首次进入引导添加到“我的小程序” -->
<view class="addMyMiniapp" wx:if="{{isFirst}}" catchtap="shutAddMyMiniapp">
	<view>点击加入我的小程序 ↑</view>
	<text>了解"{{webSiteName}}"最新文章</text>
</view>


<!-- 星尘 -->
<view>
	<!-- 轮播图 -->
	<view style="display:{{displaySwiper}}">
		<view class="uni-margin-wrap">
			<swiper class="swiper" circular indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}"
			 duration="{{duration}}" indicator-color="{{indicator_color}}" indicator-active-color="{{indicator_active_color}}">
				<block wx:key="id" wx:for="{{postsShowSwiperList}}">
					<swiper-item id="{{item.id}}" index="{{index}}" data-redicttype="{{item.type}}" data-appid="{{item.appid}}"
					 data-url="{{item.url}}" bindtap="redictAppDetail">
						<view class="swiper-item">
							<image class="fr-swiper-img" mode="aspectFill" src="{{item.post_full_image}}" />
						</view>
					</swiper-item>
				</block>
			</swiper>
		</view>
	</view>
	
	<!-- 星茫 关注微信公众号组件添加组件 -->
	<view style="position: fixed;bottom: 0rpx;width: 99%;">
		<official-account></official-account>
	</view>
	
	<!-- 标题 -->
	<view class="index-h">
		<font ><label class="index-h-blue _span">工</label>具导航</font>
		<font class="index-h-all" >滑动查看</font>
	</view>
	
	<!-- 精选栏目 -->
    <view class="selected-nav" wx:if="{{topNav.length != 0}}">
      <!-- 栏目列表 -->
      <scroll-view scroll-x>
        <view class="selected-nav-list">
          <block  wx:key="id" wx:for="{{topNav}}">
            <view wx:if="{{ item.redirecttype == 'webpage' || item.redirecttype == 'apppage'}}">
              <view class="selected-nav-item" catchtap="onNavRedirect" id="{{item.id}}" data-redicttype="{{item.redirecttype}}" data-url="{{item.url}}" data-appid="{{item.appid}}" data-extraData="{{item.extraData}}">
                <view>
                  <image  class="fr-gju-img" src="{{item.image}}"></image>
                </view>
                <view>
                  <text>{{item.name}}</text>
                </view>
              </view>
            </view>

            <view wx:if="{{ item.redirecttype == 'miniapp'}}">
              <view class="selected-nav-item">
                <navigator path="{{item.url}}" hover-class="none" open-type="navigate" app-id="{{item.appid}}" target="miniProgram">
                  <view>
                  <image  class="fr-gju-img" src="{{item.image}}"></image>
                </view>
                  <text>{{item.name}}</text>
                </navigator>
              </view>
            </view>
          </block>
        </view>
      </scroll-view>
    </view>



	<!-- 标题 -->
	<view class="index-h">
		<font v><label class="index-h-blue _span">最</label>新文章</font>
		<font class="index-h-all" >All</font>
	</view>

	<view tyle="display:{{showallDisplay}}">
		<template is="tempCommonList" data="{{postsList:postsList,listAdsuccess:listAdsuccess}}" />
		<view style='display:{{isLoading?"block":"none"}}'>
			<template is="tempLoading" />
		</view>
		<!-- 无更多文章提示 -->
		<view class="loadingmore" style="display:{{floatDisplay}}">

			<view class="no-more" hidden="{{!isLastPage}}">- 无更多文章 -</view>
		</view>
	</view>
	<!-- 无法访问网络 -->
	<view class="showerror" style="display:{{showerror}}">
		<image src="../../images/cry80.png" style="height:100rpx;width:100rpx"></image>
		<view class="errortext">
			暂时无法访问网络，下拉重试...
		</view>
	</view>
	
	
</view>


<!-- 星尘 -->

