Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
c6789e3ea2
10 changed files with 96 additions and 39 deletions
  1. 3
      pages/mall/fragment/index.wxml
  2. 12
      pages/mall/fragment/index.wxss
  3. 9
      pages/moment/attention/index.wxml
  4. 1
      pages/moment/attention/index.wxss
  5. 10
      pages/moment/fragment/index.wxml
  6. 11
      pages/moment/index.wxs
  7. 49
      pages/moment/moment-item/index.wxml
  8. 22
      pages/moment/moment-item/index.wxss
  9. 9
      pages/moment/recommend/index.wxml
  10. 9
      pages/moment/theall/index.wxml

3
pages/mall/fragment/index.wxml

@ -100,7 +100,8 @@
<view class="text-empty">暂无数据</view> <view class="text-empty">暂无数据</view>
</view> </view>
<view class="flex flex-center" style="padding: 24rpx;"> <view class="flex flex-center" style="padding: 24rpx;">
<wux-button id="moment" outline type="stable" size="small" bind:click="gridTap">查看更多行情</wux-button>
<view id="moment" class="btn-more" catchtap="gridTap">查看更多行情</view>
<!-- <wux-button id="moment" outline type="stable" size="small" bind:click="gridTap">查看更多行情</wux-button> -->
</view> </view>
</scroll-view> </scroll-view>

12
pages/mall/fragment/index.wxss

@ -52,4 +52,16 @@
.moment-pad{ .moment-pad{
padding: 0rpx 24rpx 24rpx 24rpx; padding: 0rpx 24rpx 24rpx 24rpx;
}
.btn-more{
width: 240rpx;
height: 56rpx;
line-height: 56rpx;
background-color: #F4F4F4;
font-size: 26rpx;
color: #888888;
border-radius: 28rpx;
text-align: center;
padding-top: 2rpx;
} }

9
pages/moment/attention/index.wxml

@ -10,10 +10,11 @@
</view> </view>
<view wx:else> <view wx:else>
<view class="bg-white flex flex-center" style="height: 80rpx;padding: 0rpx 32rpx;"> <view class="bg-white flex flex-center" style="height: 80rpx;padding: 0rpx 32rpx;">
<view style="width: 20%;">纸厂名称</view>
<view style="width: 36%;text-align: center;">涨跌幅</view>
<view style="flex: 1;text-align: center;">车辆排队</view>
<view style="flex: 1;text-align: center">起扣点</view>
<view style="width: 25%;">纸厂名称</view>
<view style="width: 35%;">涨跌幅</view>
<view style="width: 20%;">车辆排队</view>
<view style="width: 16%;">起扣点</view>
<view style="min-width: 48rpx;height: 24rpx;"><text></text></view>
</view> </view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex"> <view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index"> <view wx:for="{{pageItem}}" wx:key="index">

1
pages/moment/attention/index.wxss

@ -1,4 +1,3 @@
/* pages/mall/shops/index.wxss */
.item-content { .item-content {
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
padding:32rpx padding:32rpx

10
pages/moment/fragment/index.wxml

@ -46,14 +46,14 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="booking-tool" style="bottom:{{200 + safeBottom}}rpx" bindtap="feedback">
<!-- <view class="booking-tool" style="bottom:{{336 + safeBottom}}rpx" bindtap="feedback">
<view class="roder-add flex flex-center"> <view class="roder-add flex flex-center">
<image src="/assets/image/icon-{{tabIndex == 3 ? 'printer' : 'feedback'}}.png" style="width: 100rpx;height: 100rpx;"></image> <image src="/assets/image/icon-{{tabIndex == 3 ? 'printer' : 'feedback'}}.png" style="width: 100rpx;height: 100rpx;"></image>
</view> </view>
</view>
</view> -->
<view class="booking-tool" style="bottom:{{336 + safeBottom}}rpx;z-index: 22" bindtap="postMoment" wx:if="{{tabIndex== 3}}">
<view class="roder-add flex flex-center">
<text class="cuIcon-add text-blue" style="font-size:32px"></text>
<view class="booking-tool" style="bottom:{{200 + safeBottom}}rpx;z-index: 22" bindtap="postMoment" wx:if="{{tabIndex== 3}}">
<view class="roder-add flex flex-center" style="background-color: #007AFF;">
<text class="cuIcon-add text-white" style="font-size:32px"></text>
</view> </view>
</view> </view>

11
pages/moment/index.wxs

@ -27,6 +27,16 @@ function formateText(text, length) {
return text.substring(0, length) return text.substring(0, length)
} }
function formateTimes(text, start, end) {
if (!text) {
return ''
}
if (text.length <= end) {
return text
}
return text.substring(start, end)
}
function colorText(price) { function colorText(price) {
if(!price || price == 0){ if(!price || price == 0){
return 'text-gray' return 'text-gray'
@ -87,6 +97,7 @@ function checkPrice(price){
module.exports = { module.exports = {
formateDate: formateDate, formateDate: formateDate,
formateText: formateText, formateText: formateText,
formateTimes: formateTimes,
colorText: colorText, colorText: colorText,
floatImage: floatImage, floatImage: floatImage,
infoTime: infoTime, infoTime: infoTime,

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

@ -1,31 +1,31 @@
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> <wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<wxs module="moment" src="../../moment/index.wxs"></wxs> <wxs module="moment" src="../../moment/index.wxs"></wxs>
<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 24rpx">
<view style="width: 20%;" bindtap="lookItem">
<view class="text-df text-black text-cut" style="text-align: center;">{{item.shortName}}</view>
<!-- <view class="attention-bg" bindtap="onAttentionChange">
<text class="{{item.hasFollowed ? 'text-blue' : 'text-red'}}">{{item.hasFollowed ? '关注' : '已关注'}}</text>
</view> -->
<wux-button outline type="{{item.hasFollowed ? 'positive' : 'stable'}}" loading="{{loading}}" size="attention" bind:click="attention">{{loading ? '' : item.hasFollowed ? '已关注' : '点击关注'}}</wux-button>
<view class="bg-white flex flex-justify" style="padding:18rpx 32rpx">
<view style="width: 30%;" >
<view class="text-df text-black text-cut" bindtap="lookItem">{{item.shortName}}</view>
<view class="{{item.hasFollowed ? 'attention-bg' : 'attention-unbg'}}" catchtap="attention">
<text>{{item.hasFollowed ? '已关注' : '点击关注'}}</text>
</view>
</view> </view>
<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>
<view style="width: 30%;" bindtap="lookItem">
<view class="flex flex-center" style="justify-content: flex-start">
<text class="text-lg text-bold {{moment.colorText(item.typicalFloatingQuotedPrice)}}">{{formate.formatePrice(item.typicalFloatingQuotedPrice, 0)}}</text>
<image class="float-image" src="{{moment.floatImage(item.typicalFloatingQuotedPrice)}}" wx:if="{{moment.checkPrice(item.typicalFloatingQuotedPrice)}}"></image> <image class="float-image" src="{{moment.floatImage(item.typicalFloatingQuotedPrice)}}" wx:if="{{moment.checkPrice(item.typicalFloatingQuotedPrice)}}"></image>
</view> </view>
<view class="text-gray text-sm" style="margin-top: 4rpx;text-align: center">更新时间:{{moment.formateText(item.latestQuoteTime, 10)}}</view>
<view class="text-gray text-sm" style="margin-top: 4rpx;">调价时间:{{moment.formateTimes(item.latestQuoteTime, 5, 10)}}</view>
</view>
<view class="text-black" style="width: 20%;;" bindtap="lookItem">{{stringUtil.queue(item.retainedReceivedQuantity)}}</view>
<view class="text-black" style="width: 16%;" bindtap="lookItem">{{stringUtil.precent(item.startDeductionPoints)}}</view>
<view style="width: 48rpx;" bindtap="onFlodTap">
<text class="cuIcon-triangle{{unflod ? 'upfill': 'downfill'}} text-gray" style="font-size:48rpx;"></text>
</view> </view>
<view class="text-black" style="flex: 1;text-align: center;" bindtap="lookItem">{{item.retainedReceivedQuantity || '- -'}}</view>
<view style="flex: 1;text-align: center" bindtap="lookItem">{{item.startDeductionPoints || '- -'}}</view>
<text class="cuIcon-triangle{{unflod ? 'upfill': 'downfill'}}" style="font-size:48rpx;padding-top: 4rpx;color: #ccc;" bindtap="onFlodTap"></text>
</view> </view>
<view style="display: {{ unflod ? 'block' : 'none'}};padding:16rpx 24rpx;"> <view style="display: {{ unflod ? 'block' : 'none'}};padding:16rpx 24rpx;">
<view class="list-empty" style="height:240rpx" wx:if="{{requesting}}"> <view class="list-empty" style="height:240rpx" wx:if="{{requesting}}">
<view class="load-spinner text-gray" /> <view class="load-spinner text-gray" />
</view> </view>
<view class="list-empty" style="height:240rpx" catchtap="fetchItemList" wx:elif="{{!requesting && !itemList.length}}"> <view class="list-empty" style="height:240rpx" catchtap="fetchItemList" wx:elif="{{!requesting && !itemList.length}}">
<!-- <image class="img-empty" src="/assets/image/list_empty.png"></image> -->
<view class="text-empty">暂无数据,点击刷新</view> <view class="text-empty">暂无数据,点击刷新</view>
</view> </view>
<view wx:else> <view wx:else>
@ -54,4 +54,21 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</view>
<wxs module="stringUtil">
var queue = function(val) {
if(val > 0){
return val + '辆'
}
return '- -'
}
var precent = function(val) {
if(val > 0){
return (val * 100) + '%'
}
return '- -'
}
module.exports.queue = queue;
module.exports.precent = precent;
</wxs>

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

@ -1,9 +1,23 @@
/* pages/main/index.wxss */ /* pages/main/index.wxss */
.attention-unbg{
width: 100rpx;
height: 32rpx;
line-height: 32rpx;
background-color: #F4F4F4;
font-size: 20rpx;
color: #888888;
border-radius: 4rpx;
text-align: center;
padding-top: 2rpx;
margin-top: 4rpx;
}
.attention-bg{ .attention-bg{
width: 120rpx;
height: 40rpx;
line-height: 40rpx;
background-color: rgba(0,0,0,0.10);
width: 84rpx;
height: 32rpx;
line-height: 32rpx;
color: #007AFF;
background-color: #007AFF20;
font-size: 20rpx; font-size: 20rpx;
border-radius: 4rpx; border-radius: 4rpx;
text-align: center; text-align: center;

9
pages/moment/recommend/index.wxml

@ -10,10 +10,11 @@
</view> </view>
<view wx:else> <view wx:else>
<view class="bg-white flex flex-center" style="height: 80rpx;padding: 0rpx 32rpx;"> <view class="bg-white flex flex-center" style="height: 80rpx;padding: 0rpx 32rpx;">
<view style="width: 20%;">纸厂名称</view>
<view style="width: 36%;text-align: center;">涨跌幅</view>
<view style="flex: 1;text-align: center;">车辆排队</view>
<view style="flex: 1;text-align: center">起扣点</view>
<view style="width: 30%;">纸厂名称</view>
<view style="width: 30%;">涨跌幅</view>
<view style="width: 20%;">车辆排队</view>
<view style="width: 16%;">起扣点</view>
<view style="min-width: 48rpx;height: 24rpx;"><text></text></view>
</view> </view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex"> <view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index"> <view wx:for="{{pageItem}}" wx:key="index">

9
pages/moment/theall/index.wxml

@ -17,10 +17,11 @@
</view> </view>
<view wx:else> <view wx:else>
<view class="bg-white flex flex-center" style="height: 80rpx;padding: 0rpx 32rpx;"> <view class="bg-white flex flex-center" style="height: 80rpx;padding: 0rpx 32rpx;">
<view style="width: 20%;">纸厂名称</view>
<view style="width: 36%;text-align: center;">涨跌幅</view>
<view style="flex: 1;text-align: center;">车辆排队</view>
<view style="flex: 1;text-align: center">起扣点</view>
<view style="width: 25%;">纸厂名称</view>
<view style="width: 35%;">涨跌幅</view>
<view style="width: 20%;">车辆排队</view>
<view style="width: 16%;">起扣点</view>
<view style="min-width: 48rpx;height: 24rpx;"><text></text></view>
</view> </view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex"> <view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index"> <view wx:for="{{pageItem}}" wx:key="index">

Loading…
Cancel
Save