摘要: ![image](https://img2022.cnblogs.com/blog/2213654/202208/2213654-20220807210227568-1726795777.png) ![image](https://img2022.cnblogs.com/blog/2213654/202208/2213654-20220807210233395-727424307.png) 阅读全文
posted @ 2022-08-07 21:03 一个大不刘blog 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 微信小程序获取dom元素的方法 var query = wx.createSelectorQuery(); query.select('#xxx').boundingClientRect() query.exec(function (res) { //res就是 所有标签为mjltest的元素的信息 阅读全文
posted @ 2022-06-05 15:36 一个大不刘blog 阅读(1288) 评论(0) 推荐(0) 编辑
摘要: this.setDate({ info:{ a:50 } }) 上述方法除过a以外的其他属性也会被覆盖,从而成为空值 可使用以下方法 this.setData({ ['info.userImg']:this.data.fileList }) 阅读全文
posted @ 2022-06-05 15:35 一个大不刘blog 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 使用方法 模块官网:https://github.com/expressjs/multer/blob/master 后端Node实现 // 安装并导入模块 import multer from 'multer'; // 创建中间件函数 var upload = multer({ storage: m 阅读全文
posted @ 2022-06-03 00:48 一个大不刘blog 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 参考 https://wenku.baidu.com/view/daef7b3ba000a6c30c22590102020740be1ecdfe.html 解决步骤: 使用qs模块解析多层对象或数组 1.npm i qs 2.import qs from 'qs'; 3.console.log(qs 阅读全文
posted @ 2022-06-03 00:48 一个大不刘blog 阅读(198) 评论(0) 推荐(0) 编辑
摘要: import path from 'path' const __dirname = path.resolve(); 阅读全文
posted @ 2022-06-03 00:47 一个大不刘blog 阅读(364) 评论(0) 推荐(0) 编辑
摘要: jsonwebtoken加密Token的使用步骤 npm i jsonwebtoken 定义一个密钥 const secretKey = 'tieshankao114322'; 当判断登录成功后加密token后返还给客户机 const jsonwebtoken = require("jsonwebt 阅读全文
posted @ 2022-06-03 00:45 一个大不刘blog 阅读(1292) 评论(0) 推荐(0) 编辑
摘要: 导入模块 import bcryptjs from 'bcryptjs'; 加密 bcryptjs.hashSync(req.body.password, 10) 解密 bcryptjs.compareSync(req.body.password, result[0].password) 阅读全文
posted @ 2022-06-03 00:44 一个大不刘blog 阅读(325) 评论(0) 推荐(0) 编辑
摘要: mysql2 支持promise风格 使用方法 后端node遵循es6模块分类 (1)在app.js同路径下创建mysql文件夹。 (2)在mysql文件夹下创建mysql.js文件并引入mysql2模块 (3)代码格式如下: import mysql from 'mysql2'; const db 阅读全文
posted @ 2022-06-03 00:43 一个大不刘blog 阅读(241) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2213654/202206/2213654-20220603004043010-1547867626.png) ![image](https://img2022.cnblogs.com/blog/2213654/202206/2213654-20220603004048809-589642806.png) 阅读全文
posted @ 2022-06-03 00:41 一个大不刘blog 阅读(17) 评论(0) 推荐(0) 编辑