纪念日调整

This commit is contained in:
limqhz
2022-12-01 17:21:12 +08:00
parent 526a7505a7
commit abdcb5661e
37 changed files with 705 additions and 6 deletions

View File

@@ -1,8 +1,15 @@
Page({
data: {
aIconList: ['check-rectangle','star-filled','notification','circle'],
},
onLoad: function (options) {
dataEmpty: false,
anniversaryList: [
{'title':'老公的工作纪念日','type':'life','dateType':'农历','date':'2018/12/30','repeat':'3','nextDate':'2022/12/30'},
{'title':'结婚纪念日','type':'love','dateType':'公历','date':'2017/12/30','repeat':'4','nextDate':'2022/12/30'},
{'title':'真正的操作的纪念日','type':'life','dateType':'公历','date':'2017/12/30','repeat':'4','nextDate':'2022/12/30'},
{'title':'宝宝出生日期','type':'baby','dateType':'公历','date':'2017/12/30','repeat':'4','nextDate':'2022/12/30'},
{'title':'王xx的生日','type':'birthday','dateType':'公历','date':'2017/12/30','repeat':'4','nextDate':'2022/12/30'},
{'title':'天才的生日','type':'birthday','dateType':'公历','date':'2017/12/30','repeat':'4','nextDate':'2022/12/30'},
{'title':'大家爱送到家我i的生日','type':'birthday','dateType':'公历','date':'2017/12/30','repeat':'4','nextDate':'2022/12/30'},
],
}
});

View File

@@ -1,5 +1,10 @@
{
"usingComponents": {
"foot-tab": "../foot-tab/foot-tab"
"foot-tab": "../foot-tab/foot-tab",
"t-empty": "/components/empty/empty",
"t-fab": "/components/fab/fab",
"t-badge": "/components/badge/badge",
"t-countdown": "/components/countdown/index",
"t-divider": "/components/divider/divider"
}
}

View File

@@ -1,5 +1,27 @@
<!--pages/message/index.wxml-->
<text>纪念日</text>
<view class="contentView">
<view wx:for="{{anniversaryList}}" wx:key="index" class="anniversary">
<image wx:if="{{ item.type == 'birthday' }}" src="/images/birthday.jpg"/>
<image wx:elif="{{ item.type == 'love' }}" src="/images/love.png"/>
<image wx:elif="{{ item.type == 'baby' }}" src="/images/baby.png"/>
<image wx:else src="/images/life.jpg"></image>
<view class="title">
{{item.title}}
</view>
<view class="remark">
<view class="countdown">
<text>距离{{item.repeat}}周年</text>
<t-countdown time="{{item.nextDate}}" showDay="{{true}}" />
</view>
<view class="countdown">
<text>今天{{item.repeat}}周年啦!</text>
</view>
</view>
<t-divider content="✿✿✿---■Quinn■---✿✿✿" />
</view>
</view>
<t-empty wx:if="{{dataEmpty}}" t-class="empty-cls" icon="info-circle-filled" description="暂无纪念日" />
<t-fab icon="add" bind:click="handleClick"></t-fab>
<view>
<foot-tab iconList="{{aIconList}}"/>
</view>

View File

@@ -0,0 +1,27 @@
.empty-cls {
margin-top: 250rpx !important;
}
.contentView{
padding-bottom: 50px;
}
.anniversary{
height: 300rpx;
margin: 10rpx 20rpx;
border: 5px ridge #f0a1a8;
border-radius: 5px;
}
image{
width: 100%;
height: 120rpx;
}
.title {
padding-left: 10rpx;
font-size: 38rpx;
}
.remark {
padding-left: 10rpx;
margin-top: 5rpx;
font-size: 28rpx;
line-height: 28rpx;
color: #999999;
}

View File

@@ -51,6 +51,8 @@ Page({
taskList: [],
over: false
};
console.log(data)
console.log(data.over)
let listData = this.data.delayList || [];
pageData.requesting = false;
if (type === 'refresh') {