xy 1 年之前
父節點
當前提交
b085fa495c
共有 4 個文件被更改,包括 55 次插入21 次删除
  1. 5 5
      xs-app/components/read/chapterCatalog.vue
  2. 0 2
      xs-app/framework/http.ts
  3. 3 2
      xs-app/pages.json
  4. 47 12
      xs-app/pages/readbook/read.vue

+ 5 - 5
xs-app/components/read/chapterCatalog.vue

@@ -1,13 +1,13 @@
 <template>
 	<uni-popup  @maskClick="emits('Close')" :animation="false" mask-background-color="rgba(0,0,0,0)" ref="catalog"  background-color="#fff"  @change="onChange">
-		<view style="position: fixed;display: flex;
-		justify-content: space-around;
-		align-items: center;margin-left: auto;padding-left: 10%;padding-right: 10%;padding-top: 5%;" :style="{'backgroundColor':db_color}">
+		
+		<view style="display: flex;
+		align-items: center;padding-top: 5%;padding-left: 5%;"  :style="{'backgroundColor':db_color}">
 			<image :src="book_data.book_cover" style="width: 100rpx;height: 150rpx;"></image>
-			<view style="margin-left: 100rpx;">
+			<view style="margin-left: 50rpx;">
 				<view style="font-size: 1.5ex;" :style="{'color':font_color}" >{{book_data.book_name}}</view>
 				<view style="font-size: 1.5ex; margin-top: 50rpx;" :style="{'color':font_color}" >{{book_data.author_name}}</view>
-			</view>
+			</view>	
 		</view>
 		<view style="display: flex;
 		align-items: center;padding-top: 5%;" :style="{'backgroundColor':db_color}">

+ 0 - 2
xs-app/framework/http.ts

@@ -27,8 +27,6 @@ export class http {
 	//静态请求
 	public static StaticRequest(api:string,call_back:Function){
 		uni.request({
-			dataType: "json",
-			responseType: "json",
 		    url: api, 
 			method:"GET",
 			

+ 3 - 2
xs-app/pages.json

@@ -34,9 +34,10 @@
 			"path": "pages/readbook/read",
 			"style": {
 				"navigationStyle": "default",
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": ""
+				// "disableScroll": false
 				// "enablePullDownRefresh": true,
-				"onReachBottomDistance": 10
+				// "onReachBottomDistance": 10
 			}
 		},
 		{

+ 47 - 12
xs-app/pages/readbook/read.vue

@@ -1,23 +1,23 @@
 <template>
-	<scroll-view :scroll-y="true"   :refresher-enabled="false" class="color-bg" :style="{'background-color': read_setting_data.readMode==config.read_config.readMode.Bright?config.read_config.colorList[read_setting_data.colorBgIndex]:DarkBg,'height':'100%' }">
-		<readPage class="content" ref="readPages" @onTouchstart="onStartClickView"
+	<scroll-view class="scroll-container" :scroll-y="true" bounces="false"  :show-scrollbar="false" :refresher-enabled="false" :style="{'background-color': read_setting_data.readMode==config.read_config.readMode.Bright?config.read_config.colorList[read_setting_data.colorBgIndex]:DarkBg,'height':'100%' }">
+		<readPage  ref="readPages" @onTouchstart="onStartClickView"
 		@clickCatalog="onClickCatalog"
 		@clickPreChapter="onClickPreChapter"
 		@clickNextChapter="onClickNextChapter" 
 		@onTouchend="onEndClickView" @onTouchmove="hideSetting" v-for="(book_read_data_item,index) in book_text_list_view" :key="book_read_data_item.book_chapter_id" 
 		:text_content="book_read_data_item.book_content" :book_title="book_read_data_item.book_title">
 		</readPage>
-		<settingMenu ref="Menu" v-if="menuShow" @clickCatalog="onClickCatalog" 
-		@clickPreChapter="onClickPreChapter" @clickNextChapter="onClickNextChapter" 
-		@clickMode="onClickMode" @clickOpenSetting="onClickOpenSetting"
-		@Close="closeMenu" @changeFontSize="onChangeFontSize" @changeBgColor="onChangeBgColor"
-		@selectAutoBuy="onSelectAutoBuy" @clickKeep="onClickKeep">
-		</settingMenu>
-		<chapterCatalog v-if="showChapterList" :items="directoryList" :size="40" :remain="16"
-		 :scrollHeight="windowHeight*0.6" @clickChar="goToChapter" @Close="showChapterList=false">
-		</chapterCatalog>
-		<recharge v-if="showRecharge" :coin="getChapterNeedCoin()" @Close="showRecharge=false" @onClickBuy="onClickBuy" @BuyChapter="onBuyChapter"></recharge>
 	</scroll-view>
+	<settingMenu ref="Menu" v-if="menuShow" @clickCatalog="onClickCatalog"
+	@clickPreChapter="onClickPreChapter" @clickNextChapter="onClickNextChapter" 
+	@clickMode="onClickMode" @clickOpenSetting="onClickOpenSetting"
+	@Close="closeMenu" @changeFontSize="onChangeFontSize" @changeBgColor="onChangeBgColor"
+	@selectAutoBuy="onSelectAutoBuy" @clickKeep="onClickKeep">
+	</settingMenu>
+	<chapterCatalog v-if="showChapterList" :items="directoryList" :size="40" :remain="16"
+	 :scrollHeight="windowHeight*0.6" @clickChar="goToChapter" @Close="showChapterList=false">
+	</chapterCatalog>
+	<recharge v-if="showRecharge" :coin="getChapterNeedCoin()" @Close="showRecharge=false" @onClickBuy="onClickBuy" @BuyChapter="onBuyChapter"></recharge>
 </template>
 
 <script setup lang="ts">
@@ -472,4 +472,39 @@
 	  z-index: 1; /* 确保内容在背景之上 */
 	  /* 其他样式... */
 	}
+	
+	.scroll-container {
+		// position: relative; /* 或者使用 fixed/absolute,根据需要调整 */
+		width: 100vw;
+		// height: 100vh; /* 视口高度 */
+		// overflow: hidden; /* 隐藏超出容器的内容,如果需要的话 */
+		// height: 100%;
+		overflow-y: auto;
+	    scrollbar-width: none; /* Firefox */
+	    -ms-overflow-style: none; /* IE 10+ */
+	}
+	
+	/* 针对Chrome, Safari和Opera等Webkit浏览器 */
+	.scroll-container::-webkit-scrollbar {
+	    width: 0;
+	    height: 0;
+	}
+	
+	/* 隐藏水平滚动条 */
+	.scroll-container::-webkit-scrollbar {
+	    width: 0;
+	    height: 0;
+	}
+	 
+	/* 隐藏垂直滚动条 */
+	.scroll-container::-webkit-scrollbar {
+	    width: 0;
+	    height: 0;
+	}
+	 
+	/* 同时隐藏水平和垂直滚动条 */
+	.scroll-container::-webkit-scrollbar {
+	    width: 0;
+	    height: 0;
+	}
 </style>