import { ComponentClass } from 'react'
import Taro, { Component } from '@tarojs/taro'
import { View, Image, Text } from '@tarojs/components'
import './index.scss'
type PageOwnProps = {
children?: any // 替换note
className?: string
otherStyle?: 'white' | 'dark'
shopLogo: string
shopName: string
extraText: string
data: {
number: number
note: string
bright?: boolean
}[]
userName: string
userAvatar: string
}
type IProps = PageOwnProps
interface Index {
props: IProps;
}
class Index extends Component {
static options = {
addGlobalClass: true
}
render() {
const {
shopLogo,
shopName,
extraText,
data,
userName,
userAvatar,
otherStyle
} = this.props
const className = `sd-friend-card ${this.props.className || ''} ${otherStyle ? `sd-friend-card-${otherStyle}` : ''}`
return (
{/* 店铺 */}
{/* logo */}
{/* 店铺名 */}
{shopName}
{/* 补充信息 */}
{extraText}
{/* 数据 */}
{
data.map((e, index) => {
return
{e.number}
{e.note}
})
}
{/* 老板 */}
{userName}
)
}
}
export default Index as ComponentClass