Przeglądaj źródła

我的收藏 样式调整

dongyuan0658 5 lat temu
rodzic
commit
61185b8c3e

+ 1 - 13
pages/user/mycollection/mycollection.js

@@ -5,8 +5,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    collection_data: [],
-    user: {}
+    collection_data: []
   },
 
   toClass: function(e) {
@@ -30,18 +29,7 @@ Page({
         title: option.title
       });
     }
-
     httpRequestApi.myFavorites().success(res => {
-      httpRequestApi.getUserWorksInfo().success(res => {
-        let user = res.data.data;
-        this.setData({
-          user: user,
-        }, () => {
-          console.log(this.data.user);
-        });
-      }).fail(error => {
-        console.log(error);
-      });
       this.setData({
         collection_data: res.data.data.list
       },() => {

+ 1 - 25
pages/user/mycollection/mycollection.wxml

@@ -1,15 +1,5 @@
-<wxs src="../../commonWxs/format.wxs" module="format" />
 <view class='my-collection'>
   <view class='collection-article' wx:for="{{ collection_data }}" wx:key="{{ index }}" bindtap='toClass' data-targetCode="{{item.targetCode}}" data-title='{{ item.title }}'>
-    <view class='user-info'>
-      <view class='avatar-box'>
-        <image class='avatar-image' src="{{ user.user.avatar }}" />
-      </view>
-      <view class="avatar-name">
-        <view>{{ user.user.wechatName }}</view>
-        <view>{{ format.formatDate(item.gmtCreated) }}</view>
-      </view>
-    </view>
     <view class='video-preview'>
       <image src='{{ item.iconImg }}'></image>
     </view>
@@ -18,20 +8,6 @@
     </view>
     <view class='content-detail'>
       <view class='left'>{{ item.summary }}</view>
-      <view class='right'>
-        <view class='right-detail'>
-          <view class='play-img'>
-            <image src='../../../static/image/hotPlays.png'></image>
-          </view>
-          <view class='count-add'>{{ item.playAmount || 0 }}</view>
-        </view>
-        <view class='right-details'>
-          <view class='point-img'>
-            <image src='../../../static/image/like.png'></image>
-          </view>
-          <view class='count-add'>{{ item.likeAmount || 0 }}</view>
-        </view>
-      </view>
     </view> 
   </view>
-</view>
+</view>

+ 11 - 135
pages/user/mycollection/mycollection.wxss

@@ -2,57 +2,6 @@
   width: 750rpx;
   background: #F0F1F5;
 }
-
-.user-info{
-  width: 100%;
-  height: 132rpx;
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-}
-
-.avatar-image{
-  width: 100%;
-  height: 100%;
-  border-radius: 50%;
-}
-
-.avatar-box{
-  width: 96rpx;
-  height: 96rpx;
-  border-radius: 50%;
-}
-
-.avatar-name{
-  width: 420rpx;
-  height: 80rpx;
-  font-size: 32rpx;
-  color: #444444;
-  margin-left: 14rpx;
-  margin-bottom: 16rpx;
-}
-
-.avatar-follow{
-  margin-left:30rpx;
-  display:flex;
-  flex-direction:column;
-  align-items:center;
-  width:100rpx;
-
-}
-
-.avatar-img{
-  width: 46rpx;
-  height: 40rpx;
-}
-
-.avatar-images{
-  width: 100%;
-  height: 100%;
-}
-
-
-
 .collection-article{
   margin-bottom: 4rpx;
   box-sizing: border-box;
@@ -61,44 +10,8 @@
   background: #FFFFFF;
 }
 
-.collection-top{
-  width: 100%;
-  height: 120rpx;
-  display: flex;
-  align-items: center;
-}
-
-.top-img{
-  margin-right: 14rpx;
-  width: 96rpx;
-  height: 96rpx;
-  border-radius: 50%;
-}
-
-.top-img>image{
-  width: 100%;
-  height: 100%;
-  border-radius: 50%;
-}
-
-.collection-info{
-  width: 580rpx;
-  font-size: 32rpx;
-  margin-bottom: 10rpx;
-}
-
-.collection-info>.title{
-  color: #000000;
-  font-weight: 500;
-}
-
-.collection-info>.date{
-  color: #686868;
-  font-weight: lighter;
-}
-
 .video-preview{
-  /* margin-top: 10rpx; */
+  padding-top: 16rpx;
   width: 100%;
   height: 290rpx;
   border-radius: 20rpx;
@@ -110,9 +23,18 @@
   border-radius: 20rpx;
 }
 
+.content-title{
+  margin-top: 10rpx;
+  width: 100%;
+  height: 52rpx;
+  font-size: 32rpx;
+  font-weight: 500;
+  color: #414141;
+}
+
 .content-detail{
   width: 100%;
-  height: 60rpx;
+  height: 50rpx;
   display: flex;
   justify-content: space-between;
   align-items: center;
@@ -122,49 +44,3 @@
 .left{
   width: 200rpx;
 }
-
-.right{
-  height: 100%;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-}
-
-.right image{
-  width: 100%;
-  height: 100%;
-}
-
-.play-img{
-  width: 20rpx;
-  height: 22rpx;
-}
-
-.point-img{
-  width: 26rpx;
-  height: 24rpx;
-}
-
-.count-add{
-  width: 36rpx;
-  text-align: center;
-}
-
-.right-detail,.right-details{
-  display: flex;
-  justify-content: flex-end;
-  align-items: flex-start;
-}
-
-.right-details{
-  margin-left: 20rpx;
-}
-
-.content-title{
-  margin-top: 10rpx;
-  width: 100%;
-  height: 55rpx;
-  font-size: 32rpx;
-  font-weight: 500;
-  color: #414141;
-}

BIN
static/image/to.png