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
dad1cc27
Commit
dad1cc27
authored
Mar 27, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test'
parents
8cae1ab2
1862a0ab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
6 deletions
+36
-6
AppPay.scss
src/pages/AppPay/AppPay.scss
+5
-2
AppPay.tsx
src/pages/AppPay/AppPay.tsx
+31
-4
No files found.
src/pages/AppPay/AppPay.scss
View file @
dad1cc27
.AppPay
{
.AppPay
{
.AppBackButton
{
background-color
:
#fff
;
margin
:
24rpx
80rpx
0
;
}
}
src/pages/AppPay/AppPay.tsx
View file @
dad1cc27
import
"./AppPay.scss"
;
import
Taro
,
{
Component
,
useState
,
useCallback
}
from
"@tarojs/taro"
;
import
{
View
,
Button
}
from
"@tarojs/components"
;
import
{
View
,
Button
,
Navigator
}
from
"@tarojs/components"
;
import
{
rechargeFromAppOrder
}
from
"@/api/account"
;
import
AES
from
"crypto-js/aes"
;
import
Utf8
from
"crypto-js/enc-utf8"
;
...
...
@@ -8,6 +8,22 @@ import ECBmode from "crypto-js/mode-ecb";
import
PaddingPkcs7
from
"crypto-js/pad-pkcs7"
;
import
AppBackButton
from
"../../components/AppBackButton/AppBackButton"
;
type
PageStateProps
=
{};
type
PageDispatchProps
=
{};
type
PageOwnProps
=
{};
type
PageState
=
{
errorMsg
:
string
;
showBack
:
boolean
;
showError
:
boolean
;
};
type
IProps
=
PageStateProps
&
PageOwnProps
&
PageDispatchProps
;
interface
AppPay
{
props
:
IProps
;
state
:
PageState
;
}
class
AppPay
extends
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -98,27 +114,38 @@ class AppPay extends Component {
{
showBack
&&
(
<
View
className=
"AppPay-info"
>
支付成功
<
Navigator
className=
"AppBackButton"
target=
"miniProgram"
open
-
type=
"exit"
>
<
Button
className=
"AppBackButton"
open
-
type=
"launchApp"
app
-
parameter=
{
errorMsg
}
onError=
{
this
.
goBackAppError
}
>
返回App
返回
</
Button
>
</
Navigator
>
</
View
>
)
}
{
showError
&&
(
<
View
className=
"AppPay-info"
>
支付失败
<
Button
<
Navigator
className=
"AppBackButton"
target=
"miniProgram"
open
-
type=
"exit"
>
<
Button
open
-
type=
"launchApp"
app
-
parameter=
{
errorMsg
}
onError=
{
this
.
goBackAppError
}
>
返回App
返回
</
Button
>
</
Navigator
>
</
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