This commit is contained in:
alzz94 committed 2023-11-06 14:14:34 +08:00
1 parent 386a57795e
commit 32b3421eb6
3 files changed
+164 -13

No files matched your search

+46 -1
View File
@@ -16,6 +16,7 @@ Page({
tip_content: "不吃饭会饿死",
tip_hidden: false,
active_Page: "startPage",
currentDate: '',
// userInfo: {},
// hasUserInfo: false,
// canIUse: wx.canIUse('button.open-type.getUserInfo'),
@@ -28,6 +29,7 @@ Page({
this.setData({
canIUseGetUserProfile: true
})
this.getDate();
}
},
@@ -121,6 +123,38 @@ Page({
], 1000)
},
popup_history(){
this.startPage_Bottons_leave()
this.animate('#page_history', [
{ opacity: 0, translateY: 0 }, { opacity: 1, translateY: "-100%", ease: 'ease-in-out', },
], 1000,()=>{
this.selectComponent('#page_history')
})
},
exit_history(){
this.startPage_Bottons_in()
this.animate('#page_history', [
{ opacity: 1, translateY: "-100%" }, { opacity: 0, translateY: "0", ease: 'ease-in-out' },
], 1000)
},
popup_collect(){
this.startPage_Bottons_leave()
this.animate('#page_collect', [
{ opacity: 0, translateY: 0 }, { opacity: 1, translateY: "-100%", ease: 'ease-in-out', },
], 1000,()=>{
this.selectComponent('#page_collect')
})
},
exit_collect(){
this.startPage_Bottons_in()
this.animate('#page_collect', [
{ opacity: 1, translateY: "-100%" }, { opacity: 0, translateY: "0", ease: 'ease-in-out' },
], 1000)
},
takePhoto() {
// ctx = wx.createCameraContext()
console.log('takePhoto..')
@@ -162,5 +196,16 @@ Page({
userInfo: e.detail.userInfo,
hasUserInfo: true
})
},
getDate: function () {
var nowdate = new Date();
var nowyear = nowdate.getFullYear();
var nowmonth = nowdate.getMonth() + 1;
var nowday = nowdate.getDate();
var nowdata1 = nowyear + '年' + nowmonth + '月' + nowday + '日'
this.setData({
currentDate: nowdata1
});
}
})
})