添加底部Tabbar

This commit is contained in:
zhengyi 2023-03-02 00:26:04 +08:00
parent 8d8839050c
commit e0f4b807da
27 changed files with 284 additions and 173 deletions

2
app.js
View File

@ -14,6 +14,6 @@ App({
})
},
globalData: {
userInfo: null
activeTab: '/pages/index/index'
}
})

View File

@ -1,24 +1,36 @@
{
"pages":[
"pages": [
"pages/index/index",
"pages/poem-list/poem-list",
"pages/logs/logs"
"pages/author-list/author-list",
"pages/favorite/favorite"
],
"window":{
"backgroundTextStyle":"light",
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "Weixin",
"navigationBarTextStyle":"black"
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json",
"tabBar": {
"list": [{
"pagePath": "pages/index/index",
"text": "首页"
}, {
"pagePath": "pages/poem-list/poem-list",
"text": "诗词库"
}],
"list": [
{
"pagePath": "pages/index/index",
"text": "首页"
},
{
"pagePath": "pages/poem-list/poem-list",
"text": "诗词库"
},
{
"pagePath": "pages/author-list/author-list",
"text": "诗人"
},
{
"pagePath": "pages/favorite/favorite",
"text": "收藏"
}
],
"custom": true
}
}
}

View File

@ -1,10 +1 @@
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
@import './fonts/style.wxss'

View File

@ -1,17 +1,19 @@
Component({
data: {
value: 'label_1',
value: '/pages/index/index',
list: [
{ value: 'label_1', label: '首页', icon: 'home' },
{ value: 'label_2', label: '应用', icon: 'app' },
{ value: 'label_3', label: '聊天', icon: 'chat' },
{ value: 'label_4', label: '我的', icon: 'user' },
{ value: 'pages/index/index', label: '推荐', icon: 'gift' },
{ value: 'pages/poem-list/poem-list', label: '诗词库', icon: 'file-text' },
{ value: 'pages/author-list/author-list', label: '诗人', icon: 'account' },
{ value: 'pages/favorite/favorite', label: '收藏', icon: 'heart' },
],
},
methods: {
onChange(e) {
console.log(e);
const url = '/' + e.detail.value
this.setData({value: e.detail.value})
wx.switchTab({url})
},
},
}
});

View File

@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar",
"t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item"
"t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item",
"t-icon": "tdesign-miniprogram/icon/icon"
}
}

View File

@ -1,5 +1,6 @@
<t-tab-bar value="{{value}}" bindchange="onChange" theme="tag" split="{{false}}">
<t-tab-bar-item wx:for="{{list}}" wx:key="index" value="{{item.value}}" icon="{{item.icon}}">
<t-tab-bar-item wx:for="{{list}}" wx:key="index" value="{{item.value}}" icon="-">
<t-icon slot="icon" prefix="icon" name="{{item.icon}}" />
{{item.label}}
</t-tab-bar-item>
</t-tab-bar>

BIN
fonts/icomoon.eot Normal file

Binary file not shown.

