收藏
回答

视频号接口wx.getChannelsLiveInfo体验版也已经成功使用了,到了线上为什么无效?

  const that = this;

wx.getChannelsLiveInfo({

      finderUserName: this.data.finderUserName,

      startTime:option.startTime,

      success(res) {

        if (res.errMsg === 'getChannelsLiveInfo:ok'{

          if(!res || Object.keys(res).length === 0){

            console.log('API返回空数据', res);

          } else {

            let liveStatus = optionTime > newTime ? 1: res.status

            that.setData({

              liveStatus:liveStatus,

              startTime: option.startTime,

              endTime: res.endTime || 0,

              feedId: res.feedId || '',

              nonceId: res.nonceId || '',

              videoInfo: {

                coverUrl: option.reserveHeadPic,

                nickname: res.nickname || '',

                headUrl: res.headUrl,

              }

            });

          }

          // 更新直播状态和数据

        }

      },

      fail(err) {

        console.error('获取直播信息失败:', err);

        wx.showToast({

          title: '获取直播信息失败',

          icon: 'none'

        });

      }

    });


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

1 个回答

  • 大山
    大山
    09-09

    体验版开启调试模式,访问线上版本,看看有没有报错信息。

    09-09
    有用 1
    回复 1
    • 栗子
      栗子
      09-09
      好的 定位到问题了 谢谢你
      09-09
      回复
登录 后发表内容