test.tsx 1.3 KB

123456789101112131415161718192021222324252627282930
  1. import React from 'react';
  2. import { View, Image, Linking, Button, Alert, StyleSheet, Text } from 'react-native';
  3. import axios from 'axios';
  4. import sha256 from 'crypto-js/sha256';
  5. import ChargingFinishPageComponent from '../../component/chargingPage/chargingFinishPageComponent';
  6. export default function Test() {
  7. return (
  8. <View style={{ flex: 1 }} className="items-center justify-center bg-gray-50 ">
  9. <ChargingFinishPageComponent data={[]} />
  10. </View>
  11. );
  12. }
  13. // const handleRedirect = async () => {
  14. // const wechatPayUrl =
  15. // 'https://cashiermd.95516.com/b2c/api/unifiedOrder.action?tn=560492826346743689323&sign=87d11db496ba7631e44863b49490657b2968af15021d4812b5bde9ca9eb78df4&__log_id_=ACP0240827121309434f0050468870';
  16. // try {
  17. // const supported = await Linking.canOpenURL(wechatPayUrl);
  18. // if (supported) {
  19. // await Linking.openURL(wechatPayUrl);
  20. // } else {
  21. // console.log("Don't know how to open URI: " + wechatPayUrl);
  22. // alert('WeChat Pay is not available on this device.');
  23. // }
  24. // } catch (err) {
  25. // console.error('An error occurred', err);
  26. // alert('An error occurred while trying to open WeChat Pay.');
  27. // }
  28. // };