dongyuan0658 6 år sedan
förälder
incheckning
dfcae96b34

+ 27 - 46
component/my/my.wxml

@@ -1,54 +1,35 @@
-<wxs module="wxs">
-  function formatDate(time) {
-    var t = getDate(time); 
-    var tf = function(i){return (i < 10 ? '0' : '') + i};
-    var year = t.getFullYear();
-    var month = tf(t.getMonth() + 1);
-    var day = tf(t.getDate());
-    var hour = tf(t.getHours());
-    var minute = tf(t.getMinutes());
-    return month + '-' + day + ' ' + hour + ':' + minute;
-  }
-  function getBirthday(birthday){
-    var t = getDate(birthday); 
-    var tf = function(i){return (i < 10 ? '0' : '') + i};
-    var year = t.getFullYear();
-    var month = tf(t.getMonth() + 1);
-    var day = tf(t.getDate());
-    return year + '年' + month + '月' + day + '日';
-  }
-  module.exports.formatDate = formatDate;
-  module.exports.getBirthday = getBirthday;
-</wxs>
+<wxs src="../../pages/commonWxs/format.wxs" module="format"/>
 <template name="my">
   <view class='mine-container'>
     <view class='follow-details'>
       <view class='follow-info'>
-        <view class='avatar-bg'>
-          <view class='avatar-box'>
-            <image class='avatar-image' src='{{ myData.user.user.avatar }}'></image>
-          </view>
-          <view class='occupation-title'>{{ myData.user.user.profession }}</view>
-        </view>
-        <view class='avatar-msg'>
-          <view class='avatar-nickname'>
-            <text>{{ myData.user.user.wechatName }}</text>
-            <view class='flowers-box' wx:if='{{ myData.user.user.gender === 2 }}'>
-              <image src='../../static/image/flowers.png'></image>
+        <view class='set-msg'>
+          <view class='avatar-bg'>
+            <view class='avatar-box'>
+              <image class='avatar-image' src='{{ myData.user.user.avatar }}'></image>
             </view>
-            <view class='flowers-box' wx:elif='{{ myData.user.user.gender === 1 }}'>
-              <image src='../../static/image/boy.png'></image>
+            <view class='occupation-title'>{{ myData.user.user.profession }}</view>
+          </view>
+          <view class='avatar-msg'>
+            <view class='avatar-nickname'>
+              <text>{{ myData.user.user.wechatName }}</text>
+              <view class='flowers-box' wx:if='{{ myData.user.user.gender === 2 }}'>
+                <image src='../../static/image/flowers.png'></image>
+              </view>
+              <view class='flowers-box' wx:elif='{{ myData.user.user.gender === 1 }}'>
+                <image src='../../static/image/boy.png'></image>
+              </view>
+              <view wx:else class='gender-size'>未知</view>
             </view>
-            <view wx:else class='gender-size'>未知</view>
+            <view class='avatar-birthday'>{{ format.getBirthday(myData.user.user.birthday) }}</view>
+            <view class='avatar-address'>{{ myData.user.user.schoolName }}</view>
           </view>
-          <view class='avatar-birthday'>{{ wxs.getBirthday(myData.user.user.birthday) }}</view>
-          <view class='avatar-address'>{{ myData.user.user.schoolName }}</view>
-        </view>
-        <view class='mine-edit' bindtap='toMyEdit' data-title='{{ myData.title }}'>
-          <view class='edit-image'>
-            <image class='edit-img' src='../../static/image/reset.png'></image>
+          <view class='mine-edit' bindtap='toMyEdit' data-title='{{ myData.title }}'>
+            <view class='edit-image'>
+              <image class='edit-img' src='../../static/image/reset.png'></image>
+            </view>
+            <view class='edit-text'>修改</view>
           </view>
-          <view class='edit-text'>修改</view>
         </view>
       </view>
       <view class='mine-category'>
@@ -64,8 +45,8 @@
         <view class='follow-count'>
           <view class='color'>{{ myData.user.fansAmount || 0 }}</view>
           <view class='border-right'>
-            <view class='play-img'>
-              <image src='../../static/image/follow.png'></image>
+            <view class='red-heart'>
+              <image src='../../static/image/redheart.png'></image>
             </view>
             <text>关注</text>
           </view>
@@ -73,7 +54,7 @@
         <view class='point-count'>
           <view class='color'>{{ myData.user.likeAmount || 0 }}</view>
           <view class='border-right'>
-            <view class='play-img'>
+            <view class='point-img'>
               <image src='../../static/image/point.png'></image>
             </view>
             <text>赞</text>

+ 39 - 18
component/my/my.wxss

@@ -16,15 +16,22 @@
 }
 
 .follow-info{
-  /* border: 1rpx solid #3DBEF9; */
   margin-top: 20rpx;
   width: 100%;
-  height: 362rpx;
+  height: 382rpx;
   border-radius: 20rpx;
   background: #FFFFFF;
   display: flex;
 }
 
