Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app-public
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-public
Commits
82e2e90a
Commit
82e2e90a
authored
Sep 11, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除支付调试页面
parent
6cc8b45d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
56 deletions
+0
-56
app.tsx
src/app.tsx
+0
-1
stringPay.scss
src/pages/stringPay/stringPay.scss
+0
-9
stringPay.tsx
src/pages/stringPay/stringPay.tsx
+0
-46
No files found.
src/app.tsx
View file @
82e2e90a
...
...
@@ -27,7 +27,6 @@ class App extends Component {
'pages/scanEnter/scanEnter'
,
'pages/index/index'
,
'pages/pay/pay'
,
'pages/stringPay/stringPay'
,
],
window
:
{
backgroundTextStyle
:
'light'
,
...
...
src/pages/stringPay/stringPay.scss
deleted
100644 → 0
View file @
6cc8b45d
.stringPay
{
padding
:
20px
;
.stringPay-input
{
width
:
100%
;
height
:
600px
;
border
:
1px
solid
#eee
;
margin-bottom
:
50px
;
}
}
src/pages/stringPay/stringPay.tsx
deleted
100644 → 0
View file @
6cc8b45d
import
'./stringPay.scss'
;
import
Taro
,
{
Component
,
useState
,
useCallback
}
from
'@tarojs/taro'
;
import
{
View
,
Button
,
Textarea
}
from
'@tarojs/components'
;
class
stringPay
extends
Component
{
render
()
{
const
[
value
,
setValue
]
=
useState
(
''
);
const
inputHandle
=
useCallback
(
e
=>
{
setValue
(
e
.
detail
.
value
);
},
[
setValue
],
);
const
payHandle
=
()
=>
{
console
.
log
(
value
);
if
(
value
)
{
const
payData
=
JSON
.
parse
(
value
);
Taro
.
requestPayment
({
timeStamp
:
payData
.
timeStamp
.
toString
(),
nonceStr
:
payData
.
nonceStr
,
package
:
payData
.
package
,
signType
:
payData
.
signType
,
paySign
:
payData
.
paySign
,
}).
then
(
res
=>
{
console
.
log
(
res
);
Taro
.
showToast
({
title
:
'支付成功!'
,
icon
:
'success'
,
mask
:
true
,
});
setValue
(
''
);
});
}
};
return
(
<
View
className=
'stringPay'
>
<
Textarea
className=
'stringPay-input'
value=
{
value
}
onInput=
{
inputHandle
}
></
Textarea
>
<
Button
onClick=
{
payHandle
}
>
支付
</
Button
>
</
View
>
);
}
}
export
default
stringPay
;
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