diff --git a/pages/moment/fragment/index.js b/pages/moment/fragment/index.js index cc04b35..ef9bcaa 100644 --- a/pages/moment/fragment/index.js +++ b/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 diff --git a/pages/moment/index.wxs b/pages/moment/index.wxs index 6c2827c..72cd8c1 100644 --- a/pages/moment/index.wxs +++ b/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 } \ No newline at end of file diff --git a/pages/moment/moment-item/index.wxml b/pages/moment/moment-item/index.wxml index fa875f1..a4e083c 100644 --- a/pages/moment/moment-item/index.wxml +++ b/pages/moment/moment-item/index.wxml @@ -12,7 +12,7 @@ {{formate.formatePrice(item.typicalFloatingQuotedPrice, 0) || '- -'}} - + 更新时间:{{moment.formateText(item.latestQuoteTime, 10)}} @@ -30,25 +30,25 @@ - 品类 - + 品类 + 价格 (元/吨) - 涨跌 + 涨跌 平均扣点 (最近7天) - {{item.categoryName}} - - {{formate.formatePrice(item.quotedPrice, 0) || '- -'}} - + {{item.categoryName}} + + {{formate.formatePrice(item.quotedPrice, 0) || '- -'}} + - {{item.floatingQuotedPrice || '- -'}} - {{item.averageDeductionPoints || '- -'}} + {{item.floatingQuotedPrice || '- -'}} + {{item.averageDeductionPoints || '- -'}} 代卖 diff --git a/pages/moment/moment-item/index.wxss b/pages/moment/moment-item/index.wxss index 35099ed..cdb43e0 100644 --- a/pages/moment/moment-item/index.wxss +++ b/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 } \ No newline at end of file