Parcourir la source

fix:优化小程序

lsw il y a 9 mois
Parent
commit
c59dbe8fcb

+ 2 - 1
app/pages/doctor/detail.vue

@@ -7,7 +7,8 @@
 			</view>
 			<view class="con">
 				<u-divider text="人物介绍"></u-divider>
-				<u-parse :content="item.introduce"></u-parse>
+				<u-parse :content="item.introduce" v-if="item.introduce"></u-parse>
+				<u-empty v-else text="暂无介绍资料"></u-empty>
 			</view>
 		</view>
 	</view>

+ 1 - 1
app/pages/doctor/index.vue

@@ -9,7 +9,7 @@
 					<image :src="item.avatar ? ip + item.avatar : '../../static/head.png'" mode="scaleToFill" class="avatar"></image>
 					<view class="con">
 						<view class="name">{{ item.name }}</view>
-						<view class="brief ellip">{{ item.brief }}</view>
+						<view class="brief ellip">{{ item.brief || '暂无介绍资料' }}</view>
 					</view>
 				</view>
 			</view>

+ 38 - 14
app/pages/index/index.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="main">
-		<image src="https://chenglantimes.com/prod-api/profile/upload/2024/07/26/1721928199437.jpg" mode="widthFix" class="banner"></image>
+		<image src="https://chenglantimes.com/prod-api/profile/upload/2024/07/27/1722074138272.jpg" mode="widthFix" class="banner"></image>
 		<!--通知公告-->
 		<view class="notice">
 			<u-notice-bar color="#545555" :text="noticeList" :step="true" direction="column" mode="link" bgColor="white" speed="300" url="/pages/notice/index"></u-notice-bar>
 		</view>
-
+		<!--卡片菜单-->
 		<view class="flow">
 			<view class="item" @click="go('/pages/doctor/index')">
 				<view class="out">
@@ -18,8 +18,8 @@
 					</view>
 				</view>
 			</view>
-			<view class="item" @click="go('/pages/introduction/index')">
-				<view class="out">
+			<view class="item">
+				<view class="out" @click="go('/pages/department/index')">
 					<view class="int" style="height: 87px; background-color: #ddf8f3">
 						<view class="icon" style="color: #22b789">&#xe606;</view>
 						<view class="title">
@@ -28,8 +28,8 @@
 						</view>
 					</view>
 				</view>
-				<view class="out">
-					<view class="int" style="height: 87px; background-color: #fff3e3">
+				<view class="out" @click="go('/pages/introduction/index')">
+					<view class="int" style="height: 90px; background-color: #fff3e3">
 						<view class="icon" style="color: #fe9b01">&#xe636;</view>
 						<view class="title"></view>
 						<view class="title">
@@ -40,6 +40,14 @@
 				</view>
 			</view>
 		</view>
+		<!--健康知识-->
+		<view class="tg" @click="go('/pages/knowledge/index')">
+			<image src="https://chenglantimes.com/prod-api/profile/upload/2024/07/27/1722076102395.jpg" mode="widthFix"></image>
+			<view class="tit">
+				<view>知识课堂</view>
+				<view class="desc">每天一个健康小知识</view>
+			</view>
+		</view>
 		<!--权威专家-->
 		<view class="bos">
 			<view class="gg">
@@ -99,12 +107,7 @@ export default {
 				{ name: '阿松大', avatar: '/profile/upload/2024/07/23/blob_20240723153318A001.jpeg' },
 				{ name: '阿松大', avatar: '/profile/upload/2024/07/23/blob_20240723153318A001.jpeg' }
 			],
-			knowledgeList: [
-				{ title: '啊实打实', type: '阿松大', createTime: '' },
-				{ title: '啊实打实', type: '阿松大', createTime: '' },
-				{ title: '啊实打实', type: '阿松大', createTime: '' }
-			],
-			user: {}
+			knowledgeList: []
 		};
 	},
 	onLoad() {
@@ -141,12 +144,11 @@ page {
 }
 .flow {
 	padding-top: 5px;
-	overflow: hidden;
 	margin-left: -5px;
 	margin-right: -5px;
+	overflow: hidden;
 	.item {
 		border-radius: 10px;
-		overflow: hidden;
 		float: left;
 		width: 50%;
 		.out {
@@ -184,6 +186,28 @@ page {
 		}
 	}
 }
+.tg {
+	margin-top: 5px;
+	overflow: hidden;
+	image {
+		width: 100%;
+		border-radius: 50px;
+	}
+	.tit {
+		text-align: left;
+		float: left;
+		margin-top: -60px;
+		left: 116px;
+		position: relative;
+		font-weight: bold;
+		color: white;
+		font-size: 18px;
+		.desc {
+			font-size: 14px;
+			font-weight: normal;
+		}
+	}
+}
 .bos {
 	background-color: white;
 	border-radius: 7px;

BIN
app/static/head.png


+ 1 - 1
app/uni_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue

@@ -95,7 +95,7 @@
 
 	.u-notice-bar {
 		overflow: hidden;
-		padding: 9px 12px;
+		padding: 9px 0px;
 		flex: 1;
 	}
 </style>