Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bh_face_counter
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
黄天晨
bh_face_counter
Commits
953db527
Commit
953db527
authored
Aug 27, 2024
by
清晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8.27提交 判断banSmoke该门店是否能售卖香烟
parent
daa61daf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
admin.js
src/models/admin.js
+5
-0
CounterMixins.js
src/pages/CounterMixins.js
+8
-0
No files found.
src/models/admin.js
View file @
953db527
...
@@ -73,6 +73,11 @@ export default {
...
@@ -73,6 +73,11 @@ export default {
}
else
{
}
else
{
yield
call
(
AsyncStorage
.
setItem
,
'isInduction'
,
'0'
);
yield
call
(
AsyncStorage
.
setItem
,
'isInduction'
,
'0'
);
}
}
if
(
data
.
data
&&
data
.
data
.
banSmoke
)
{
yield
call
(
AsyncStorage
.
setItem
,
'banSmoke'
,
'1'
);
}
else
{
yield
call
(
AsyncStorage
.
setItem
,
'banSmoke'
,
'0'
);
}
if
(
action
.
key
)
{
if
(
action
.
key
)
{
yield
call
(
AsyncStorage
.
setItem
,
'KEY'
,
action
.
key
);
yield
call
(
AsyncStorage
.
setItem
,
'KEY'
,
action
.
key
);
}
}
...
...
src/pages/CounterMixins.js
View file @
953db527
...
@@ -97,11 +97,13 @@ const CounterMixins = ComposeComponent => {
...
@@ -97,11 +97,13 @@ const CounterMixins = ComposeComponent => {
const
stype
=
await
AsyncStorage
.
getItem
(
'STYPE'
);
const
stype
=
await
AsyncStorage
.
getItem
(
'STYPE'
);
const
qrHost
=
await
AsyncStorage
.
getItem
(
'QRHOST'
);
const
qrHost
=
await
AsyncStorage
.
getItem
(
'QRHOST'
);
const
isInduction
=
await
AsyncStorage
.
getItem
(
'isInduction'
);
const
isInduction
=
await
AsyncStorage
.
getItem
(
'isInduction'
);
const
banSmoke
=
await
AsyncStorage
.
getItem
(
'banSmoke'
);
await
this
.
setState
({
await
this
.
setState
({
qrHost
,
qrHost
,
stype
,
stype
,
isInduction
:
isInduction
===
'1'
,
isInduction
:
isInduction
===
'1'
,
human
:
human
===
'1'
,
human
:
human
===
'1'
,
banSmoke
:
banSmoke
===
'1'
,
});
});
};
};
...
@@ -857,6 +859,12 @@ const CounterMixins = ComposeComponent => {
...
@@ -857,6 +859,12 @@ const CounterMixins = ComposeComponent => {
}
}
}
}
}
}
if
(
data
.
data
.
category
&&
data
.
data
.
category
.
search
(
'烟'
)
!==
-
1
)
{
if
(
this
.
state
.
banSmoke
)
{
Speech
.
speak
(
'云值守模式下不允许售卖香烟,请把香烟放回原位'
);
return
;
}
}
let
price
=
Number
(
data
.
data
.
price
||
data
.
data
.
prePrice
);
let
price
=
Number
(
data
.
data
.
price
||
data
.
data
.
prePrice
);
if
(
data
.
code
===
1
&&
price
>
0
&&
!
stopSpecial
)
{
if
(
data
.
code
===
1
&&
price
>
0
&&
!
stopSpecial
)
{
if
(
!
data
.
data
.
num
)
{
if
(
!
data
.
data
.
num
)
{
...
...
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