地址wx.chooseLocation与输入框input结合导致安卓下无法提交
发布于 6 年前 作者 oshao 11579 次浏览 来自 问答

以下代码:

<form bindsubmit="formSubmit">
<view class="input detail">
        <text>地点:</text>
        <input name="address" value="{{addressName}}" placeholder="请输入地点" placeholder-style="color:#c6c6c6" />
        <image bindtap="selectMap" class="icon-postion" src="/image/map.png" />
    </view>
    <button formType="submit" type="primary" class="complete">发布</button>
</form>
selectMap: function (e) {
    var that = this;
    wx.chooseLocation({
      success: function (res) {
        console.log('选择地图');
        console.log(res);
        that.setData({
          addressName: res.address
        });
      }
    })
  },
1 回复

莫名奇妙修复了,猜测可能是<input></input>不行吧,上面代码还是OK的

回到顶部