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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@shencom/api

v1.9.5

Published

shencom api group

Downloads

191

Readme

@shencom/api

描述....

install

pnpm add @shencom/request @shencom/api

# or

yarn add @shencom/request @shencom/api

Usage

Init

import { axiosBrowser } from '@shencom/request';
// import { axiosUniapp } from '@shencom/request';
import { init } from '@shencom/api';

const url = 'xxxx';

init(http, url);

Basic Usage

import { ApiGisShow } from '@shencom/api';

function getGisShow() {
  const { data } = await ApiGisShow({ ids: ['xxx'] });
  // console.log(data);
}

API

uaa

  • [x] 获取 sccode: ApiGetScCode;

  • [x] sccode 登录: ApiScCodeLogin;

  • [x] 使用 refreshToken 续期 token: ApiRefreshToken;

    • token 8 小时有效期
    • refreshToken 30 天有效期
  • [ ] 更新系统用户信息

  • [ ] 注册用户

  • [ ] 用户名+密码登录:

  • [x] 手机号+密码登录: ApiPhoneAndPasswordLogin;

  • [ ] 手机号+短信登录:

  • [ ] 发送短信:

uaa-wechat

  • [x] 微信小程序登录: ApiWechatMiniLogin;
  • 小程序手机号登录,并绑定手机号到系统用户(创建系统用户)
  • [x] 绑定微信用户登录: BaseWechatMiniBindPhone;
  • [ ] 退出登录 (解除微信绑定)
  • [ ] 微信公众号授权登录
  • [ ] 更新微信用户信息
  • [ ] 通过 openid 获取用户信息
  • [ ] 判断是否关注公众号

wechat

  • [x] 获取公众号 JSSDK 配置: ApiWechatGetConfig

file

  • [x] oss 签名: ApiFileOssSign
  • [x] 将 oss 文件信息更新到数据库: ApiFileUpdate
  • [x] 服务器文件上传: ApiFileUpload
  • [x] 获取文件信息: ApiFileShow
  • [ ] 单个文件上传
  • [ ] 文件下载
  • [ ] 检查图片是否含有违法违规或政治敏感内容
  • [ ] 私有文件下载
  • [ ] 私有上传指定 url 的文件
  • [ ] 私有文件上传
  • [ ] 私有 oss 签名
  • [ ] 获取私有临时文件访问链接

gis

  • [x] 创建点位: ApiGisCreate;
  • [x] 获取点位: ApiGisShow;
  • [ ] 更新点位
  • [ ] 创建范围
  • [ ] 更新范围
  • [ ] 获取范围

cms

  • [x] 获取栏目: ApiCMSCategoryTree;
  • [x] 获取内容列表: ApiCMSArticlesIndex;
  • [x] 获取内容: ApiCMSArticlesShow;

AMap

  • [x] 高德-地理编码: ApiAMapGeocodeGeo;
  • [x] 高德-逆地理编码: ApiAMapGeocodeRegeo;
  • [x] 高德-天气查询: ApiAMapWeather;
  • [x] 高德-IP定位: ApiAMapIP;

QQMap

  • [x] 腾讯-地理编码: ApiQQMapGeocodeGeo;
  • [x] 腾讯-逆地理编码: ApiQQMapGeocodeRegeo;
  • [x] 腾讯-IP定位: ApiQQMapIP;

Helpers

ApiQueryHandler

  • 说明: 查询参数生成格式方法
  • 类型: 参考源码
  • 参数:
    • val: 查询的值
    • prop: 后端字段
    • operateType?: 筛选条件 (默认: string)
    • params?: 同 [val, prop, operateType]
  • 返回: IndexQuery
  • 示例:
    ApiQueryHandler('1', 'active');
    ApiQueryHandler('2020-08-03', 'createdAt', 'rangeDateTime');
    ApiQueryHandler([
      [1, 'active'],
      ['2020-08-03', 'createdAt', 'rangeDateTime'],
    ]);

ApiSortsHandler

  • 说明: 排序参数生成格式方法
  • 类型: 参考源码
  • 参数:
    • prop: 排序字段
    • type: 排序类型 (默认: DESC)
    • params?: 同 [prop, orderType]
  • 返回: IndexSorts
  • 示例:
    ApiSortsHandler('aaa');
    ApiSortsHandler('aaa', 'ASC');
    ApiSortsHandler([['aaa', 'ASC'], ['bbb']]);

Jsencrypt

  • 说明: 密码加密
  • 类型: (pwd: string) => string
  • 参数:
    • pwd: 明文密码
  • 返回: string
  • 示例:
    const password = Jsencrypt('sc123456');