/**
 * Created by zhangmike on 2017/2/21.
 */
import html from './comment.html';
import BaseClass from '../../base/Class';
import './comment.css';
class Comment extends BaseClass {
    constructor(options) {
        super(options);
        super._create(html);
    }
    preinit() {
        console.log('preinit....');
    }
    sendCallback() {
        console.log('send cb');
    }
    listCallback() {
        console.log('list cb');
    }
    clickInputEvent() {
        console.log('click input');
    }
    fetchItemData() {
        var myRequest = new Request('http://10.69.205.26:9090/mock/58ac014557af834832f97a0c/fetchCommentList');
        fetch(myRequest)
            .then(function(response) {
                return response.json();
            }).then(function (json) {
            console.log(json);
        }).catch(function (err) {
                console.log(err);
        })
    }
};

$.fn.Comment = function(options){
    options.el = $(this);
    return new Comment(options);
}

export default Comment;