上一页 1 2 3 4 5 6 7 8 9 ··· 73 下一页
摘要: /*计算当前Swiper的高度*/ getCurrentSwiperHeight() { //获取Dom是异步操作 所以封装Promise return new Promise((resolve, reject) => { let sum = 0; const query = uni.createS 阅读全文
posted @ 2022-10-30 11:58 咸瑜 阅读(279) 评论(0) 推荐(0)
摘要: 注释 三总: 单行注释 直接 # + 内容 多行注释 三个 单引号括起来的内容 指定编码注释 可以指定文件的中文编码 例: # 作者:咸瑜 # 代码时间:2022/10/17 15:57 '''' 多行注释 我是多行的呀 我是咸瑜,欢迎来到我的博客 ''' # coding:utf-8 函数、运算符 阅读全文
posted @ 2022-10-21 21:46 咸瑜 阅读(41) 评论(0) 推荐(0)
摘要: web端可能可以,但是小程序就算了,小程序的话有一个插件能但是也繁琐,所以我的想法是这样的: 参考: 参考博客 自解决: 跳转的时候携带code,判断code是什么 然后显示啥,,,, 阅读全文
posted @ 2022-10-20 16:37 咸瑜 阅读(102) 评论(0) 推荐(0)
摘要: 逻辑:我随便写一个 没有cookie 我就跳转到登录页,而且任何返回都没用 1.在App.vue 里 写 onload 判断是否存在Cookie 【有效否后面验证】 2. 在导入Uniapp 拦截器 // 页面白名单,不受拦截 const whiteList = [ '' ] function ha 阅读全文
posted @ 2022-10-19 11:03 咸瑜 阅读(833) 评论(1) 推荐(0)
摘要: 关键字规则 变量定义使用 # 作者:咸瑜 # 代码时间:2022/10/17 15:57 name = "咸瑜" print('值', name) print('id', id(name)) print('类型', type(name)) # # 值 咸瑜 # id 2245130370480 # 阅读全文
posted @ 2022-10-18 18:50 咸瑜 阅读(23) 评论(0) 推荐(0)
摘要: export function getWeek(date1, date2) { let d1 = new Date(date1); let d2 = new Date(date2); console.log(Math.ceil(parseInt(((d2 - d1) / (1000 * 3600 * 阅读全文
posted @ 2022-10-18 14:59 咸瑜 阅读(51) 评论(0) 推荐(0)
摘要: 很简单 但也很细节 print 可以打印任何基本类型的数据,包括表达式 print 默认是换行的,不换行的话 加个逗号, 然后继续写变量,输出逗号会代替掉空格 print("a","b") # a b print 转义字符: 如果不想转义 那么在字符串之前加上 r 或 R: # 作者:咸瑜 # 代码 阅读全文
posted @ 2022-10-17 16:32 咸瑜 阅读(181) 评论(0) 推荐(0)
摘要: let res = Array.from(new Set(arr)) 阅读全文
posted @ 2022-10-16 17:49 咸瑜 阅读(13) 评论(0) 推荐(0)
摘要: // 计算状态栏高度 getMenuButton() { // 状态栏高度 let ztl = uni.getSystemInfoSync().statusBarHeight; // 获取微信胶囊的位置信息 const custom = wx.getMenuButtonBoundingClientR 阅读全文
posted @ 2022-10-15 16:36 咸瑜 阅读(318) 评论(0) 推荐(0)
摘要: 值多且是对象就用这个方法了: 发送 接受: 阅读全文
posted @ 2022-10-14 21:17 咸瑜 阅读(59) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 73 下一页