zoukankan      html  css  js  c++  java
  • 在HbuilderX的Uni-app中引入crypto-js md5

    在 hbuilderX的菜单“视图”中选择“显示终端”,在终端中把当前目录定位到uni-app的根目录,这样才可以把crypto-js库安装在正确的位置,在终端中键入:npm install crypto-js ,等待片刻,crypto-js 库就装在了uni-app的根目录的:/node_modules/crypto-js/* 中了。要使用其相关加解密算法,只要在代码中引入:import cj from '../../../node_modules/crypto-js/crypto-js.js' 就可以搞事情了。

    比如:

    ```

    <script>

    import cj from '../../../node_modules/crypto-js/crypto-js.js'

                    const data = {

    t:"sign up",

                        account: this.account,

                        password: cj.MD5(this.password).toString(),

                        email: email0,

    cellphone:cellphone0,

                    }

    </script>


     
  • 相关阅读:
    双线性过滤
    textureView
    cubemap
    selfshadow
    cbuffer padding
    异常
    Python深浅拷贝
    数据类型分类
    集合类型内置方法
    字典数据类型内置方法
  • 原文地址:https://www.cnblogs.com/lhxsoft/p/11507231.html
Copyright © 2011-2022 走看看