Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app
Project
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
姜雷
wx-school-app
Commits
a7b76e53
Commit
a7b76e53
authored
Mar 12, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
3f6cb326
eb8f5c21
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
31 deletions
+39
-31
icon_fangda@2x.png
src/images/barcode/icon_fangda@2x.png
+0
-0
pic_shuaxin@2x.png
src/images/barcode/pic_shuaxin@2x.png
+0
-0
BarCode.scss
src/pages/BarCode/BarCode.scss
+26
-15
BarCode.tsx
src/pages/BarCode/BarCode.tsx
+13
-16
No files found.
src/images/barcode/icon_fangda@2x.png
0 → 100644
View file @
a7b76e53
489 Bytes
src/images/barcode/pic_shuaxin@2x.png
0 → 100644
View file @
a7b76e53
4.37 KB
src/pages/BarCode/BarCode.scss
View file @
a7b76e53
page
{
background-color
:
#eee
;
}
.BarCode
{
.OrderBox
{
box-sizing
:
border-box
;
...
...
@@ -13,9 +16,9 @@
}
.BarCodeBox
{
position
:
relative
;
background-color
:
#fff
;
width
:
100%
;
height
:
260px
;
overflow
:
hidden
;
transition
:
all
0
.28s
;
display
:
flex
;
}
...
...
@@ -28,7 +31,6 @@
flex
:
1
;
margin
:
26px
52px
46px
;
background-color
:
#fff
;
overflow
:
hidden
;
transition
:
all
0
.28s
;
}
.BarCodeImgBig
{
...
...
@@ -36,9 +38,10 @@
}
.BarCodeBox-refresh
{
position
:
absolute
;
right
:
4px
;
width
:
32px
;
height
:
52px
;
right
:
44px
;
bottom
:
-58px
;
width
:
176px
;
height
:
96px
;
}
.BarCodeCav
{
display
:
none
;
...
...
@@ -50,16 +53,24 @@
}
.toggleBtn
{
position
:
absolute
;
right
:
0
;
bottom
:
4px
;
background-color
:
#6180f4
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
left
:
50%
;
bottom
:
0
;
transform
:
translate
(
-50%
,
40px
);
background-color
:
#fff
;
box-sizing
:
border-box
;
width
:
82px
;
height
:
40px
;
line-height
:
40px
;
padding-left
:
20px
;
border-radius
:
20px
0
0
20px
;
font-size
:
24px
;
color
:
#fff
;
width
:
136px
;
height
:
45px
;
border-radius
:
0
0
20px
20px
;
.arricon
{
width
:
24px
;
height
:
24px
;
transition
:
all
400ms
ease-in-out
;
}
.rever
{
transform
:
rotate
(
180deg
);
}
}
}
src/pages/BarCode/BarCode.tsx
View file @
a7b76e53
import
Taro
,
{
Component
}
from
'@tarojs/taro'
;
import
{
ComponentClass
}
from
'react'
;
import
{
View
,
Canvas
,
Image
}
from
'@tarojs/components'
;
import
BarCodeBoxBg
from
'../../images/barcode/tiaoxingma-1.png'
;
import
BarCodeBoxBigBg
from
'../../images/barcode/tiaoxingma-2.png'
;
import
RefreshIcon
from
'../../images/barcode/icon_shuaxin@2x.png'
;
import
RefreshIcon
from
'../../images/barcode/pic_shuaxin@2x.png'
;
import
ArrIcon
from
'../../images/barcode/icon_fangda@2x.png'
;
import
wxbarcode
from
'wxbarcode'
;
import
'./BarCode.scss'
;
...
...
@@ -250,18 +251,11 @@ class BarCode extends Component {
className=
{
`BarCodeBox ${showPayOrder ? 'blur' : ''} ${
showBig ? 'BarCodeBoxBig' : ''
}`
}
>
{
showBig
?
(
<
Image
className=
'bg'
src=
{
BarCodeBoxBigBg
}
/>
)
:
(
<
Image
className=
'bg'
src=
{
BarCodeBoxBg
}
/>
)
}
{
!
showBig
&&
(
<
Image
className=
'BarCodeBox-refresh'
src=
{
RefreshIcon
}
onClick=
{
this
.
refreshCodeBar
}
/>
)
}
<
Image
className=
'BarCodeBox-refresh'
src=
{
RefreshIcon
}
onClick=
{
this
.
refreshCodeBar
}
/>
{
showPayOrder
?
null
:
(
<
View
className=
{
`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`
}
>
<
Canvas
...
...
@@ -275,7 +269,10 @@ class BarCode extends Component {
</
View
>
)
}
<
View
className=
'toggleBtn'
onClick=
{
this
.
toggleBigBarCode
}
>
{
showBig
?
'缩小'
:
'放大'
}
<
Image
className=
{
`arricon ${showBig ? 'rever' : ''}`
}
src=
{
ArrIcon
}
/>
</
View
>
</
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