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
9c2dae3d
Commit
9c2dae3d
authored
Mar 12, 2021
by
zhonghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单详情页优化
parent
87c48f38
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
loading.gif
src/assets/loading.gif
+0
-0
OrderDetailMini.js
src/components/OrderDetailMini.js
+17
-1
FacePage.js
src/pages/FacePage.js
+16
-3
No files found.
src/assets/loading.gif
0 → 100644
View file @
9c2dae3d
376 KB
src/components/OrderDetailMini.js
View file @
9c2dae3d
...
@@ -186,7 +186,7 @@ class OrderDetailMini extends Component {
...
@@ -186,7 +186,7 @@ class OrderDetailMini extends Component {
<
View
style
=
{
styles
.
line
}
/
>
<
View
style
=
{
styles
.
line
}
/
>
<
View
style
=
{
styles
.
realPay
}
>
<
View
style
=
{
styles
.
realPay
}
>
<
View
style
=
{
styles
.
total
}
>
<
View
style
=
{
styles
.
total
}
>
<
Text
style
=
{
styles
.
totalText
}
>
实付
金额
<
/Text
>
<
Text
style
=
{
styles
.
totalText
}
>
实付
<
/Text
>
<
Text
style
=
{
styles
.
totalText
}
>
<
Text
style
=
{
styles
.
totalText
}
>
¥
{
NP
.
round
(
totalPrice
,
2
).
toFixed
(
2
)}
¥
{
NP
.
round
(
totalPrice
,
2
).
toFixed
(
2
)}
<
/Text
>
<
/Text
>
...
@@ -206,6 +206,9 @@ class OrderDetailMini extends Component {
...
@@ -206,6 +206,9 @@ class OrderDetailMini extends Component {
<
/View
>
<
/View
>
)}
)}
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
loading
}
>
<
Image
source
=
{
require
(
'../assets/loading.gif'
)}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
);
);
...
@@ -214,6 +217,7 @@ class OrderDetailMini extends Component {
...
@@ -214,6 +217,7 @@ class OrderDetailMini extends Component {
const
styles
=
{
const
styles
=
{
modalBackgroundStyle
:
{
modalBackgroundStyle
:
{
position
:
'relative'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'rgba(0, 0, 0, 0.5)'
,
backgroundColor
:
'rgba(0, 0, 0, 0.5)'
,
...
@@ -320,6 +324,7 @@ const styles = {
...
@@ -320,6 +324,7 @@ const styles = {
paddingBottom
:
scaleSize
(
14
),
paddingBottom
:
scaleSize
(
14
),
paddingLeft
:
scaleSize
(
6
),
paddingLeft
:
scaleSize
(
6
),
paddingRight
:
scaleSize
(
50
),
paddingRight
:
scaleSize
(
50
),
marginRight
:
scaleSize
(
-
15
),
},
},
TdText
:
{
TdText
:
{
fontSize
:
setSpText
(
45
),
fontSize
:
setSpText
(
45
),
...
@@ -357,8 +362,19 @@ const styles = {
...
@@ -357,8 +362,19 @@ const styles = {
backgroundColor
:
'#FFF'
,
backgroundColor
:
'#FFF'
,
marginLeft
:
'10%'
,
marginLeft
:
'10%'
,
marginRight
:
'10%'
,
marginRight
:
'10%'
,
marginBottom
:
scaleSize
(
50
),
justifyContent
:
'center'
,
justifyContent
:
'center'
,
},
},
loading
:
{
position
:
'absolute'
,
top
:
850
,
// bottom: 0,
left
:
0
,
right
:
0
,
width
:
scaleSize
(
1150
),
height
:
scaleSize
(
1150
),
resizeMode
:
'contain'
,
},
};
};
export
default
OrderDetailMini
;
export
default
OrderDetailMini
;
src/pages/FacePage.js
View file @
9c2dae3d
...
@@ -42,7 +42,7 @@ class FacePage extends Component {
...
@@ -42,7 +42,7 @@ class FacePage extends Component {
tipsModal
:
false
,
tipsModal
:
false
,
faceType
:
'wxpay'
,
faceType
:
'wxpay'
,
// 屏保模式
// 屏保模式
sleep
:
true
,
//
sleep: true,
loadingModal
:
false
,
loadingModal
:
false
,
qrCode
:
''
,
qrCode
:
''
,
goTipsModal
:
false
,
goTipsModal
:
false
,
...
@@ -53,9 +53,13 @@ class FacePage extends Component {
...
@@ -53,9 +53,13 @@ class FacePage extends Component {
phone
=
''
;
// 监听用户输入手机
phone
=
''
;
// 监听用户输入手机
// 设备类型
// 设备类型
//
sense = true; // 测试即拿刷脸设备
sense
=
true
;
// 测试即拿刷脸设备
async
componentWillMount
()
{
async
componentWillMount
()
{
this
.
goodsCounterInter
=
setInterval
(()
=>
{
this
.
getOrderDetailMiniCounter
();
},
3000
);
this
.
orderDetailMiniPop
(
true
);
this
.
storeKey
=
await
AsyncStorage
.
getItem
(
'KEY'
);
this
.
storeKey
=
await
AsyncStorage
.
getItem
(
'KEY'
);
let
contact
=
await
AsyncStorage
.
getItem
(
'CONTACT'
);
let
contact
=
await
AsyncStorage
.
getItem
(
'CONTACT'
);
let
storeName
=
await
AsyncStorage
.
getItem
(
'NAME'
);
let
storeName
=
await
AsyncStorage
.
getItem
(
'NAME'
);
...
@@ -186,12 +190,20 @@ class FacePage extends Component {
...
@@ -186,12 +190,20 @@ class FacePage extends Component {
* 拉取数据,同步至state
* 拉取数据,同步至state
*/
*/
getOrderDetailMiniCounter
=
async
()
=>
{
getOrderDetailMiniCounter
=
async
()
=>
{
try
{
const
{
data
}
=
await
this
.
props
.
dispatch
({
const
{
data
}
=
await
this
.
props
.
dispatch
({
type
:
'goods/getOrderCounter'
,
type
:
'goods/getOrderCounter'
,
});
});
if
(
data
.
length
!==
0
)
{
this
.
setState
({
this
.
setState
({
goodsArr
:
data
,
goodsArr
:
data
,
});
});
}
else
{
Toast
.
show
(
'数据异常'
);
}
}
catch
(
error
)
{
Toast
.
show
(
'当前网络存在异常'
);
}
};
};
listen
=
async
()
=>
{
listen
=
async
()
=>
{
...
@@ -384,7 +396,7 @@ class FacePage extends Component {
...
@@ -384,7 +396,7 @@ class FacePage extends Component {
this
.
setState
({
tip
:
tipText
,
tipsModal
:
true
,
loadingModal
:
false
});
this
.
setState
({
tip
:
tipText
,
tipsModal
:
true
,
loadingModal
:
false
});
}
else
if
(
this
.
sense
)
{
}
else
if
(
this
.
sense
)
{
this
.
setState
({
loadingModal
:
false
});
this
.
setState
({
loadingModal
:
false
});
if
(
(
ret
.
action
=
'enter'
)
)
{
if
(
ret
.
action
===
'enter'
)
{
this
.
goodsCounterInter
=
setInterval
(()
=>
{
this
.
goodsCounterInter
=
setInterval
(()
=>
{
this
.
getOrderDetailMiniCounter
();
this
.
getOrderDetailMiniCounter
();
},
3000
);
},
3000
);
...
@@ -944,6 +956,7 @@ class FacePage extends Component {
...
@@ -944,6 +956,7 @@ class FacePage extends Component {
const
styles
=
{
const
styles
=
{
content
:
{
content
:
{
position
:
'relative'
,
flex
:
1
,
flex
:
1
,
alignItems
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
...
...
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