wx.scanCode在红米5plus中获取不到链接中的参数?
发布于 4 年前 作者 mingxiao 6567 次浏览 来自 问答
 wx.scanCode在红米5plus中获取不到链接中的参数
// 扫码绑定站点
  scancode(e) {
    const that = this;
    wx.scanCode({
      scanType'QR_CODE',
      success(res) {
        if (null == app.globalData.UNIQUENUM) {
          that.setData({
            user_accesstrue
          })
          if (res !== undefined) {
            let scan_urls = decodeURIComponent(res.result);
            that.setData({
              shopId: cry.getQueryString(scan_urls, 'shopId'),
            })
          }
        } else {
          if (res !== undefined) {
            let scan_urls = decodeURIComponent(res.result);
            that.setData({
              shopId: cry.getQueryString(scan_urls, 'shopId'),
            })
            console.log(that.data.shopId + '{{}}')
            let bidingParam = {
              UNIQUENUM: app.globalData.UNIQUENUM,
              OAUTHCODE: app.globalData.OAUTHCODE,
              phoneNum: app.globalData.phoneNum,
              shopId: that.data.shopId
            }
            api.request(apiName.courierBindingShop, bidingParam).then((res) => {
              if (res.data.code == "SUCCESS") {
                wx.showToast({
                  title'绑定成功',
                  duration2500,
                  masktrue,
                  icon'none',
                  success() {
                    setTimeout(function () {
                      that.onPullDownRefresh()
                    }, 1000)
                  }
                })
              } else {
                wx.showToast({
                  title: res.data.message,
                  duration2500,
                  masktrue,
                  icon'none',
                })
              }
            })
            // 绑定站点
          } else {
            wx.showToast({
              title'未获取到站点Id',
              duration3000,
              masktrue,
              icon"none"
            })
          }
        }

      },
    })
  }
res.result返回的一直是null,其他机型正常。
1 回复

麻烦在手机微信那里上传下日志: 我->设置->帮助与反馈右上角有个上报日志的入口,麻烦提供一下微信号,时间点

回到顶部