23
fonts/icomoon.svg Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="account" d="M270.176 686.494c0-134.068 109.138-243.067 243.068-243.067 133.932 0 242.931 108.999 243.067 243.067 0 134.068-109.136 243.068-243.067 243.068-134.068 0-243.068-109.138-243.068-243.068 0 0 0 0 0 0zM353.276 686.359c0 88.224 71.744 159.968 159.968 159.968 88.227 0 159.828-71.743 159.97-159.968 0-88.225-71.743-159.968-159.97-159.968-88.224 0-159.968 71.743-159.968 159.968 0 0 0 0 0 0zM931.103 270.442c0 0 0 0 0 0 44.043-22.158 64.814-79.633 64.814-128.944 0 0 0-175.064 0-175.064s-965.484 0-965.484 0c0 0 0 175.064 0 175.064 0 49.311 29.224 110.939 73.267 133.103 0 0 122.85 61.633 122.85 61.633 181.297 90.993 400.267 86.837 581.566-4.159 0 0 122.988-61.633 122.988-61.633zM114.087 50.914c0 0 798.174 0 798.174 0s0 107.065 0 107.065c0 30.054-17.175 65.234-53.595 78.808 0 0-101.666 37.666-101.666 37.666-149.714 55.541-330.873 58.032-480.73 2.497 0 0-101.659-37.672-101.659-37.672-36.425-13.437-60.524-51.109-60.524-81.3 0 0 0-107.065 0-107.065s0 0 0 0z" />
<glyph unicode="&#xe901;" glyph-name="close" d="M511.843 382.643c0 0 400.558-400.556 400.558-400.556 18.631-18.631 46.577-18.631 65.207 0s18.631 46.575 0 65.206c0 0-400.558 400.558-400.558 400.558s403.713 400.558 403.713 400.558c18.631 18.631 18.631 46.577 0 65.207s-46.577 18.631-65.207 0c0 0-403.713-400.558-403.713-400.558s-400.558 403.713-400.558 403.713c-18.631 18.631-46.575 18.631-65.206 0-9.318-9.315-12.476-21.786-12.476-34.106s3.157-24.791 12.476-34.106c0 0 400.556-400.559 400.556-400.559s-400.556-400.559-400.556-400.559c-9.318-9.313-12.476-21.783-12.476-34.105 0-12.47 3.157-24.792 12.476-34.105 18.631-18.631 46.575-18.631 65.206 0 0 0 400.558 403.412 400.558 403.412s0 0 0 0z" />
<glyph unicode="&#xe902;" glyph-name="download" d="M512 874.667c23.565 0 42.667-19.102 42.667-42.667 0 0 0-408.994 0-408.994s140.498 140.497 140.498 140.497c16.663 16.662 43.674 16.662 60.336 0s16.663-43.677 0-60.34c0 0-213.332-213.332-213.332-213.332-16.661-16.663-43.676-16.663-60.339 0 0 0-213.333 213.332-213.333 213.332-16.662 16.663-16.662 43.677 0 60.34s43.677 16.662 60.34 0c0 0 140.497-140.497 140.497-140.497s0 408.994 0 408.994c0 23.564 19.102 42.667 42.667 42.667 0 0 0 0 0 0zM128 362.667c23.564 0 42.667-19.102 42.667-42.667 0 0 0-170.667 0-170.667 0-11.315 4.495-22.17 12.497-30.168s18.854-12.498 30.17-12.498c0 0 597.333 0 597.333 0 11.315 0 22.17 4.5 30.168 12.498s12.498 18.853 12.498 30.168c0 0 0 170.667 0 170.667 0 23.565 19.103 42.667 42.667 42.667s42.667-19.102 42.667-42.667c0 0 0-170.667 0-170.667 0-33.951-13.488-66.503-37.49-90.51-24.007-24.001-56.559-37.49-90.51-37.49 0 0-597.333 0-597.333 0-33.948 0-66.505 13.488-90.51 37.49-24.005 24.007-37.49 56.559-37.49 90.51 0 0 0 170.667 0 170.667 0 23.565 19.102 42.667 42.667 42.667 0 0 0 0 0 0z" />
<glyph unicode="&#xe903;" glyph-name="share" d="M691.797 187.819c1.067 1.408 2.048 2.859 2.987 4.437 0.853 1.493 1.621 3.029 2.304 4.565 3.115 4.608 6.656 8.917 10.581 12.843 15.488 15.488 36.736 25.003 60.331 25.003s44.843-9.515 60.331-25.003 25.003-36.736 25.003-60.331-9.515-44.843-25.003-60.331-36.736-25.003-60.331-25.003-44.843 9.515-60.331 25.003-25.003 36.736-25.003 60.331c0 13.867 3.285 26.923 9.131 38.485zM695.509 701.611c-0.384 0.725-0.768 1.451-1.195 2.176s-0.853 1.451-1.323 2.133c-6.571 12.075-10.325 25.941-10.325 40.747 0 23.595 9.515 44.843 25.003 60.331s36.736 25.003 60.331 25.003 44.843-9.515 60.331-25.003 25.003-36.736 25.003-60.331-9.515-44.843-25.003-60.331-36.736-25.003-60.331-25.003-44.843 9.515-60.331 25.003c-4.608 4.608-8.704 9.728-12.16 15.275zM328.491 493.056c0.384-0.725 0.768-1.451 1.195-2.176s0.853-1.451 1.323-2.133c6.571-12.075 10.325-25.941 10.325-40.747s-3.755-28.672-10.368-40.789c-0.469-0.683-0.896-1.408-1.323-2.133s-0.811-1.408-1.152-2.133c-3.456-5.547-7.552-10.667-12.16-15.275-15.488-15.488-36.736-25.003-60.331-25.003s-44.843 9.515-60.331 25.003-25.003 36.736-25.003 60.331 9.515 44.843 25.003 60.331 36.736 25.003 60.331 25.003 44.843-9.515 60.331-25.003c4.608-4.608 8.704-9.728 12.16-15.275zM603.733 700.245l-226.475-132.139c-0.171 0.213-0.384 0.384-0.597 0.597-30.805 30.805-73.557 49.963-120.661 49.963s-89.856-19.157-120.661-50.005-50.005-73.557-50.005-120.661 19.157-89.856 50.005-120.661 73.557-50.005 120.661-50.005 89.856 19.157 120.661 50.005c0.213 0.213 0.384 0.384 0.597 0.597l226.517-132.011c-4.181-14.805-6.443-30.464-6.443-46.592 0-47.104 19.157-89.856 50.005-120.661s73.557-50.005 120.661-50.005 89.856 19.157 120.661 50.005 50.005 73.557 50.005 120.661-19.157 89.856-50.005 120.661-73.557 50.005-120.661 50.005-89.856-19.157-120.661-50.005c-0.128-0.128-0.299-0.299-0.427-0.427l-226.645 132.053c4.181 14.763 6.4 30.293 6.4 46.379s-2.219 31.659-6.4 46.421l226.475 132.181c0.171-0.213 0.384-0.384 0.597-0.597 30.805-30.848 73.557-50.005 120.661-50.005s89.856 19.157 120.661 50.005 50.005 73.557 50.005 120.661-19.157 89.856-50.005 120.661-73.557 50.005-120.661 50.005-89.856-19.157-120.661-50.005-50.005-73.557-50.005-120.661c0-16.085 2.219-31.659 6.4-46.421z" />
<glyph unicode="&#xe904;" glyph-name="heart-fill" d="M924.028 799.244c-51.974 51.974-118.743 81.691-192.975 81.691-71.709 0-141.005-29.717-192.979-81.691l-17.326-19.851-19.849 19.851c-51.974 51.974-118.746 81.691-192.977 81.691-71.704 0-141.003-29.717-192.976-81.691-106.354-106.353-106.354-282.006 0-390.885l376.091-383.427c7.459-7.459 17.322-9.867 27.185-9.867 9.871 0 19.853 4.932 27.193 9.867l376.087 383.427c51.974 51.974 79.167 121.272 79.167 195.502s-24.666 143.41-76.64 195.383z" />
<glyph unicode="&#xe905;" glyph-name="heart" d="M731.050 880.935c74.229 0 140.999-29.717 192.978-81.691 51.968-51.974 76.635-121.152 76.635-195.384s-27.193-143.53-79.161-195.503c0 0-376.091-383.429-376.091-383.429-7.339-4.932-17.323-9.865-27.191-9.865-9.865 0-19.729 2.406-27.187 9.865 0 0-376.088 383.429-376.088 383.429-106.353 108.88-106.353 284.533 0 390.887 51.974 51.974 121.272 81.691 192.976 81.691 74.231 0 141.003-29.717 192.977-81.691 0 0 19.849-19.851 19.849-19.851s17.327 19.851 17.327 19.851c51.973 51.974 121.269 81.691 192.977 81.691 0 0 0 0 0 0zM520.746 103.975c0 0 351.303 358.762 351.303 358.762 34.651 37.176 49.692 88.909 49.692 143.41 0 54.5-19.854 106.474-56.906 143.53-37.183 39.582-86.625 59.434-138.598 59.434s-101.541-22.378-138.598-59.434c0 0-44.514-47.041-44.514-47.041-12.39-14.798-37.175-14.798-51.972 0 0 0-44.515 47.041-44.515 47.041-37.176 39.582-86.623 59.434-138.597 59.434s-101.541-22.378-138.597-59.434c-76.637-79.164-76.637-207.776 0-286.94 0 0 351.302-358.762 351.302-358.762s0 0 0 0z" />
<glyph unicode="&#xe906;" glyph-name="play" d="M192.888 869.449c13.699 7.479 30.389 6.881 43.518-1.559 0 0 597.335-384 597.335-384 12.211-7.851 19.593-21.373 19.593-35.89 0-14.519-7.381-28.041-19.593-35.891 0 0-597.335-384-597.335-384-13.129-8.439-29.819-9.037-43.518-1.557s-22.221 21.841-22.221 37.449c0 0 0 768 0 768 0 15.608 8.522 29.97 22.221 37.449 0 0 0 0 0 0zM256 753.849c0 0 0-611.696 0-611.696s475.763 305.847 475.763 305.847c0 0-475.763 305.849-475.763 305.849s0 0 0 0z" />
<glyph unicode="&#xe907;" glyph-name="rewind-1" d="M480.334 768.945c14.402-6.819 23.539-20.983 23.539-36.503 0 0 0-284.445 0-284.445s0-284.444 0-284.444c0-15.521-9.137-29.686-23.539-36.503-14.406-6.817-31.57-5.1-44.229 4.428 0 0-377.905 284.444-377.905 284.444-10.228 7.699-16.21 19.536-16.21 32.075s5.982 24.377 16.21 32.076c0 0 377.905 284.444 377.905 284.444 12.659 9.528 29.823 11.246 44.229 4.428 0 0 0 0 0 0zM503.873 447.997c0 0 0 0 0 0 0 12.54 5.984 24.377 16.212 32.076 0 0 377.905 284.444 377.905 284.444 12.654 9.528 29.823 11.246 44.227 4.428s23.537-20.983 23.537-36.503c0 0 0-568.888 0-568.888 0-15.521-9.133-29.686-23.537-36.503s-31.573-5.1-44.227 4.428c0 0-377.905 284.444-377.905 284.444-10.229 7.699-16.212 19.536-16.212 32.075zM152.372 447.997c0 0 267.522-201.363 267.522-201.363s0 402.724 0 402.724c0 0-267.522-201.361-267.522-201.361s0 0 0 0zM614.254 447.997c0 0 267.522-201.363 267.522-201.363s0 402.724 0 402.724c0 0-267.522-201.361-267.522-201.361s0 0 0 0z" />
<glyph unicode="&#xe908;" glyph-name="rewind" d="M527.414 768.945c-14.402-6.819-23.539-20.983-23.539-36.503 0 0 0-284.445 0-284.445s0-284.444 0-284.444c0-15.521 9.137-29.686 23.539-36.503 14.406-6.817 31.57-5.1 44.229 4.428 0 0 377.905 284.444 377.905 284.444 10.228 7.699 16.21 19.536 16.21 32.075s-5.982 24.377-16.21 32.076c0 0-377.905 284.444-377.905 284.444-12.659 9.528-29.823 11.246-44.229 4.428 0 0 0 0 0 0zM503.875 447.997c0 0 0 0 0 0 0 12.54-5.984 24.377-16.212 32.076 0 0-377.905 284.444-377.905 284.444-12.654 9.528-29.823 11.246-44.227 4.428s-23.537-20.983-23.537-36.503c0 0 0-568.888 0-568.888 0-15.521 9.133-29.686 23.537-36.503s31.573-5.1 44.227 4.428c0 0 377.905 284.444 377.905 284.444 10.229 7.699 16.212 19.536 16.212 32.075zM855.375 447.997c0 0-267.522-201.363-267.522-201.363s0 402.724 0 402.724c0 0 267.522-201.361 267.522-201.361s0 0 0 0zM393.493 447.997c0 0-267.522-201.363-267.522-201.363s0 402.724 0 402.724c0 0 267.522-201.361 267.522-201.361s0 0 0 0z" />
<glyph unicode="&#xe90a;" glyph-name="thumbs-up" d="M430.344 891.995c6.848 15.408 22.128 25.338 38.989 25.338 45.265 0 88.674-17.981 120.678-49.987 32.009-32.006 49.988-75.416 49.988-120.68 0 0 0-128 0-128s198.609 0 198.609 0c18.462 0.171 36.749-3.655 53.594-11.217 16.93-7.598 32.004-18.785 44.181-32.787 12.173-14.002 21.158-30.484 26.334-48.303 5.171-17.82 6.409-36.551 3.627-54.897 0 0-58.88-383.991-58.88-383.991 0-0.013 0 0.009 0 0-4.634-30.511-20.143-58.351-43.652-78.336-23.458-19.938-53.312-30.754-84.087-30.468 0 0-609.058 0-609.058 0-33.948 0-66.505 13.487-90.51 37.491s-37.49 56.559-37.49 90.509c0 0 0 298.667 0 298.667 0 33.946 13.486 66.505 37.49 90.51s56.562 37.49 90.51 37.49c0 0 100.272 0 100.272 0s159.405 358.662 159.405 358.662c0 0 0 0 0 0zM256 448c0 0-85.333 0-85.333 0-11.316 0-22.168-4.497-30.17-12.497s-12.497-18.854-12.497-30.17c0 0 0-298.667 0-298.667 0-11.315 4.495-22.17 12.497-30.17s18.854-12.497 30.17-12.497c0 0 85.333 0 85.333 0s0 384 0 384c0 0 0 0 0 0zM341.333 64c0 0 439.095 0 439.095 0 10.291-0.115 20.275 3.486 28.117 10.15 7.838 6.665 13.005 15.94 14.549 26.112 0 0 58.88 384.009 58.88 384.009 0 0.004 0-0.009 0 0 0.926 6.11 0.516 12.363-1.207 18.297-1.724 5.94-4.719 11.434-8.777 16.101-4.062 4.667-9.084 8.396-14.729 10.929-5.641 2.532-11.767 3.808-17.954 3.738 0 0-0.482-0.005-0.482-0.005s-241.493 0.003-241.493 0.003c-23.565 0-42.667 19.103-42.667 42.667 0 0 0 170.667 0 170.667 0 22.632-8.99 44.337-24.994 60.34-9.719 9.722-21.547 16.855-34.406 20.957 0 0-153.933-346.351-153.933-346.351s0-417.613 0-417.613c0 0 0 0 0 0z" />
<glyph unicode="&#xe90b;" glyph-name="volume-up" d="M635.407 420.455c0 0-3.009 408.689-3.009 408.689-0.364 62.134-73.693 94.887-120.293 53.825 0 0-279.603-246.609-279.603-246.609s-137.754 0-137.754 0c-39.978 0-72.369-32.392-72.369-72.369 0 0 0-289.721 0-289.721 0-39.97 32.392-72.363 72.369-72.363 0 0 145.701 0 145.701 0s276.712-247.091 276.712-247.091c46.843-41.785 121.017-8.311 120.658 54.426 0 0-2.412 411.215-2.412 411.215s0 0 0 0zM259.956 563.985c0 0 300.071 264.552 300.071 264.552s3.012-408.449 3.012-408.449c0 0 2.406-411.217 2.406-411.217s-297.423 265.518-297.423 265.518c0 0-173.276 0-173.276 0s0 289.596 0 289.596c0 0 165.209 0 165.209 0s0 0 0 0zM829.876 657.908c13.488 14.811 36.363 15.895 51.177 2.409 68.033-61.652 106.809-149.315 106.809-241.189 0-99.103-44.55-190.859-119.694-252.39-15.65-12.402-38.411-9.756-50.813 5.899-12.163 15.292-9.876 37.569 5.057 50.21 58.999 48.048 93.201 120.176 93.201 196.281 0 72.367-30.464 139.799-83.086 187.604-14.928 13.487-16.139 36.366-2.651 51.176 0 0 0 0 0 0zM818.799 419.128c0 46.72-19.024 90.671-52.264 123.906-14.086 14.089-37.086 14.089-51.291 0-14.211-14.089-14.211-37.088 0-51.177 19.991-19.87 31.067-45.517 31.067-72.61 0-31.066-14.575-60.087-39.862-80.679-0.119-0.119-0.239-0.209-0.358-0.299-0.119-0.093-0.245-0.183-0.364-0.303-15.411-12.885-17.459-35.76-4.574-51.052 12.885-15.417 35.766-17.459 51.058-4.58 41.904 34.076 66.588 83.446 66.588 136.792 0 0 0 0 0 0z" />
<glyph unicode="&#xe90c;" glyph-name="gift" d="M758.64 702.448c0 0 0 0 0 0 3.112 2.072 6.218 4.404 9.068 6.865 52.332 43.914 59.199 122.284 15.286 174.617-44.043 52.333-122.288 59.199-174.618 15.285-18.265-15.415-31.735-35.494-38.733-58.292 0 0-57.643-124.616-57.643-124.616s-57.646 124.616-57.646 124.616c-6.996 22.798-20.467 42.877-38.732 58.292-52.333 43.913-130.703 37.048-174.617-15.285-43.913-52.463-37.048-130.704 15.285-174.617 2.979-2.461 5.959-4.663 9.068-6.865 0 0-131.87 0-131.87 0-26.685 0-48.317-21.633-48.317-48.317 0 0 0-151.171 0-151.171 0-26.555 21.633-48.319 48.317-48.319 0 0 756.757 0 756.757 0 26.687 0 48.321 21.764 48.577 48.448 0 0 0 151.041 0 151.041 0 26.555-21.629 48.317-48.316 48.317 0 0-131.868 0-131.868 0zM171.184 437.54c0 0 0 0 0 0-26.555 0-48.188-21.632-48.188-48.32 0 0 0-378.251 0-378.251 0-26.681 21.633-48.316 48.188-48.316 0 0 681.367 0 681.367 0 26.556 0 48.191 21.635 48.191 48.316 0 0 0 378.251 0 378.251 0 26.688-21.635 48.32-48.191 48.32 0 0-681.367 0-681.367 0zM823.146 48.532c0 0 0 0 0 0 0-4.528-3.88-8.414-8.545-8.414 0 0-254.545 0-254.545 0s0 319.956 0 319.956c0 0 254.545 0 254.545 0 4.665 0 8.545-3.756 8.545-8.421 0 0 0-303.121 0-303.121zM463.681 360.206c0 0 0-319.957 0-319.957s-254.541 0-254.541 0c-4.664 0-8.55 3.755-8.55 8.42 0 0 0 302.985 0 302.985 0 4.54 3.886 8.425 8.55 8.425 0 0 0 0.128 0 0.128s254.541 0 254.541 0c0 0 0 0 0 0zM298.002 841.827c7.902 9.586 19.172 15.415 31.478 16.451s24.353-2.72 33.809-10.751c4.534-3.757 8.161-8.161 10.881-13.213 0 0 0.777-1.295 0.777-1.295s0.389-0.907 0.389-0.907c0.167-0.251 0.28-0.502 0.41-0.787 0.071-0.157 0.146-0.324 0.238-0.508 0 0 46.892-101.817 46.892-101.817s-99.485 36.919-99.485 36.919c0 0-8.031 3.368-8.031 3.368-4.275 1.814-8.161 4.145-11.659 7.125-9.585 7.902-15.415 19.171-16.451 31.478-1.037 12.435 2.72 24.482 10.751 33.939 0 0 0 0 0 0zM171.185 532.104c0 0 0 0 0 0-4.664 0-8.55 3.886-8.55 8.42 0 0 0 76.038 0 76.038 0 4.534 3.886 8.42 8.55 8.42 0 0 0-0.129 0-0.129s292.496 0 292.496 0c0 0 0-92.749 0-92.749s-292.496 0-292.496 0zM560.056 624.982c0 0 292.495 0 292.495 0 4.665 0 8.55-3.886 8.55-8.42 0 0 0-76.038 0-76.038 0-4.534-3.886-8.42-8.55-8.42 0 0-292.495 0-292.495 0s0 92.879 0 92.879c0 0 0 0 0 0zM648.069 831.501c0 0 0 0 0 0 0.077 0.166 0.154 0.323 0.205 0.481 0 0 0.517 1.166 0.517 1.166s0.777 1.166 0.777 1.166c2.85 5.052 6.48 9.456 10.883 13.213 9.455 8.031 21.504 11.788 33.809 10.751s23.444-6.995 31.477-16.451c8.033-9.586 11.787-21.633 10.752-33.939-1.035-12.307-6.866-23.447-16.447-31.478-3.499-2.98-7.384-5.311-11.662-7.125 0 0-7.902-3.368-7.902-3.368s-99.614-36.919-99.614-36.919c0 0 46.891 101.687 46.891 101.687 0.077 0.308 0.201 0.571 0.316 0.815z" />
<glyph unicode="&#xe926;" glyph-name="file-text" d="M917.806 730.924c-22.212 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.592 42.194-90.924 42.194h-496c-44.112 0-80-35.888-80-80v-864c0-44.112 35.888-80 80-80h736c44.112 0 80 35.888 80 80v624c0 14.332-4.372 39.35-42.194 90.924zM785.374 785.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.984-17.78 50.678-41.878 81.374-72.572zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16 0 0 495.956 0.002 496 0v-224c0-17.672 14.326-32 32-32h224v-624zM736 128h-448c-17.672 0-32 14.326-32 32s14.328 32 32 32h448c17.674 0 32-14.326 32-32s-14.326-32-32-32zM736 256h-448c-17.672 0-32 14.326-32 32s14.328 32 32 32h448c17.674 0 32-14.326 32-32s-14.326-32-32-32zM736 384h-448c-17.672 0-32 14.326-32 32s14.328 32 32 32h448c17.674 0 32-14.326 32-32s-14.326-32-32-32z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 16 KiB

