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

med-mars

v0.0.10-7

Published

百度健康是集医疗服务和医疗内容于一体的一站式平台,手百端内为小程序(搜索-百度健康),端外为H5( https://expert.baidu.com )

Readme

med-mars

百度健康是集医疗服务和医疗内容于一体的一站式平台,手百端内为小程序(搜索-百度健康),端外为H5( https://expert.baidu.com )

开发准备

权限申请

1、申请「百度健康」小程序成员权限:FE选择「开发者」权限即可
2、申请「百度健康」H5上线权限:联系@liuxianrui,添加AE-APP56上线权限

安装

1、git clone
2、cd med-mars
3、npm install

工具准备

1、小程序开发工具下载:https://smartprogram.baidu.com/docs/develop/tutorial/install

评审

参加需求评审后,需要PM在需求空间 对应类名下添加需求卡片

开发 + 联调

适用于:FE编写页面样式和业务逻辑、与RD进行前后端联调

「小程序开发环境」

1、修改请求接口域名(如联调时):

// src/utils/conf.js 中修改 apiHost 为要请求的后端接口域名,如:

const apiHost = 'http://bjyz-migrate-big-mem-zyl02.epc.baidu.com:8977';

2、npm run serve

3、在小程序开发工具中打开编译产物 dist-swan,查看效果

4、npm run dev [path,path] path为从pages开始到任意位置的一个目录级别路径(eg: pages/brand/home),该命令开发时仅编译指定目录下的文件。

「H5开发环境」

1、修改请求接口域名(如联调时):

// src/utils/conf.js 中修改 apiHost 为要请求的后端接口域名,如:

const apiHost = 'http://bjyz-migrate-big-mem-zyl02.epc.baidu.com:8977';

2、npm run serve:h5

3、关闭chrome浏览器安全策略进行预览(解决本地访问跨域问题):open -n /Applications/Google\ Chrome.app/ --args --disable-web-security --user-data-dir=/Users/用户名/MyChromeDevUserData

「mock」

若开发过程中需要mock数据,可使用平台:http://yapi.baidu-int.com

SEO接入

1、seo.config.js 中新增短路径配置(如当前路径满足需求可不写);

2、与后端协定TDK,通过 shareBDBox 方法修改页面TDK,简单实例如下: 2.1、升级改造了share.js支持传入多图(2021.10.15)


import {shareBdBox} from '@utils/share';

const seoData = res.data.seoData || {};

// 单图
const shareInfo = {
    title:  seoData.title,
    content: seoData.desc,
    keywords: seoData.keywords,
    imageUrl: ,// 需求页面的logo,头图等图片地址
    alt: ,// 需求页面的机构,套餐名称等
};

// 多图
const shareInfo = {
    title:  seoData.title,
    content: seoData.desc,
    keywords: seoData.keywords
    imageUrl: [
        {
            id:  ,// id,可不传,自动为 shareImg + 下标索引
            url: ,// 需求页面的logo,头图等图片地址
            alt: ,// 需求页面的机构,套餐名称等
        }
    ]
};

// process.env.BUILD_TARGET 为可获取seo环境变量,seo | web
if (process.env.MARS_ENV === 'h5' && process.env.BUILD_TARGET === 'seo') {
    shareBdBox(shareInfo);
}

3、同步代码:npm run sync:seo (注:同步机器需有线上nginx服务配置,如没有机器,可周知后同步至如下配置,访问:http://medfe04.bcc-szwg.baidu.com:8300/):


module.exports = {
    receiver: 'http://medfe04.bcc-szwg.baidu.com:8999/receiver', // 文件推送服务(公司内部统一使用)
    static: '/home/work/apps/med-mars', // H5静态文件部署目录
    template: '/home/work/apps/med-mars/template' // H5模板文件部署目录
};

走查

开发联调结束后,需要提供预览环境给UE、PM进行走查

「小程序走查环境」

开发工具中点击「预览」,生成预览二维码

「H5走查环境」

一般需要FE将前端编译产物推送到RD提供的开发机后,给出页面访问地址

1、修改H5产物部署路径

// med-mars/med-conf.js 中修改部署路径(不同开发机以下三项配置可能不同,具体找机器对应RD确认)

module.exports = {
    receiver: 'http://bjyz-migrate-big-mem-zyl02.epc.baidu.com:8999/receiver', // 文件推送服务(公司内部统一使用)
    static: '/home/work/search/paex.zjh/0.ae-app-56-fenji.test/data/webroot/med-h5', // H5静态文件部署目录
    template: '/home/work/search/paex.zjh/0.ae-app-56-fenji.test/data/template/med-h5' // H5模板文件部署目录
};

2、npm run sync

3、访问对应页面地址

提测

1、测试需求收集(每周一):加群23825147

2、修改需求空间中对应卡片状态未「已提测」,QA根据卡片状态排期测试

3、开始测试时通知负责QA,提供测试环境

上线

1、代码合入master:
1)提交代码,生成icode cr链接
2)cr FE同学 + 1
3)测试QA + 2
4) 合入

2、agile发布:http://agile.baidu.com/#/builds/baidu/ps-aladdin/med-mars@MasterPipeline@branches
1)找到自己提交的流水线,点击「发布」
2)待流水线流程走完,分别上线小程序和H5代码

3、小程序发布:
1)访问小程序开发后台:https://smartprogram.baidu.com/developer/home/package.html?appId=11806953
2)验证开发版本二维码,确认效果正确后,点击「提交审核」
3)审核通过后,点击「发布」,5分钟后冷启动小程序,验证线上效果

4、H5上线:
1)访问AE平台app56:http://appengine.baidu.com/aep/app/flowList?app_id=56
2)点击「新建上线版本」
3)新页面 - 「选择上线单元和模块」勾选「908_问诊前端模板」中产物版本,填写「版本描述」,点击「确认」
4)1分钟后刷新页面(跳过代码测试),点击「部署」,生成对应tower上线单
5)上线进度到stage0时,为单机,此时进行单机验证,地址为:http://bjyz-ps-ae-fenji-api1.bjyz.baidu.com:8656/med/template/#/pages/brand/home/index?lid=4914395780
6)验证通过后继续部署后续阶段,至上线结束,验证线上效果

相关文档

小程序官方文档

mars官方文档

mars-ui官方文档