Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
adbe2f1f98
1 changed files with 20 additions and 8 deletions
  1. 28
      pages/mall/information-item/index.wxml

28
pages/mall/information-item/index.wxml

@ -1,20 +1,32 @@
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<wxs module="moment" src="../../moment/index.wxs"></wxs>
<view class="bg-white flex flex-justify" style="padding:18rpx 24rpx" bindtap="lookItem">
<view style="flex: 2;">
<view style="flex: 1;">
<view class="text-df text-black">{{item.categoryName}} {{item.shortName}}</view>
<view class="text-gray text-xs" style="margin-top: 6rpx;">{{item.latestQuoteTime}}</view>
</view>
<view style="flex: 1;">
<view class="flex flex-center">
<view style="width: 132rpx;">
<view class="flex">
<text class="text-lg {{moment.colorText(item.floatingQuotedPrice)}}">{{formate.formatePrice(item.quotedPrice, 0)}}</text>
<image style="height: 20rpx;width: 20rpx;margin-left: 4rpx" src="/assets/image/icon-up.png" wx:if="{{item.floatingQuotedPrice > 0}}"></image>
<image style="height: 20rpx;width: 20rpx;margin-left: 4rpx" src="/assets/image/icon-down.png" wx:elif="{{item.floatingQuotedPrice < 0}}"></image>
</view>
<view class="text-gray text-sm" style="margin-top: 4rpx;text-align: center">当前价</view>
<view class="text-gray text-sm" style="margin-top: 4rpx;">当前价</view>
</view>
<view style="flex: 1;text-align: center">
<view class="text-df {{moment.colorText(item.floatingQuotedPrice)}}">{{formate.formatePrice(item.floatingQuotedPrice, 0) || '- -'}}</view>
<view class="text-gray text-sm" style="margin-top: 4rpx;text-align: center">较上次</view>
<view style="width: 100rpx;">
<view class="text-df {{moment.colorText(item.floatingQuotedPrice)}}">{{stringUtil.roundPrice(item.floatingQuotedPrice)}}</view>
<view class="text-gray text-sm" style="margin-top: 4rpx;">较上次</view>
</view>
</view>
</view>
<wxs module="stringUtil">
var roundPrice = function(val){
if(val > 0){
return '+' + (val * 1000)
} else if(val < 0){
return (val * 1000)
}
return '- -'
}
module.exports.roundPrice = roundPrice;
</wxs>
Loading…
Cancel
Save