from表单获取循环的input值
<block wx:for="{{chexing}}" >
<view class=‘chexing’>
<view class=‘chexingname’>
车型
</view>
<input class=“chexingvar” name=‘chexing{{item}}’ maxlength=“10” placeholder=“请输入车型” />
<view class=‘chexingname’>
价格
</view>
<input class=“chexingvar” name=‘jiage{{item}}’ maxlength=“10” placeholder=“请输入价格” />
<view bindtap=‘jianshao’ class=‘tianjia’ wx:if=’{{chexing.length==item}}’>
</view>
</view>
</block>
JS中
for (var i = 0; i <= res.data.chexing.length; i++) {
phone = e.detail.value.phone;怎么加上i的值来获取?
}
或者from直接取到数组?