修改首页,未登录添加数据

This commit is contained in:
duan 2025-01-07 16:18:26 +08:00
parent 299a340144
commit 3731abf871
2 changed files with 111 additions and 8 deletions

View File

@ -5,6 +5,13 @@
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index2",
"style": {
"navigationBarTitleText": "斯耀短剧",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
@ -282,14 +289,6 @@
"navigationBarTitleText": "图片s",
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index2",
"style": {
"navigationBarTitleText": "斯耀短剧",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
}
],
"subPackages": [{

View File

@ -338,6 +338,23 @@
// }
// })
} else {
this.signDays = 0
const dateArray = [];
for (let i = 0; i < 7; i++) {
const date = new Date(Date.now() + i * 24 * 60 * 60 * 1000);
const year = date.getFullYear();
const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() +
1;
const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate();
dateArray.push(`${year}-${month}-${day}`);
}
console.log(dateArray, 'debug');
dateArray.forEach(ele => {
this.signInList.push({
"signDay": ele,
"status": "0",
})
})
// uni.showToast({
// title: res.msg,
// icon: 'none'
@ -471,6 +488,93 @@
} else {
this.list = res.data
}
} else {
this.list = [{
"id": 1,
"title": "每月打卡奖励",
"type": 2,
"detail": "满3笔支付即可领取",
"rewardDetail": "1元现金红包",
"number": 3,
"buttonTitle": "",
"jumpType": 1,
"buttonUrl": "",
"buttonUnderContent": "",
"buttonUnderUrl": "",
"updateTime": "2025-01-06 18:08:49",
"sort": 0,
"shows": 1,
"discNumber": 0,
"disabled": false
},
{
"id": 17,
"title": "每月打卡奖励2",
"type": 2,
"detail": "当月签到满25天即可免费领取",
"rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
"rewardDetail": "会员免费领",
"number": 25,
"buttonTitle": "立即领取",
"buttonBgColor": "#EC6F48",
"buttonFontColor": "#fff",
"jumpType": 1,
"buttonUrl": "/pages/task/receiveMember",
"buttonUnderContent": "会员权益",
"buttonUnderUrl": "/pages/task/receiveMember",
"createTime": "2024-12-10 17:43:42",
"updateTime": "2024-12-25 09:52:09",
"sort": 5,
"shows": 1,
"discNumber": 0,
"disabled": false
},
{
"id": 17,
"title": "每月打卡奖励3",
"type": 2,
"detail": "当月签到满50天即可免费领取",
"rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
"rewardDetail": "会员免费领",
"number": 50,
"buttonTitle": "立即领取",
"buttonBgColor": "#EC6F48",
"buttonFontColor": "#fff",
"jumpType": 1,
"buttonUrl": "/pages/task/receiveMember",
"buttonUnderContent": "会员权益",
"buttonUnderUrl": "/pages/task/receiveMember",
"createTime": "2024-12-10 17:43:42",
"updateTime": "2024-12-25 09:52:09",
"sort": 5,
"shows": 1,
"discNumber": 0,
"disabled": false
},
{
"id": 17,
"title": "每月打卡奖励4",
"type": 2,
"detail": "当月签到满60天即可免费领取",
"rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
"rewardDetail": "",
"number": 60,
"buttonTitle": "立即领取",
"buttonBgColor": "#EC6F48",
"buttonFontColor": "#fff",
"jumpType": 1,
"buttonUrl": "/pages/task/receiveMember",
"buttonUnderContent": "会员权益",
"buttonUnderUrl": "/pages/task/receiveMember",
"createTime": "2024-12-10 17:43:42",
"updateTime": "2024-12-25 09:52:09",
"sort": 5,
"shows": 1,
"discNumber": 0,
"disabled": false
}
]
}
uni.stopPullDownRefresh();
})