import React from "react"; import { StyleSheet, View } from "react-native"; import { Card, Text, Button, Avatar } from "@ui-kitten/components"; import { useModel } from "flooks"; const styles = StyleSheet.create({ card: { marginTop: 10 }, layout: { flexDirection: "row", height: 80, backgroundColor: "transparent", }, avatar: { width: 80, height: 80, marginRight: 10, }, main: { flex: 1, backgroundColor: "transparent", }, flex1: { flex: 1, }, butContent: { marginLeft: 6, }, fontColor: { color: "#B5B5B5", }, miniButton: { minWidth: 22, minHeight: 22, width: 22, height: 22, position: "absolute", right: 10, bottom: 5, maxWidth: 22, }, status: { position: "absolute", left: 0, width: 80, paddingVertical: 4, backgroundColor: "#F0F0F0", bottom: 0, textAlign: "center", }, }); export default function GoodsCard(props) { const { add, remove, getWordsStr, EBBZOP, HBHXVO, YMCWXK } = useModel( "wordsModel" ); const { info, changeInfo, type, removeEvent, addEvent, isAdd, appearance, style, canEdit, onPress, } = props; const { id, img, name, introduction, totalSales, discountAmount, amount, takeOff, status, } = info || {}; const { takeOffInfo, ChangeTakeOff } = useModel("goodsModel", true); return ( {id ? ( {status === "PENDING" && ( {EBBZOP} )} {status === "DENY" && ( {HBHXVO} )} {name || ""} {introduction || ""} {YMCWXK} {totalSales || 0} ¥{discountAmount}{" "} ¥{amount} {appearance && type === "goodsList" && ( )} {!appearance && !isAdd && ( )} {removeEvent && isAdd && ( )} {/* {props.appearance == "classification" && props.type != "goodsList" && (