(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/packageB/paper/paper_info"],{371:function(t,n,e){"use strict";(function(t,n){var o=e(4);e(26);o(e(25));var i=o(e(372));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e(1)["default"],e(2)["createPage"])},372:function(t,n,e){"use strict";e.r(n);var o=e(373),i=e(375);for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e(377);var c,r=e(42),s=Object(r["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],c);s.options.__file="pages/packageB/paper/paper_info.vue",n["default"]=s.exports},373:function(t,n,e){"use strict";e.r(n);var o=e(374);e.d(n,"render",(function(){return o["render"]})),e.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),e.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),e.d(n,"components",(function(){return o["components"]}))},374:function(t,n,e){"use strict";var o;e.r(n),e.d(n,"render",(function(){return i})),e.d(n,"staticRenderFns",(function(){return c})),e.d(n,"recyclableRender",(function(){return a})),e.d(n,"components",(function(){return o}));try{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,394))},tnButton:function(){return Promise.all([e.e("common/vendor"),e.e("tuniao-ui/components/tn-button/tn-button")]).then(e.bind(null,408))},tnInput:function(){return Promise.all([e.e("common/vendor"),e.e("tuniao-ui/components/tn-input/tn-input")]).then(e.bind(null,526))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var t=this,n=t.$createElement,e=(t._self._c,t.info.files.length),o=t.com_list.length;t.$mp.data=Object.assign({},{$root:{g0:e,g1:o}})},a=!1,c=[];i._withStripped=!0},375:function(t,n,e){"use strict";e.r(n);var o=e(376),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},376:function(t,n,e){"use strict";(function(t){var o=e(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=o(e(18)),a=e(33),c=(o(e(30)),{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(2)["default"])},377:function(t,n,e){"use strict";e.r(n);var o=e(378),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},378:function(t,n,e){}},[[371,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/packageB/paper/paper_info.js.map