uniapp-ad

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to use this skill

何时使用该技能

Use this skill whenever the user wants to:
  • Integrate ads into uni-app
  • Implement ad monetization
  • Configure different ad types (banner, interstitial, rewarded video, etc.)
  • Handle ad events (load, show, close, error)
  • Optimize ad revenue
  • Set up ad placement and timing
  • Handle ad policies and compliance
当用户有以下需求时,可使用本技能:
  • 在uni-app中集成广告
  • 实现广告变现
  • 配置不同类型的广告(横幅广告、插屏广告、激励视频广告等)
  • 处理广告事件(加载、展示、关闭、错误)
  • 优化广告收益
  • 设置广告位和投放时机
  • 处理广告政策与合规问题

How to use this skill

如何使用该技能

To integrate ads:
  1. Identify the ad type from the user's request:
    • Banner ads → Use banner examples
    • Interstitial ads → Use interstitial examples
    • Rewarded video → Use rewarded video examples
    • Native ads → Use native ad examples
  2. Load the appropriate example file from the
    examples/
    directory:
    • examples/guide/
      - Ad integration guide
    • examples/ad-types/
      - Different ad type examples
    • examples/integration/
      - Integration examples
  3. Load the appropriate API reference from the
    api/
    directory:
    • api/ad-api.md
      - uni-ad API reference
  4. Follow the specific instructions in those files for integration
集成广告步骤:
  1. 根据用户需求确定广告类型
    • 横幅广告 → 使用横幅广告示例
    • 插屏广告 → 使用插屏广告示例
    • 激励视频广告 → 使用激励视频广告示例
    • 原生广告 → 使用原生广告示例
  2. examples/
    目录加载对应的示例文件
    • examples/guide/
      - 广告集成指南
    • examples/ad-types/
      - 不同广告类型示例
    • examples/integration/
      - 集成示例
  3. api/
    目录加载对应的API参考文档
    • api/ad-api.md
      - uni-ad API参考文档
  4. 按照这些文件中的具体说明完成集成

Examples and Templates

示例与模板

Examples

示例文件

Located in
examples/
:
  • guide/ - Ad integration guide and setup
  • ad-types/ - Different ad type examples (banner, interstitial, rewarded video, etc.)
  • integration/ - Integration examples and best practices
位于
examples/
目录下:
  • guide/ - 广告集成指南与设置说明
  • ad-types/ - 不同广告类型示例(横幅、插屏、激励视频等)
  • integration/ - 集成示例与最佳实践

API Reference

API参考文档

Located in
api/
:
  • ad-api.md - Complete uni-ad API reference
位于
api/
目录下:
  • ad-api.md - 完整的uni-ad API参考文档

Best Practices

最佳实践

  1. User experience: Don't interrupt user experience with excessive ads
  2. Ad placement: Place ads strategically for maximum revenue
  3. Loading: Handle ad loading states properly
  4. Error handling: Implement proper error handling for ad failures
  5. Compliance: Follow ad policies and regulations
  1. 用户体验:不要用过多广告干扰用户体验
  2. 广告位设置:合理布局广告位以实现收益最大化
  3. 加载处理:妥善处理广告加载状态
  4. 错误处理:为广告加载失败等情况实现完善的错误处理机制
  5. 合规性:遵守广告政策与相关法规

Resources

资源

Keywords

关键词

uni-ad, 广告变现, banner广告, 激励视频, 插屏广告, ad monetization, ad integration
uni-ad、广告变现、banner广告、激励视频、插屏广告、ad monetization、ad integration