封装请求的方法,完成简易的问题解答页面
This commit is contained in:
@@ -5,7 +5,13 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
codes: [
|
||||
{ code: "2331242324", money: 510 },
|
||||
{ code: "4234234134", money: 10 },
|
||||
{ code: "2354245345", money: 50 },
|
||||
{ code: "5365457642", money: 150 },
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
/**
|
||||
|
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"navigator": "/components/navigator/index",
|
||||
"scrollPageWrapper": "/components/scrollPageWrapper/index"
|
||||
}
|
||||
}
|
@@ -1,2 +1,12 @@
|
||||
<!--pages/meterList/index.wxml-->
|
||||
<text>pages/meterList/index.wxml</text>
|
||||
<scrollPageWrapper>
|
||||
<navigator title="表计列表" />
|
||||
<view class="content">
|
||||
<scroll-view type="list" scroll-y style="display: flex; flex-direction: column; flex: 1; width: 100%; overflow: auto;">
|
||||
<view wx:for="{{codes}}" list-item class="listItem">
|
||||
<view class="code"> {{ item.code }} </view>
|
||||
<view class="money"> {{ item.money }} </view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</scrollPageWrapper>
|
@@ -1 +1,20 @@
|
||||
/* pages/meterList/index.wxss */
|
||||
/* pages/meterList/index.wxss */
|
||||
.content {
|
||||
flex: 1;
|
||||
padding: 16rpx 24rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.listItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 12rpx 0;
|
||||
}
|
||||
|
||||
.money {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
}
|
Reference in New Issue
Block a user