| 12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/community-comment-list/community-comment-list"],{"535d":function(e,t,n){"use strict";var i=n("8521"),o=n.n(i);o.a},8521:function(e,t,n){},"94d0":function(e,t,n){"use strict";n.r(t);var i=n("ff2c"),o=n("d254");for(var s in o)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(s);n("535d");var c=n("f0c5"),m=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"b2b67c16",null,!1,i["a"],void 0);t["default"]=m.exports},d254:function(e,t,n){"use strict";n.r(t);var i=n("e9a9"),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);t["default"]=o.a},e9a9:function(e,t,n){"use strict";var i=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n("448a")),s=n("af79"),c=n("c93f"),m={name:"community-comment-list",props:{comment:{type:Object}},data:function(){return{more:1,page:1,pageSize:5,commentInfo:{}}},watch:{comment:{handler:function(e){var t;this.commentInfo.hasOwnProperty("child")?((t=this.commentInfo.child).push.apply(t,(0,o.default)(JSON.parse(JSON.stringify(e.child)))),this.commentInfo.child=this.removeDiffrent(this.commentInfo.child,"id")):this.commentInfo=e},deep:!0,immediate:!0}},mounted:function(){this.handleCommentLike=(0,c.debounce)(this.handleCommentLike,100)},methods:{onComment:function(e,t){if(!this.isLogin)return this.$Router.push("/pages/login/login");this.$emit("reply",{commentId:e,parentId:this.commentInfo.id,commentUserName:t})},handleCommentLike:function(e,t,n){var i=this;if(!this.isLogin)return this.$Router.push("/pages/login/login");switch(t){case 0:this.$set(n,"like",n.like+=1),this.$set(n,"is_like",1);break;case 1:this.$set(n,"like",n.like-=1),this.$set(n,"is_like",0);break}(0,s.apiCommunityCommentLike)({id:e,status:t?0:1,type:2}).then((function(e){if(1!==e.code){switch(t){case 0:i.$set(n,"like",n.like-=1),i.$set(n,"is_like",1);break;case 1:i.$set(n,"like",n.like+=1),i.$set(n,"is_like",0);break}i.$toast({title:e.msg})}}))},handleLoadingMore:function(){var e=this;if(!this.isLogin)return this.$Router.push("/pages/login/login");this.commentInfo.loading=!0,(0,s.getCommunityCommentChildLists)({comment_id:this.commentInfo.id,page_no:this.page,page_size:this.pageSize}).then((function(t){var n;1===t.code?(e.more=t.data.more,(n=e.commentInfo.child).push.apply(n,(0,o.default)(t.data.list)),e.commentInfo.child=e.removeDiffrent(e.commentInfo.child,"id"),1===t.data.more&&(e.page+=1)):e.$toast({title:t.msg});e.commentInfo.loading=!1}))},removeDiffrent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",n={};return e.reduce((function(e,i){return!n[i[t]]&&(n[i[t]]=e.push(i)),e}),[])}}};t.default=m},ff2c:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return i}));var i={uImage:function(){return n.e("components/uview-ui/components/u-image/u-image").then(n.bind(null,"2a31"))},uIcon:function(){return n.e("components/uview-ui/components/u-icon/u-icon").then(n.bind(null,"9a0e"))},uLoading:function(){return n.e("components/uview-ui/components/u-loading/u-loading").then(n.bind(null,"c839"))}},o=function(){var e=this.$createElement,t=(this._self._c,this.commentInfo.child.length),n=t?0!=this.commentInfo.more&&this.commentInfo.more+2>this.commentInfo.child.length&&this.more&&!this.commentInfo.loading:null;this.$mp.data=Object.assign({},{$root:{g0:t,g1:n}})},s=[]}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'components/community-comment-list/community-comment-list-create-component',
- {
- 'components/community-comment-list/community-comment-list-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('543d')['createComponent'](__webpack_require__("94d0"))
- })
- },
- [['components/community-comment-list/community-comment-list-create-component']]
- ]);
|