import React, { Component } from 'react';
import './index.less';
import { Popover } from 'antd';
import { Carousel } from 'antd-mobile';
import Assets from '@src/components/Assets';
import { formatDate } from '@src/services/Tools';
import Button from '../Button';
import { User } from '../../stores/user';
export class CommentFalls extends Component {
createLayout() {
const msnry = new Masonry('.comment-falls', {
itemSelector: '.grid-item',
});
msnry.layout();
}
render() {
const { list = [] } = this.props;
return (
{list.map(row => {
return (
{row.user ? row.user.nickname : row.nickname}
{formatDate(row.createTime, 'yyyy年mm月dd日')}
{row.content}
);
})}
);
}
}
export class AnswerCarousel extends Component {
constructor(props) {
super(props);
this.state = { index: 1 };
}
onNext() {
const index = this.state.index + 1;
const { list = [] } = this.props;
if (index >= list.length - 1) return;
this.setState({ index });
}
onPrev() {
const index = this.state.index - 1;
if (index < 1) return;
this.setState({ index });
}
render() {
const { onFaq } = this.props;
const { index } = this.state;
const { list = [], hideBtn = false } = this.props;
return (
{list.length > 0 && (
{list.map(item => {
return (
);
})}
)}
this.onNext()} />
this.onPrev()} />
{!hideBtn && (
)
}
);
}
}
export class Consultation extends Component {
render() {
const { data = {} } = this.props;
return (
);
}
}
export class Contact extends Component {
render() {
const { data = {} } = this.props;
return (
联系我们
{data.phone}
{data.email}
{data.wechat}
);
}
}