dever 3 năm trước cách đây
mục cha
commit
00368ae238
4 tập tin đã thay đổi với 71 bổ sung80 xóa
  1. 3 0
      App.vue
  2. 7 9
      lib/community/y-Fab/y-Fab.vue
  3. 59 61
      pages/dream/view.vue
  4. 2 10
      pages/dream/view/dream.vue

+ 3 - 0
App.vue

@@ -67,6 +67,9 @@ export default {
 @import './lib/dever/dever.css';
 /*body {font-family:"NSimSun"}*/
 page{background-color: #ffffff;}
+*{
+  -webkit-overflow-scrolling: touch;
+}
 .grace-body {
 	width:100%;
 }

+ 7 - 9
lib/community/y-Fab/y-Fab.vue

@@ -105,8 +105,7 @@
 		data() {
 			return {
 				isOpen: false,
-				hidden: true,
-				timer: null,
+				hidden: true
 			};
 		},
 		mounted() {
@@ -131,7 +130,6 @@
 			},
 			handleClick: function(index) {
 				this.hidden = false
-				clearTimeout(this.timer)
 				if (index == -1 && this.btnList.length) {
 					this.isOpen = !this.isOpen
 				} else {
@@ -149,9 +147,7 @@
 					}
 				}
 				if (!this.isOpen) {
-					this.timer = setTimeout(() => {
-						this.hidden = true
-					}, 200)
+					this.hidden = true;
 				}
 			},
 			handleClickCancel: function() {
@@ -160,8 +156,7 @@
 			}
 		},
 		beforeDestroy() {
-			clearTimeout(this.timer)
-			this.timer = null
+			
 		}
 	}
 </script>
@@ -206,8 +201,11 @@
 	}
 
 	.yc-fab-hidden {
-		height: 0;
+		display: hidden;
+		/*
 		width: 0;
+		height: 0;
+		*/
 	}
 
 

+ 59 - 61
pages/dream/view.vue

@@ -1,67 +1,65 @@
 <template>
-	<gracePage :customHeader="false">
-		<view class="container" slot="gBody">
-			<ourLoading isFullScreen :active="pageLoading" :text="pageLoadingText" />
-			<view v-if="fetch.items.length > 0">
-				<dever-drawer-page :show="drawer.show ? 'left' : ''">
-					<view class="container_main" slot="links" @click="closeDrawer()">
-						<block v-if="show">
-							<view class='cover' v-if="guide" @touchstart="closeGuide()">
-								<view class='journal-guide'>
-								  <view class='guide-center'></view>
-								  <view class='guide-bottom'></view>
-								</view>
+	<view class="container" slot="gBody">
+		<ourLoading isFullScreen :active="pageLoading" :text="pageLoadingText" />
+		<view v-if="fetch.items.length > 0">
+			<dever-drawer-page :show="drawer.show ? 'left' : ''">
+				<view class="container_main" slot="links" @click="closeDrawer()">
+					<block v-if="show">
+						<view class='cover' v-if="guide" @touchstart="closeGuide()">
+							<view class='journal-guide'>
+							  <view class='guide-center'></view>
+							  <view class='guide-bottom'></view>
 							</view>
