Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
a33fe7c4
Commit
a33fe7c4
authored
Apr 12, 2022
by
米嘉伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并代码
parent
bfbd3d2f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
src/api/request.js
+2
-2
src/views/rxcj/modules/cj.vue
+14
-3
src/views/rxcj/rxcj.vue
+0
-0
vue.config.js
+2
-2
No files found.
src/api/request.js
View file @
a33fe7c4
...
...
@@ -28,7 +28,7 @@ axios.interceptors.request.use(config => {
}
// config.headers['Authorization'] = 'Security-ceyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIxIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE2NDk0MTE1NDgsImF1dGhvcml0aWVzIjoiXCJST0xFX0IsUk9MRV9DLFJPTEVfRCxST0xFX0UsUk9MRV9GLFJPTEVfRyxST0xFX0ctNSxST0xFX0ItMyxST0xFX0ItMixST0xFX0ItMSxST0xFX0MtNixST0xFX0ktOSxST0xFX0ktMTAsUk9MRV9FLTEsUk9MRV9ELTEsUk9MRV9ILFJPTEVfSSxST0xFX0MtMyxST0xFX0MtNCxST0xFX0MtNSxST0xFX0QtNixST0xFX0QtMTAsUk9MRV9ELTgsUk9MRV9ELTEyLFJPTEVfRC05LFJPTEVfRC03LFJPTEVfRC0xMSxST0xFX0YtMixST0xFX0YtMSxST0xFX0ctMixST0xFX0gtMSxST0xFX0ktMixST0xFX0ktMyxST0xFX0ktMSxST0xFX0ktNCxST0xFX0MtMixST0xFX0MtMSxST0xFX0QtNSxST0xFX0QtNCxST0xFX0QtMixST0xFX0YtMyxST0xFX0YtNCxST0xFX0YtNSxST0xFX0ctMSxST0xFX0ctMyxST0xFX0ktOCxST0xFX0gtMixST0xFX0gtNCxST0xFX0gtNixST0xFX0gtMyxST0xFX0gtNSxST0xFX0ktNixST0xFX0ktNSxST0xFX0ktNyxST0xFX0UtNixST0xFX0UtMixST0xFX0UtMyxST0xFX0UtNSxST0xFX0UtNFwiIiwiaXNzIjoiemNnIiwiZXhwIjoxNjQ5NDE1MTQ4fQ._hAHc1-yTUN5DZGQ2e_2O1NXn4tPbyh9OYPqUAvSkjE0vfuqyAUwUz9mOa-Yz9k_VLmTtKArRmkXf3Fjvj1xBQ' // 让每个请求携带自定义 token 请根据实际情况自行修改
config
.
headers
.
BrowserHeader
=
'H5'
//
config.headers.BrowserHeader = 'H5'
return
config
},
error
=>
{
...
...
@@ -36,6 +36,7 @@ axios.interceptors.request.use(config => {
});
//http response 拦截,此处用到es6 Promise
axios
.
interceptors
.
response
.
use
(
res
=>
{
console
.
log
(
'请求拦截'
,
res
)
//获取状态码
// const status = res.data.code || res.status;
...
...
@@ -55,7 +56,6 @@ axios.interceptors.response.use(res => {
// }
return
res
;
},
error
=>
{
return
Promise
.
reject
(
new
Error
(
error
));
});
...
...
src/views/rxcj/modules/cj.vue
View file @
a33fe7c4
...
...
@@ -104,17 +104,19 @@ export default {
// console.log(track.getSettings())
// console.log('----------------------------------------------------------------')
// })
console
.
log
(
'111 完成'
)
}
else
{
// 避免在新的浏览器中使用它,因为它正在被弃用。
_this
.
thisVideo
.
src
=
window
.
URL
.
createObjectURL
(
stream
)
}
_this
.
thisVideo
.
onloadedmetadata
=
function
()
{
_this
.
thisVideo
.
play
()
console
.
log
(
'222 完成'
)
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// 绘制图片(拍照功能)
setImage
()
{
...
...
@@ -155,10 +157,21 @@ export default {
},
//切换本地摄像头
changePhoto
()
{
/**
* 需要浏览器权限
* chrome://flags/#unsafely-treat-insecure-origin-as-secure
* chrome://flags/#block-insecure-private-network-requests(大概不需要)
*/
/**得到所有的设备*/
let
_this
=
this
if
(
!
navigator
.
mediaDevices
||
!
navigator
.
mediaDevices
.
enumerateDevices
)
{
console
.
log
(
"不支持 enumerateDevices()"
);
return
;
}
// navigator.mediaDevices.getUserMedia({ video: true })
navigator
.
mediaDevices
.
enumerateDevices
()
.
then
((
devices
)
=>
{
console
.
log
(
devices
,
'devices设备列表'
)
devices
.
forEach
((
device
)
=>
{
if
(
device
.
kind
==
'videoinput'
)
{
_this
.
videoArr
.
push
({
...
...
@@ -181,9 +194,7 @@ export default {
},
// 切换摄像头
changeFacingMode
()
{
this
.
stopNavigator
()
// 切换先关闭
if
(
this
.
sxtIding
<
this
.
videoArr
.
length
-
1
)
{
this
.
sxtIding
++
}
else
{
...
...
src/views/rxcj/rxcj.vue
View file @
a33fe7c4
vue.config.js
View file @
a33fe7c4
...
...
@@ -44,14 +44,14 @@ module.exports = {
},
productionSourceMap
:
false
,
//关闭生产映射
devServer
:
{
//
port: 9101,
port
:
9101
,
overlay
:
{
warnings
:
false
,
errors
:
false
},
proxy
:
{
"/api"
:
{
target
:
"http://172.18.109.63:809
9
/"
,
//统一的请求头部每次修改都要重启才会生效
target
:
"http://172.18.109.63:809
1
/"
,
//统一的请求头部每次修改都要重启才会生效
ws
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment