|
@@ -65,25 +65,7 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
- onLoad: function (options) {
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面初次渲染完成
|
|
|
- */
|
|
|
- onReady: function () {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面显示
|
|
|
- */
|
|
|
- onShow: async function () {
|
|
|
- const that = this;
|
|
|
- // 查询其他信息
|
|
|
- await that.searchOther();
|
|
|
- // 监听用户是否登录
|
|
|
- await that.watchLogin();
|
|
|
+ onLoad: async function (options) {
|
|
|
},
|
|
|
watchLogin: async function () {
|
|
|
const that = this;
|
|
@@ -136,20 +118,36 @@ Page({
|
|
|
that.setData({ typeList: list })
|
|
|
}
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面初次渲染完成
|
|
|
+ */
|
|
|
+ onReady: function () {
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面显示
|
|
|
+ */
|
|
|
+ onShow: async function () {
|
|
|
+ const that = this;
|
|
|
+ // 查询其他信息
|
|
|
+ await that.searchOther();
|
|
|
+ // 监听用户是否登录
|
|
|
+ await that.watchLogin();
|
|
|
+ },
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
onHide: function () {
|
|
|
-
|
|
|
+ const that = this;
|
|
|
+ that.clearPage();
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
onUnload: function () {
|
|
|
-
|
|
|
},
|
|
|
|
|
|
/**
|