仓库地址修改
This commit is contained in:
@@ -1,72 +0,0 @@
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
spinShow: false,
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: '暂无数据',
|
||||
queryParam: {
|
||||
pageIndex: 1,
|
||||
pageSize: app.globalData.pageSize
|
||||
},
|
||||
tableData: [],
|
||||
total: 1
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.setData({
|
||||
spinShow: true
|
||||
});
|
||||
this.search(true);
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
spinShow: true
|
||||
});
|
||||
if (!this.loading) {
|
||||
this.setData({
|
||||
['queryParam.pageIndex']: 1
|
||||
});
|
||||
this.search(true)
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loading && this.data.queryParam.pageIndex < this.data.total) {
|
||||
this.setData({
|
||||
loadMoreLoad: true,
|
||||
loadMoreTip: '正在加载'
|
||||
});
|
||||
this.setData({
|
||||
['queryParam.pageIndex']: this.data.queryParam.pageIndex + 1
|
||||
});
|
||||
this.search(false)
|
||||
}
|
||||
},
|
||||
search: function(override) {
|
||||
let _this = this
|
||||
app.formPost('/api/wx/student/user/message/page', this.data.queryParam).then(res => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
wx.stopPullDownRefresh()
|
||||
if (res.code === 1) {
|
||||
const re = res.response
|
||||
_this.setData({
|
||||
['queryParam.pageIndex']: re.pageNum,
|
||||
tableData: override ? re.list : this.data.tableData.concat(re.list),
|
||||
total: re.pages
|
||||
});
|
||||
|
||||
if (re.pageNum >= re.pages) {
|
||||
this.setData({
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: '暂无数据'
|
||||
});
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
app.message(e, 'error')
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"i-cell-group": "/component/iView/cell-group/index",
|
||||
"i-cell": "/component/iView/cell/index",
|
||||
"i-load-more": "/component/iView/load-more/index",
|
||||
"i-message": "/component/iView/message/index",
|
||||
"i-spin": "/component/iView/spin/index"
|
||||
},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<wxs module="enumItem" src="../../../../wxs/enumItem.wxs"></wxs>
|
||||
<view>
|
||||
<i-cell-group>
|
||||
<i-cell wx:for="{{tableData}}" data-item="item" label="{{item.content}}" wx:key="{{item.id}}" url="/pages/my/message/info/index?id={{item.id}}" title="{{item.title}}" lable="{{item.content}}" is-link value="{{enumItem.format(enumItem.state.user.message.readText,item.readed)}}"></i-cell>
|
||||
</i-cell-group>
|
||||
</view>
|
||||
|
||||
<i-load-more tip="{{loadMoreTip}}" loading="{{loadMoreLoad}}" />
|
||||
<i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
|
||||
<i-message id="message" />
|
||||
@@ -1 +0,0 @@
|
||||
/* pages/user/message/index.wxss */
|
||||
Reference in New Issue
Block a user