Complaint.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import React from "react";
  2. import { StyleSheet } from "react-native";
  3. import {
  4. Modal,
  5. Card,
  6. Text,
  7. Button,
  8. Layout,
  9. Avatar,
  10. Icon,
  11. Divider,
  12. } from "@ui-kitten/components";
  13. import { useModel } from "flooks";
  14. export default function Complaint(props) {
  15. const { getWordsStr } = useModel("wordsModel");
  16. const { info } = props;
  17. const { id, amount, fullAmount, name, endDate, startDate } = info || {};
  18. const code = React.useMemo(() => {
  19. if (amount) {
  20. return (amount > 0 ? "+ " : "- ") + amount.toFixed(2);
  21. } else {
  22. return "+ 0.00";
  23. }
  24. }, [amount]);
  25. return (
  26. <Card appearance='walletCard' style={{ marginBottom: 15 }}>
  27. <Layout>
  28. <Text category='c1'>投诉类型:商家少送/漏送商品</Text>
  29. <Text category='c1'>投诉时间:2020-05-13 12:45</Text>
  30. </Layout>
  31. <Divider style={styles.drivider} />
  32. <Text category='h1' status='info'>
  33. 您的订单已经被取消收款方老司机的发链接SDK溜老司机的上路考订水房间了圣诞节弗兰克斯家电快溜缝胶看楼上的甲方看了圣诞节放凌空加施蒂
  34. </Text>
  35. <Layout style={styles.imgList}>
  36. <Avatar style={styles.avatar} shape='rounded'></Avatar>
  37. <Avatar style={styles.avatar} shape='rounded'></Avatar>
  38. <Avatar style={styles.avatar} shape='rounded'></Avatar>
  39. </Layout>
  40. </Card>
  41. );
  42. }
  43. const ForwardIcon = props => (
  44. <Icon
  45. {...props}
  46. name='arrow-ios-forward'
  47. fill='#B4B4B4'
  48. style={{ width: 15, height: 15, fontWeight: 500 }}
  49. />
  50. );
  51. const styles = StyleSheet.create({
  52. main: {
  53. flexDirection: "row",
  54. alignItems: "center",
  55. backgroundColor: "transparent",
  56. },
  57. left: {
  58. width: 80,
  59. flexShrink: 0,
  60. alignItems: "center",
  61. },
  62. center: {
  63. flex: 1,
  64. marginLeft: 14,
  65. backgroundColor: "transparent",
  66. },
  67. text2: {
  68. paddingTop: 6,
  69. },
  70. code: {
  71. alignSelf: "flex-start",
  72. },
  73. icon: {
  74. width: 20,
  75. position: "absolute",
  76. right: 0,
  77. top: "50%",
  78. marginTop: -10,
  79. },
  80. imgList: {
  81. flexDirection: "row",
  82. marginTop: 20,
  83. },
  84. avatar: {
  85. width: 53,
  86. height: 53,
  87. backgroundColor: "#eee",
  88. marginRight: 13,
  89. },
  90. drivider: {
  91. marginVertical: 10,
  92. },
  93. });