收藏
回答

开发在小程序在华为Mate30上,不兼容(获取不到表单元素对象)。其他华为手机正常,该如何处理?


回答关注问题邀请回答
收藏

4 个回答

  • 轩炀
    轩炀
    2021-03-02

    楼主,解决了吗?

    2021-03-02
    有用
    回复
  • 是小白啊
    是小白啊
    2019-10-31

    麻烦提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    2019-10-31
    有用
    回复 6
    • Machine • Liu
      Machine • Liu
      2019-10-31
      wxBindUser: function() {
          var that = this;
          console.log(that);
          if (!util.strIsNotEmpty(this.data.userName)) {
            wx.showToast({
              title: '请输入用户名!',
              icon: 'none',
              duration: 2000
            })
            return
          }
          if (!util.strIsNotEmpty(this.data.userPassword)) {
            wx.showToast({
              title: '请输入密码!',
              icon: 'none',
              duration: 2000
            })
            return;
          }
      }
      2019-10-31
      回复
    • 是小白啊
      是小白啊
      2019-10-31回复Machine • Liu
      代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)这个格式的
      2019-10-31
      回复
    • Machine • Liu
      Machine • Liu
      2019-10-31
      function strIsNotEmpty(str) {
        if (null != str && '' != str) {
          return true;
        } else {
          return false;
        }
      }
      2019-10-31
      回复
    • 刁_Kyle
      刁_Kyle
      2019-10-31回复Machine • Liu
      你把整个项目都弄过来了。。。。
      2019-10-31
      回复
    • Machine • Liu
      Machine • Liu
      2019-10-31
      代码段 是在华为Mate30 上测试吗 ?
      2019-10-31
      回复
    查看更多(1)
  • 刁_Kyle
    刁_Kyle
    2019-10-31

    给个代码片段

    2019-10-31
    有用
    回复 3
    • Machine • Liu
      Machine • Liu
      2019-10-31
      wxBindUser: function() {
          var that = this;
          console.log(that);
          if (!util.strIsNotEmpty(this.data.userName)) {
            wx.showToast({
              title: '请输入用户名!',
              icon: 'none',
              duration: 2000
            })
            return
          }
          if (!util.strIsNotEmpty(this.data.userPassword)) {
            wx.showToast({
              title: '请输入密码!',
              icon: 'none',
              duration: 2000
            })
            return;
          }
      }






      function strIsNotEmpty(str) {
        if (null != str && '' != str) {
          return true;
        } else {
          return false;
        }
      }
      2019-10-31
      回复
    • 刁_Kyle
      刁_Kyle
      2019-10-31回复Machine • Liu
      ......复现代码片段吧,这一部分看着没啥问题
      2019-10-31
      回复
    • Machine • Liu
      Machine • Liu
      2019-10-31
      代码段 是在华为Mate30 上测试吗 ?
      2019-10-31
      回复
  • 少年啦
    少年啦
    2019-10-31

    应该是输入监听事件不起作用吧 你调试看看

    2019-10-31
    有用
    回复 2
    • Machine • Liu
      Machine • Liu
      2019-10-31
      我用的是华为P30 PRO 可以监听到,客户反馈Mate30不行;
      2019-10-31
      回复
    • Machine • Liu
      Machine • Liu
      2019-10-31回复Machine • Liu
      目前最新款手机 都会存在这样的问题;
      2019-10-31
      回复
登录 后发表内容
问题标签