nginx中 vue路由去掉#后的配置问题
摘要:location =/ { rewrite index.html permanent; try_files $uri $uri/ /index.html; }
阅读全文
webpack中 VUE使用搜狐ip库查询设备ip地址
摘要:1、index.html中引入百度地图 2、在webpack.base.conf.js里面 配置 3、引入使用
阅读全文
webpack中 VUE使用百度地图获取地理位置
摘要:百度地图 1、index.html中引入 百度地图api 2、在webpack.base.conf.js里面 配置 3、引入使用,一定记住需要在mounted钩子函数里面操作API 因为地图需要在所以的dom树加载完毕后才能操作
阅读全文
VUE动态设置网页head中的title
摘要:router.beforeEach((to, from, next) => { /* 路由发生变化修改页面meta */ if (to.meta.content) { const head = document.getElementsByTagName('head') const meta = document.createElement('meta') meta...
阅读全文
VUE中的 AES加密和解密
摘要:import CryptoJS from 'crypto-js/crypto-js' // 默认的 KEY 与 iv 如果没有给 const KEY = CryptoJS.enc.Utf8.parse('F697467B14B076F2') const IV = CryptoJS.enc.Utf8.parse('0102030405060708') /** * AES加密 :字符串 key...
阅读全文
VUE单页面添加百度统计
摘要:router.afterEach(() => { setTimeout(() => { var _hmt = _hmt || []; (function() { // 每次执行前,先移除上次插入的代码 document.getElementById('baidu_tj') && document.getElementById('baidu_tj').r...
阅读全文
vue项目html5调取手机摄像头录像并上传
摘要:刷脸验证 methods: { updateFace(e) { const file = e.target.files[0] || e.dataTransfer.files[0] if (file) { // 本地预览 const reader = new FileReader() const myVideo = docu...
阅读全文
【IE浏览器】GET请求防止读取缓存数据的解决方法
摘要:方法1: 设置请求头(axios封装中) 方法2: URL后加数学随机数 或者 时间戳
阅读全文