project init & fix ui
This commit is contained in:
25
pages/index/index.js
Normal file
25
pages/index/index.js
Normal file
@@ -0,0 +1,25 @@
|
||||
Page({
|
||||
data: {
|
||||
progress: 89,
|
||||
todayList: [
|
||||
{"title":"电脑","type":"income","dateTime":"01-06","from":"银行卡","money":"4500.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
]
|
||||
},
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
if (wx.canIUse('hideHomeButton')) {
|
||||
wx.hideHomeButton()
|
||||
}
|
||||
},
|
||||
});
|
||||
6
pages/index/index.json
Normal file
6
pages/index/index.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-progress": "/miniprogram_npm/tdesign-miniprogram/progress/progress"
|
||||
},
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
37
pages/index/index.wxml
Normal file
37
pages/index/index.wxml
Normal file
@@ -0,0 +1,37 @@
|
||||
<view class="main_look">
|
||||
<view class="look_content">
|
||||
<view class="pay_look">
|
||||
<text>今日支出\n</text>
|
||||
<text class="font_big">200.00</text>
|
||||
</view>
|
||||
<view class="balance_look">
|
||||
<text>账户余额:2235.20</text>
|
||||
<text>预算余额:300.00</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="space_box font_small">
|
||||
<text>当月预算消费情况</text>
|
||||
<view class="inline_box"><t-icon name="tools" size="28rpx"/>调整</view>
|
||||
</view>
|
||||
<view class="padding_box">
|
||||
<t-progress theme="plump" percentage="{{progress}}" status="{{progress > 80 ? 'error' : 'success' }}" />
|
||||
</view>
|
||||
<view class="space_box font_small">
|
||||
<text>当月预算:54602.00</text>
|
||||
<text>已消费:777.80</text>
|
||||
</view>
|
||||
<view class="padding_box">
|
||||
<t-button theme="primary" size="medium" block>记一笔</t-button>
|
||||
<t-divider dashed content="今日记账清单"/>
|
||||
<t-cell wx:for="{{todayList}}" wx:key="index"
|
||||
title="{{item.title}}"
|
||||
description="{{item.dateTime}} • {{item.from}}"
|
||||
align="top"
|
||||
image="https://tdesign.gtimg.com/mobile/%E5%9B%BE%E7%89%87.png"
|
||||
note="{{item.money}}"
|
||||
class="t_{{item.type}}"
|
||||
/>
|
||||
</view>
|
||||
<view class="placeholder"/>
|
||||
<foot-tab value="label_1"/>
|
||||
21
pages/index/index.wxss
Normal file
21
pages/index/index.wxss
Normal file
@@ -0,0 +1,21 @@
|
||||
.main_look {
|
||||
margin: 0 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
height: 280rpx;
|
||||
background-image: url("https://yigger.cn/covers/default-7.jpeg");
|
||||
background-size:100% 100%;
|
||||
}
|
||||
.look_content {
|
||||
font-weight: bold;
|
||||
}
|
||||
.pay_look {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.balance_look {
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user