Browse Source

no message

feature/v1.1
xpz2018 5 years ago
parent
commit
a364d75bfc
2 changed files with 4 additions and 10 deletions
  1. 2
      app.js
  2. 12
      pages/message/index/index.js

2
app.js

@ -1,6 +1,6 @@
//app.js //app.js
App({ App({
evn: 0, // 0: 开发版本;1:测试版本;2:生产版本
evn: 2, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: [''], tmplIds: [''],
version: 152, version: 152,
xAppId: '503258978847953926', xAppId: '503258978847953926',

12
pages/message/index/index.js

@ -63,25 +63,19 @@ Component({
this.onRefreshList() this.onRefreshList()
}, },
onRefreshList: function () { onRefreshList: function () {
this.setData({
orderList: [],
['form.pageNum']: 1,
loading: true,
finished: false
})
this.fetchList()
// this.setData({ orderList: [], ['form.pageNum']: 1, loading: true, finished: false })
// this.fetchList()
}, },
fetchList: function () { fetchList: function () {
if (this.data.requesting || this.data.finished) { if (this.data.requesting || this.data.finished) {
return return
} }
if (this.data.loading) {
if (this.data.orderList.length > 0) {
this.data.requesting = true this.data.requesting = true
} else { } else {
this.setData({ requesting: true }) this.setData({ requesting: true })
} }
getProductList(this.data.form).then(result => { getProductList(this.data.form).then(result => {
//成功回调
if (result.data.records.length) { if (result.data.records.length) {
var respList = result.data.records var respList = result.data.records
let nowList = `orderList[${this.data.orderList.length}]` let nowList = `orderList[${this.data.orderList.length}]`

Loading…
Cancel
Save