随笔分类 -  h5

H5静态页面开发环境跳转小程序(微信浏览器,外部浏览器)
摘要:一.先贴下官方开发文档,虽没能成功调起小程序,也是可以先看下的1.官方开发文档参考:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/staticstorage/jump-miniprogram.html 官方文档只提供了关 阅读全文

posted @ 2025-07-07 16:51 奔驰的码儿 阅读(724) 评论(0) 推荐(0)

vue3+vant-ui 上传头像,base64文件流上传及回显
摘要:1 <script setup> 2 import { onMounted, reactive } from "vue"; 3 import { useRouter } from "vue-router"; 4 import request from '@/utils/request'; 5 imp 阅读全文

posted @ 2024-12-20 13:05 奔驰的码儿 阅读(485) 评论(0) 推荐(0)

uni-app 蓝牙连接热敏打印机
摘要:主要流程: 1.初始化蓝牙适配器openBluetoothAdapter,如果不成功就onBluetoothAdapterStateChange监听蓝牙适配器状态变化事件 2.startBluetoothDevicesDiscovery开始搜寻附近的蓝牙外围设备 3.onBluetoothDevic 阅读全文

posted @ 2021-11-17 16:30 奔驰的码儿 阅读(2717) 评论(0) 推荐(0)

手机端自适应字体大小rem
摘要:1 function fontSize(){ 2 var deviceWidth=document.documentElement.clientWidth>768?768:document.documentElement.clientWidth; 3 document.documentElement 阅读全文

posted @ 2021-03-16 12:50 奔驰的码儿 阅读(285) 评论(0) 推荐(0)

h5 video 封面poster IOS下无效不显示,安卓显示正常
摘要:1 2 3 1 #detail{height: auto; width: 100%; overflow: hidden;background: none; text-align: center;background:url('https://staging.all-dream.com/assets/front/img/highlight.png') no-repeat cen... 阅读全文

posted @ 2019-06-11 14:32 奔驰的码儿 阅读(3231) 评论(0) 推荐(0)

微信H5 ios移动端,键盘收起以后页面不缩回
摘要:这是个微信bug 1 $("input").on("blur",function(){ 2 console.log("焦点1") 3 window.scroll(0,0);//失焦后强制让页面归位 4 }); 阅读全文

posted @ 2019-06-10 21:50 奔驰的码儿 阅读(208) 评论(0) 推荐(0)

如果微信H5页面转发分享后标题及内容、链接不是自己自定义的内容,及logo https兼容性问题如下解决方法
摘要:// imgUrl: window.location.protocol + '//' + window.location.host + '/nviews/mobile/images/amlogo.jpg',(解决https logo不显示问题) 注意: 1、页面引入:<script src="htt 阅读全文

posted @ 2019-06-06 16:38 奔驰的码儿 阅读(941) 评论(0) 推荐(0)

检测关闭浏览器、浏览器的返回按钮、关闭微信页面
摘要:1 //检测浏览器关闭 2 window.onbeforeunload = function () { 3 console.log("确定离开吗") 4 return main.getApi();//调用相关需求 5 6 }; 7 $(function(){ 8 pushHistory();... 阅读全文

posted @ 2019-06-06 16:15 奔驰的码儿 阅读(284) 评论(0) 推荐(0)

h5 video 无法控制 采取方式
摘要:<video id="js-video" width="100%" controls="controls" x5-video-player-type="h5" x5-video-player-fullscreen="true" x5-video-orientation="portraint" pos 阅读全文

posted @ 2019-06-03 20:10 奔驰的码儿 阅读(183) 评论(0) 推荐(0)

导航