committed by
trae-solo-agent
co-authored by
Claude Sonnet 4.6 noreply@anthropic.com
parent
031227710d
commit
d3f399d1ad
+15
-51
@@ -1,5 +1,3 @@
|
||||
const app = getApp()
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
@@ -7,64 +5,30 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
agreement: null,
|
||||
loading: true
|
||||
loading: true,
|
||||
error: false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const agreement = app.globalData.agreement
|
||||
if (agreement) {
|
||||
onLoad() {
|
||||
this.loadAgreement()
|
||||
},
|
||||
|
||||
loadAgreement() {
|
||||
this.setData({ loading: true, error: false })
|
||||
getApp().loadAgreement().then((agreement) => {
|
||||
this.setData({
|
||||
agreement: agreement,
|
||||
loading: false
|
||||
agreement: agreement || null,
|
||||
loading: false,
|
||||
error: !agreement
|
||||
})
|
||||
} else {
|
||||
this.setData({ loading: false })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
retry() {
|
||||
this.loadAgreement()
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user