抖音开放平台Logo
开发者文档
“/”唤起搜索
控制台
  • API 概览
  • C# API
  • 开放接口
  • 收藏
  • 群聊
  • 关注
  • 数据分析
  • 基础
  • 渲染
  • 设备
  • 文件
  • 位置
  • 媒体
  • 网络
  • 转发
  • 数据缓存
  • 广告
  • tt.createGridGamePanel
  • tt.createRewardedVideoAd
  • tt.createBannerAd
  • tt.createInterstitialAd
  • BannerAd
  • RewardedVideoAd
  • InterstitialAd
  • GridGamePanel
  • GridAd
  • GridGamePanel
  • GridGamePanel.show
  • GridGamePanel.hide
  • GridGamePanel.onStateChange
  • GridGamePanel.offStateChange
  • GridGamePanel.destroy
  • 界面
  • 支付
  • Worker
  • GridGamePanel.destroy

    收藏
    我的收藏

    基础库 2.82.0 开始支持本方法,这是一个同步方法。

    销毁游戏推荐组件实例。

    前提条件
    业务背景
    使用限制
    注意事项
    游戏推荐组件实例销毁时,会移除实例上所有事件的监听器
    相关教程

    语法

    GridGamePanel.destroy()

    参数说明

    返回值

    错误码

    errNoerrMsg说明最低支持版本
    20000internal error
    小游戏框架内部错误,有需要请创建工单咨询
    2.82.0
    21000current game panel doesn't exist
    2.82.0
    10401Internal error
    小游戏框架内部错误,有需要请创建工单咨询
    2.82.0
    10301feature is not supported in app
    2.82.0
    10302In the gray scale experiment, the user will not display
    2.82.0

    扫码体验

    请使用字节宿主APP扫码

    代码示例

    开发者工具中预览

    let gridGamePanel = null; try { gridGamePanel = tt.createGridGamePanel({ gridCount: "nine", query: { tt00000000000000: "age=12&name=xxxx", }, }); } catch (error) { console.error("创建游戏推荐组件失败", error); } if (gridGamePanel) { gridGamePanel.destroy(); console.log("游戏推荐组件销毁"); }