|
@@ -25,6 +25,8 @@ Page({
|
|
|
'https://pic.nximg.cn/file/20230420/12106414_122949747127_2.jpg'
|
|
|
],
|
|
|
randomImage: '',
|
|
|
+ accumulateChink:0,
|
|
|
+ continuousChink:0
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -51,6 +53,8 @@ Page({
|
|
|
});
|
|
|
this.showRandomImage()
|
|
|
this.order()
|
|
|
+ this.accumulateChink()
|
|
|
+ this.continuousChink()
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -166,6 +170,7 @@ Page({
|
|
|
try {
|
|
|
let saveDate = await EventLog.save();
|
|
|
console.log(saveDate);
|
|
|
+ this.accumulateChink()
|
|
|
this.setData({
|
|
|
issigin: true
|
|
|
})
|
|
@@ -182,5 +187,22 @@ Page({
|
|
|
this.setData({
|
|
|
randomImage: this.data.images[randomIndex]
|
|
|
});
|
|
|
+ },
|
|
|
+ //积累打卡
|
|
|
+ async accumulateChink(){
|
|
|
+ const currentUser = Parse.User.current();
|
|
|
+ let EventLogquery = new Parse.Query('EventLog');
|
|
|
+ EventLogquery.equalTo('user', currentUser.id);
|
|
|
+ EventLogquery.equalTo('company', company);
|
|
|
+ EventLogquery.notEqualTo('isDeleted', true)
|
|
|
+ let P = await EventLogquery.find();
|
|
|
+ let chickList = P.map(item => item.toJSON());
|
|
|
+ this.setData({
|
|
|
+ accumulateChink:chickList.length
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //连续打卡
|
|
|
+ async continuousChink() {
|
|
|
+
|
|
|
}
|
|
|
})
|