Comment.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. } from "@ui-kitten/components";
  12. import Badge from "../components/Badge";
  13. import { useModel } from "flooks";
  14. export default function CommentCard(props) {
  15. const { storeBackInfo } = useModel("wordsModel");
  16. return (
  17. <Card appearance='CommentCard' disabled={true}>
  18. <Layout style={styles.user}>
  19. <Avatar
  20. style={styles.userIcon}
  21. shape='rounded'
  22. source={{
  23. uri:
  24. "https://t7.baidu.com/it/u=3616242789,1098670747&fm=79&app=86&size=h300&n=0&g=4n&f=jpeg",
  25. }}
  26. />
  27. <Layout style={styles.main}>
  28. <Layout style={styles.layout}>
  29. <Text
  30. category='s1'
  31. ellipsizeMode='tail'
  32. numberOfLines={1}
  33. style={styles.flex1}
  34. >
  35. 用户名
  36. </Text>
  37. <Text category='h1' status='info'>
  38. 2019-11-27
  39. </Text>
  40. </Layout>
  41. <Button
  42. appearance='ghost'
  43. accessoryLeft={StarIcon}
  44. style={styles.button}
  45. >
  46. 9999+
  47. </Button>
  48. <Text category='h1'>
  49. 金额后认为害人害己而和我入口即化吾儿可教很温和人和网入口即,
  50. 化我耳机sdfsdfsd考试的分开理就是老款的加菲,是大富科技谁看
  51. 得见后方可了三等奖
  52. </Text>
  53. <Layout style={styles.badgeList}>
  54. <Badge
  55. style={styles.badge}
  56. appearance='ghost'
  57. status='primary'
  58. >
  59. 麦辣鸡堡
  60. </Badge>
  61. </Layout>
  62. <Layout style={styles.backInfo}>
  63. <Text category='h1'>
  64. {storeBackInfo}:
  65. <Text category='h1' style={styles.backColor}>
  66. 水电费记录删掉科技风科雷嘉是的溜缝胶SDK垃圾分
  67. 类圣诞节疯狂老司机的风口浪尖当时考虑放假了圣诞节放克鲁赛
  68. 德荆防颗粒的就是风口浪尖类似的减肥了可视v
  69. </Text>
  70. </Text>
  71. </Layout>
  72. </Layout>
  73. </Layout>
  74. </Card>
  75. );
  76. }
  77. const StarIcon = (props) => (
  78. <Avatar source={require("../assets/images/zan.png")} {...props} />
  79. );
  80. const styles = StyleSheet.create({
  81. user: {
  82. flexDirection: "row",
  83. borderBottomWidth: 1,
  84. borderColor: "#EEEEEE",
  85. paddingVertical: 10,
  86. },
  87. userIcon: {
  88. width: 33,
  89. height: 33,
  90. marginRight: 3,
  91. },
  92. avatar: {
  93. width: 80,
  94. height: 80,
  95. marginRight: 10,
  96. },
  97. commentImg: {
  98. width: 167,
  99. height: 167,
  100. marginTop: 10,
  101. borderRadius: 0,
  102. },
  103. layout: {
  104. flexDirection: "row",
  105. },
  106. main: {
  107. flex: 1,
  108. },
  109. flex1: {
  110. flex: 1,
  111. },
  112. butContent: {
  113. marginLeft: 6,
  114. },
  115. fontColor: {
  116. color: "#B5B5B5",
  117. },
  118. miniButton: {
  119. minWidth: 18,
  120. minHeight: 18,
  121. width: 18,
  122. height: 18,
  123. position: "absolute",
  124. right: 10,
  125. bottom: 5,
  126. },
  127. button: {
  128. alignSelf: "flex-start",
  129. marginTop: 5,
  130. marginBottom: 0,
  131. },
  132. badgeList: {
  133. flexDirection: "row",
  134. },
  135. badge: {
  136. marginRight: 5,
  137. marginTop: 4,
  138. },
  139. backInfo: {
  140. backgroundColor: "rgba(248,236,214,1)",
  141. padding: 7,
  142. marginTop: 10,
  143. },
  144. backColor: {
  145. color: "#6BCDFF",
  146. },
  147. });