dever 4 years ago
parent
commit
3f51d3ebdc
1 changed files with 31 additions and 3 deletions
  1. 31 3
      pages/index/index.vue

+ 31 - 3
pages/index/index.vue

@@ -1,6 +1,25 @@
 <template>
 	<gracePage :customHeader="false">
 		<view slot="gBody" class="grace-body">
+			
+			<view class='push-journal'>
+			  <swiper class="swiper" previous-margin="70rpx" next-margin="70rpx">
+			    <block v-for="(v, k) in fetch.hot" :key="k">
+			      <swiper-item :class="index == k?'active':''" @click="location(v.id_code)">
+			        <image mode='aspectFill' :src="v.pic_cover" class="default" />
+			        <view class='push-infos'>
+			          <view class='tit'>{{v.name}}</view>
+			          <view class='num'>
+			            <text class='grace-icons icon-eye'></text><text class="icon-num">{{v.num_view_total}}</text>
+			            <text class='grace-icons icon-user'></text><text class="icon-num">{{v.num_buy_total}}</text>
+						</view>
+			        </view>
+			      </swiper-item>
+			    </block>
+			  </swiper>
+			</view>
+			<view class='spriter'></view>
+			
 			<view class='journal-list'>
 			  <view class='list'>
 			    <view class='journal' v-for="(v, k) in fetch.info" :key="k">
@@ -26,11 +45,13 @@ export default{
 		return {
 			fetch : {
 				info : [],
-			}
+				hot : [],
+			},
+			index : 0,
 		}
 	},
 	onShow() {
-		this.Dever.checkLogin();
+		//this.Dever.checkLogin();
 		this.getData(1);
 	},
 	// 重新加载
@@ -58,7 +79,14 @@ export default{
 page {
   padding-bottom: 100rpx;
 }
-
+.swiper{
+	width: 100vw;
+	height: 100vh;	
+	position: relative;
+	top: 0;
+	left: 0;
+	z-index: 1;
+}
 .push-journal {
   position: relative;
   width: 750rpx;