Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_web_vue
Project
Project
Details
Activity
Releases
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
张伯涛
91isoft_web_vue
Commits
27040a15
Commit
27040a15
authored
Mar 05, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
2d4bc7ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
ResizeHandler.js
src/layout/mixin/ResizeHandler.js
+1
-1
WebViewContact.js
src/utils/WebViewContact.js
+9
-0
index.vue
src/views/setup/index.vue
+18
-3
vue.config.js
vue.config.js
+1
-1
No files found.
src/layout/mixin/ResizeHandler.js
View file @
27040a15
import
store
from
'@/store'
import
store
from
'@/store'
const
{
body
}
=
document
const
{
body
}
=
document
const
WIDTH
=
9
9
2
// refer to Bootstrap's responsive design
const
WIDTH
=
92
// refer to Bootstrap's responsive design
export
default
{
export
default
{
watch
:
{
watch
:
{
...
...
src/utils/WebViewContact.js
View file @
27040a15
...
@@ -8,6 +8,14 @@ export const openCamera = (params) => {
...
@@ -8,6 +8,14 @@ export const openCamera = (params) => {
})
})
})
})
}
}
// 拍照取相册
export
const
openCameraStorage
=
(
params
)
=>
{
return
new
Promise
(
resolve
=>
{
DS_BRIDGE
.
call
(
'openCameraStorage'
,
params
,
res
=>
{
resolve
(
res
)
})
})
}
// 扫码
// 扫码
export
const
openScan
=
(
params
)
=>
{
export
const
openScan
=
(
params
)
=>
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
...
@@ -19,5 +27,6 @@ export const openScan = (params) => {
...
@@ -19,5 +27,6 @@ export const openScan = (params) => {
export
const
WebView
=
{
export
const
WebView
=
{
openCamera
,
openCamera
,
openCameraStorage
,
openScan
openScan
}
}
src/views/setup/index.vue
View file @
27040a15
...
@@ -3,22 +3,28 @@
...
@@ -3,22 +3,28 @@
<div
class=
"button_row"
>
<div
class=
"button_row"
>
<el-button
type=
"primary"
@
click=
"handleOpenScan"
>
扫码
</el-button>
<el-button
type=
"primary"
@
click=
"handleOpenScan"
>
扫码
</el-button>
<el-button
type=
"primary"
@
click=
"handleTakePhotos"
>
拍照
</el-button>
<el-button
type=
"primary"
@
click=
"handleTakePhotos"
>
拍照
</el-button>
<el-button
type=
"primary"
@
click=
"handleTakePhotosAlbum"
>
拍照取相册
</el-button>
</div>
</div>
<div
class=
"button_row"
>
<div
class=
"button_row"
>
<el-button
type=
"primary"
@
click=
"handleOutbound"
>
出库
</el-button>
<el-button
type=
"primary"
@
click=
"handleOutbound"
>
出库
</el-button>
<el-button
type=
"primary"
>
入库
</el-button>
<el-button
type=
"primary"
>
入库
</el-button>
</div>
</div>
<div>
扫码获取:
<span>
{{
scanCode
}}
</span></div>
<div>
扫码获取:
<span>
{{
scanCode
}}
</span></div>
<div
style=
"margin-top: 50px"
>
拍照获取:
<img
:src=
"imgUrlForm.url"
class=
"sidebar-logo"
></div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
import
{
openCameraStorage
}
from
"@/utils/WebViewContact"
;
export
default
{
export
default
{
name
:
'Index'
,
name
:
'Index'
,
data
()
{
data
()
{
return
{
return
{
scanCode
:
''
,
scanCode
:
''
,
imgUrlForm
:
{
}
}
}
},
},
created
()
{
created
()
{
...
@@ -35,13 +41,22 @@ export default {
...
@@ -35,13 +41,22 @@ export default {
},
},
/** 拍照按钮*/
/** 拍照按钮*/
handleTakePhotos
()
{
handleTakePhotos
()
{
console
.
log
(
'调用前'
,
getToken
())
console
.
log
(
'调用前'
,
getToken
())
const
params
=
{
const
params
=
{
flag
:
'openCamera'
,
flag
:
'openCamera'
,
tokenMsg
:
getToken
()
tokenMsg
:
getToken
()
}
}
this
.
$WebView
.
openCamera
(
params
).
then
(
res
=>
{
this
.
$WebView
.
openCamera
(
params
).
then
(
res
=>
{
console
.
log
(
'拍照'
,
res
)
this
.
imgUrlForm
=
JSON
.
parse
(
res
)
})
},
/** 拍照取相册按钮*/
handleTakePhotosAlbum
()
{
const
params
=
{
tokenMsg
:
getToken
()
}
this
.
$WebView
.
openCameraStorage
(
params
).
then
(
res
=>
{
this
.
imgUrlForm
=
JSON
.
parse
(
res
)
})
})
},
},
handleOutbound
()
{
handleOutbound
()
{
...
...
vue.config.js
View file @
27040a15
...
@@ -85,7 +85,7 @@ module.exports = {
...
@@ -85,7 +85,7 @@ module.exports = {
// target: `http://117.122.212.91:32012/`,
// target: `http://117.122.212.91:32012/`,
// target: `http://192.168.1.31:8082/`,
// target: `http://192.168.1.31:8082/`,
// target: `http://192.168.1.12:8082/`, // 孙浩
// target: `http://192.168.1.12:8082/`, // 孙浩
// target: `http://192.168.1.
14
:8082/`,
// target: `http://192.168.1.
41
:8082/`,
target
:
`http://49.232.167.247:20014/`
,
// 线上
target
:
`http://49.232.167.247:20014/`
,
// 线上
// target: `http://192.168.1.30:8082/`,
// target: `http://192.168.1.30:8082/`,
// changeOrigin: true,
// changeOrigin: true,
...
...
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