liurongli vor 1 Monat
Ursprung
Commit
c69a5df6af

+ 19 - 3
pages/materialCollection/reviewMaterial/auditDetail.vue

@@ -3,7 +3,7 @@
 		<!-- 头部 -->
 		<nav-bar height="96" title="任务详情" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
 		<!-- 吸顶 -->
-		<uv-sticky style="top:98rpx">
+		<uv-sticky offsetTop="0" customNavHeight="98rpx">
 			<view class="search_tabs" v-if="state.isSticky">
 				<scroll-view class="scroll_tabs" scroll-x="true" scroll-left="0" :show-scrollbar="false">
 					<view :class="['tab_item',{'selected':item.value==state.tabsSelected}]" v-for="item in state.tabList"
@@ -13,7 +13,7 @@
 				</scroll-view>
 			</view>
 		</uv-sticky>
-		<view class="scroll_view_box">
+		<view class="scroll_view_box" :style="{'height': state.isSticky ? 'calc(100% - 296rpx)' : 'calc(100% - 96rpx)'}">
 			<scroll-view
 				class="scroll_view_y" 
 				:scroll-top="state.scrollTop" 
@@ -212,6 +212,20 @@
 	// 展开收起切换
 	const toggleExpand = () => {
 		state.isExpand = !state.isExpand;
+		nextTick(() => {
+			const instance = getCurrentInstance();
+			// 安全保护
+			if (!instance || !instance.proxy) {
+				// 备用方案:全局查询(要求元素 class 唯一)
+				query.select('.page_content_data').boundingClientRect((rect) => {
+					state.searchBoxTop = rect?.top || 0;
+				});
+				return;
+			}
+			query.select('.page_content_data').boundingClientRect((rect) => {
+				state.searchBoxTop = rect?.top || 0;
+			});
+		});
 	}
 	//切换tab
 	const SelectTabsValue = (val) => {
@@ -316,13 +330,15 @@
 
 <style scoped lang="scss">
 	.page_body{
+		display: flex;
+		flex-direction: column;
 		height: 100%;
 		min-height: auto;
 		.scroll_view_box{
 			width: 100%;
 			display: flex;
 			flex-direction: column;
-			height: calc(100% - 96rpx);
+			// height: calc(100% - 96rpx);
 		}
 		.scroll_view_y {
 			height: 100%;

+ 19 - 3
pages/materialCollection/taskOverview/taskDetail.vue

@@ -3,7 +3,7 @@
 		<!-- 头部 -->
 		<nav-bar height="96" title="任务详情" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
 		<!-- 吸顶 -->
-		<uv-sticky style="top:98rpx">
+		<uv-sticky offsetTop="0" customNavHeight="98rpx">
 			<view class="search_tabs" v-if="state.isSticky">
 				<!-- 搜索框 -->
 				<uni-easyinput class="search_box" v-model="state.searchWord" trim="all" :styles="state.searchInputStyles"
@@ -23,7 +23,7 @@
 				</scroll-view>
 			</view>
 		</uv-sticky>
-		<view class="scroll_view_box">
+		<view class="scroll_view_box" :style="{'height': state.isSticky ? 'calc(100% - 396rpx)' : 'calc(100% - 96rpx)'}">
 			<scroll-view
 				class="scroll_view_y" 
 				:scroll-top="state.scrollTop" 
@@ -423,6 +423,20 @@
 	// 展开收起切换
 	const toggleExpand = () => {
 		state.isExpand = !state.isExpand;
+		nextTick(() => {
+			const instance = getCurrentInstance();
+			// 安全保护
+			if (!instance || !instance.proxy) {
+				// 备用方案:全局查询(要求元素 class 唯一)
+				query.select('.page_content_data').boundingClientRect((rect) => {
+					state.searchBoxTop = rect?.top || 0;
+				});
+				return;
+			}
+			query.select('.page_content_data').boundingClientRect((rect) => {
+				state.searchBoxTop = rect?.top || 0;
+			});
+		});
 	}
 	//切换tab
 	const SelectTabsValue = (val) => {
@@ -593,13 +607,15 @@
 
 <style scoped lang="scss">
 	.page_body{
+		display: flex;
+		flex-direction: column;
 		height: 100%;
 		min-height: auto;
 		.scroll_view_box{
 			width: 100%;
 			display: flex;
 			flex-direction: column;
-			height: calc(100% - 96rpx);
+			// height: calc(100% - 96rpx);
 		}
 		.scroll_view_y {
 			height: 100%;

+ 19 - 3
pages/studentStudy/learningMonitor/taskDetails.vue

@@ -3,7 +3,7 @@
 		<!-- 头部 -->
 		<nav-bar height="96" title="任务详情" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
 		<!-- 吸顶 -->
-		<uv-sticky style="top:98rpx">
+		<uv-sticky offsetTop="0" customNavHeight="98rpx">
 			<view class="search_tabs" v-if="state.isSticky">
 				<!-- 搜索框 -->
 				<uni-easyinput class="search_box" v-model="state.searchWord" trim="all" :styles="state.searchInputStyles"
@@ -20,7 +20,7 @@
 				</scroll-view>
 			</view>
 		</uv-sticky>
-		<view class="scroll_view_box">
+		<view class="scroll_view_box" :style="{'height': state.isSticky ? 'calc(100% - 296rpx)' : 'calc(100% - 96rpx)'}">
 			<scroll-view
 				class="scroll_view_y" 
 				:scroll-top="state.scrollTop" 
@@ -268,6 +268,20 @@
 	// 展开收起切换
 	const toggleExpand = () => {
 		state.isExpand = !state.isExpand;
+		nextTick(() => {
+			const instance = getCurrentInstance();
+			// 安全保护
+			if (!instance || !instance.proxy) {
+				// 备用方案:全局查询(要求元素 class 唯一)
+				query.select('.page_content_data').boundingClientRect((rect) => {
+					state.searchBoxTop = rect?.top || 0;
+				});
+				return;
+			}
+			query.select('.page_content_data').boundingClientRect((rect) => {
+				state.searchBoxTop = rect?.top || 0;
+			});
+		});
 	}
 	//切换tab
 	const SelectTabsValue = (val) => {
@@ -371,13 +385,15 @@
 
 <style scoped lang="scss">
 	.page_body{
+		display: flex;
+		flex-direction: column;
 		height: 100%;
 		min-height: auto;
 		.scroll_view_box{
 			width: 100%;
 			display: flex;
 			flex-direction: column;
-			height: calc(100% - 96rpx);
+			// height: calc(100% - 96rpx);
 		}
 		.scroll_view_y {
 			height: 100%;

+ 1 - 1
pages/studentStudy/videoDetails.vue

@@ -56,7 +56,7 @@
 				<view class="questions_title">{{state?.question?.codeName}}:{{state?.question?.questionsName}}</view>
 				<uni-easyinput type="textarea" v-model="state.questionsAnswer" :style="state.easyinputStyle" placeholder="请输入你的回答" placeholderStyle="font-weight: 400;font-size: 28rpx;color: #999999;"></uni-easyinput>
 			</view>
-		</customPopupDialog>	
+		</customPopupDialog>
 	</view>
 </template>
 

+ 18 - 3
pages/teacherStudy/learningMonitor/taskDetails.vue

@@ -3,7 +3,7 @@
 		<!-- 头部 -->
 		<nav-bar height="96" title="任务详情" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
 		<!-- 吸顶 -->
-		<uv-sticky style="top:98rpx">
+		<uv-sticky offsetTop="0" customNavHeight="98rpx">
 			<view class="search_tabs" v-if="state.isSticky">
 				<!-- 搜索框 -->
 				<uni-easyinput class="search_box" v-model="state.searchWord" trim="all" :styles="state.searchInputStyles"
@@ -20,7 +20,7 @@
 				</scroll-view>
 			</view>
 		</uv-sticky>
-		<view class="scroll_view_box">
+		<view class="scroll_view_box" :style="{'height': state.isSticky ? 'calc(100% - 296rpx)' : 'calc(100% - 96rpx)'}">
 			<scroll-view
 				class="scroll_view_y" 
 				:scroll-top="state.scrollTop" 
@@ -268,6 +268,20 @@
 	// 展开收起切换
 	const toggleExpand = () => {
 		state.isExpand = !state.isExpand;
+		nextTick(() => {
+			const instance = getCurrentInstance();
+			// 安全保护
+			if (!instance || !instance.proxy) {
+				// 备用方案:全局查询(要求元素 class 唯一)
+				query.select('.page_content_data').boundingClientRect((rect) => {
+					state.searchBoxTop = rect?.top || 0;
+				});
+				return;
+			}
+			query.select('.page_content_data').boundingClientRect((rect) => {
+				state.searchBoxTop = rect?.top || 0;
+			});
+		});
 	}
 	//切换tab
 	const SelectTabsValue = (val) => {
@@ -371,13 +385,14 @@
 
 <style scoped lang="scss">
 	.page_body{
+		display: flex;
+		flex-direction: column;
 		height: 100%;
 		min-height: auto;
 		.scroll_view_box{
 			width: 100%;
 			display: flex;
 			flex-direction: column;
-			height: calc(100% - 96rpx);
 		}
 		.scroll_view_y {
 			height: 100%;