大神帮帮我!!!
wxml
<view class="table">
<view class="tr bg-w">
<text class="th">姓名</text>
<text class="th">手机号</text>
<text class="th ">邮箱</text>
</view>
<block wx:for="{{searchResult}}">
<view class="tr bg-g" >
<text class="td" selectable bindtap="watchContact">{{item.contactName}}</text>
<text class="td" selectable >{{item.telPhone}}</text>
<text class="td" selectable >{{item.mail}}</text>
</view>
</block>
</view>
js
Page({
data: {
inputData: '',
searchResult: []
},
watchContact:function(){
var that = this;
wx.request({
url: 'https://xxxxxxxx/findBycontactName',
method:'post',
header: {
'content-type': 'application/json'
},
data:{
},
success: (resp) => {
}
})
}
data-绑定属性 然后在e.currentTarget.dataset中获取