<template>
  <view class="dt-page">
    <view class="" v-if="vuex_appletType==1">
    	<block v-if="emptyType == 0">
    		<view style="height: 20upx;"></view>
    	  <view class="data_wrap" v-for="(item,index) in dataList" :key="index">
    		 <view style="background-color: #f2f2f2;height: 70upx;line-height: 70upx;padding-left: 20upx;margin-bottom: 20upx;color: #999;">{{item.time}}</view>
    	    <!-- <DtGoodsList :dataList="item.datas" /> -->
    		<DtRecommendGoodsList :dataList="item.datas"></DtRecommendGoodsList>
    	  </view>
    	  <DtNoMore v-if="isNoMore" />
    	</block>
    	<DtEmpty :type="emptyType" />
    </view>
	
	<u-empty v-else margin-top="300" text="内容为空" mode="list"></u-empty>
  </view>
</template>
<script>
import DtRecommendGoodsList from '../comps/dt_recommend_goods_list.vue'
import DtGoodsList from '../comps/dt_goods_list.vue'
import DtNoMore from '../comps/dt_no_more.vue'
import DtEmpty from '../comps/dt_empty.vue'

export default {
  components: {
	  DtRecommendGoodsList,
    DtGoodsList,
    DtNoMore,
    DtEmpty
  },
  data() {
    return {
		//小程序审核状态
	  appletType:0,
		
      dataList: [],
      memberId: 0
    }
  },
  methods: {
    async queryDataList() {
      if (this.isPull) {
        this.isNoMore = false
        this.pageIndex = 0
        this.dataList.length = 0
      }
      let resp = await this.$api.getBrowseRecords({
        _isShowLoading: true,
        memberId: this.memberId,
        pageNo: this.pageIndex,
        pageSize: this.pageSize
      })
      let list = this.getDataList(resp)
      this.dataList = this.dataList.concat(list)
    },
    onLoadPage() {
	  wx.hideShareMenu();
      this.memberId = this.$auth.getMemberId()
      this.queryDataList()
    },
  },
  onShow() {
	this.appletType= uni.getStorageSync('appletType')
    this.onShowPage()
  },
  onReachBottom() {
    this.onReachBottomPage()
  }
}
</script>

<style lang="scss" scoped>
.dt-page {
  min-height: 100vh;
  background-color: #f2f2f2;
}
.data_wrap {
}
</style>