|
|
|
@ -3,7 +3,6 @@ const util = require('../../../utils/util') |
|
|
|
import { userPushFollowMill } from "../../../api/ztb" |
|
|
|
import { getMillPaperList } from "../../../api/moment" |
|
|
|
const app = getApp() |
|
|
|
var requesting = false |
|
|
|
|
|
|
|
Component({ |
|
|
|
options: { |
|
|
|
@ -17,7 +16,8 @@ Component({ |
|
|
|
data: { |
|
|
|
unflod: false, |
|
|
|
loading: false, |
|
|
|
itemList: [2] |
|
|
|
requesting: false, |
|
|
|
itemList: [] |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onFlodTap: function(){ |
|
|
|
@ -45,18 +45,18 @@ Component({ |
|
|
|
util.navigateTo('/pages/article/detail/index?id=' + this.data.item.id) |
|
|
|
}, |
|
|
|
fetchItemList: function(){ |
|
|
|
if (requesting) { |
|
|
|
if (this.data.requesting) { |
|
|
|
return |
|
|
|
} |
|
|
|
requesting = true |
|
|
|
getMillPaperList({ paperMillId: 1, date: '' }).then(result => { |
|
|
|
this.setData({ requesting: true }) |
|
|
|
getMillPaperList({ paperMillId: this.data.item.paperMillId, date: this.data.item.latestQuoteTime }).then(result => { |
|
|
|
if (result.data.records.length) { |
|
|
|
this.setData({ orderList: result.data.records }) |
|
|
|
this.setData({ requesting: false, orderList: result.data.records }) |
|
|
|
} else { |
|
|
|
requesting = false |
|
|
|
this.setData({ requesting: false }) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
requesting = false |
|
|
|
this.setData({ requesting: false }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
agentOrder: function(e){ |
|
|
|
|