omi-cloud - add loading
This commit is contained in:
parent
af2404ba8b
commit
ad9020ac64
|
@ -18,10 +18,13 @@ define('page-about', class extends WeElement {
|
|||
}
|
||||
|
||||
install(options) {
|
||||
|
||||
wx.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
app.globalData.db.collection('article').doc(options.id).get().then(res=>{
|
||||
const article = md.render(res.data.md)
|
||||
WxParse.wxParse('article', 'html', article, this._weappRef, 5)
|
||||
wx.hideLoading()
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -34,4 +37,4 @@ define('page-about', class extends WeElement {
|
|||
</view>
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -14,7 +14,7 @@ define('page-index', class extends WeElement {
|
|||
backgroundColor: '#eeeeee',
|
||||
backgroundTextStyle: 'light'
|
||||
}
|
||||
|
||||
|
||||
data = {
|
||||
todo: [],
|
||||
inputText: '',
|
||||
|
@ -93,7 +93,7 @@ define('page-index', class extends WeElement {
|
|||
|
||||
|
||||
wx.showLoading({
|
||||
title: '加载中'
|
||||
title: '添加中'
|
||||
})
|
||||
app.globalData.db.collection('todo').add({
|
||||
// data 字段表示需新增的 JSON 数据
|
||||
|
|
|
@ -20,7 +20,9 @@ define('page-about', class extends WeElement {
|
|||
}
|
||||
|
||||
installed() {
|
||||
wx.showLoading()
|
||||
wx.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
wx.cloud.callFunction({
|
||||
name: 'login',
|
||||
data: {},
|
||||
|
@ -86,4 +88,4 @@ define('page-about', class extends WeElement {
|
|||
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue