فهرست منبع

解决展开高度过高的问题

Limengbo 6 سال پیش
والد
کامیت
4d07521412

+ 1 - 1
compontents/lesson_list/lessonList.js

@@ -31,7 +31,7 @@ Component({
   methods: {
     onTap (e) {
       let flage = e.target.dataset.flag;
-      const height = this.properties.lessonData.length * 70;
+      const height = this.properties.lessonData.length * 56;
       if(flage){
         this.util(flage, '280rpx');
         this.setData({

+ 3 - 2
compontents/lesson_list/lessonList.wxss

@@ -34,7 +34,7 @@
 
 .lesson-name text:nth-child(2) {
     height: 30rpx;
-    margin-top: 10rpx;
+    margin-top: 6rpx;
     font-size: 28rpx;
     color: #bebebe;
 }
@@ -42,7 +42,7 @@
 /* 时间轴 */
 .timer-shaft {
     overflow: hidden;
-    margin: 0 0 30rpx 10rpx;
+    margin: 0 0 50rpx 10rpx;
     padding: 0 25rpx;
 }
 
@@ -62,6 +62,7 @@
 .art-con-color {
     display: flex;
     justify-content: space-between;
+    height:32rpx;
     margin-left: 53rpx;
     font-size: 28rpx;
     color: #878787;

+ 1 - 1
compontents/preview/preview.js

@@ -31,7 +31,7 @@ Component({
   methods: {
     onTap (e) {
       let flage = e.target.dataset.flag;
-      const height = this.properties.materialData.length * 70;
+      const height = this.properties.materialData.length * 56;
       if(flage){
         
         this.util(flage, '280rpx');

+ 3 - 2
compontents/preview/preview.wxml

@@ -11,9 +11,10 @@
     </view>
 
     <view class="material-con" animation="{{animationData}}" style="height: {{height}}rpx">
-        <view wx:if="{{ item.warePath && item.title}}" class="art-img" wx:for="{{materialData}}" wx:key="{{index}}">
+        <view class="art-img" wx:for="{{materialData}}" wx:key="{{index}}">
             <text>{{item.title}}</text>
-            <text data-warePath="{{item.warePath}}" bindtap="preview">点击预览</text>
+            <text wx:if="{{ item.warePath && item.title}}" data-warePath="{{item.warePath}}" bindtap="preview">点击预览</text>
+            <text wx:else>暂无资料</text>
         </view>
     </view>
     

+ 3 - 2
compontents/preview/preview.wxss

@@ -34,14 +34,14 @@
 
 .lesson-name text:nth-child(2) {
     height: 30rpx;
-    margin-top: 10rpx;
+    margin-top: 6rpx;
     font-size: 28rpx;
     color: #bebebe;
 }
 
 /* 预览图片 */
 .material-con {
-    margin: 0 0 30rpx 10rpx;
+    margin: 0 0 50rpx 10rpx;
     padding: 0 25rpx;
     overflow: hidden;
 }
@@ -49,6 +49,7 @@
 .art-img {
     display: flex;
     justify-content: space-between;
+    height:32rpx;
     margin-left: 53rpx;
     font-size: 28rpx;
     color: #303030;

+ 0 - 1
pages/index/index.js

@@ -37,7 +37,6 @@ Page({
   },
 
   onLoad: function (options) {
-    debugger;
     //获取分享过来的值跳转页面
     const ind  = options.ind;
     const postsId = options.postId || '';

+ 0 - 1
pages/input_content/input_content.js

@@ -82,7 +82,6 @@ Page({
                 }  
               },  
               fail: function (res) {  
-                debugger;
                 wx.hideToast();  
                 wx.showModal({  
                   title: '错误提示',