Browse Source

fix 修改首页样式问题,加入vant样式主题

tiedan 4 years ago
parent
commit
12d318876f
3 changed files with 71 additions and 8 deletions
  1. 2 0
      app.wxss
  2. 21 3
      pages/index/index.wxml
  3. 48 5
      pages/index/index.wxss

+ 2 - 0
app.wxss

@@ -1,5 +1,7 @@
 /**app.wxss**/
 /* @import "./fonts/SourceHanSansCN-Medium.wxss"; */
+@import '/miniprogram_npm/vant-weapp/common/index.wxss';
+   
 .container {
   width: 100%;
   margin-top: 20rpx;

+ 21 - 3
pages/index/index.wxml

@@ -53,11 +53,11 @@
 
 
 
-	<van-tabs active="{{ active }}" bind:change="onChange">
+	<van-tabs active="{{ active }}" bind:change="onChange" line-width="60" line-height="2">
 
-		<van-tab  wx:for="{{vType}}" wx:for-item="titem" title="{{titem}}" wx:key="titem" title-style="font-size:25rpx">
+		<van-tab  wx:for="{{vType}}" wx:for-item="titem" title="{{titem}}" wx:key="titem" title-style="font-size:30rpx" >
 			<view class="xczs">
-				<view class="zb1" wx:for="{{xcpArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goSeevideo" data-item="{{item}}">
+				<!-- <view class="zb1" wx:for="{{xcpArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goSeevideo" data-item="{{item}}">
 					<image src='{{item.courseImg}}' mode='aspectFill' class="show1"></image>
 					<view class="grayblock">
 						<view class="show_text">{{item.courseName}}</view>
@@ -67,7 +67,25 @@
 							</view>
 						</view>
 					</view>
+				</view> -->
+
+
+
+
+             
+				<view class="ivlist" wx:for="{{xcpArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goSeevideo" data-item="{{item}}">
+					
+					<view class="ivlist_text">
+						<view class="ivlist_title van-multi-ellipsis--l2">{{item.courseName}}</view>
+						<view class="ivlist_subt"><van-icon name="eye-o" class="ivlist_icon" /> {{item.playTimes}}人看过</view>
+					</view>
+					<!-- <van-image width="180" height="150" fit="cover" src="{{item.courseImg}}" /> -->
+					<image src='{{item.courseImg}}' mode='aspectFill' class="ivlist_img"></image>
+
 				</view>
+
+
+
 			</view>
 		</van-tab>		
 	</van-tabs>

+ 48 - 5
pages/index/index.wxss

@@ -149,13 +149,12 @@
 }
 
 .xczs {
-  width: 720rpx;
-  margin-left: 20rpx;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 30rpx;
   /* height: 250rpx; */
   /* border: 1px solid yellow; */
-  margin-top: 20rpx;
-  margin-bottom: 20rpx;
-  display: flex;
+ 
   display: block;
 }
 
@@ -199,4 +198,48 @@
   margin-left: 10rpx;
   margin-top: 5rpx;
   float: left;
+}
+
+
+
+
+.ivlist{
+  width: 100%;
+  height:150rpx;
+  display: flex;
+  flex-flow:row nowrap;
+  justify-content:  space-between ;
+  align-items:  center;
+  padding-bottom:30rpx;
+  margin-bottom:30rpx;
+  border-bottom:1rpx solid #f8f8f8;
+}
+.ivlist_img{
+  width: 230rpx;
+  height:150rpx;
+}
+.ivlist_text{
+  width:430rpx;
+  height:150rpx;
+  display: flex;
+  flex-flow:column nowrap;
+  justify-content:  space-between ;
+
+}
+.ivlist_title{
+  font-size: 32rpx;
+  color: #333333;
+  padding-top:5rpx;
+}
+.ivlist_subt{
+  font-size:26rpx;
+  color:#999999;
+  padding-bottom:5rpx;
+  display:flex;
+  align-items:center;
+  justify-content: start;
+}
+.ivlist_icon{
+  font-size:30rpx;
+  padding-right:10rpx;
 }