wkyy 3 роки тому
батько
коміт
93757eabc8
3 змінених файлів з 21 додано та 13 видалено
  1. 10 6
      pages/article/newsNotice.vue
  2. 10 6
      pages/index/index.vue
  3. 1 1
      pages/user/index.vue

+ 10 - 6
pages/article/newsNotice.vue

@@ -18,7 +18,7 @@
 		<view class="news" >
 			<view class="news-content" v-for="(item,index) in newsList" :key="item.id" @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
 				<view class="content-text">
-					{{item.title}}
+					<view class="content-title">{{item.title}}</view>
 					<view class="news-time">{{item.createTime ? item.createTime.slice(5,16) : ''}}</view>
 				</view>
 				<view class="content-img">
@@ -173,13 +173,17 @@
 				color: #101010;
 				text-align: left;
 				font-size: 14px;
+			}
+	
+			.content-title {
+				width: 100%;
 				overflow: hidden;
 				text-overflow: ellipsis;
-				white-space: nowrap;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
 			}
 	
-			;
-	
 			.content-img {
 				width: 40.57%;
 				height: 100%;
@@ -188,12 +192,12 @@
 	
 				img {
 					width: 100%;
-					height: 100%;
+					height: 80%;
 				}
 			}
 	
 			.news-time {
-				margin-top: 26%;
+				margin-top: 10%;
 				color: #999999;
 				width: 100px;
 				height: 20px;

+ 10 - 6
pages/index/index.vue

@@ -188,7 +188,7 @@
 
 			<view class="news-content" v-for="(item,index) in newsList" :key="item.id" @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
 				<view class="content-text">
-					{{item.title}}
+					<view class="content-title">{{item.title}}</view>
 					<view class="news-time">{{item.createTime?item.createTime.slice(5,10):''}}</view>
 				</view>
 				<view class="content-img">
@@ -847,14 +847,18 @@
 				line-height: 21px;
 				color: #101010;
 				text-align: left;
-				font-size: 14px;
+				font-size: 14px;			
+			}
+
+			.content-title {
+				width: 100%;
 				overflow: hidden;
 				text-overflow: ellipsis;
-				white-space: nowrap;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
 			}
 
-			;
-
 			.content-img {
 				width: 40.57%;
 				height: 100%;
@@ -868,7 +872,7 @@
 			}
 
 			.news-time {
-				margin-top: 26%;
+				margin-top: 10%;
 				color: #999999;
 				width: 80px;
 				height: 20px;

+ 1 - 1
pages/user/index.vue

@@ -86,7 +86,7 @@
 				userPhone: '',
 				show: false,
 				title: '联系客服',
-				content: '0716-8123456',
+				content: '400-8899-619',
 				confirmText: '拨打电话',
 				background:{
 					background: 'none'