随笔 - 59,  文章 - 5,  评论 - 1,  阅读 - 55955

随笔分类 -  uni-app

获取当前时间的前一天 后一天 一周后
摘要:created() { //取前一天时间 let reTime = this.getDay(-1, 7200000); //转化为毫秒 let jugdeTime = Date.parse(reTime); console.log('昨天:', this.getDay(-1, 7200000)) c 阅读全文
posted @ 2022-11-22 09:06 好大的虫子 阅读(292) 评论(0) 推荐(0) 编辑
获取浏览器唯一标识符
摘要:this.fingerprint = (equipment.model || '') + (equipment.deviceId || '') + (equipment.hostName || '') 阅读全文
posted @ 2022-09-01 09:01 好大的虫子 阅读(135) 评论(0) 推荐(0) 编辑
表单验证时是value值为空或空格的处理方法
摘要:将if条件判断里面的input.value==' ',或者input.value.length<=0替换成 if(/^\s*$/.test(input.value)) 即可 阅读全文
posted @ 2022-08-21 21:37 好大的虫子 阅读(350) 评论(0) 推荐(0) 编辑
uniapp获取元素的宽度、高度
摘要:uni.createSelectorQuery().in(this).select('.类名').boundingClientRect(data => { console.log(data.height) console.log(data.width) }).exec() 阅读全文
posted @ 2022-08-13 19:27 好大的虫子 阅读(2852) 评论(0) 推荐(0) 编辑
uniapp解决滚动条问题
摘要:在App.vue的style中写上 /* 解决小程序和app滚动条的问题 */ /* #ifdef MP-NEIXIN 11 APP-PLUS */ ::-webkit-scrollbar { display: none; width: 0 !important; height: 0 !import 阅读全文
posted @ 2022-06-22 12:35 好大的虫子 阅读(2100) 评论(0) 推荐(0) 编辑
uniapp中登录提交密码时用base64加密
摘要:1.在项目文件夹里面的地址栏中输入npm后回车 2.在弹出来的管理员界面输入 npm install base-64 后回车 3.在需要使用的页面引入 import Base64 from 'base-64'; 4.提交时转换成base64后提交 const en = Base64. encode( 阅读全文
posted @ 2022-06-22 12:04 好大的虫子 阅读(1296) 评论(0) 推荐(0) 编辑
uni-app封装request
摘要:1.新建api文件夹和api.js文件,在写上这段代码 const BASE_URL = 'http://127.0.0.1:4523/m1/989800-0-default'export const myRequest = (options) => { return new Promise((re 阅读全文
posted @ 2022-06-10 00:07 好大的虫子 阅读(310) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示