+.set-msg{
+  width: 100%;
+  height: 248rpx;
+  display: flex;
+  align-items: flex-start;
+  justify-content: center;
+}
+
 .avatar-bg{
   margin-left: 20rpx;
   margin-top: 50rpx;
@@ -89,15 +96,15 @@
   margin-left: 40rpx;
   margin-top: 50rpx;
   width: 500rpx;
-  height: 154rpx;
-  display: flex;
-  flex-direction: column;
-  align-items: flex-start;
-  justify-content: center;
+  height: 150rpx;
   color: #444444;
   font-size: 32rpx;
 }
 
+.avatar-nickname,.avatar-birthday,.avatar-address{
+  line-height: 50rpx;
+}
+
 .gender-size{
   margin-left: 10rpx;
   font-size: 28rpx;
@@ -108,15 +115,15 @@
 .mine-category{
   box-sizing: border-box;
   width: 674rpx;
-  padding-top: 30rpx;
-  padding-bottom: 30rpx;
+  padding-top: 40rpx;
+  padding-bottom: 32rpx;
   border-top: 4rpx solid #F0F1F5;
   font-size: 28rpx;
   font-weight: 600;
   z-index: 900;
   display: flex;
   position: absolute;
-  top: 246rpx;
+  top: 268rpx;
   left: 38rpx;
 }
 
@@ -146,6 +153,20 @@
   margin-bottom: 6rpx;
 }
 
+.red-heart{
+  width: 26rpx;
+  height: 22rpx;
+  margin-right: 6rpx;
+  margin-bottom: 6rpx;
+}
+
+.point-img{
+  width: 28rpx;
+  height: 24rpx;
+  margin-right: 6rpx;
+  margin-bottom: 6rpx;
+}
+
 image{
   width: 100%;
   height: 100%;
@@ -160,7 +181,7 @@ image{
 }
 
 .follow-count{
-  color: #529BEF;
+  color: #FF0000;
 }
 
 .flower-count{
@@ -171,7 +192,7 @@ image{
 
 .mine-edit{
   position: absolute;
-  top: 75rpx;
+  top: 72rpx;
   right: 36rpx;
   width: 138rpx;
   height: 52rpx;
@@ -183,20 +204,20 @@ image{
 }
 
 .edit-image{
-  width: 22rpx;
-  height: 32rpx;
+  width: 24rpx;
+  height: 34rpx;
   margin-left: 24rpx;
   margin-right: 10rpx;
 }
 
 .edit-img{
-  width: 22rpx;
-  height: 32rpx;
+  width: 24rpx;
+  height: 34rpx;
 }
 
 .edit-text{
-  width: 144rpx;
-  height: 34rpx;
+  width: 150rpx;
+  height: 32rpx;
   color: #FFFFFF;
   font-size: 32rpx;
 }

+ 1 - 1
pages/social/replyDetail/replyDetail.wxml

@@ -9,7 +9,7 @@
       </view>
     </view>
 <view class='reply-all'>
-    全部回复({{ count }})
+    全部回复({{ count || 0 }})
   </view>
     <view class="{{classNormal}}" wx:for="{{comment}}" wx:key="{{index}}" wx:if="{{index !== 0}}">
       <image class="avatar" src="{{item.avatar}}" />

+ 1 - 1
pages/social/replyDetail/replyDetail.wxss

@@ -11,7 +11,7 @@
   width: 100%;
   padding: 0 0 0 23rpx;
   height: 100%;
-  border-bottom: solid 2rpx #979797;
+  border-bottom: solid 2rpx #DEDEE2;
   display: flex;
   position: relative;
   background: #F0F1F5;

+ 2 - 2
pages/social/works/works.wxml

@@ -41,8 +41,8 @@
                 </view>
             </view>
             <view class="btnWrapper">
-                <image class="commentBtn" src="../../../static/image/comment.png" bindtap="goToDetail" data-id="{{item.id}}" data-index="{{index}}" />
-                <text class="commentText" bindtap="goToDetail" data-id="{{item.id}}" data-index="{{index}}">评论</text>
+                <image class="commentBtn" src="../../../static/image/comment.png" bindtap="goToDetail" data-count="{{item.replyCount}}" data-id="{{item.id}}" data-index="{{index}}" />
+                <text class="commentText" bindtap="goToDetail" data-id="{{item.id}}" data-count="{{item.replyCount}}" data-index="{{index}}">评论</text>
                 <image class="likeBtn" src="../../../static/image/like.png" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="likeCommend" />
                 <text class="likeText" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="likeCommend">{{item.likes}}</text>
             </view>

+ 2 - 2
pages/user/myworks/myworks.wxss

@@ -7,7 +7,7 @@ page{
 .user-works{
   width: 750rpx;
   box-sizing: border-box;
-  padding: 0 16rpx;
+  padding: 0 15rpx;
   background: #F0F1F5;
   display: flex;
   flex-direction: column;
@@ -17,7 +17,7 @@ page{
 
 .follow-details{
   width: 100%;
-  height: 362rpx;
+  height: 382rpx;
   border-radius: 20rpx;
   background: #FFFFFF;
   margin-top: 30rpx;

BIN
static/image/_edit.png


BIN
static/image/edit.png


BIN
static/image/play.png


BIN
static/image/redheart.png