更新记录
1.0.5(2025-07-15)
1.0.4(2025-07-10)
1.0.3(2025-07-10)
查看更多
平台兼容性
uni-app(4.63)
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
Android插件版本 |
iOS |
iOS插件版本 |
鸿蒙 |
× |
× |
× |
× |
× |
× |
5.0 |
1.0.4 |
12 |
1.0.4 |
× |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
uni-app x(4.63)
Chrome |
Safari |
Android |
Android插件版本 |
iOS |
iOS插件版本 |
鸿蒙 |
微信小程序 |
- |
- |
5.0 |
1.0.1 |
12 |
1.0.1 |
- |
- |
Turbo UI 系列插件 - 抖音SDK
- 如您已购买
Turbo UI
,那么该插件可以免费使用源码版!
- 使用需要打自定义基座,最新支持4.71,4.66,4.63,4.72版本,其他自测
- 支持授权登录
uni-app x 使用示例
<script setup lang="uts">
import { tDouyinRegister,tDouyinOpenAuth,TDouyinResult,TDouyinOptions } from "@/uni_modules/t-douyin-api"
const register = () =>{
new Promise((resolve: (result: TDouyinResult) => void,reject: (result: TDouyinResult) => void) => {
tDouyinRegister({
clientkey: "",
resolve: (result: TDouyinResult) => {
resolve(result)
},
reject: (result: TDouyinResult) => {
reject(result)
}
} as TDouyinOptions)
}).then((result: TDouyinResult) => {
console.log(result)
}).catch((result) => {
console.log(result)
})
}
const openAuth = () => {
new Promise((resolve: (result: TDouyinResult) => void,reject: (result: TDouyinResult) => void) => {
tDouyinOpenAuth({
scope: "user_info",
resolve: (result: TDouyinResult) => {
resolve(result)
},
reject: (result: TDouyinResult) => {
reject(result)
}
} as TDouyinOptions)
}).then((result: TDouyinResult) => {
console.log(result)
}).catch((result) => {
console.log(result)
})
}
onReady(() => {
register()
})
</script>
uni-app vue3 使用示例
<script setup>
import { tDouyinRegister,tDouyinOpenAuth,TDouyinResult,TDouyinOptions } from "@/uni_modules/t-douyin-api"
const register = () =>{
new Promise((resolve,reject) => {
tDouyinRegister({
clientkey: "",
resolve: (result) => {
resolve(result)
},
reject: (result) => {
reject(result)
}
})
}).then((result) => {
console.log(result)
}).catch((result) => {
console.log(result)
})
}
const openAuth = () => {
new Promise((resolve,reject) => {
tDouyinOpenAuth({
scope: "user_info",
resolve: (result) => {
resolve(result)
},
reject: (result) => {
reject(result)
}
})
}).then((result) => {
console.log(result)
}).catch((result) => {
console.log(result)
})
}
onReady(() => {
register()
})
</script>
暴露的类型
export type TDouyinResult = {
code: number;
msg: string;
data?: any;
}
export type TDouyinOptions = {
clientkey?: string;
scope?: string;
state?: string;
success?: (result: TDouyinResult) => void;
fail?: (result: TDouyinResult) => void;
}