my.getStorage({
key: gdc.userId + gameName,
success: function (res) {
// console.log(!res.data)
//判断是否是第一次加载游戏
if (!res.data) {
my.setStorage({
key: gdc.userId + gameName,
data: {
timer: timer,
list: self.data.list,
current: 0,
golds: 0,
flag: false
},
success: function () {
}
});
} else if (res.data != '') {
//判断连续签到七天后第八天签到,判断是否隔天签到
if (res.data.timer - newDateTime < -86400000 || res.data.current == 6) {
my.getStorage({
key: gdc.userId + gameName,
success: function (res) {
let list = [true, true, true, true, true, true, true]
my.setStorage({
key: gdc.userId + gameName,
data: {
list: list,
淘宝小程序签到功能
最新推荐文章于 2023-10-26 08:20:47 发布
本文详细介绍了淘宝小程序中签到功能的实现过程,包括用户交互、数据存储、连续签到奖励机制等方面,探讨了如何确保签到系统的稳定性和用户体验。
摘要由CSDN通过智能技术生成