Quellcode durchsuchen

我的页面统计信息默认为0

孙志雷 vor 6 Jahren
Ursprung
Commit
e55425d929
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      component/my/my.wxml

+ 4 - 4
component/my/my.wxml

@@ -21,7 +21,7 @@
       </view>
       <view class='mine-category'>
         <view class='play-count'>
-          <view>{{ myData.user.playAmount }}</view>
+          <view>{{ myData.user.playAmount || 0 }}</view>
           <view class='border-right'>
             <view class='play-img'>
               <image src='../../static/image/play.png'></image>
@@ -30,7 +30,7 @@
           </view>
         </view>
         <view class='follow-count'>
-          <view class='color'>{{ myData.user.fansAmount }}</view>
+          <view class='color'>{{ myData.user.fansAmount || 0 }}</view>
           <view class='border-right'>
             <view class='play-img'>
               <image src='../../static/image/follow.png'></image>
@@ -39,7 +39,7 @@
           </view>
         </view>
         <view class='point-count'>
-          <view class='color'>{{ myData.user.likeAmount }}</view>
+          <view class='color'>{{ myData.user.likeAmount || 0 }}</view>
           <view class='border-right'>
             <view class='play-img'>
               <image src='../../static/image/point.png'></image>
@@ -48,7 +48,7 @@
           </view>
         </view>
         <view class='flower-count'>
-          <view class='color'>{{ myData.user.pointAmount }}</view>
+          <view class='color'>{{ myData.user.pointAmount || 0 }}</view>
           <view class='border-right'>
             <view class='play-img'>
               <image src='../../static/image/flower.png'></image>