init project
This commit is contained in:
9
miniprogram/pages/main/about/index.json
Normal file
9
miniprogram/pages/main/about/index.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar",
|
||||
"snowflake": "../../../components/background/snowflake"
|
||||
}
|
||||
}
|
||||
107
miniprogram/pages/main/about/index.less
Normal file
107
miniprogram/pages/main/about/index.less
Normal file
@ -0,0 +1,107 @@
|
||||
/* pages/info/info.less */
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.info {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
padding: 100rpx 0;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
|
||||
.cotainer {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
.logo {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
display: block;
|
||||
border-radius: 4px;
|
||||
box-shadow: 2px 2px 8px rgba(0, 0, 0, .2);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.name {
|
||||
margin: 0 .5rem;
|
||||
display: inline-block;
|
||||
|
||||
&.gao {
|
||||
color: #FF7A9B;
|
||||
}
|
||||
|
||||
&.yeyu {
|
||||
color: #7A9BFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #777;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
|
||||
.love {
|
||||
color: transparent;
|
||||
font-size: 1rem;
|
||||
animation: loveGradient 1500ms linear infinite;
|
||||
text-align: center;
|
||||
background: linear-gradient(90deg, #FFB5C7, #FF7A9B, #FF3A6B, #FF7A9B, #FFB5C7);
|
||||
font-weight: bold;
|
||||
font-family: "Arial", sans-serif;
|
||||
margin-bottom: 1rem;
|
||||
background-size: 200% 100%;
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
@keyframes loveGradient {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 200% 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
.exit {
|
||||
color: #E64340;
|
||||
width: 10rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.item {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
|
||||
.label {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
&.copyright {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
64
miniprogram/pages/main/about/index.ts
Normal file
64
miniprogram/pages/main/about/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
// pages/info/info.ts
|
||||
|
||||
import Time from "../../../utils/Time";
|
||||
import config from "../../../config/index"
|
||||
|
||||
interface IAboutData {
|
||||
timer?: number;
|
||||
total?: number;
|
||||
beginFriendText: string;
|
||||
}
|
||||
|
||||
Page({
|
||||
data: <IAboutData>{
|
||||
copyright: `Copyright © 2017 - ${new Date().getFullYear()} imyeyu.com`,
|
||||
timer: undefined,
|
||||
total: undefined,
|
||||
beginFriendText: "相识 -- 天 -- 小时 -- 分钟 -- 秒",
|
||||
beginLoveText: "相恋 -- 天 -- 小时 -- 分钟 -- 秒"
|
||||
},
|
||||
onShow() {
|
||||
const beginLove = new Date("2025/11/10 00:10:00");
|
||||
const beginFriend = new Date("2025/06/28 16:00:00");
|
||||
|
||||
const timer = setInterval(() => {
|
||||
{
|
||||
const r = Time.between(beginLove)
|
||||
this.setData({
|
||||
beginLoveText: `相恋 ${r.d} 天 ${r.h} 小时 ${r.m.toString().padStart(2, "0")} 分钟 ${r.s.toString().padStart(2, "0")} 秒`
|
||||
})
|
||||
}
|
||||
{
|
||||
const r = Time.between(beginFriend)
|
||||
this.setData({
|
||||
beginFriendText: `相识 ${r.d} 天 ${r.h} 小时 ${r.m.toString().padStart(2, "0")} 分钟 ${r.s.toString().padStart(2, "0")} 秒`
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
this.setData({
|
||||
timer
|
||||
});
|
||||
|
||||
|
||||
wx.request({
|
||||
url: `${config.url}/journal/total`,
|
||||
method: "GET",
|
||||
header: {
|
||||
Key: wx.getStorageSync("key")
|
||||
},
|
||||
success: (resp: any) => {
|
||||
this.setData({
|
||||
total: resp.data.data
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onHide() {
|
||||
this.data.timer && clearInterval(this.data.timer);
|
||||
},
|
||||
exit() {
|
||||
wx.redirectTo({
|
||||
"url": "/pages/index/index?from=info"
|
||||
})
|
||||
}
|
||||
})
|
||||
37
miniprogram/pages/main/about/index.wxml
Normal file
37
miniprogram/pages/main/about/index.wxml
Normal file
@ -0,0 +1,37 @@
|
||||
<!--pages/info/info.wxml-->
|
||||
<snowflake />
|
||||
<t-navbar title="关于我们" />
|
||||
<scroll-view class="info" scroll-y>
|
||||
<view class="cotainer">
|
||||
<view class="header">
|
||||
<image class="logo" src="/assets/image/logo.png"></image>
|
||||
<view>
|
||||
<text>记录</text>
|
||||
<text class="name gao">小糕</text>
|
||||
<text>和</text>
|
||||
<text class="name yeyu">夜雨</text>
|
||||
<text>的美好回忆</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="love">{{beginLoveText}}</view>
|
||||
<view>{{beginFriendText}}</view>
|
||||
<view wx:if="{{total}}">已留住 {{total}} 个我们的瞬间</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<t-button class="exit" bind:tap="exit">退出</t-button>
|
||||
<view class="item">
|
||||
<text class="label">开发者:</text>
|
||||
<text>夜雨</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="label">版本:</text>
|
||||
<text>1.2.2</text>
|
||||
</view>
|
||||
<view class="item copyright">
|
||||
<text>{{copyright}}</text>
|
||||
<text>All Rights Reserved 夜雨 版权所有</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
Reference in New Issue
Block a user