Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5
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
vanke
h5
Commits
0521542a
Commit
0521542a
authored
Jul 03, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存统计,领用记录,库存统计,领用详情
parent
8d09c601
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
scan.vue
src/views/Admin/scan.vue
+8
-6
No files found.
src/views/Admin/scan.vue
View file @
0521542a
...
...
@@ -56,11 +56,12 @@ export default {
},
methods
:
{
init
()
{
window
.
qing
.
call
(
'scanQRCode'
,
{
needResult
:
0
,
success
:
function
(
result
)
{
alert
(
'初始化'
+
result
)
}
window
.
qing
.
config
({
debug
:
true
,
// 声明需要调用的API
jsApiList
:
[
'scanQRCode'
]
// 声明需要监听的事件,声明后可通过 document.addEventListener 绑定监听函数
// jsEventList: ['appear', 'disappear']
})
},
// 员工二维码扫描
...
...
@@ -68,7 +69,7 @@ export default {
window
.
qing
.
call
(
'scanQRCode'
,
{
needResult
:
1
,
success
:
function
(
result
)
{
alert
(
'成功'
+
result
.
data
)
alert
(
'成功'
+
result
.
data
.
qrcode_str
)
const
data
=
JSON
.
parse
(
result
.
data
)
checkQcode
(
data
).
then
(
res
=>
{
console
.
log
(
'校验结果'
,
res
)
...
...
@@ -104,6 +105,7 @@ export default {
window
.
qing
.
call
(
'scanQRCode'
,
{
needResult
:
1
,
success
:
function
(
result
)
{
alert
(
'物品'
+
result
.
data
.
qrcode_str
)
// result.data = '{"barCode":"f7c3af254e5a40caaf7dab1b06fd7a1c","memberId":53}'
// const data = JSON.parse(result.data)
getGoodsInfo
({
barCode
:
result
.
data
.
qrcode_str
}).
then
(
res
=>
{
...
...
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