Kaynağa Gözat

留言删除bug

begmoon 2 yıl önce
ebeveyn
işleme
d41cc3743e

+ 2 - 2
pages/index/index.wxml

@@ -87,7 +87,7 @@
                         <view bindtap="tabChange1" data-id='0' class="{{hot==0?'act1':''}}">今日热门 <text></text></view>
                         <view bindtap="tabChange1" data-id='1' class="{{hot==1?'act1':''}}">我的自选 <text></text></view>
                     </view> -->
-                    <scroll-view style="padding:0;" scroll-y='{{true}}' style="height:calc(120vh - 377rpx);">
+                    <scroll-view style="padding:0;" scroll-y='{{true}}' style="height:calc(100vh - 377rpx);">
                         <view wx:if='{{hot==0}}'>
                           <navigator hover-class="none" url="../stock/stock?id={{item.id}}&date={{date}}" class="gp" wx:for='{{hotbuyList}}' wx:if='{{index<10}}'>
                               <image wx:if='{{index==0}}' mode="widthFix" src="../../images/1.png"></image>
@@ -146,7 +146,7 @@
                 <label class="tag" wx:for='{{item.style}}' wx:for-item='i'>{{i}}</label></view>
                 <view class="info">
                     资产:  
-                    <view><label>{{item.today_fund}}w</label>(总收益 <text class='up'> {{item.total_income}} </text> 
+                    <view><label>{{item.today_fund}}w</label>(总收益 <text class="{{item.total_income[0]=='-' ?'down':'up'}}"> {{item.total_income}} </text> 
                       <text style="color:#F5F5F5;">  |  </text>
                       <text style="color:#666;">胜率</text>
                       <text class="{{item.win_rate[0]=='-' ?'down':'up'}}"> {{item.win_rate}} </text>)

+ 3 - 4
pages/index/index.wxss

@@ -154,7 +154,7 @@ scroll-view{
 }
 .hot{
   border-radius: 16rpx;
-  margin-top: 10rpx;
+  margin-top: 30rpx;
   /* box-shadow: 0px 0px 12px 0px rgba(218, 217, 217, 0.5); */
 }
 .hot_tab{
@@ -207,11 +207,10 @@ scroll-view{
 .gp{
   display: flex;
   justify-content: space-between;
-  padding: 10rpx 0;
+  padding: 24rpx 0;
   flex-wrap: wrap;
   border-bottom: 1px solid #F5F5F5;
 }
-
 .gp-name{
   font-weight: 500;
   font-size: 32rpx;
@@ -231,7 +230,7 @@ scroll-view{
 }
 .comment{
   width: 100%;
-  padding-top: 0rpx;
+  padding-top: 10rpx;
   padding-left: 60rpx;
 }
 .comment text{

+ 2 - 1
pages/today/today.js

@@ -14,6 +14,7 @@ Page({
     date:'2021-11',
     text:'留言',
     days:[],
+    author_user_id:'',
     ec: {
       onInit: null
     },
@@ -37,7 +38,7 @@ Page({
         title: '',
       })
       this.setData({
-        user_id:res.data.data.id,
+        author_user_id:res.data.data.id,
         role: res.data.data.role
       })
     })

+ 1 - 1
pages/today/today.wxml

@@ -84,7 +84,7 @@
           </view>
           <view class="addr">
               <text>{{item.ctime}}</text><text>来自{{item.location}}</text>
-              <image wx:if="{{user_id==datas.today_record.user_id||item.user_id==user_id}}" class="del" data-id='{{item.id}}' data-name='{{item.user_name}}' catchtap="delmsg" mode="widthFix" src="../../images/delete.png"></image>
+              <image wx:if="{{author_user_id==datas.today_record.user_id||item.user_id==author_user_id}}" class="del" data-id='{{item.id}}' data-name='{{item.user_name}}' catchtap="delmsg" mode="widthFix" src="../../images/delete.png"></image>
               <image data-id='{{item.id}}' data-name='{{item.user_name}}' catchtap="answer" mode="widthFix" src="../../images/msg.png"></image>
           </view>
       </view>