Html
<view>
<input name="search" type='text' placeholder="请搜索" confirm-type="search"
bindconfirm="bindconfirm" focus='{{focus}}' bindinput='bindinput' ></input>
</view>
Js
// 点击键盘上的搜索 调接口
bindconfirm:function(e){
let content = e.detail.value['search - input'] ?e.detail.value['search - input'] : e.detail.value
console.log(content);
接口(‘http://www’)