Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
3ca222869f
13 changed files with 73 additions and 63 deletions
  1. 3
      colorui/components/cu-custom.wxml
  2. 3
      pages/agent/fragment/index.js
  3. 3
      pages/agent/order-item/index.wxml
  4. 7
      pages/agent/order/index.js
  5. 13
      pages/agent/order/index.wxml
  6. 2
      pages/formate.wxs
  7. 8
      pages/moment/attention/index.wxml
  8. 4
      pages/moment/fragment/index.js
  9. 28
      pages/moment/index.wxs
  10. 3
      pages/moment/moment-item/index.js
  11. 46
      pages/moment/moment-item/index.wxml
  12. 8
      pages/moment/recommend/index.wxml
  13. 8
      pages/moment/theall/index.wxml

3
colorui/components/cu-custom.wxml

@ -4,8 +4,7 @@
<text class="weui_goback"></text> <text class="weui_goback"></text>
<slot name="backText"></slot> <slot name="backText"></slot>
</view> </view>
<view class="action border-custom" wx:if="{{isCustom}}"
style="width:{{Custom.width}}px;height:{{Custom.height}}px;margin-left:calc(750rpx - {{Custom.right}}px)">
<view class="action border-custom" style="width:{{Custom.width}}px;height:{{Custom.height}}px;margin-left:calc(750rpx - {{Custom.right}}px)" wx:if="{{isCustom}}">
<text class="cuIcon-back" bindtap="backspace"></text> <text class="cuIcon-back" bindtap="backspace"></text>
<text class="cuIcon-homefill" bindtap="toHome"></text> <text class="cuIcon-homefill" bindtap="toHome"></text>
</view> </view>

3
pages/agent/fragment/index.js

@ -65,6 +65,9 @@ Component({
this.data.firstShow = true this.data.firstShow = true
}, },
onEvent: function (message) { onEvent: function (message) {
if(!this.data.firstShow){
return
}
console.log('agent>>fragment>>onEvent', message) console.log('agent>>fragment>>onEvent', message)
if (message.what == 10 && app.globalData.isVIP == 1) { if (message.what == 10 && app.globalData.isVIP == 1) {
// this.setData({ token: app.globalData.token }) // this.setData({ token: app.globalData.token })

3
pages/agent/order-item/index.wxml

@ -1,6 +1,5 @@
<!--pages/message/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> <wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<view wx:if="{{item.isShowDateQd}}" style="padding-left:35rpx;height:40rpx;line-height:34rpx"><text>{{stringUtil.sub(item.createTime)}}</text></view>
<view wx:if="{{item.isShowDateQd}}" style="padding: 12rpx 36rpx 8rpx 36rpx;height:56rpx;"><text>{{stringUtil.sub(item.createTime)}}</text></view>
<view class="flex flex-justify item-content" style="border-bottom:2rpx solid #f3f3f3" bindtap="lookItem"> <view class="flex flex-justify item-content" style="border-bottom:2rpx solid #f3f3f3" bindtap="lookItem">
<view class="flex flex-center"> <view class="flex flex-center">
<wux-image width="{{20}}" height="{{20}}" shape="circle" src="{{item.logoImg}}" mode="aspectFill"> <wux-image width="{{20}}" height="{{20}}" shape="circle" src="{{item.logoImg}}" mode="aspectFill">

7
pages/agent/order/index.js

@ -25,10 +25,7 @@ Page({
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
height: app.globalData.fragmentHeight - 90, height: app.globalData.fragmentHeight - 90,
CustomBar: app.globalData.CustomBar,
// ['form.status']: options.status ? statusList[parseInt(options.status)] : '',
['form.status']: options.status ? options.status : '', ['form.status']: options.status ? options.status : '',
// tabIndex: options.status ? parseInt(options.status) : 0
tabIndex: options.tabIndex ? parseInt(options.tabIndex) : 0 tabIndex: options.tabIndex ? parseInt(options.tabIndex) : 0
}) })
event.on('ProxyMessage', this, this.onEvent) event.on('ProxyMessage', this, this.onEvent)
@ -39,6 +36,10 @@ Page({
this.onRefreshList() this.onRefreshList()
} }
}, },
searchOrder: function(){
console.length('searchOrder>>>>')
wx.navigateTo({url: `/pages/mall/search-list/index?tab=2` })
},
onRefreshList: function () { onRefreshList: function () {
if (this.data.requesting) { if (this.data.requesting) {
return return

13
pages/agent/order/index.wxml

@ -1,11 +1,16 @@
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">代卖订单</view>
<view slot="content" style="position: relative;">
<text>代卖订单</text>
<view style="position: absolute;right: 0px;top: 0px;padding: 0rpx 24rpx;" catchtap="searchOrder">
<text class="cuIcon-search text-blue"></text>
</view>
</view>
</cu-custom> </cu-custom>
<view class="nav bg-white fixed" style="top:{{CustomBar}}px;">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" bind:change="onTabChange"></wux-tabi>
<view class="bg-white" style="height: 90rpx;border-bottom: 1rpx solid #f3f3f3;">
<wux-tabi scroll="{{true}}" tab-data="{{tabList}}" disable="{{requesting}}" tab-index="{{tabIndex}}" bind:change="onTabChange"></wux-tabi>
</view> </view>
<view style="height:110rpx;width:100%"></view>
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchOrderList"> <refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchOrderList">
<view wx:if="{{!orderList.length}}"> <view wx:if="{{!orderList.length}}">

2
pages/formate.wxs

@ -61,7 +61,7 @@ var numberUtil = {
if(kg){ if(kg){
return (parseFloat(value)).toFixed(3) return (parseFloat(value)).toFixed(3)
} else { } else {
return (parseFloat(value) * 1000).toFixed(1)
return (parseFloat(value) * 1000).toFixed(0)
} }
} }
return '' return ''

8
pages/moment/attention/index.wxml

@ -10,10 +10,10 @@
</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: 35%;">纸厂名称</view>
<view style="width: 15%;">涨跌幅</view>
<view style="width: 25%;padding-left: 48rpx;">车辆排队</view>
<view style="width: 25%;padding-left: 24rpx">起扣点</view>
<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> </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">

4
pages/moment/fragment/index.js

@ -49,6 +49,10 @@ Component({
this.onResume() this.onResume()
}, },
onEvent: function (message) { onEvent: function (message) {
if(!this.data.firstShow){
return
}
console.log('moment>>fragment>>onEvent', message)
if (message.what == 10 && app.globalData.isVIP == 1) { if (message.what == 10 && app.globalData.isVIP == 1) {
// this.setData({ token: app.globalData.token }) // this.setData({ token: app.globalData.token })
// this.onRefreshList() // this.onRefreshList()

28
pages/moment/index.wxs

@ -27,7 +27,33 @@ function formateText(text, length) {
return text.substring(0, length) return text.substring(0, length)
} }
function colorText(price) {
if(!price || price == 0){
return 'text-gray'
}
if(price > 0){
return 'text-red'
}
if(price > 0){
return 'text-green'
}
}
function floatImage(price) {
if(!price || price == 0){
return 'text-gray'
}
if(price > 0){
return '/assets/image/icon-up.png'
}
if(price > 0){
return '/assets/image/icon-down.png'
}
}
module.exports = { module.exports = {
formateDate: formateDate, formateDate: formateDate,
formateText: formateText
formateText: formateText,
colorText: colorText,
floatImage: floatImage
} }

3
pages/moment/moment-item/index.js

@ -54,7 +54,8 @@ Component({
return return
} }
this.setData({ requesting: true }) this.setData({ requesting: true })
getMillPaperList({ paperMillId: this.data.item.paperMillId, date: this.data.item.latestQuoteTime }).then(result => {
var date = this.data.item.latestQuoteTime.length > 10 ? this.data.item.latestQuoteTime.substring(0, 10) : this.data.item.latestQuoteTime
getMillPaperList({ paperMillId: this.data.item.paperMillId, date }).then(result => {
if (result.data.length) { if (result.data.length) {
this.setData({ requesting: false, itemList: result.data }) this.setData({ requesting: false, itemList: result.data })
} else { } else {

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

@ -3,22 +3,22 @@
<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 class="bg-white flex flex-justify" style="padding:18rpx 24rpx">
<view style="width: 25%;">
<view style="width: 20%;">
<view class="text-df text-black text-cut" bindtap="lookItem">{{item.shortName}}</view> <view class="text-df text-black text-cut" bindtap="lookItem">{{item.shortName}}</view>
<!-- <view class="attention-bg" bindtap="onAttentionChange"> <!-- <view class="attention-bg" bindtap="onAttentionChange">
<text class="{{item.hasFollowed ? 'text-blue' : 'text-red'}}">{{item.hasFollowed ? '关注' : '已关注'}}</text> <text class="{{item.hasFollowed ? 'text-blue' : 'text-red'}}">{{item.hasFollowed ? '关注' : '已关注'}}</text>
</view> --> </view> -->
<wux-button outline type="{{item.hasFollowed ? 'positive' : 'stable'}}" loading="{{loading}}" size="attention" bind:click="attention">{{loading ? '' : item.hasFollowed ? '已关注' : '点击关注'}}</wux-button> <wux-button outline type="{{item.hasFollowed ? 'positive' : 'stable'}}" loading="{{loading}}" size="attention" bind:click="attention">{{loading ? '' : item.hasFollowed ? '已关注' : '点击关注'}}</wux-button>
</view> </view>
<view style="width: 35%;">
<view style="width: 40%;">
<view class="flex flex-center"> <view class="flex flex-center">
<text class="text-lg text-red">{{item.typicalFloatingQuotedPrice}}</text>
<text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
<text class="text-lg {{moment.colorText(item.typicalFloatingQuotedPrice)}}">{{item.typicalFloatingQuotedPrice || '- -'}}</text>
<image style="height: 20rpx;width: 20rpx;margin-left: 4rpx" src="{{moment.floatImage(item.typicalFloatingQuotedPrice)}}" wx:if="{{item.typicalFloatingQuotedPrice !== 0}}"></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;text-align: center">更新时间:{{moment.formateText(item.latestQuoteTime, 10)}}</view>
</view> </view>
<view style="flex: 1;">{{item.retainedReceivedQuantity || '- -'}}</view>
<view style="flex: 1;">{{item.startDeductionPoints}}</view>
<view class="text-black" style="flex: 1;text-align: center;">{{item.retainedReceivedQuantity || '- -'}}</view>
<view style="flex: 1;text-align: center">{{item.startDeductionPoints || '- -'}}</view>
<text class="cuIcon-triangle{{unflod ? 'upfill': 'downfill'}}" style="font-size:48rpx;padding-top: 4rpx;color: #ccc;" bindtap="onFlodTap"></text> <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;">
@ -45,40 +45,12 @@
<view class="flex flex-center bg-white item-content" wx:for="{{itemList}}" wx:key="index"> <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="text-df text-black" style="width: 25%;">{{item.categoryName}}</view>
<view class="flex flex-center" style="width: 25%;"> <view class="flex flex-center" style="width: 25%;">
<text class="text-lg text-red">{{formate.formatePrice(item.quotedPrice, 1)}}</text>
<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> <text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
</view> </view>
<view class="text-df text-green" style="width: 20%;padding-left: 24rpx;">{{item.floatingQuotedPrice}}</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 text-green" style="width: 10%;">{{item.averageDeductionPoints || '- -'}}</view>
<wux-button outline round type="positive" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button> <wux-button outline round type="positive" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button>
</view> </view>
</view> </view>
</view>
<wxs module="formateTime">
function formateTime(lasttime) {
if (index == 0) {
if(tabIndex == index){
return '/assets/tabs/tab-host-blue.png'
}
return '/assets/tabs/tab-host-gray.png'
} else if (index == 1) {
if(tabIndex == index){
return '/assets/tabs/tab-infi-blue.png'
}
return '/assets/tabs/tab-infi-gray.png'
} else if (index == 2) {
if(tabIndex == index){
return '/assets/tabs/tab-trans-blue.png'
}
return '/assets/tabs/tab-trans-gray.png'
} else if (index == 3) {
if(tabIndex == index){
return '/assets/tabs/tab-self-blue.png'
}
return '/assets/tabs/tab-self-gray.png'
}
return ''
}
module.exports = formateTime
</wxs>
</view>

8
pages/moment/recommend/index.wxml

@ -10,10 +10,10 @@
</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: 35%;">纸厂名称</view>
<view style="width: 15%;">涨跌幅</view>
<view style="width: 25%;padding-left: 48rpx;">车辆排队</view>
<view style="width: 25%;padding-left: 24rpx">起扣点</view>
<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> </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">

8
pages/moment/theall/index.wxml

@ -17,10 +17,10 @@
</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: 35%;">纸厂名称</view>
<view style="width: 15%;">涨跌幅</view>
<view style="width: 25%;padding-left: 48rpx;">车辆排队</view>
<view style="width: 25%;padding-left: 24rpx">起扣点</view>
<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> </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