Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 457925f2
authored
Nov 15, 2023
by
李乾广
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改bug
1 parent
dbfcf319
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
h5/src/api/http.js
h5/src/views/extension/index.vue
h5/src/api/http.js
View file @
457925f
import
axios
from
'axios'
import
{
Toast
}
from
'vant'
;
const
baseURL
=
'https://
store.keliuyun
.com'
;
const
baseURL
=
'https://
patrol.huian365
.com'
;
const
Axios
=
axios
.
create
({
baseURL
:
process
.
env
.
NODE_ENV
===
'production'
?
''
:
baseURL
,
// 因为我本地做了反向代理
timeout
:
0
,
...
...
h5/src/views/extension/index.vue
View file @
457925f
...
...
@@ -222,6 +222,12 @@ export default {
// let regPng = new RegExp('data:image/png;base64,');
// let pic = imgData.replace(reg, '')
// pic = pic.replace(regPng, '')
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'加载中'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
let
par
=
{
restaurantName
:
this
.
params
.
gateName
,
fileData
:
imgData
,
...
...
@@ -229,7 +235,7 @@ export default {
// console.log(par)
this
.
$axios
({
method
:
'post'
,
url
:
process
.
env
.
NODE_ENV
===
'production'
?
`/api/v1/upload_images`
:
`/qxh/api/v1/upload_images`
,
url
:
process
.
env
.
NODE_ENV
===
'production'
?
`
https://openapi.huian365.com
/api/v1/upload_images`
:
`/qxh/api/v1/upload_images`
,
data
:
par
,
headers
:{
accessKeyid
:
'ca8e162ca2c9263a8f32882feea9d506'
,
...
...
@@ -238,9 +244,21 @@ export default {
}).
then
((
res
)
=>
{
// console.log(res)
if
(
res
.
data
.
code
===
0
)
{
setTimeout
(()
=>
{
loading
.
close
();
},
5000
);
// 跳转页面
// console.log(`http://dining-sit.huian365.com/camera/CameraReport?userKey=${this.params.userKey}&restaurantId=${this.params.restaurantId}&imgUrl=${encodeURIComponent(res.data.data)}`)
window
.
open
(
`http://dining-sit.huian365.com/camera/CameraReport?userKey=
${
this
.
params
.
userKey
}
&restaurantId=
${
this
.
params
.
restaurantId
}
&imgUrl=
${
encodeURIComponent
(
res
.
data
.
data
)}
`
)
// window.open(`http://dining-sit.huian365.com/camera/CameraReport?userKey=${this.params.userKey}&restaurantId=${this.params.restaurantId}&imgUrl=${encodeURIComponent(res.data.data)}`)
const
strUrl
=
`http://dining-sit.huian365.com/camera/CameraReport?userKey=
${
this
.
params
.
userKey
}
&restaurantId=
${
this
.
params
.
restaurantId
}
&imgUrl=
${
encodeURIComponent
(
res
.
data
.
data
)}
`
// const a = document.createElement('a')
// a.style = 'display: none'
// a.target = '_blank'
// a.href = strUrl
// a.click()
// document.body.append(a)
// document.body.removeChild(a)
window
.
location
.
href
=
strUrl
}
else
{
this
.
$message
({
message
:
'截图失败'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment