Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
ded3f46753
4 changed files with 19 additions and 3 deletions
  1. 16
      pages/agent/factory/index.js
  2. 2
      pages/agent/factory/index.wxml
  3. 3
      pages/moment/fragment/index.js
  4. 1
      pages/moment/info-item/index.wxss

16
pages/agent/factory/index.js

@ -33,6 +33,7 @@ Page({
pageSize:15
},
visible: false,
disabled: false,
hasFollowed: false
},
/**
@ -62,7 +63,12 @@ Page({
this.data.visible = true
}
}
this.setData({ factoryDetail: result.data, hasFollowed:result.data.hasFollowed, visible: this.data.visible })
var item = result.data.paperCategoryList[this.data.cateIndex]
var disabled = false
if(!item.isAllowOrder || util.isEmpty(item.unitPrice) || Number(item.unitPrice) <= 0){
disabled = true
}
this.setData({ factoryDetail: result.data, hasFollowed:result.data.hasFollowed, visible: this.data.visible, disabled})
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
@ -115,7 +121,13 @@ Page({
if (this.data.cateIndex == e.currentTarget.dataset.index) {
return
}
this.setData({ cateIndex: e.currentTarget.dataset.index })
this.data.cateIndex = e.currentTarget.dataset.index
var item = this.data.factoryDetail.paperCategoryList[this.data.cateIndex]
var disabled = false
if(!item.isAllowOrder || util.isEmpty(item.unitPrice) || Number(item.unitPrice) <= 0){
disabled = true
}
this.setData({ cateIndex: this.data.cateIndex, disabled })
},
saleGood: function (e) {
if (!app.globalData.userInfo) {

2
pages/agent/factory/index.wxml

@ -167,7 +167,7 @@
</button>
</view>
<view style="width:100%">
<wux-button block type="{{factoryDetail.isOperations? 'positive' : 'stable'}}" bind:click="saleGood">我要卖货</wux-button>
<wux-button block type="{{factoryDetail.isOperations? 'positive' : 'stable'}}" disabled="{{disabled}}" bind:click="saleGood">我要卖货</wux-button>
</view>
</view>

3
pages/moment/fragment/index.js

@ -122,6 +122,9 @@ Component({
// if(record.latestQuoteTime.indexOf(params.data) < 0){
// return
// }
if(util.isEmpty(record.typicalFloatingQuotedPrice) || record.typicalFloatingQuotedPrice == 0){
return
}
if(record.typicalFloatingQuotedPrice > 0){
record.content = record.paperMillName + '上涨' + math.times(record.typicalFloatingQuotedPrice, 1000) + '元/吨'
} else if(record.typicalFloatingQuotedPrice < 0){

1
pages/moment/info-item/index.wxss

@ -22,6 +22,7 @@
}
.type-tags {
z-index: 2;
background: #33333366;
border-radius: 28rpx;
padding: 4rpx 12rpx;

Loading…
Cancel
Save