1234567891011121314151617181920212223242526272829303132333435 |
- import React, { Component } from 'react';
- import './index.less';
- import Assets from '@src/components/Assets';
- import { formatDate } from '@src/services/Tools';
- export class FAQItem extends Component {
- render() {
- const { className = '', data = {} } = this.props;
- return (
- <div className={`g-faq-item ${className}`}>
- <div className="g-faq-item-title">{data.content}</div>
- <div className="g-faq-item-desc">答:{data.answer}</div>
- </div>
- );
- }
- }
- export class CommentItem extends Component {
- render() {
- const { className = '', data = {} } = this.props;
- return (
- <div className={`g-comment-item ${className}`}>
- <div className="g-comment-item-left">
- <Assets name="d_b" src={data.avatar} />
- </div>
- <div className="g-comment-item-right">
- <div className="g-comment-item-right-info">
- <div className="g-comment-item-right-info-name">{data.nickname}</div>
- <div className="g-comment-item-right-info-date">{data.createTime && formatDate(data.createTime, 'YYYY-MM-DD')}</div>
- </div>
- <div className="g-comment-item-right-desc">{data.content}</div>
- </div>
- </div>
- );
- }
- }
|