Commit a33fe7c4 by 米嘉伟

合并代码

parent bfbd3d2f
...@@ -28,7 +28,7 @@ axios.interceptors.request.use(config => { ...@@ -28,7 +28,7 @@ axios.interceptors.request.use(config => {
} }
// config.headers['Authorization'] = 'Security-ceyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIxIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE2NDk0MTE1NDgsImF1dGhvcml0aWVzIjoiXCJST0xFX0IsUk9MRV9DLFJPTEVfRCxST0xFX0UsUk9MRV9GLFJPTEVfRyxST0xFX0ctNSxST0xFX0ItMyxST0xFX0ItMixST0xFX0ItMSxST0xFX0MtNixST0xFX0ktOSxST0xFX0ktMTAsUk9MRV9FLTEsUk9MRV9ELTEsUk9MRV9ILFJPTEVfSSxST0xFX0MtMyxST0xFX0MtNCxST0xFX0MtNSxST0xFX0QtNixST0xFX0QtMTAsUk9MRV9ELTgsUk9MRV9ELTEyLFJPTEVfRC05LFJPTEVfRC03LFJPTEVfRC0xMSxST0xFX0YtMixST0xFX0YtMSxST0xFX0ctMixST0xFX0gtMSxST0xFX0ktMixST0xFX0ktMyxST0xFX0ktMSxST0xFX0ktNCxST0xFX0MtMixST0xFX0MtMSxST0xFX0QtNSxST0xFX0QtNCxST0xFX0QtMixST0xFX0YtMyxST0xFX0YtNCxST0xFX0YtNSxST0xFX0ctMSxST0xFX0ctMyxST0xFX0ktOCxST0xFX0gtMixST0xFX0gtNCxST0xFX0gtNixST0xFX0gtMyxST0xFX0gtNSxST0xFX0ktNixST0xFX0ktNSxST0xFX0ktNyxST0xFX0UtNixST0xFX0UtMixST0xFX0UtMyxST0xFX0UtNSxST0xFX0UtNFwiIiwiaXNzIjoiemNnIiwiZXhwIjoxNjQ5NDE1MTQ4fQ._hAHc1-yTUN5DZGQ2e_2O1NXn4tPbyh9OYPqUAvSkjE0vfuqyAUwUz9mOa-Yz9k_VLmTtKArRmkXf3Fjvj1xBQ' // 让每个请求携带自定义 token 请根据实际情况自行修改 // config.headers['Authorization'] = 'Security-ceyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIxIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE2NDk0MTE1NDgsImF1dGhvcml0aWVzIjoiXCJST0xFX0IsUk9MRV9DLFJPTEVfRCxST0xFX0UsUk9MRV9GLFJPTEVfRyxST0xFX0ctNSxST0xFX0ItMyxST0xFX0ItMixST0xFX0ItMSxST0xFX0MtNixST0xFX0ktOSxST0xFX0ktMTAsUk9MRV9FLTEsUk9MRV9ELTEsUk9MRV9ILFJPTEVfSSxST0xFX0MtMyxST0xFX0MtNCxST0xFX0MtNSxST0xFX0QtNixST0xFX0QtMTAsUk9MRV9ELTgsUk9MRV9ELTEyLFJPTEVfRC05LFJPTEVfRC03LFJPTEVfRC0xMSxST0xFX0YtMixST0xFX0YtMSxST0xFX0ctMixST0xFX0gtMSxST0xFX0ktMixST0xFX0ktMyxST0xFX0ktMSxST0xFX0ktNCxST0xFX0MtMixST0xFX0MtMSxST0xFX0QtNSxST0xFX0QtNCxST0xFX0QtMixST0xFX0YtMyxST0xFX0YtNCxST0xFX0YtNSxST0xFX0ctMSxST0xFX0ctMyxST0xFX0ktOCxST0xFX0gtMixST0xFX0gtNCxST0xFX0gtNixST0xFX0gtMyxST0xFX0gtNSxST0xFX0ktNixST0xFX0ktNSxST0xFX0ktNyxST0xFX0UtNixST0xFX0UtMixST0xFX0UtMyxST0xFX0UtNSxST0xFX0UtNFwiIiwiaXNzIjoiemNnIiwiZXhwIjoxNjQ5NDE1MTQ4fQ._hAHc1-yTUN5DZGQ2e_2O1NXn4tPbyh9OYPqUAvSkjE0vfuqyAUwUz9mOa-Yz9k_VLmTtKArRmkXf3Fjvj1xBQ' // 让每个请求携带自定义 token 请根据实际情况自行修改
config.headers.BrowserHeader = 'H5' // config.headers.BrowserHeader = 'H5'
return config return config
}, error => { }, error => {
...@@ -36,6 +36,7 @@ axios.interceptors.request.use(config => { ...@@ -36,6 +36,7 @@ axios.interceptors.request.use(config => {
}); });
//http response 拦截,此处用到es6 Promise //http response 拦截,此处用到es6 Promise
axios.interceptors.response.use(res => { axios.interceptors.response.use(res => {
console.log('请求拦截', res)
//获取状态码 //获取状态码
// const status = res.data.code || res.status; // const status = res.data.code || res.status;
...@@ -55,7 +56,6 @@ axios.interceptors.response.use(res => { ...@@ -55,7 +56,6 @@ axios.interceptors.response.use(res => {
// } // }
return res; return res;
}, error => { }, error => {
return Promise.reject(new Error(error)); return Promise.reject(new Error(error));
}); });
......
...@@ -104,17 +104,19 @@ export default { ...@@ -104,17 +104,19 @@ export default {
// console.log(track.getSettings()) // console.log(track.getSettings())
// console.log('----------------------------------------------------------------') // console.log('----------------------------------------------------------------')
// }) // })
console.log('111 完成')
} else { } else {
// 避免在新的浏览器中使用它,因为它正在被弃用。 // 避免在新的浏览器中使用它,因为它正在被弃用。
_this.thisVideo.src = window.URL.createObjectURL(stream) _this.thisVideo.src = window.URL.createObjectURL(stream)
} }
_this.thisVideo.onloadedmetadata = function () { _this.thisVideo.onloadedmetadata = function () {
_this.thisVideo.play() _this.thisVideo.play()
console.log('222 完成')
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
}, },
// 绘制图片(拍照功能) // 绘制图片(拍照功能)
setImage () { setImage () {
...@@ -155,10 +157,21 @@ export default { ...@@ -155,10 +157,21 @@ export default {
}, },
//切换本地摄像头 //切换本地摄像头
changePhoto () { changePhoto () {
/**
* 需要浏览器权限
* chrome://flags/#unsafely-treat-insecure-origin-as-secure
* chrome://flags/#block-insecure-private-network-requests(大概不需要)
*/
/**得到所有的设备*/ /**得到所有的设备*/
let _this = this let _this = this
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {
console.log("不支持 enumerateDevices()");
return;
}
// navigator.mediaDevices.getUserMedia({ video: true })
navigator.mediaDevices.enumerateDevices() navigator.mediaDevices.enumerateDevices()
.then((devices) => { .then((devices) => {
console.log(devices, 'devices设备列表')
devices.forEach((device) => { devices.forEach((device) => {
if (device.kind == 'videoinput') { if (device.kind == 'videoinput') {
_this.videoArr.push({ _this.videoArr.push({
...@@ -181,9 +194,7 @@ export default { ...@@ -181,9 +194,7 @@ export default {
}, },
// 切换摄像头 // 切换摄像头
changeFacingMode () { changeFacingMode () {
this.stopNavigator() // 切换先关闭 this.stopNavigator() // 切换先关闭
if (this.sxtIding < this.videoArr.length - 1) { if (this.sxtIding < this.videoArr.length - 1) {
this.sxtIding++ this.sxtIding++
} else { } else {
......
...@@ -512,7 +512,7 @@ export default { ...@@ -512,7 +512,7 @@ export default {
self.scwj() self.scwj()
self.uploadFile() self.uploadFile()
// 导出文件到本地 --- 前端导出文件到本地 // 导出文件到本地 --- 前端导出文件到本地
// let filenameexport = self.$route.params.rybh // let filenameexport = self.$route.params.rybh
// let filenameexport = 'makabaka' // let filenameexport = 'makabaka'
......
...@@ -44,14 +44,14 @@ module.exports = { ...@@ -44,14 +44,14 @@ module.exports = {
}, },
productionSourceMap: false, //关闭生产映射 productionSourceMap: false, //关闭生产映射
devServer: { devServer: {
// port: 9101, port: 9101,
overlay: { overlay: {
warnings: false, warnings: false,
errors: false errors: false
}, },
proxy: { proxy: {
"/api": { "/api": {
target: "http://172.18.109.63:8099/", //统一的请求头部每次修改都要重启才会生效 target: "http://172.18.109.63:8091/", //统一的请求头部每次修改都要重启才会生效
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment