摘要: 1、新建 index.html,写入禁止缓存的 meta <!-- 设置 meta 不缓存 --> <meta http-equiv="Expires" content="0"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equ 阅读全文
posted @ 2023-05-16 11:13 live丶 阅读(1338) 评论(0) 推荐(0) 编辑
摘要: 这里我封装了一个版本更新的组件 项目版本号在manifest.json 基础配置中查看 应用版本名称 2.1.07 这种三段式的就是大版本号,一般用于版本强制更新,比如重新安装apk包 应用版本号 2107 就是小版本号 ,一般用于热更新 下面是代码 首先在项目入口地址App.vue 界面获取设备信 阅读全文
posted @ 2023-03-04 09:38 live丶 阅读(2086) 评论(0) 推荐(0) 编辑
摘要: (function flexible(window,document){ // 获取html的根元素 var docEl = document.documentElement; // dpr 物理像素比 window.devicePixelRatio 会获取当前屏幕的物理像素比,如果是pc端则为1, 阅读全文
posted @ 2023-02-16 11:38 live丶 阅读(70) 评论(0) 推荐(0) 编辑
摘要: // 监听时间选择 watch( [ internalSubmTimer, internalTimer, externalSubmTimer, externaTimer, callbackTimer, ], (newValue, oldValue) => { Object.keys(newValue 阅读全文
posted @ 2022-12-06 13:09 live丶 阅读(1820) 评论(0) 推荐(0) 编辑
摘要: 需求:这边是uniapp开发的APP 需要内嵌H5(vue),就得使用web-view跳转网页 H5端 在vue的index,html文件引入web-view的插件 <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.ne 阅读全文
posted @ 2022-10-28 16:29 live丶 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: 需求 点击订单页 订单详情页 点击修改地址 来到地址列表,修改地址 成功以后返回订单详情页,并且更新界面数据 首先在订单详情页 设置事件 监听另一界面触发事件后 就会执行并且可以接收参数 onLoad(option) { // 返回上一页更新地址信息 uni.$on('setAddress', fu 阅读全文
posted @ 2022-09-23 10:52 live丶 阅读(1983) 评论(0) 推荐(0) 编辑
摘要: 本地分支和远程修改了同一个文件代码,pull远程分支的代码的时候会文件冲突 出现这个错误 Please commit your changes or stash them before you merge. 解决办法先将当前内容存储起来 git stash就可以把当前内容存储在栈内 再 git pu 阅读全文
posted @ 2022-09-01 16:25 live丶 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 拉取了新项目以后,git突然不能用了 报husky > pre-commit, 解决办法:进入你的项目显示隐藏git文件 进入git文件 找到 hooks / pre-commit 删掉就好了 搜索 复制 阅读全文
posted @ 2022-09-01 16:08 live丶 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 最近打包上架的 ios项目 启动项目提示打包时未添加 push模块 在uniapp manifest中可以配置消息推送,可以我们项目没有用到这个功能,真是日狗了,排除半天仔细检查了使用Push消息推送的地方 1丶manifest中,APP模块配置,如果使用Push消息推送就要勾选上,没用就别勾 2丶 阅读全文
posted @ 2022-08-10 14:19 live丶 阅读(3028) 评论(0) 推荐(0) 编辑
摘要: 首先要了解这里代码执行顺序: for循环同步;setTimeout异步; js在执行代码的过程中,碰到同步代码会依次执行,碰到异步代码就会将其放入任务队列中进行等待,当同步代码执行完毕后再开始执行异步代码; 然后看下面: let声明 for(let i=1; i<=5; i++){ setTimeo 阅读全文
posted @ 2022-08-05 14:45 live丶 阅读(46) 评论(0) 推荐(0) 编辑