(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/packageB/paper/paper_info"],{5214:function(t,n,e){"use strict";var o=e("fe80"),i=e.n(o);i.a},6084:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return o}));var o={tnNavBar:function(){return Promise.all([e.e("common/vendor"),e.e("tuniao-ui/components/tn-nav-bar/tn-nav-bar")]).then(e.bind(null,"f926"))},tnButton:function(){return Promise.all([e.e("common/vendor"),e.e("tuniao-ui/components/tn-button/tn-button")]).then(e.bind(null,"eb0a"))},tnInput:function(){return Promise.all([e.e("common/vendor"),e.e("tuniao-ui/components/tn-input/tn-input")]).then(e.bind(null,"6fc0"))}},i=function(){var t=this.$createElement,n=(this._self._c,this.info.files.length),e=this.com_list.length;this.$mp.data=Object.assign({},{$root:{g0:n,g1:e}})},a=[]},ba55:function(t,n,e){"use strict";(function(t){var o=e("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=o(e("af34")),a=e("1081"),c=(o(e("ac0b")),{data:function(){return{id:0,info:{},apiImgUrl:this.$store.state.imgUrl,content:"",com_list:[],com_info:{},page:1,uid:0}},onLoad:function(n){var e=t.getStorageSync("uid");this.uid=e,this.id=n.id,this.getTweets(),this.getCommentList()},onReachBottom:function(){this.page+=1,this.getCommentList()},methods:{submitDo:function(){var n=this;(0,a.addComment)({tweet_id:this.id,content:this.content,member_b_id:this.info.member_id}).then((function(e){console.log(e),1==e.code?t.showToast({title:"评论成功！",icon:"none",duration:2e3}):t.showToast({title:"评论失败！",icon:"none",duration:2e3}),n.content="",n.page=1,n.com_list=[],n.getCommentList()})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})}))},getCommentList:function(){var n=this;(0,a.commentList)({tweet_id:this.id,page:this.page,size:15}).then((function(t){var e;console.log(t),(e=n.com_list).push.apply(e,(0,i.default)(t.data.data)),n.com_info=t.data})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})}))},getTweets:function(){var n=this;(0,a.tweetsInfo)({id:this.id}).then((function(t){console.log(t),n.info=t.data})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})}))},like:function(){var n=this,e=t.getStorageSync("uid");e?0==this.info.is_like?(0,a.likeDo)({member_id:e,related_id:this.id,related_type:"tweets"}).then((function(e){console.log(e),t.showToast({title:"赞成功！",icon:"none",duration:2e3}),n.info.is_like=1})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})})):(0,a.likeRevoke)({member_id:e,related_id:this.id,related_type:"tweets"}).then((function(e){console.log(e),t.showToast({title:"取消成功！",icon:"none",duration:2e3}),n.info.is_like=0})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})})):t.showToast({title:"请先登录",icon:"none",duration:2e3})},favs:function(){var n=this,e=t.getStorageSync("uid");e?0==this.info.is_fav?(0,a.favsDo)({member_id:e,related_id:this.id,related_type:"tweets"}).then((function(e){console.log(e),t.showToast({title:"收藏成功！",icon:"none",duration:2e3}),n.info.is_fav=1})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})})):(0,a.favsRevoke)({member_id:e,related_id:this.id,related_type:"tweets"}).then((function(e){console.log(e),t.showToast({title:"取消收藏成功！",icon:"none",duration:2e3}),n.info.is_fav=0})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})})):t.showToast({title:"请先登录",icon:"none",duration:2e3})},del:function(n){var e=this;(0,a.removeComment)({id:n.id}).then((function(n){console.log(n),1==n.code?(t.showToast({title:"删除成功！",icon:"none",duration:2e3}),e.page=1,e.com_list=[],e.getCommentList()):t.showToast({title:n.msg,icon:"none",duration:2e3})})).catch((function(n){t.showToast({title:n,icon:"none",duration:2e3})}))},goBack:function(){getCurrentPages().length>1?t.navigateBack():t.redirectTo({url:"/pages/index/index"})}}});n.default=c}).call(this,e("df3c")["default"])},be73:function(t,n,e){"use strict";e.r(n);var o=e("6084"),i=e("c8e2");for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("5214");var c=e("828b"),s=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=s.exports},c8e2:function(t,n,e){"use strict";e.r(n);var o=e("ba55"),i=e.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=i.a},d5d9:function(t,n,e){"use strict";(function(t,n){var o=e("47a9");e("b618");o(e("3240"));var i=o(e("be73"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},fe80:function(t,n,e){}},[["d5d9","common/runtime","common/vendor"]]]);