Пример #1
0
 },function(result){
     if(result.status==404){
         successCallback && successCallback.call(self,[]);
     }else{
         fnAssemble.message(result.message,'error');
         self.xhrFailCallback(result);
     }
 });
Пример #2
0
            }).delegate('.book-limit-parent .baby-news-btn','click',function(e){
                var $target=$(e.currentTarget),$parent=$target.closest('.page'),tweetData,record,status=$parent.attr('data-status');

                if(status != 'success'){
                    fnAssemble.message('正在加载页面,请稍后!');
                    return;
                }
                record = self.createTweetRecord(e);
                if(record.content.text == ''){
                    fnAssemble.message('请填写内容!');
                    return;
                }
                console.log('创建动态 ',record);
                self.xhrTweetCreate(record,function(id){
                    record.id = id;
                    tweetData = self.buildTweetData(record);
                    self.emptyData(e);
                    $parent.find('.baby-news-list').prepend(fnAssemble.substitute(newsTpl,tweetData));
                });

                //点击删除图片
            }).delegate('.book-limit-parent .news-photo-del','click',function(e){
Пример #3
0
 },function(result){
     fnAssemble.message(result.message,'error');
     self.xhrFailCallback();
 });
Пример #4
0
 Service.xhrTweetCreate(data,function(result){
     var id = result.data && result.data.id;
     fnAssemble.message('宝宝动态创建成功','success');
     if(successCallback){successCallback.call(self,id);}
     
 },function(result){
Пример #5
0
 Service.xhrTweetDel(data,function(result){
     fnAssemble.message('宝宝动态删除成功','success');
     if(successCallback){successCallback.call(self);}
     
 },function(result){
Пример #6
0
 error: function(result) {
     this._$box.remove();
     console.warn('error ',result);
     fnAssemble.message('上传失败! '+result.message,'error');
 }