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
7bf9a3f4
Commit
7bf9a3f4
authored
Apr 19, 2023
by
黄日华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整付款后开门离店提示时间
调整呼叫客服弹窗时间
parent
29aecaab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
42 deletions
+54
-42
CounterMixins.js
src/pages/CounterMixins.js
+47
-35
VerticalPage.js
src/pages/VerticalPage.js
+7
-7
No files found.
src/pages/CounterMixins.js
View file @
7bf9a3f4
...
@@ -465,31 +465,30 @@ const CounterMixins = ComposeComponent => {
...
@@ -465,31 +465,30 @@ const CounterMixins = ComposeComponent => {
successPay
=
async
balance
=>
{
successPay
=
async
balance
=>
{
Toast
.
hide
();
Toast
.
hide
();
const
{
goodsArr
}
=
this
.
state
;
const
{
goodsArr
}
=
this
.
state
;
let
total
=
0
;
// let total = 0;
let
totalNum
=
0
;
// let totalNum = 0;
goodsArr
.
map
(
item
=>
{
// goodsArr.map(item => {
totalNum
+=
Number
(
item
.
num
);
// totalNum += Number(item.num);
if
(
item
.
price
)
{
// if (item.price) {
total
+=
Number
(
item
.
price
)
*
Number
(
item
.
num
);
// total += Number(item.price) * Number(item.num);
}
else
{
// } else {
total
+=
Number
(
item
.
prePrice
)
*
Number
(
item
.
num
);
// total += Number(item.prePrice) * Number(item.num);
}
// }
});
// });
// const msg = balance
// const msg = '付款' + total + '元,共' + totalNum + '件商品,祝您生活愉快';
// ? '余额付款成功,祝您生活愉快~'
// : '付款成功,祝您生活愉快~';
const
msg
=
'付款'
+
total
+
'元,共'
+
totalNum
+
'件商品,祝您生活愉快'
;
this
.
props
.
dispatch
({
this
.
props
.
dispatch
({
// 购物完成步骤
// 购物完成步骤
type
:
'app/step'
,
type
:
'app/step'
,
step
:
3
,
step
:
3
,
});
});
this
.
setState
({
voiceModal
:
true
,
voiceTitle
:
msg
});
// this.setState({voiceModal: true, voiceTitle: msg});
Speech
.
speak
(
msg
);
Speech
.
speak
(
'付款成功'
);
if
(
this
.
state
.
stype
===
'guard'
)
{
this
.
showLeaveModal
();
}
else
{
this
.
storeSetting
(
goodsArr
);
this
.
storeSetting
(
goodsArr
);
await
wait
(
1500
);
this
.
onLucky
();
this
.
onLucky
();
await
wait
(
1500
);
}
this
.
clearList
();
this
.
clearList
();
};
};
...
@@ -552,7 +551,7 @@ const CounterMixins = ComposeComponent => {
...
@@ -552,7 +551,7 @@ const CounterMixins = ComposeComponent => {
showLeaveModal
=
()
=>
{
showLeaveModal
=
()
=>
{
if
(
this
.
state
.
stype
===
'guard'
)
{
if
(
this
.
state
.
stype
===
'guard'
)
{
Speech
.
speak
(
'请点击
开门离店或者再逛一逛继续购物
'
);
Speech
.
speak
(
'请点击
收银界面开门离店按钮,离开门店
'
);
this
.
setState
({
cloudFinishModal
:
true
});
this
.
setState
({
cloudFinishModal
:
true
});
clearTimeout
(
this
.
leaveModalTimeout
);
clearTimeout
(
this
.
leaveModalTimeout
);
this
.
leaveModalTimeout
=
setTimeout
(()
=>
{
this
.
leaveModalTimeout
=
setTimeout
(()
=>
{
...
@@ -1053,7 +1052,7 @@ const CounterMixins = ComposeComponent => {
...
@@ -1053,7 +1052,7 @@ const CounterMixins = ComposeComponent => {
});
});
const
{
stype
}
=
this
.
state
;
const
{
stype
}
=
this
.
state
;
if
(
stype
===
'guard'
)
{
if
(
stype
===
'guard'
)
{
Speech
.
speak
(
'请点击
开门离店或者再逛一逛继续购物
'
);
Speech
.
speak
(
'请点击
收银界面开门离店按钮,离开门店
'
);
this
.
setState
({
this
.
setState
({
cloudFinishModal
:
true
,
cloudFinishModal
:
true
,
});
});
...
@@ -1245,11 +1244,18 @@ const CounterMixins = ComposeComponent => {
...
@@ -1245,11 +1244,18 @@ const CounterMixins = ComposeComponent => {
<
/Modal
>
<
/Modal
>
<
Modal
visible
=
{
cloudFinishModal
}
transparent
>
<
Modal
visible
=
{
cloudFinishModal
}
transparent
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'center'
,
marginBottom
:
10
,
}}
>
<
Image
<
Image
style
=
{{
style
=
{{
width
:
100
,
width
:
100
,
height
:
100
,
height
:
100
,
marginLeft
:
'5%'
,
marginLeft
:
-
10
,
marginTop
:
-
18
,
resizeMode
:
'contain'
,
resizeMode
:
'contain'
,
alignSelf
:
'flex-start'
,
alignSelf
:
'flex-start'
,
}}
}}
...
@@ -1259,23 +1265,30 @@ const CounterMixins = ComposeComponent => {
...
@@ -1259,23 +1265,30 @@ const CounterMixins = ComposeComponent => {
style
=
{{
style
=
{{
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
marginTop
:
-
30
,
flex
:
1
,
}}
>
}}
>
<
Text
style
=
{{
color
:
'#000000'
,
fontSize
:
26
}}
>
云值守店
<
/Text
>
<
Text
style
=
{{
color
:
'#000000'
,
fontSize
:
28
}}
>
云值守店
<
/Text
>
<
/View
>
<
/View
>
<
Touch
<
Touch
onPress
=
{()
=>
this
.
onCloseCloudFinish
()}
onPress
=
{()
=>
this
.
onCloseCloudFinish
()}
style
=
{{
style
=
{{
width
:
'90%'
,
width
:
100
,
height
:
70
,
height
:
100
,
borderRadius
:
5
,
justifyContent
:
'flex-start'
,
justifyContent
:
'center'
,
alignItems
:
'flex-end'
,
alignItems
:
'center'
,
backgroundColor
:
'#FC4000'
,
marginTop
:
40
,
}}
>
}}
>
<
Text
style
=
{{
color
:
'#ffffff'
,
fontSize
:
22
}}
>
再逛一逛
<
/Text
>
<
Image
style
=
{{
width
:
30
,
height
:
30
,
marginRight
:
-
8
,
marginTop
:
-
16
,
resizeMode
:
'contain'
,
}}
source
=
{
require
(
'../assets/close.png'
)}
/
>
<
/Touch
>
<
/Touch
>
<
/View
>
<
Touch
<
Touch
onPress
=
{()
=>
this
.
onOpen
()}
onPress
=
{()
=>
this
.
onOpen
()}
style
=
{{
style
=
{{
...
@@ -1284,11 +1297,10 @@ const CounterMixins = ComposeComponent => {
...
@@ -1284,11 +1297,10 @@ const CounterMixins = ComposeComponent => {
borderRadius
:
5
,
borderRadius
:
5
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'#E3DDDD'
,
backgroundColor
:
'#FC4000'
,
marginTop
:
40
,
marginVertical
:
25
,
marginBottom
:
20
,
}}
>
}}
>
<
Text
style
=
{{
color
:
'#
000000
'
,
fontSize
:
22
}}
>
开门离店
<
/Text
>
<
Text
style
=
{{
color
:
'#
ffffff
'
,
fontSize
:
22
}}
>
开门离店
<
/Text
>
<
/Touch
>
<
/Touch
>
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
...
...
src/pages/VerticalPage.js
View file @
7bf9a3f4
...
@@ -376,7 +376,7 @@ class VerticalPage extends Component {
...
@@ -376,7 +376,7 @@ class VerticalPage extends Component {
clearTimeout
(
this
.
callModalTimeout
);
clearTimeout
(
this
.
callModalTimeout
);
this
.
callModalTimeout
=
setTimeout
(()
=>
{
this
.
callModalTimeout
=
setTimeout
(()
=>
{
this
.
setState
({
hintVisible
:
false
});
this
.
setState
({
hintVisible
:
false
});
},
300
000
);
},
12
000
);
};
};
onNoBuy
=
async
()
=>
{
onNoBuy
=
async
()
=>
{
...
@@ -572,7 +572,7 @@ class VerticalPage extends Component {
...
@@ -572,7 +572,7 @@ class VerticalPage extends Component {
},
8000
);
},
8000
);
};
};
show
n
oBuyModal
=
()
=>
{
show
N
oBuyModal
=
()
=>
{
Speech
.
speak
(
'请扫码出店'
);
Speech
.
speak
(
'请扫码出店'
);
this
.
setState
({
noBuyModal
:
true
});
this
.
setState
({
noBuyModal
:
true
});
clearTimeout
(
this
.
nobuyTimeout
);
clearTimeout
(
this
.
nobuyTimeout
);
...
@@ -692,7 +692,7 @@ class VerticalPage extends Component {
...
@@ -692,7 +692,7 @@ class VerticalPage extends Component {
<
Text
style
=
{
styles
.
callText
}
>
呼叫客服
<
/Text
>
<
Text
style
=
{
styles
.
callText
}
>
呼叫客服
<
/Text
>
<
/View
>
<
/View
>
<
/Touch
>
<
/Touch
>
<
Touch
onPress
=
{()
=>
this
.
show
n
oBuyModal
()}
>
<
Touch
onPress
=
{()
=>
this
.
show
N
oBuyModal
()}
>
<
View
style
=
{
styles
.
guardModal_button_nobuy
}
>
<
View
style
=
{
styles
.
guardModal_button_nobuy
}
>
<
Text
style
=
{
styles
.
callText
}
>
无购物出店
<
/Text
>
<
Text
style
=
{
styles
.
callText
}
>
无购物出店
<
/Text
>
<
/View
>
<
/View
>
...
@@ -1266,16 +1266,16 @@ class HintPhone extends React.Component {
...
@@ -1266,16 +1266,16 @@ class HintPhone extends React.Component {
<
Touch
onPress
=
{
closeHint
}
>
<
Touch
onPress
=
{
closeHint
}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
scaleSize
(
2
00
),
width
:
scaleSize
(
3
00
),
height
:
scaleSize
(
65
),
height
:
scaleSize
(
100
),
borderRadius
:
100
,
borderRadius
:
100
,
backgroundColor
:
'#fc4000'
,
backgroundColor
:
'#fc4000'
,
marginTop
:
3
0
,
marginTop
:
2
0
,
display
:
'flex'
,
display
:
'flex'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
}}
>
}}
>
<
Text
style
=
{{
color
:
'#ffffff'
,
fontSize
:
scaleSize
(
3
0
)}}
>
<
Text
style
=
{{
color
:
'#ffffff'
,
fontSize
:
scaleSize
(
3
6
)}}
>
关闭弹窗
关闭弹窗
<
/Text
>
<
/Text
>
<
/View
>
<
/View
>
...
...
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