|
@@ -28,9 +28,15 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面显示
|
|
|
+ */
|
|
|
+ onShow: function () {
|
|
|
this.data.dayOfWeek = this.getDayOfWeek()
|
|
|
this.startLoadActivityData()
|
|
|
- this.setPageStyle()
|
|
|
},
|
|
|
|
|
|
startLoadActivityData() {
|
|
@@ -63,20 +69,6 @@ Page({
|
|
|
|
|
|
},
|
|
|
|
|
|
- setPageStyle() {
|
|
|
- let dwObj = wx.getMenuButtonBoundingClientRect()
|
|
|
- let navHeight_ = (dwObj.top + dwObj.height)
|
|
|
- let capsuleTop_ = dwObj.top
|
|
|
- let windowHeight = wx.getSystemInfoSync().windowHeight
|
|
|
-
|
|
|
- this.setData({
|
|
|
- navHeight: navHeight_,
|
|
|
- capsuleTop:capsuleTop_,
|
|
|
- capHeight: dwObj.height,
|
|
|
- bodyHeight: windowHeight - navHeight_,
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
mapToView(data) {
|
|
|
this.setColors(data.color)
|
|
|
if (data.dayAwardList && data.dayAwardList.length > 0) {
|
|
@@ -242,13 +234,6 @@ Page({
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 生命周期函数--监听页面显示
|
|
|
- */
|
|
|
- onShow: function () {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
onHide: function () {
|