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
1862a0ab
Commit
1862a0ab
authored
Mar 27, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
7fb865c7
60c084a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
15 deletions
+45
-15
AppPay.scss
src/pages/AppPay/AppPay.scss
+5
-2
AppPay.tsx
src/pages/AppPay/AppPay.tsx
+40
-13
No files found.
src/pages/AppPay/AppPay.scss
View file @
1862a0ab
.AppPay
{
.AppPay
{
.AppBackButton
{
background-color
:
#fff
;
margin
:
24rpx
80rpx
0
;
}
}
src/pages/AppPay/AppPay.tsx
View file @
1862a0ab
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"
>
支付成功
<
Button
<
Navigator
className=
"AppBackButton"
open
-
type=
"launchApp"
app
-
parameter=
{
errorMsg
}
onError=
{
this
.
goBackAppError
}
target=
"miniProgram"
open
-
type=
"exit"
>
返回App
</
Button
>
<
Button
className=
"AppBackButton"
open
-
type=
"launchApp"
app
-
parameter=
{
errorMsg
}
onError=
{
this
.
goBackAppError
}
>
返回
</
Button
>
</
Navigator
>
</
View
>
)
}
{
showError
&&
(
<
View
className=
"AppPay-info"
>
支付失败
<
Button
<
Navigator
className=
"AppBackButton"
open
-
type=
"launchApp"
app
-
parameter=
{
errorMsg
}
onError=
{
this
.
goBackAppError
}
target=
"miniProgram"
open
-
type=
"exit"
>
返回App
</
Button
>
<
Button
open
-
type=
"launchApp"
app
-
parameter=
{
errorMsg
}
onError=
{
this
.
goBackAppError
}
>
返回
</
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