实现效果
实现过程:
–js–
wx.request({
url: "http://health.ia.ac.cn:5007/checklistParameters/getChecklistParametersByListId?listId=13985",
method: "POST",
data: {
},
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success: function (res) {
console.log(res.data);
self.setData({
item1: res.data.data.item1,
item2: res.data.data.item2,
item3: res.data.data.item3,
})
},
fail: function (err) {
}
})
–wxml–
<view class="table1">
<view class="tr bg-w">
<view class="th1 ">
<view class='th1_ch'>指标</view>
<view class='th1_en'>(Parameters)</view>
</view>
<block wx:for="{
{item1}}" wx:key="this">
<view class='th'>{
{item.parameterName}}</view>
</block>
</view>
<view class='tr'>
<view class="td ">
<view class='td_ch'>实测值</view>
<view class='td_en'>(Measured)</view>
</view>
<view class="td ">
<view class="tdd2">(L/min)</view>
<view class="tdd2 border-none">(mL/min/kg)</view>
</view>
<view class="tdd1 ">
<view class='tdd1_row'>
<block wx:for="{
{item1}}" wx:key="this">
<view class='tdd1_row_num'>{
{item.Measured_L}}</view>
</block>
</view>
<view class='tdd1_row'>
<block wx:for="{
{item1}}" wx:key="this">