Commit dad1cc27 by 姜雷

Merge branch 'test'

parents 8cae1ab2 1862a0ab
.AppPay{ .AppPay {
.AppBackButton {
background-color: #fff;
margin: 24rpx 80rpx 0;
}
} }
import "./AppPay.scss"; import "./AppPay.scss";
import Taro, { Component, useState, useCallback } from "@tarojs/taro"; 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 { rechargeFromAppOrder } from "@/api/account";
import AES from "crypto-js/aes"; import AES from "crypto-js/aes";
import Utf8 from "crypto-js/enc-utf8"; import Utf8 from "crypto-js/enc-utf8";
...@@ -8,6 +8,22 @@ import ECBmode from "crypto-js/mode-ecb"; ...@@ -8,6 +8,22 @@ import ECBmode from "crypto-js/mode-ecb";
import PaddingPkcs7 from "crypto-js/pad-pkcs7"; import PaddingPkcs7 from "crypto-js/pad-pkcs7";
import AppBackButton from "../../components/AppBackButton/AppBackButton"; 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 { class AppPay extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -98,27 +114,38 @@ class AppPay extends Component { ...@@ -98,27 +114,38 @@ class AppPay extends Component {
{showBack && ( {showBack && (
<View className="AppPay-info"> <View className="AppPay-info">
支付成功 支付成功
<Button <Navigator
className="AppBackButton" className="AppBackButton"
open-type="launchApp" target="miniProgram"
app-parameter={errorMsg} open-type="exit"
onError={this.goBackAppError}
> >
返回App <Button
</Button> className="AppBackButton"
open-type="launchApp"
app-parameter={errorMsg}
onError={this.goBackAppError}
>
返回
</Button>
</Navigator>
</View> </View>
)} )}
{showError && ( {showError && (
<View className="AppPay-info"> <View className="AppPay-info">
支付失败 支付失败
<Button <Navigator
className="AppBackButton" className="AppBackButton"
open-type="launchApp" target="miniProgram"
app-parameter={errorMsg} open-type="exit"
onError={this.goBackAppError}
> >
返回App <Button
</Button> open-type="launchApp"
app-parameter={errorMsg}
onError={this.goBackAppError}
>
返回
</Button>
</Navigator>
</View> </View>
)} )}
</View> </View>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment