Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
58cfc45c9b
4 changed files with 43 additions and 32 deletions
  1. 1
      app.js
  2. 53
      pages/index/index.wxml
  3. 2
      pages/mall/fragment/index.wxss
  4. 19
      pages/moment/moment-item/index.wxml

1
app.js

@ -1,4 +1,3 @@
//app.js
const tdsdk = require('./libs/tdweapp.js')
App({
//----------------------------------------------globalData--------------------------------------

53
pages/index/index.wxml

@ -49,31 +49,34 @@
<view class="text-black text-sg text-bold">选择城市</view>
<view class="text-gray text-df" hover-class="button--hover" style="width: 120rpx;line-height: 90rpx;" bindtap="onClose">取消</view>
</view>
<view class="flex flex-justify" style="padding: 24rpx 32rpx 0rpx 32rpx;" wx:if="{{historyList.length}}">
<view class="text-black text-df text-bold">历史选择</view>
<text class="cuIcon-delete" style="font-size: 17px" bindtap="clearHistory"></text>
</view>
<view class="bg-white" style="padding: 24rpx;" wx:if="{{historyList.length}}">
<wux-grids col="4" bordered="{{ false }}">
<wux-grid wx:for="{{historyList}}" wx:key="index" hover-class="none">
<view style="width: 160rpx;margin-bottom: 16rpx;">
<wux-button outline="{{cityId != item.cityId}}" block type="{{cityId == item.cityId ? 'positive' : 'stable'}}" size="city" data-id="{{item.cityId}}" bind:click="clickCity">{{item.cityName}}</wux-button>
</view>
</wux-grid>
</wux-grids>
</view>
<view class="flex flex-justify" style="padding: 24rpx 32rpx 0rpx 32rpx;">
<view class="text-black text-df text-bold">全部城市</view>
</view>
<view class="bg-white" style="padding: 24rpx;">
<wux-grids col="4" bordered="{{ false }}">
<wux-grid wx:for="{{cityList}}" wx:key="index" hover-class="none">
<view style="width: 160rpx;margin-bottom: 16rpx;">
<wux-button outline="{{cityId != item.cityId}}" block type="{{cityId == item.cityId ? 'positive' : 'stable'}}" size="city" data-id="{{item.cityId}}" data-index="{{index}}" bind:click="clickCity">{{item.cityName}}</wux-button>
</view>
</wux-grid>
</wux-grids>
</view>
<scroll-view scroll-y style="height:630rpx;">
<view class="flex flex-justify" style="padding: 0rpx 32rpx;height: 72rpx;" wx:if="{{historyList.length}}">
<view class="text-black text-df text-bold">历史选择</view>
<text class="cuIcon-delete" style="font-size: 17px" bindtap="clearHistory"></text>
</view>
<view class="bg-white" style="padding: 0rpx 24rpx;" wx:if="{{historyList.length}}">
<wux-grids col="4" bordered="{{ false }}">
<wux-grid wx:for="{{historyList}}" wx:key="index" hover-class="none">
<view style="width: 160rpx;margin-bottom: 16rpx;">
<wux-button outline="{{cityId != item.cityId}}" block type="{{cityId == item.cityId ? 'positive' : 'stable'}}" size="city" data-id="{{item.cityId}}" bind:click="clickCity">{{item.cityName}}</wux-button>
</view>
</wux-grid>
</wux-grids>
</view>
<view class="flex flex-justify" style="padding: 0rpx 32rpx;height: 72rpx;">
<view class="text-black text-df text-bold">全部城市</view>
</view>
<view class="bg-white" style="padding: 0rpx 24rpx;">
<wux-grids col="4" bordered="{{ false }}">
<wux-grid wx:for="{{cityList}}" wx:key="index" hover-class="none">
<view style="width: 160rpx;margin-bottom: 16rpx;">
<wux-button outline="{{cityId != item.cityId}}" block type="{{cityId == item.cityId ? 'positive' : 'stable'}}" size="city" data-id="{{item.cityId}}" data-index="{{index}}" bind:click="clickCity">{{item.cityName}}</wux-button>
</view>
</wux-grid>
</wux-grids>
</view>
</scroll-view>
<view style="height: 24rpx;"></view>
</wux-popup>
<wxs module="tabImage">

2
pages/mall/fragment/index.wxss

@ -61,7 +61,7 @@
background-color: #F4F4F4;
font-size: 26rpx;
color: #888888;
border: 1rpx solid #e3e3e3;
border-radius: 28rpx;
text-align: center;
padding-top: 2rpx;
}

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

@ -35,8 +35,8 @@
<text class="text-df" style="color: #555555;">价格</text>
<text style="color: #555555;font-size: 20rpx;">(元/吨)</text>
</view>
<view style="width: 20%;">涨跌</view>
<view style="width: 30%;">
<view style="width: 15%;">涨跌</view>
<view style="width: 35%;">
<text class="text-df" style="color: #555555;">平均扣点</text>
<text style="color: #555555;font-size: 20rpx;">(最近7天)</text>
</view>
@ -47,8 +47,8 @@
<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 {{moment.colorText(item.floatingQuotedPrice)}}" style="width: 20%;">{{formate.formatePrice(item.floatingQuotedPrice, 0)}}</view>
<view class="text-df text-black" style="width: 10%;">{{item.averageDeductionPoints || '- -'}}</view>
<view class="text-df {{moment.colorText(item.floatingQuotedPrice)}}" style="width:15%;">{{stringUtil.roundPrice(item.floatingQuotedPrice)}}</view>
<view class="text-df text-black" style="width: 15%;">{{stringUtil.precent(item.averageDeductionPoints)}}</view>
<view class="flex flex-center" style="width: 20%;align-items: flex-end">
<wux-button outline round type="positive" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button>
</view>
@ -65,10 +65,19 @@
}
var precent = function(val) {
if(val > 0){
return (val * 100) + '%'
return val + '%'
}
return '- -'
}
var roundPrice = function(val){
if(val > 0){
return '+' + (val * 1000)
} else if(val < 0){
return (val * 1000)
}
return '- -'
}
module.exports.queue = queue;
module.exports.precent = precent;
module.exports.roundPrice = roundPrice;
</wxs>
Loading…
Cancel
Save