<template>
<view>
<!--components/specialTopic/specialTopic.wxml-->
<!-- 特色专题 -->
<template name="special">
  <view class="pdlr20">
    <navigator v-for="(item, index) in specialList" :key="index" :url="'/pages/topic/topic?id=' + item.id+'&title='+item.title" hover-class="none" class="li dflex">
		<view class="ztdiv">
			<view class="imgdiv">
				<image lazy-load="true" :src="item.pic!=''?item.pic+ '?x-oss-process=style/w750-auto':''" class="t-img">
				</image>
			</view>
			<view class="txtdiv">
				<text>{{item.title}}</text>
			</view>
		</view>
	</navigator>
  </view>
</template>
</view>
</template>

<script>
// components/specialTopic/specialTopic.js
const route = require("../../utils/route.js");
const utils = require("../../utils/util.js");
const mes = require("../../utils/requestmessage.js");
const req = require("../../utils/request.js");
const app = getApp();

export default {
  data() {
    return {

    };
  },

  components: {},
  props: {
	specialList:Array, //专题列表
	

  },
  watch: {
  },
  methods: {
    getRqeDatas() {
      let that = this; //专题

      let special = that.homeTemplate.filter(it => it.module == that.templateType.module_special);

      if (special && special.length > 0 && special[0].state == 0) {
        that.setData({
          specialTemplate: special[0]
        });
        this.getSpecialList(special[0]);
      }
    },

    // 获取专题
    getSpecialList(special) {
      let that = this;
      let form = {
        page: 1,
        limit: special.number
      };
      route.getSpecial(form, data => {
        if (data) {
          that.setData({
            specialList: data
          });
        }
      });
    }

  }
};
</script>
<style>
@import "./specialTopic.css";
</style>