소스 검색

样式修改

tanxue 2 주 전
부모
커밋
d38b3958f2

+ 12 - 3
components/custom-scroll-list/custom-scroll-list-chengji.vue

@@ -1,6 +1,6 @@
 <template>
 	<!-- 查询区域 -->
-	<uni-search-bar class="uni-mt-10" v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
+	<uni-search-bar class="mobile-scroll-search" v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
 		:bgColor="searchBarColor" clearButton="auto" cancelButton="none" @confirm="onSearch" @blur="onSearch" />
 	<!-- tab选择区域 -->
 	<view class="lli-status-box" v-if="hasTab">
@@ -10,7 +10,8 @@
 	<!-- 无限滚动区域 -->
 	<scroll-view class="mobile-chengji-scroll-box" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
 		:refresher-threshold="100" refresher-background="#F3F3F4" @refresherrefresh="onRefresh"
-		@scrolltolower="onReachBottom" @refresherrestore="onRestore">
+		@scrolltolower="onReachBottom" @refresherrestore="onRestore"
+		:style="{ height: `calc(100vh - ${statusBarHeight}px - 264rpx);`}">
 		<slot :list="list"></slot>
 		<uni-load-more :status="status" :contentText="contentText"></uni-load-more>
 
@@ -30,7 +31,7 @@
 	import {
 		onLoad
 	} from "@dcloudio/uni-app"
-
+	const statusBarHeight = ref(0);
 	const props = defineProps({
 		refreshFn: {
 			type: Function,
@@ -114,6 +115,14 @@
 
 		return total.value === list.value.length
 	})
+	
+	onMounted(() => {
+		uni.getSystemInfo({
+		success: (res) => {
+		statusBarHeight.value = res.statusBarHeight;
+		}
+		});
+	});
 
 	// 重置
 	function reset() {

+ 1 - 1
components/custom-scroll-list/custom-scroll-list-date.vue

@@ -2,7 +2,7 @@
 	<view>
 		<!-- 查询区域 -->
 		<view>
-			<uni-search-bar class="uni-mt-10" v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
+			<uni-search-bar v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
 				:bgColor="searchBarColor" clearButton="auto" cancelButton="none" @confirm="onSearch" @blur="onSearch" />
 			<view @click="selectDate">日历</view>
 		</view>

+ 14 - 10
components/custom-scroll-list/custom-scroll-list.vue

@@ -1,16 +1,18 @@
 <template>
 	<!-- 查询区域 -->
-	<uni-search-bar class="uni-mt-10" v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
+	<uni-search-bar class="mobile-scroll-search" v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
 		:bgColor="searchBarColor" clearButton="auto" cancelButton="none" @confirm="onSearch" @blur="onSearch" />
 	<!-- tab选择区域 -->
-	<view class="lli-status-box" v-if="hasTab">
+	<view class="lli-status-box" v-if="hasTab"
+>
 		<text :class="['status-item', activeTab === item.value? 'click':'' ]" v-for="item in tabList" :key="item.value"
 			@click="onTavChange(item)">{{item.label}}</text>
 	</view>
 	<!-- 无限滚动区域 -->
-	<scroll-view class="mobile-scroll-box" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
+	<scroll-view :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
 		:refresher-threshold="100" refresher-background="#F3F3F4" @refresherrefresh="onRefresh"
-		@scrolltolower="onReachBottom" @refresherrestore="onRestore">
+		@scrolltolower="onReachBottom" @refresherrestore="onRestore"
+		:style="{ height: `calc(100vh - ${statusBarHeight}px - 264rpx);`}">
 		<slot :list="list"></slot>
 		<uni-load-more :status="status" :contentText="contentText"></uni-load-more>
 
@@ -30,6 +32,7 @@
 		onLoad
 	} from "@dcloudio/uni-app"
 
+	const statusBarHeight = ref(0);
 	const props = defineProps({
 		refreshFn: {
 			type: Function,
@@ -104,7 +107,13 @@
 
 		return total.value === list.value.length
 	})
-
+	onMounted(() => {
+		uni.getSystemInfo({
+		success: (res) => {
+		statusBarHeight.value = res.statusBarHeight;
+		}
+		});
+	});
 	// 重置
 	function reset() {
 		list.value = [];
@@ -202,8 +211,3 @@
 	})
 </script>
 
-<style lang="scss">
-	.scroll-container {
-		height: calc(100vh - 220rpx)
-	}
-</style>

+ 1 - 1
pages.json

@@ -26,7 +26,7 @@
 		{
 			"path": "pages/my/index",
 			"style": {
-				"navigationBarTitleText": "我的"
+				"navigationStyle": "custom"
 			}
 		}
 	],

+ 3 - 0
pages/my/index.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="mobile-my-page">
+		<customNavbarVue title="我的"></customNavbarVue>
 		<view class="user-info-box">
 		    <view class="user-img-box">
 		        <img class="head-img" :src="myInfoData.userImg" v-if="myInfoData.userImg">
@@ -75,6 +76,8 @@
 	import cacheManager from '@/utils/cacheManager.js';
 	import cameraCommon from "@/components/dialog/cameraCommon.vue";
 	import shexiangtoushuoming from "@/components/dialog/shexiangtoushuoming.vue";
+	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
+	
 	let myInfoData = reactive({
 		userImg: '',
 		realName: '',

+ 2 - 0
pages/score/index.vue

@@ -1,4 +1,5 @@
 <template>
+	<customNavbarVue title="成绩"></customNavbarVue>
 	<custom-scroll-list-chengji ref="customChengjiRef" :refreshFn="currentRefreshFn" @tabChange="tabChange"
 		:searchBarKey="searchBarKeyName" :tabList="tabData" :defaultTab="1">
 		<template #default="{list}">
@@ -15,6 +16,7 @@
 		getKaoshichengjiList,
 		getKcchengjiList
 	} from "@/api/chengji.js";
+	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
 	import customScrollListChengji from "@/components/custom-scroll-list/custom-scroll-list-chengji.vue";
 	import {
 		onLoad,