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

@ant-hospital/drantsdk-module

v1.0.0

Published

蚂蚁云医互联网医院-提供第三方使用的SDK

Downloads

6

Readme

项目启动步骤

步骤 1:开发工具 vsCode / Hbuild 等,打开项目根目录

  • cd 项目根目录

步骤 2: 检查本地是否安装 node (指定16.20.0版本)环境(默认已安装),执行脚本下载运行所需依赖

npm install

步骤 3: 以上操作完成,执行项目启动脚本。脚本执行完成,即项目成功运行

npm run  dev:custom my-weixin~dev

步骤 4:打包发布

一、手动打包

  • 执行打包脚本: npm run build:custom my-weixin~dev
  • 执行脚本成功得到的微信小程序包在: 项目根目录 -> dist -> build -> mp-weixin
  • 拥有小程序开发权限的账号登录微信开发者工具,导入微信小程序目录:根目录 -> dist -> build -> mp-weixin . 进入微信开发者工具,点击界面右上角 “上传” 按钮即可

二、自动化打包上传

  • 执行打包上传脚本: node build.js (打包完成后自动上传 默认上传测试环境,上传生产需在阿里流水线运行)
  • 执行自动上传脚本: node uploadDev.js (默认上传dist->build->mp-weixin文件)

项目页面结构

  • dist 运行/打包小程序存放目录
  • key JenKins 读取密钥
  • map 腾讯地图
  • src
  • common
  • js 封装公共方法
  • commonData 获取环境变量,服务请求根路径,做本地调试
  • style 封装公共样式
  • components 封装公共组件
  • config 全局定义 appid、域名、obs,已废弃
  • img 静态图片资源
  • mixin 全局混入
  • packageBusiness1 商务模块代码 【分包】
  • packageDoctor1 医生模块代码 【分包】
  • packageCloud 视频医生 【分包】
  • packageExtract 通用 【分包】=》包含:蚂蚁快检
  • packagePatient1 患者模块代码 【分包】
  • timIM 问诊室模块代码 【分包】
  • pages 小程序主程序入口 【主包】
  • store 状态管理模式
  • uni_modules
  • App.vue 应用配置,用来配置 App 全局样式以及监听 应用生命周期, 详见 https://uniapp.dcloud.net.cn/collocation/App#%E5%BA%94%E7%94%A8%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F
  • main.js Vue 初始化入口文件
  • manifest.json 配置应用名称、appid、logo、版本等打包信息,详见 https://uniapp.dcloud.net.cn/collocation/manifest.html
  • pages.json 配置页面路由、导航条、选项卡等页面类信息,详见 https://uniapp.dcloud.net.cn/collocation/pages.html
  • vue.config.js 配置 appid、域名、obs、全局版本号

常见问题

1. uni-app 同时支持安卓,iOS, 微信小程序平台,im sdk 如何选择?

请选择 tim-wx-sdk ,npm 安装或者静态引入

    // 从v2.11.2起,SDK 支持了 WebSocket,推荐接入;v2.10.2及以下版本,使用 HTTP
	npm install [email protected] --save
	import TIM from 'tim-wx-sdk';
	// 创建 SDK 实例,`TIM.create()`方法对于同一个 `SDKAppID` 只会返回同一份实例
	uni.$TUIKit = TIM.create({
		SDKAppID: 0  // 接入时需要将0替换为您的即时通信 IM 应用的 SDKAppID
	});

	// 设置 SDK 日志输出级别,详细分级请参见 setLogLevel 接口的说明
	uni.$TUIKit.setLogLevel(0); // 普通级别,日志量较多,接入时建议使用
	// uni.$TUIKit.setLogLevel(1); // release 级别,SDK 输出关键信息,生产环境时建议使用

如果您的项目需要关系链功能,请使用 tim-wx-friendship.js

import TIM from 'tim-wx-sdk/tim-wx-friendship.js'
  • 为了 uni-app 更好地接入使用 tim,快速定位和解决问题,请勿修改 uni.$TUIKit 命名,如果您已经接入tim ,请将 uni.tim 修改为uni.$TUIKit。
  • 请将 im sdk 升级到 2.15.0,该版本支持了 iOS 语音播放。
  • 若同步依赖过程中出现问题,请切换 npm 源后再次重试。
	切换 cnpm 源
	npm config set registry http://r.cnpmjs.org/

2. 如何上传图片、视频、语音消息等富媒体消息?

请使用 cos-wx-sdk-v5

    // 发送图片、语音、视频等消息需要 cos-wx-sdk-v5 上传插件
	npm install [email protected] --save
	import COS from "cos-wx-sdk-v5";
	// 注册 COS SDK 插件
	uni.$TUIKit.registerPlugin({
		'cos-wx-sdk': COS
	});

3. uni-app 打包 iOS 语音消息无法播放怎么办?

请将 im sdk 升级到 2.15.0,该版本支持了 iOS 语音消息播放

4. uni-app 打包 app 发送语音消息时间显示错误怎么办?

uni-app 打包 app,recorderManager.onStop 回调中没有 durationfileSize需要用户自己补充 duration 和 fileSize

详细代码请参考 uni-app TUIKit

  • 语音消息对象中必须包括 durationfileSize,如果没有 fileSize,语音消息时长是一串错误的数字

5、video 视频消息层级过高无法滑动怎么办?

在项目中通过视频图片代替,没有直接渲染 video,在播放时渲染的方式规避了层级过高问题

详细代码请参考 uni-app TUIKit

官方 原生组件说明

6、微信小程序如果需要上线或者部署正式环境怎么办?

请在微信公众平台>开发>开发设置>服务器域名中进行域名配置:

将以下域名添加到 request 合法域名

从 v2.11.2 起,SDK 支持了 WebSocket,WebSocket 版本须添加以下域名:

| 域名 | 说明 | 是否必须 | | :--------------------------: | --------------- | -------- | | wss://wss.im.qcloud.com | Web IM 业务域名 | 必须 | | wss://wss.tim.qq.com | Web IM 业务域名 | 必须 | | https://web.sdk.qcloud.com | Web IM 业务域名 | 必须 | | https://webim.tim.qq.com | Web IM 业务域名 | 必须 |

v2.10.2 及以下版本,使用 HTTP,HTTP 版本须添加以下域名:

| 域名 | 说明 | 是否必须 | | :----------------------------: | --------------- | -------- | | https://webim.tim.qq.com | Web IM 业务域名 | 必须 | | https://yun.tim.qq.com | Web IM 业务域名 | 必须 | | https://events.tim.qq.com | Web IM 业务域名 | 必须 | | https://grouptalk.c2c.qq.com | Web IM 业务域名 | 必须 | | https://pingtas.qq.com | Web IM 统计域名 | 必须 |

将以下域名添加到 uploadFile 合法域名

| 域名 | 说明 | 是否必须 | | :------------------------------------: | ------------ | -------- | | https://cos.ap-shanghai.myqcloud.com | 文件上传域名 | 必须 |

将以下域名添加到 downloadFile 合法域名

| 域名 | 说明 | 是否必须 | | :------------------------------------: | ------------ | -------- | | https://cos.ap-shanghai.myqcloud.com | 文件下载域名 | 必须 |

7、客户端消息订阅收不到怎么办?

  • 登录管理后台 https://域名/#/login,系统管理 -> 配置管理 -> 小程序订阅消息模板
  • 登录小程序后台 https://mp.weixin.qq.com 订阅消息
  • 对比管理后台配置的订阅消息是否正确且长期订阅不可和一次性订阅同时使用

参考文档: