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
de618f1d
Commit
de618f1d
authored
Apr 24, 2024
by
黄日华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收银程序横屏兼容
parent
75151180
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
HomeLayout.js
src/components/HomeLayout.js
+12
-0
AuthPage.js
src/pages/AuthPage.js
+4
-6
No files found.
src/components/HomeLayout.js
View file @
de618f1d
...
...
@@ -19,6 +19,18 @@ class HomeLayout extends Component {
source
=
{
require
(
'../assets/Vertical/24h.png'
)}
/
>
<
Text
style
=
{
styles
.
titleText
}
>
{
appName
}
<
/Text
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'flex-end'
,
alignItems
:
'flex-end'
,
paddingRight
:
25
,
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'#ccc'
}}
>
{
width
}
-
{
height
}
<
/Text
>
<
/View
>
<
/View
>
{
this
.
props
.
children
}
<
/View
>
...
...
src/pages/AuthPage.js
View file @
de618f1d
...
...
@@ -11,11 +11,10 @@ const {width, height} = Dimensions.get('window');
class
AuthPage
extends
Component
{
state
=
{
isLandscape
:
false
,
socket
:
''
,
};
async
componentDidMount
()
{
this
.
setState
({
isLandscape
:
width
>
height
});
this
.
socket
=
io
(
axios
.
defaults
.
baseURL
);
this
.
socket
.
on
(
'storeAuth'
,
this
.
handleLogin
);
this
.
socket
.
on
(
'connect'
,
()
=>
{
...
...
@@ -33,16 +32,15 @@ class AuthPage extends Component {
};
render
()
{
const
{
socket
,
isLandscape
}
=
this
.
state
;
console
.
warn
(
width
,
height
);
const
{
socket
}
=
this
.
state
;
return
(
<
HomeLayout
>
<
View
style
=
{
styles
.
qrcode
}
>
<
QRCode
size
=
{
isLandscape
?
scaleSize
(
height
*
0.35
)
:
scaleSize
(
700
)}
size
=
{
width
>
height
?
scaleSize
(
height
*
0.2
)
:
scaleSize
(
700
)}
logo
=
{
require
(
'../assets/logo.png'
)}
backgroundColor
=
"white"
value
=
{
`
${
config
.
qrHost
}
/#/store-auth-
${
socket
}
`
}
value
=
{
`
${
config
.
qrHost
}
/#/store-auth-
${
socket
||
''
}
`
}
/
>
<
/View
>
<
/HomeLayout
>
...
...
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