TMSAPI

腾讯出行小程序常用的工具函数

快速上手 →

开箱即用

一键安装npm包即可使用

详细示例

使用示例说明及demo展示

功能齐全

覆盖小程序\h5\云函数场景常用函数

# 项目结构

library
├─tms-core(@tmsfe/tms-core)                                             # 小程序日常使用的工具函数
├─tms-bridge(@tmsfe/tms-bridge)                                         # 小程序插件与小程序交互通信的工具函数
├─tms-websdk(@tmsfe/tms-websdk)                                         # 腾讯出行h5常用的工具函数 【暂未对外开放】
├─tms-cloud-sdk(@tmsfe/tms-cloud-sdk)                                   # 小程序云函数常用的工具函数【暂未对外开放】
  • tms-core示例
  // core的所有方法已经在”app.js“挂在到了app上,开发”小程序模块时,只需从app获取即可,无需再次引入“
  const tms = getApp({ allowDefault: true }).tms;      
  const request = tms.createRequest({ withAuth: true });

  request.get('/api/list', {carId: '112222'}).then(res => res);