-							<swiper class="swiper" @change="change" :circular="swiper.circular" :current="fetch.index">
-								<swiper-item v-for="(v, k) in fetch.items"  v-if="v.data" :key="k" >
-									<scroll-view scroll-y="true" scroll-x="true" class="scroll-height" @scrolltolower="bottomCall">
-										<dream ref="dream" @showDrawer="showDrawer" :index="k" :item="v" :control="control" :bottom="bottom" class="item"></dream>
-									</scroll-view>
-								</swiper-item>
-							</swiper>
-						</block>
-						<block v-if="!show">
-							<dream ref="dream" @showDrawer="showDrawer" :index="fetch.index" :item="fetch.items[fetch.index]" :control="control" :bottom="bottom" class="item"></dream>
-						</block>
-					</view>
-				</dever-drawer-page>
-				
-				
-				<dever-drawer-window v-for="(v, k) in drawer.item" :key="k" :type="k" :show="v.show" :zIndex="v.index" padding="v.padding" :top="v.top" :direction="v.direction" :width="v.width" v-on:closeDrawer="closeDrawer(k)" v-on:bottomFunc="bottomFunc">
-					<view slot="links">
-						<block v-if="k == 'cate'">
-							<cate ref="cate" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :page_id="fetch.page_id"  @getCate="getCate"></cate>
-						</block>
-						
-						<block v-if="k == 'community'">
-							<community ref="community" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param"></community>
-						</block>
-						
-						<block v-if="k == 'times'">
-							<times ref="times" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :set="v.set" :times="fetch.times_id" @getTimes="getTimes"></times>
-						</block>
-						
-						<block v-if="k == 'shop'">
-							<shop ref="shop" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param"></shop>
-						</block>
-						
-						<block v-if="k == 'my'">
-							<my ref="my" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param"></my>
-						</block>
-						
-						<block v-if="k == 'share'">
-							<share ref="share" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :type="type"></share>
-						</block>
-					</view>
-				</dever-drawer-window>
-				
-				<y-Fab v-if="!drawer.show && fetch.user.avatar && show" :bottom="20" :right="20" :btnList="drawer.button" :bgmPlay="bgm.playing" @click="clickDrawerButton" :text="`P`+(swiper.index+1)" :icon_o="fetch.user.avatar"></y-Fab>
-				<y-Fab v-if="!show" :bottom="20" :right="20" @click="goHome" :text="`更多`"></y-Fab>
-			</view>
+						</view>
+						<swiper class="swiper" @change="change" :circular="swiper.circular" :current="fetch.index">
+							<swiper-item v-for="(v, k) in fetch.items"  v-if="v.data" :key="k" >
+								<scroll-view scroll-y="true" scroll-x="true" class="scroll-height" @scrolltolower="bottomCall">
+									<dream ref="dream" @showDrawer="showDrawer" :index="k" :item="v" :control="control" :bottom="bottom" class="item"></dream>
+								</scroll-view>
+							</swiper-item>
+						</swiper>
+					</block>
+					<block v-if="!show">
+						<dream ref="dream" @showDrawer="showDrawer" :index="fetch.index" :item="fetch.items[fetch.index]" :control="control" :bottom="bottom" class="item"></dream>
+					</block>
+				</view>
+			</dever-drawer-page>
+			
+			
+			<dever-drawer-window v-for="(v, k) in drawer.item" :key="k" :type="k" :show="v.show" :zIndex="v.index" padding="v.padding" :top="v.top" :direction="v.direction" :width="v.width" v-on:closeDrawer="closeDrawer(k)" v-on:bottomFunc="bottomFunc">
+				<view slot="links">
+					<block v-if="k == 'cate'">
+						<cate ref="cate" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :page_id="fetch.page_id"  @getCate="getCate"></cate>
+					</block>
+					
+					<block v-if="k == 'community'">
+						<community ref="community" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param"></community>
+					</block>
+					
+					<block v-if="k == 'times'">
+						<times ref="times" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :set="v.set" :times="fetch.times_id" @getTimes="getTimes"></times>
+					</block>
+					
+					<block v-if="k == 'shop'">
+						<shop ref="shop" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param"></shop>
+					</block>
+					
+					<block v-if="k == 'my'">
+						<my ref="my" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param"></my>
+					</block>
+					
+					<block v-if="k == 'share'">
+						<share ref="share" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :type="type"></share>
+					</block>
+				</view>
+			</dever-drawer-window>
 			
-			<dever-share ref="share" :data="fetch.share" v-if="fetch.share"></dever-share>
-		</view>
-	</gracePage>
+			<y-Fab v-if="!drawer.show && fetch.user.avatar && show" :bottom="20" :right="20" :btnList="drawer.button" :bgmPlay="bgm.playing" @click="clickDrawerButton" :text="`P`+(swiper.index+1)" :icon_o="fetch.user.avatar"></y-Fab>
+			<y-Fab v-if="!show" :bottom="20" :right="20" @click="goHome" :text="`更多`"></y-Fab>
+		</view>
+		
+		<dever-share ref="share" :data="fetch.share" v-if="fetch.share"></dever-share>
+	</view>
 </template>
 <script>
 import cate from "@/pages/dream/func/cate.vue";

+ 2 - 10
pages/dream/view/dream.vue

@@ -93,11 +93,7 @@
 		<!--单页面-->
 		<view v-else-if="item.type == 82">
 			<webView :index="index" :item="item.data" :control="control" :bottom="bottom"></webView>
-		</view>
-		
-		<!--<view class="page-num" @click="setShow" v-if="index != -1">P{{index+1}}</view>-->
-		
-		
+		</view>
 	</view>
 </template>
 
@@ -132,10 +128,7 @@ export default {
 			type    : Object,
 			value	: null
 		},
-		index : {
-			type    : Number,
-			value	: 0
-		},
+		index : 0,
 	},
 	data() {
 		return {
@@ -175,7 +168,6 @@ export default {
 				if (windowHeight > height) {
 					height = windowHeight-height-3;
 					this.next_margin = height + 'px';
-					console.info(this.next_margin)
 				}
 			}
 		},