npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cloudbase/adapter-uni-app

v1.1.0

Published

uni-app adapter of cloudbase javascript SDK

Downloads

290

Readme

CloudBase UniApp Adapter

NPM Version Downloads License

📖 概述

CloudBase UniApp Adapter 是专为 UniApp 跨平台开发框架设计的腾讯云开发适配器。它让开发者能够在 UniApp 项目中无缝集成腾讯云开发的核心能力,包括数据库,对象存储,云函数等。

🚀 安装

使用 npm:

npm install @cloudbase/adapter-uni-app

CloudBase UniApp 模版

一个基于 UniApp 和腾讯云开发的跨平台应用模板,提供了用户登录、图形验证码、云函数调用等常用功能的实现。支持 H5、微信小程序、支付宝小程序、抖音小程序和 App(iOS/Android)。

完整示例项目请参考:CloudBase UniApp 模板

各平台展示如下:

H5 端 | 微信小程序 | |:---:|:---:| | H5 端 | 微信小程序 |

支付宝小程序 | 抖音小程序 | |:---:|:---:| | 支付宝小程序 | 抖音小程序 |

Android 和 iOS | |:---:| | |

⚡ 快速开始

配置

在 UniApp 项目的入口文件中引入并初始化适配器:

当需要使用登录功能时,必须传入options参数,传入后可以在适配器内部的 genAdapter 中接收和使用。

详细说明请参考适配器开发指引

import cloudbase from '@cloudbase/js-sdk'
import adapter from '@cloudbase/adapter-uni-app'

// 配置选项
const options = {
  uni // UniApp 全局对象,用于登录和验证码功能
}

cloudbase.useAdapters(adapter, options)

const app = cloudbase.init({
  env: 'your-env-id', // 替换为您的云开发环境 ID
  // 其他配置项
})

export default app

开发环境启动

平台支持说明:目前稳定支持 APP、H5、微信小程序、抖音小程序和支付宝小程序平台,其他平台适配正在开发中。

# H5 开发
npm run dev:h5

# 微信小程序开发
npm run dev:mp-weixin

# 抖音小程序开发
npm run dev:mp-toutiao

# 支付宝小程序开发
npm run dev:mp-alipay

# App (iOS/Android) 开发
# 1. 使用 HBuilderX 打开项目
# 2. 在顶部菜单栏选择【运行】->【运行到手机或模拟器】-> 选择您的设备

域名配置

可参考安全域名配置

🔐 图形验证码说明

在某些安全敏感的操作场景下(如用户登录),腾讯云开发会要求进行图形验证码验证。UniApp Adapter 通过事件总线机制处理验证码交互。

详情请参考Cloudbase JavaScript SDK 官方文档

📚 相关资源

官方文档

示例项目