BIN
fonts/icomoon.ttf Normal file

Binary file not shown.

BIN
fonts/icomoon.woff Normal file

Binary file not shown.

66
fonts/style.wxss Normal file
View File

@ -0,0 +1,66 @@
@font-face {
font-family: 'icon';
src: url('https://a-1254429201.cos.ap-chengdu.myqcloud.com/poem-font/icomoon.eot?3gxqgj');
src: url('https://a-1254429201.cos.ap-chengdu.myqcloud.com/poem-font/icomoon.eot?3gxqgj#iefix') format('embedded-opentype'),
url('https://a-1254429201.cos.ap-chengdu.myqcloud.com/poem-font/icomoon.ttf?3gxqgj') format('truetype'),
url('https://a-1254429201.cos.ap-chengdu.myqcloud.com/poem-font/icomoon.woff?3gxqgj') format('woff'),
url('https://a-1254429201.cos.ap-chengdu.myqcloud.com/poem-font/icomoon.svg?3gxqgj#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
.icon {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icon' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-share:before {
content: "\e903";
}
.icon-account:before {
content: "\e900";
}
.icon-close:before {
content: "\e901";
}
.icon-download:before {
content: "\e902";
}
.icon-heart-fill:before {
content: "\e904";
}
.icon-heart:before {
content: "\e905";
}
.icon-play:before {
content: "\e906";
}
.icon-rewind-1:before {
content: "\e907";
}
.icon-rewind:before {
content: "\e908";
}
.icon-thumbs-up:before {
content: "\e90a";
}
.icon-volume-up:before {
content: "\e90b";
}
.icon-gift:before {
content: "\e90c";
}
.icon-file-text:before {
content: "\e926";
}

View File

@ -0,0 +1,66 @@
// pages/author-list/author-list.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,2 @@
<!--pages/author-list/author-list.wxml-->
<text>pages/author-list/author-list.wxml</text>

View File

@ -0,0 +1 @@
/* pages/author-list/author-list.wxss */

View File

@ -0,0 +1,66 @@
// pages/favorite/favorite.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,2 @@
<!--pages/favorite/favorite.wxml-->
<text>pages/favorite/favorite.wxml</text>

View File

@ -0,0 +1 @@
/* pages/favorite/favorite.wxss */

View File

@ -3,46 +3,10 @@
const app = getApp()
Page({
data: {
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
},
// 事件处理函数
bindViewTap() {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad() {
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息开发者每次通过该接口获取用户个人信息均需用户确认开发者妥善保管用户快速填写的头像昵称避免重复弹窗
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res)
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
},
getUserInfo(e) {
// 不推荐使用getUserInfo获取用户信息预计自2021年4月13日起getUserInfo将不再弹出弹窗并直接返回匿名的用户个人信息
console.log(e)
this.setData({
userInfo: e.detail.userInfo,
hasUserInfo: true
onShow() {
let page = getCurrentPages()[0].route
this.getTabBar().setData({
value: page
})
}
})

View File

@ -1,4 +1,5 @@
{
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
}
}

View File

@ -1,3 +1 @@
<!--index.wxml-->
<view class="container">
</view>
<t-icon name="account" prefix="icon" />

View File

@ -1,18 +0,0 @@
// logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad() {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return {
date: util.formatTime(new Date(log)),
timeStamp: log
}
})
})
}
})

View File

@ -1,4 +0,0 @@
{
"navigationBarTitleText": "查看启动日志",
"usingComponents": {}
}

View File

@ -1,6 +0,0 @@
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log.date}}</text>
</block>
</view>

View File

@ -1,8 +0,0 @@
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}

View File

@ -1,66 +1,10 @@
// pages/poem-list/poem-list.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
let page = getCurrentPages()[0].route
console.log(page);
this.getTabBar().setData({
value: page
})
}
})