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
80234996
Commit
80234996
authored
Feb 27, 2023
by
黄日华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
屏保添加无码商品
parent
44751709
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
CounterMixins.js
src/pages/CounterMixins.js
+11
-11
VerticalPage.js
src/pages/VerticalPage.js
+9
-1
No files found.
src/pages/CounterMixins.js
View file @
80234996
...
@@ -71,7 +71,7 @@ const CounterMixins = ComposeComponent => {
...
@@ -71,7 +71,7 @@ const CounterMixins = ComposeComponent => {
cloudFinishModal
:
false
,
cloudFinishModal
:
false
,
noBuyModal
:
false
,
noBuyModal
:
false
,
logoVisible
:
true
,
logoVisible
:
true
,
nobodyVoice
:
tru
e
,
nobodyVoice
:
fals
e
,
};
};
componentWillMount
=
async
()
=>
{
componentWillMount
=
async
()
=>
{
...
@@ -135,7 +135,9 @@ const CounterMixins = ComposeComponent => {
...
@@ -135,7 +135,9 @@ const CounterMixins = ComposeComponent => {
});
});
this
.
printerConnect
();
this
.
printerConnect
();
this
.
listen
();
this
.
listen
();
if
(
this
.
state
.
nobodyVoice
)
{
this
.
guideVoice
();
this
.
guideVoice
();
}
};
};
initSetting
=
()
=>
{
initSetting
=
()
=>
{
...
@@ -153,7 +155,6 @@ const CounterMixins = ComposeComponent => {
...
@@ -153,7 +155,6 @@ const CounterMixins = ComposeComponent => {
type
:
'store/findModuleSetting'
,
type
:
'store/findModuleSetting'
,
group
,
group
,
});
});
console
.
warn
(
data
.
data
);
if
(
data
.
code
===
1
&&
data
.
data
)
{
if
(
data
.
code
===
1
&&
data
.
data
)
{
const
state
=
{
priceVisible
:
data
.
data
.
priceVisible
};
const
state
=
{
priceVisible
:
data
.
data
.
priceVisible
};
if
(
data
.
data
.
cardCounter
)
{
if
(
data
.
data
.
cardCounter
)
{
...
@@ -261,7 +262,6 @@ const CounterMixins = ComposeComponent => {
...
@@ -261,7 +262,6 @@ const CounterMixins = ComposeComponent => {
window
.
socket
.
on
(
window
.
socket
.
on
(
'goodsOperate'
,
'goodsOperate'
,
({
type
,
number
,
row
,
barcode
,
price
})
=>
{
({
type
,
number
,
row
,
barcode
,
price
})
=>
{
console
.
warn
(
'goodsOperate'
,
barcode
);
const
index
=
row
;
const
index
=
row
;
if
(
type
===
'add'
)
{
if
(
type
===
'add'
)
{
// 新增
// 新增
...
@@ -1027,15 +1027,15 @@ const CounterMixins = ComposeComponent => {
...
@@ -1027,15 +1027,15 @@ const CounterMixins = ComposeComponent => {
guideVoice
=
()
=>
{
guideVoice
=
()
=>
{
if
(
this
.
nobodyInter
)
clearInterval
(
this
.
nobodyInter
);
if
(
this
.
nobodyInter
)
clearInterval
(
this
.
nobodyInter
);
//
const that = this;
const
that
=
this
;
this
.
nobodyInter
=
setInterval
(
async
()
=>
{
this
.
nobodyInter
=
setInterval
(
async
()
=>
{
//
if (this.state.nobodyVoice) {
if
(
this
.
state
.
nobodyVoice
)
{
//
await Speech.speak('您好,选购完商品后请到收银机这边付款');
await
Speech
.
speak
(
'您好,选购完商品后请到收银机这边付款'
);
//
await wait(5000);
await
wait
(
5000
);
//
await Speech.speak('请先扫描商品条码,再出示付款码');
await
Speech
.
speak
(
'请先扫描商品条码,再出示付款码'
);
//
} else {
}
else
{
//
clearInterval(that.nobodyInter);
clearInterval
(
that
.
nobodyInter
);
//
}
}
},
45000
);
},
45000
);
this
.
setState
({
this
.
setState
({
nobodyVoice
:
true
,
nobodyVoice
:
true
,
...
...
src/pages/VerticalPage.js
View file @
80234996
...
@@ -706,7 +706,15 @@ class VerticalPage extends Component {
...
@@ -706,7 +706,15 @@ class VerticalPage extends Component {
justifyContent
:
'flex-end'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
}}
>
}}
>
<
View
style
=
{[
styles
.
guardModal_button_call
,
{
opacity
:
0
}]}
/
>
<
Touch
onPress
=
{()
=>
this
.
props
.
handleCodeless
()}
>
<
View
style
=
{[
styles
.
guardModal_button_nobuy
,
{
marginRight
:
50
},
]}
>
<
Text
style
=
{
styles
.
callText
}
>
无码商品
<
/Text
>
<
/View
>
<
/Touch
>
<
Touch
onPress
=
{()
=>
this
.
props
.
handleBarcode
()}
>
<
Touch
onPress
=
{()
=>
this
.
props
.
handleBarcode
()}
>
<
View
style
=
{
styles
.
guardModal_button_nobuy
}
>
<
View
style
=
{
styles
.
guardModal_button_nobuy
}
>
<
Text
style
=
{
styles
.
callText
}
>
输入条码
<
/Text
>
<
Text
style
=
{
styles
.
callText
}
>
输入条码
<
/Text
>
...
...
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