如图,已经做到用wx:for在卡片上显示某一订单的部分信息,我希望可以通过点击红框内按钮的方式显示该订单详细信息,但是目前还无法显示。使用的是vant。
wxml代码:
<van-tabs active="{{ active }}" bind:change="onChange" animated>
<van-tab title="未送达">
<scroll-view scroll-y="true" style="height: 900rpx; margin-top: 45rpx;">
<view class="order_box" style="height: 400px;opacity: 0.85;margin-top:5%;margin-left:16%;margin-bottom: 5%;"
wx:for="{{orderList}}" wx:key="oid" wx:if="{{item.ispay===1}}">
<van-card
desc="订单号:{{item.oid}}"
title="{{item.oname}}"
num="{{item.count}}"
price="{{item.money}}"
desc-class="cardDesc"
>
<view slot="footer">
<button class="box_btn" bindtap="showDetailDialog" size="mini">详情</button>
<button class="box_btn" size="mini" bindtap="orderReminder">催单</button>
</view>
</van-card>
</view>
</scroll-view>
</van-tab>
......
</van-tabs>
下面是这个弹出框的代码:
<van-dialog
use-slot
title="订单详情"
show="{{ showDetail }}"
>
<van-cell-group>
<van-cell title="订单号" value="{{item.oid}}"/>
<van-cell title="目的地址" value="{{item.daddress}}"></van-cell>
<van-cell title="货物名" value="{{item.oname}}"></van-cell>
<van-cell title="货物重量" value="{{item.weight}}"></van-cell>
<van-cell title="货物数量" value="{{item.count}}"></van-cell>
<van-cell title="货物类别" value="{{item.cclass}}"></van-cell>
<van-cell title="加急" value="{{item.ishurry}}" title-width="300rpx">
<van-radio-group
value="{{ radio }}"
bind:change="onChange"
direction="horizontal"
disabled
>
<van-radio name="1" shape="square" label-position="left">是</van-radio>
<van-radio name="0" shape="square" label-position="left">否</van-radio>
</van-radio-group>
</van-cell>
<van-cell title="易碎" value="{{item.isfragile}}" title-width="300rpx">
<van-radio-group
value="{{ radio }}"
bind:change="onChange"
direction="horizontal"
disabled
>
<van-radio name="1" shape="square" label-position="left">是</van-radio>
<van-radio name="0" shape="square" label-position="left">否</van-radio>
</van-radio-group>
</van-cell>
<van-cell title="支付金额" value="{{item.money}}"></van-cell>
<van-cell title="备注" value="{{item.tips}}"></van-cell>
<van-cell title="创建日期" value="{{item.otime}}" />
</van-cell-group>
</van-dialog>
没有前端经验,拜托各位了......