在小程序中使用md5

  1. 使用md5.js的首先你要有md5.js这个文件https://github.com/emn178/js-md5

    您也可以使用Bower安装js-md5。

    bower install md5

    对于node.js,您可以使用此命令安装:

    npm install js-md5

 2.把md5.js的文件放到小程序的项目中,我是放在这里

  

  3.然后在你想要的用到md5.js的页面引入,并使用

  

 

  或者是

  import md5 from ‘md5’引入

  使用可以看https://github.com/emn178/js-md5的GitHub文档额

 

posted @ 2018-09-14 16:09  mei1234!  阅读(3960)  评论(0编辑  收藏  举报