feat: add resident miniapp MVP
This commit is contained in:
@@ -1 +1,20 @@
|
||||
Page({})
|
||||
const { listNotices } = require('../../api/noticeApi')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
loading: false,
|
||||
notices: []
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.load()
|
||||
},
|
||||
|
||||
load() {
|
||||
this.setData({ loading: true })
|
||||
listNotices()
|
||||
.then((notices) => this.setData({ notices: notices || [] }))
|
||||
.catch((error) => wx.showToast({ title: error.message, icon: 'none' }))
|
||||
.finally(() => this.setData({ loading: false }))
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user