Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
3027c74729
4 changed files with 24 additions and 12 deletions
  1. 2
      pages/moment/fragment/index.js
  2. 10
      pages/moment/index.wxs
  3. 20
      pages/moment/moment-item/index.wxml
  4. 4
      pages/moment/moment-item/index.wxss

2
pages/moment/fragment/index.js

@ -39,7 +39,7 @@ Component({
methods: {
onRestart: function () {
if(!this.data.firstShow){
setTimeout(() => { this.setData({ tabIndex: this.data.tabIndex, tabList: [ '推荐', '关注', '全部' , '资讯'] }) }, 100)
setTimeout(() => { this.setData({ tabIndex: this.data.tabIndex, tabList: [ '推荐', '关注', '全部' , '行情'] }) }, 100)
params.date = util.formatDate(new Date(), 'Y-M-D')
}
this.data.firstShow = true

10
pages/moment/index.wxs

@ -83,11 +83,19 @@ function infoColor(time){
}
}
function checkPrice(price){
if (isEmpty(time)) {
return false
}
return Number(price) !== 0
}
module.exports = {
formateDate: formateDate,
formateText: formateText,
colorText: colorText,
floatImage: floatImage,
infoTime: infoTime,
infoColor: infoColor
infoColor: infoColor,
checkPrice: checkPrice
}

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

@ -12,7 +12,7 @@
<view style="width: 40%;" bindtap="lookItem">
<view class="flex flex-center">
<text class="text-lg {{moment.colorText(item.typicalFloatingQuotedPrice)}}">{{formate.formatePrice(item.typicalFloatingQuotedPrice, 0) || '- -'}}</text>
<image style="height: 24rpx;width: 24rpx;margin-left: 4rpx" src="{{moment.floatImage(item.typicalFloatingQuotedPrice)}}" wx:if="{{item.typicalFloatingQuotedPrice !== 0}}"></image>
<image class="float-image" src="{{moment.floatImage(item.typicalFloatingQuotedPrice)}}" wx:if="{{moment.checkPrice(item.typicalFloatingQuotedPrice)}}"></image>
</view>
<view class="text-gray text-sm" style="margin-top: 4rpx;text-align: center">更新时间:{{moment.formateText(item.latestQuoteTime, 10)}}</view>
</view>
@ -30,25 +30,25 @@
</view>
<view wx:else>
<view class="flex" style="padding-bottom: 16rpx;">
<view style="width: 30%;padding-left: 32rpx;">品类</view>
<view style="width: 20%;text-align: center">
<view style="width: 25%;padding-left: 32rpx;">品类</view>
<view style="width: 25%;text-align: center">
<text class="text-df" style="color: #555555;">价格</text>
<text style="color: #555555;font-size: 20rpx;">(元/吨)</text>
</view>
<view style="width: 20%;padding-left: 40rpx;">涨跌</view>
<view style="width: 20%;padding-left: 24rpx;">涨跌</view>
<view style="width: 30%;">
<text class="text-df" style="color: #555555;">平均扣点</text>
<text style="color: #555555;font-size: 20rpx;">(最近7天)</text>
</view>
</view>
<view class="flex flex-center bg-white item-content" wx:for="{{itemList}}" wx:key="index">
<view class="text-df text-black" style="width: 25%;">{{item.categoryName}}</view>
<view class="flex flex-center" style="width: 25%;">
<text class="text-lg text-red">{{formate.formatePrice(item.quotedPrice, 0) || '- -'}}</text>
<text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
<view class="text-df text-black" style="width: 20%;">{{item.categoryName}}</view>
<view class="flex flex-center" style="width: 30%;">
<text class="text-lg {{moment.colorText(item.floatingQuotedPrice)}}">{{formate.formatePrice(item.quotedPrice, 0) || '- -'}}</text>
<image class="float-image" src="{{moment.floatImage(item.floatingQuotedPrice)}}" wx:if="{{moment.checkPrice(item.floatingQuotedPrice)}}"></image>
</view>
<view class="text-df text-green" style="width: 20%;padding-left: 24rpx;">{{item.floatingQuotedPrice || '- -'}}</view>
<view class="text-df text-green" style="width: 10%;">{{item.averageDeductionPoints || '- -'}}</view>
<view class="text-df {{moment.colorText(item.floatingQuotedPrice)}}" style="width: 20%;padding-left: 24rpx;">{{item.floatingQuotedPrice || '- -'}}</view>
<view class="text-df text-black" style="width: 10%;">{{item.averageDeductionPoints || '- -'}}</view>
<wux-button outline round type="positive" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button>
</view>
</view>

4
pages/moment/moment-item/index.wxss

@ -22,4 +22,8 @@
.item-content{
padding:16rpx 24rpx;
border-bottom: 1rpx solid #f3f3f3;
}
.float-image{
height: 24rpx;width: 24rpx;margin-left: 4rpx
}
Loading…
Cancel
Save