Comment.js 3.7 KB

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