Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
fd4e2d5880
1 changed files with 8 additions and 1 deletions
  1. 9
      pages/moment/moment-item/index.wxml

9
pages/moment/moment-item/index.wxml

@ -3,7 +3,7 @@
<view class="item-tips" wx:if="{{item.tipsTime}}">{{moment.formateDate(item.tipsTime)}}</view> <view class="item-tips" wx:if="{{item.tipsTime}}">{{moment.formateDate(item.tipsTime)}}</view>
<view class="bg-white flex flex-justify" style="padding:18rpx 32rpx" bindtap="lookItem"> <view class="bg-white flex flex-justify" style="padding:18rpx 32rpx" bindtap="lookItem">
<view style="width: 30%;" > <view style="width: 30%;" >
<highlight-text content="{{item.shortName}}" keyword="{{keyword}}" class="text-df text-black text-cut"/>
<highlight-text content="{{stringUtil.shortName(item.shortName)}}" keyword="{{keyword}}" class="text-df text-black text-cut"/>
<view class="{{item.hasFollowed ? 'attention-bg' : 'attention-unbg'}}" catchtap="attention"> <view class="{{item.hasFollowed ? 'attention-bg' : 'attention-unbg'}}" catchtap="attention">
<text>{{item.hasFollowed ? '已关注' : '点击关注'}}</text> <text>{{item.hasFollowed ? '已关注' : '点击关注'}}</text>
</view> </view>
@ -83,7 +83,14 @@
} }
return '- -' return '- -'
} }
var shortName = function(val){
if(val.length > 4){
return val.substring(0, 4) + '...'
}
return val
}
module.exports.queue = queue; module.exports.queue = queue;
module.exports.shortName = shortName;
module.exports.precent = precent; module.exports.precent = precent;
module.exports.roundPrice = roundPrice; module.exports.roundPrice = roundPrice;
</wxs> </wxs>
Loading…
Cancel
Save