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
fb4bf56c
Commit
fb4bf56c
authored
Mar 07, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
1a46d45b
bb546863
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
21 deletions
+30
-21
BarCode.scss
src/pages/BarCode/BarCode.scss
+4
-0
BarCode.tsx
src/pages/BarCode/BarCode.tsx
+15
-13
Home.tsx
src/pages/Home/Home.tsx
+6
-2
OrderPayway.tsx
src/pages/Order/components/OrderPayway/OrderPayway.tsx
+5
-6
No files found.
src/pages/BarCode/BarCode.scss
View file @
fb4bf56c
...
...
@@ -41,9 +41,13 @@
height
:
52px
;
}
.BarCodeCav
{
display
:
none
;
width
:
100%
;
height
:
100%
;
}
.BarCodeCav.show
{
display
:
block
;
}
.toggleBtn
{
position
:
absolute
;
right
:
0
;
...
...
src/pages/BarCode/BarCode.tsx
View file @
fb4bf56c
...
...
@@ -186,29 +186,24 @@ class BarCode extends Component {
}
payDoneHandle
()
{
const
{
showBig
}
=
this
.
state
;
this
.
setState
(
{
showPayOrder
:
false
,
},
()
=>
{
this
.
drawBarCode
(
showBig
);
this
.
drawBarCode
();
},
);
}
drawBarCode
(
showBig
:
boolean
)
{
drawBarCode
()
{
const
{
userinfo
}
=
this
.
props
;
let
idBar
=
userinfo
.
idBar
.
substring
(
0
,
userinfo
.
idBar
.
length
-
2
)
+
'04'
;
if
(
showBig
)
{
wxbarcode
.
barcode
(
'BarCode'
,
idBar
,
700
,
188
);
}
else
{
wxbarcode
.
barcode
(
'BarCode'
,
idBar
,
700
,
364
);
}
wxbarcode
.
barcode
(
'BarCode'
,
idBar
,
646
,
188
);
wxbarcode
.
barcode
(
'BarCodeBig'
,
idBar
,
700
,
364
);
}
toggleBigBarCode
()
{
const
{
showBig
}
=
this
.
state
;
this
.
drawBarCode
(
showBig
);
this
.
setState
({
showBig
:
!
showBig
,
});
...
...
@@ -222,7 +217,7 @@ class BarCode extends Component {
updateUserInfo
({
idBar
:
data
,
});
this
.
drawBarCode
(
false
);
this
.
drawBarCode
();
})
.
catch
(
err
=>
{
Taro
.
showToast
({
...
...
@@ -267,11 +262,18 @@ class BarCode extends Component {
onClick=
{
this
.
refreshCodeBar
}
/>
)
}
<
View
className=
{
`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`
}
>
{
showPayOrder
?
null
:
(
<
Canvas
className=
'BarCodeCav'
canvasId=
'BarCode'
/>
)
}
<
View
className=
{
`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`
}
>
<
Canvas
className=
{
`BarCodeCav ${showBig ? 'show' : ''}`
}
canvasId=
'BarCodeBig'
/>
<
Canvas
className=
{
`BarCodeCav ${showBig ? '' : 'show'}`
}
canvasId=
'BarCode'
/>
</
View
>
)
}
<
View
className=
'toggleBtn'
onClick=
{
this
.
toggleBigBarCode
}
>
{
showBig
?
'缩小'
:
'放大'
}
</
View
>
...
...
src/pages/Home/Home.tsx
View file @
fb4bf56c
...
...
@@ -229,12 +229,16 @@ class Home extends Component {
<
View
className=
'Home-UserBox-BeanItem'
>
<
Image
className=
'Home-UserBox-BeanIcon'
src=
{
HBeanIcon
}
/>
<
Text
>
吹风豆:
</
Text
>
<
Text
className=
'Home-UserBox-BeanCount'
>
{
hairDryerBean
}
</
Text
>
<
Text
className=
'Home-UserBox-BeanCount'
>
{
hairDryerBean
.
toFixed
(
2
)
}
</
Text
>
</
View
>
<
View
className=
'Home-UserBox-BeanItem'
>
<
Image
className=
'Home-UserBox-BeanIcon'
src=
{
TBeanIcon
}
/>
<
Text
>
通用豆:
</
Text
>
<
Text
className=
'Home-UserBox-BeanCount'
>
{
commBean
}
</
Text
>
<
Text
className=
'Home-UserBox-BeanCount'
>
{
commBean
.
toFixed
(
2
)
}
</
Text
>
</
View
>
</
View
>
<
View
className=
'Home-UserBox-Order'
>
...
...
src/pages/Order/components/OrderPayway/OrderPayway.tsx
View file @
fb4bf56c
...
...
@@ -165,23 +165,22 @@ class OrderPayway extends Component {
}).
toString
(
Utf8
),
);
console
.
log
(
payData
);
Taro
.
requestPayment
({
timeStamp
:
payData
.
msg
.
timeStamp
.
toString
(),
nonceStr
:
payData
.
msg
.
nonceStr
,
package
:
payData
.
msg
.
package
,
signType
:
payData
.
msg
.
signType
,
paySign
:
payData
.
msg
.
paySign
,
success
(
res
)
{
})
.
then
(
res
=>
{
console
.
log
(
res
);
onPayDoneCallback
();
}
,
fail
(
res
)
{
}
)
.
catch
(
err
=>
{
Taro
.
showToast
({
title
:
res
.
msg
||
'发起支付失败'
,
title
:
err
.
msg
||
'发起支付失败'
,
icon
:
'none'
,
});
},
});
}
else
{
onPayDoneCallback
();
...
...
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