chunk-24e88122.ce968f8e.js 13 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24e88122"],{"046b":function(t,e,n){"use strict";n("c492")},"21c9":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAw1JREFUWEftWU1IVFEU/s59zg9lhOZGE1pIkhUFleImrIgQIRprxoVYSEEQSJtSxI1WKJLRKi0kgogKnDBpUyLkqkVRFGGIgmEL+zMsJkNnxnk37htfMzrjzH3Px8wE3uW8c777nXPPOffcM4R46yy3YSbgAqkugPYBKADn2XFlzf5INAvgM8Bfg7MB5NoH0EvB5XAUg+/xVwO8C5wXmd3blB7RBECN8DoeR+tHCLZxhg/+TnDeaGoDq5SIurDD0Yw2UgVkhKBn/mrayelGCpJeZ1OEoDhWrvZb5QRLcIgdF8dNEAnx0z+a8phLZoWIyRxHCcHt9wBqXzJ5/XtpEaGhMgstD4OYmpHVMivHagieufvgqJWFqNvPcO+8HYPvQqhsj1SFnPVAcX5sUYiH65sDRqd48i0JDwie+TFwXpxcOiLx6IINJ8oVnOsN4tZQSPtQXcbQ32iXghkeCeHQpZiSF6tLNC4I/jZahPM2ACPXHch2ArsvBjDxjWvec5WxhASFfzvrbDBAcJbgnpPwNdB0TEHJZsLpngUIhaN7GZ4023HZu4DWvgUpzzECQn1OeYJaHZQk+LzVhoM7FSg181AXTRJeG/8iZZ9mQMoJSrktSijlBDeuAwpzE2fu5DTHH3+YZcoJnqpguNuQOHOPXAlg6L12raaP4MCrEN58DJPQV8V2hsO7FGQEwTM9QdwZDtdDfbVUK2ivta0R/OeReGVGj8E1D8rUs//ag5+mOX74lt4o+TmEglxKb5K4Shm6TmYlPID67iBejIXJp7xQy4RGtMwaweXdjFEPbskDJm868fRtCFUdEg3ratstGYLucgbOAcaA+gMKqvYoaLgdRPfg0ptnJaxV9YMyBF922FG2NdxpqyrXEsZ9LYDvPhltAw2ryNjCT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IOsDSpmFuHTeZz+LDjYwyM/CWEycPWL8BASQCyY56BVrURcmkIaoxf4HD3EQ/h3LjV3PXhcVZ6arinlqVf6BAEyErNytiXsSouh+smpuEeLmqd1k6vflUKFd5LKkac/D6Y7WZ8e+M7nLj5PaxjNt6cvABjgqKxZsFqvHjvcwiRhqDfPoD+kX4khj7Ey5HBakSoLBTRwfNwa+w2fjSdRG33UZiGTT7n8wIsTHwbL8W+gOu3uvH19VrUmerxePhjSA1P8emAGbQMXsbP/b9AE52BVxbkQqVMwKW/W/DWpUKf83kBRgVG4uF7knHG3DTtk+zT0wSD9Ign0Gc3w2Az+pzGC3CiSqAkECrFAz6FvRkYbV1cKRIyBAOqFAnYm1YtxIfbdsOFPBhtVwXN9RuQtTa2rvgM1olYu5xRQFb79l87xIcPr8av5Wri/4AsXK41eNJUj9O9DbwimBmdgWfnZ81sBHmRTTKa0RSzYn26t5EXZ2a0GtkzFUGlTIHlUU+iw9LJu2SwZcHa4llzk6A+zO5ecJnhFTIRjYhap7FQCqWImqJJOV+adBo9KBJFUxVTiL12qnWaA5RinZi6YmkRgoNErctaQyn9RixRMXW4rY+85rwAvcXYRoGFYorfrZZ784gJqXVZKymlR+9WVMz57u03l6hap9lJKYrEdOKvlscGpkukjJZJGhrPfjDbkFO2gCffJUs3KK2Y6TXJ1pzXTXRvaeAeHOvVHIDmUCCVALFiF3O+f0P8AykzESWicFq5AAAAAElFTkSuQmCC"},5833:function(t,e,n){"use strict";var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-question-content",on:{click:function(e){return t.$emit("handleToDetail")}}},[e("img",{staticClass:"icon",attrs:{src:n("21c9"),alt:""}}),e("div",{staticClass:"title"},[t._v(t._s(t.content))])])},i=[],s={name:"CardQuestionContent",props:{content:{type:String,default:""}}},c=s,r=(n("ef3e"),n("2877")),o=Object(r["a"])(c,a,i,!1,null,"39f2b4cc",null);e["a"]=o.exports},7542:function(t,e,n){},"8abd":function(t,e,n){"use strict";n("7542")},9117:function(t,e,n){"use strict";var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-answer-content"},[e("div",{staticClass:"top"},[t.showIcon?e("img",{staticClass:"icon",attrs:{src:n("4314")}}):t._e(),t.showVip?t._e():e("div",{staticClass:"content"},[t._v("\n "+t._s(t.replaceTag(t.formatRichText1(t.content)))+"\n ")])]),t.showVip?t._e():e("div",{staticClass:"view-answer",on:{click:function(e){return t.$emit("handleToDetail")}}},[t._v("\n 点击查看答案\n ")]),t.showVip?e("div",{staticClass:"open-vip"},[t._v("开通会员查看答案")]):t._e()])},i=[],s=(n("a481"),n("325c")),c={name:"CardAnswerContent",props:{content:{type:String},showIcon:{type:Boolean,default:!0},showVip:{type:Boolean,default:!1}},methods:{formatRichText1:s["c"],replaceTag:function(t){return t.replace("<p>","").replace("</p>","")}}},r=c,o=(n("8abd"),n("2877")),l=Object(o["a"])(r,a,i,!1,null,"dc6fdb30",null);e["a"]=l.exports},c492:function(t,e,n){},cb29:function(t,e,n){},d1c3:function(t,e,n){},e562:function(t,e,n){"use strict";n.r(e);n("d25f");var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"wrap"},[e("div",{staticClass:"wrap-title"},[e("TitleControl",{attrs:{title:"点赞我的",showSearch:!1},on:{handleChange:t.handleSearch}},[e("div",{staticClass:"control-btn",attrs:{slot:"control"},slot:"control"},[t.manageType?e("div",{staticClass:"manage cancel",on:{click:function(e){t.manageType=!1}}},[t._v("\n 取消\n ")]):e("div",{staticClass:"manage",on:{click:function(e){t.manageType=!0}}},[t._v("\n 管理\n ")])]),e("div",{staticClass:"switch-box",attrs:{slot:"bottom"},slot:"bottom"},[e("div",{staticClass:"btn",class:{select:0==t.type},on:{click:function(e){return t.changeType(0)}}},[t._v("\n 问题\n "),t.forumMarkNum.praise_forum?e("div",{staticClass:"mark"}):t._e()]),e("div",{staticClass:"btn",class:{select:1==t.type},on:{click:function(e){return t.changeType(1)}}},[t._v("\n 回答\n "),t.forumMarkNum.praise_reply?e("div",{staticClass:"mark"}):t._e()]),e("div",{staticClass:"btn",class:{select:2==t.type},on:{click:function(e){return t.changeType(2)}}},[t._v("\n 评论\n "),t.forumMarkNum.praise_comment?e("div",{staticClass:"mark"}):t._e()])])])],1),e("div",{staticClass:"wrap-content"},[t.manageType?e("div",{staticClass:"del-box"},[e("div",{staticClass:"radio"},[e("el-checkbox",{on:{change:t.changeAllChecked},model:{value:t.allChecked,callback:function(e){t.allChecked=e},expression:"allChecked"}})],1),e("div",{staticClass:"btn",on:{click:function(e){t.handleDelete(t.list.filter((function(t){return t.checked})))}}},[t._v("\n 删除\n ")])]):t._e(),e("div",{staticClass:"list"},[t._l(t.list,(function(n){return e("div",{key:n.id,staticClass:"list-item"},[t.manageType?e("div",{staticClass:"radio"},[e("el-checkbox",{model:{value:n.checked,callback:function(e){t.$set(n,"checked",e)},expression:"item.checked"}})],1):t._e(),e("div",{staticClass:"card",style:t.manageType?{width:"calc(100% - 60px)"}:""},[e("LikeMyCard",{attrs:{info:n,manageType:t.manageType,cardType:0==t.type?"question":1==t.type?"answer":"comment"},on:{handleDelete:function(e){return t.handleDelete([n])},handleToDetail:function(e){return t.handleToDetail(n,e,{forum_id:2==t.type?"forum_id":"like_id",reply_id:"reply_id"})}}})],1)])})),t.finished?e("el-empty",{attrs:{description:"没有更多数据"}}):t._e()],2)])])},i=[],s=(n("1c01"),n("58b2"),n("8e6e"),n("456d"),n("28a5"),n("6762"),n("2fdb"),n("2909")),c=(n("6d67"),n("ac6a"),n("f3e2"),n("ade3")),r=(n("7f7f"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"card"},[e("CardBox",t._g({staticStyle:{padding:"15px 20px"},attrs:{btnList:t.btnList}},t.$listeners),[e("div",{staticClass:"header"},[e("CardHeader",t._g({attrs:{avatar:t.info.headimg,name:t.info.user_name,time:t.info.create_at,btnList:[]}},t.$listeners))],1),e("div",{staticClass:"content"},[e("CardContent",{attrs:{content:"点赞了这个".concat("question"==t.cardType?"问题":"answer"==t.cardType?"回答":"评论")}})],1),e("div",{staticClass:"target"},["comment"==t.cardType?e("CardContent",{staticStyle:{"margin-bottom":"10px"},attrs:{content:"@".concat(t.userInfo.name,":").concat(t.info.content)}}):t._e(),"question"==t.cardType||"comment"==t.cardType&&1==t.info.type?e("CardQuestionContent",{attrs:{content:t.info.title,is_normal:t.info.is_normal},on:{handleToDetail:function(e){return t.$emit("handleToDetail","question")}}}):t._e(),"answer"==t.cardType||"comment"==t.cardType&&2==t.info.type?e("CardAnswerContent",{attrs:{content:t.info.content,showIcon:!0,"show-vip":t.showVip},on:{handleToDetail:function(e){return t.$emit("handleToDetail","answer")}}}):t._e()],1)])],1)}),o=[],l=n("c191"),u=n("a7e8"),d=n("3d06"),p=n("9117"),f=n("5833"),h=n("2f62");function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){Object(c["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y={name:"LikeMyCard",components:{CardBox:l["a"],CardHeader:u["a"],CardContent:d["a"],CardAnswerContent:p["a"],CardQuestionContent:f["a"]},props:{info:{type:Object},manageType:{type:Boolean,default:!1},cardType:{type:String,default:"question"}},data:function(){return{}},computed:g(g({},Object(h["b"])(["userInfo"])),{},{showVip:function(){return!(this.userInfo.level_id||!this.info.level)},btnList:function(){var t=["del"];return this.manageType?[]:t}}),mounted:function(){}},A=y,v=(n("f699"),n("2877")),C=Object(v["a"])(A,r,o,!1,null,"44a1e083",null),b=C.exports,k=n("7e74"),w=n("f523");function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){Object(c["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var T={components:{LikeMyCard:b,TitleControl:k["a"]},data:function(){var t;return t={list:[],params:{page:1,page_num:20,sort_type:1},finished:!1,manageType:!1,allChecked:!1,type:0,info:{}},Object(c["a"])(t,"type",0),Object(c["a"])(t,"list_copy",""),t},computed:j({},Object(h["b"])({forumMarkNum:function(t){return t.mark_num.forumMarkNum}})),watch:{manageType:function(t){!t&&(this.allChecked=!1),this.list.forEach((function(t){return t.checked=!1}))}},mounted:function(){this.getQuestionList()},methods:{TouchBottom:function(){this.finished||(0==this.type?this.getQuestionList():1==this.type?this.getAnswerList():this.getCommentList())},changeAllChecked:function(t){this.list.map((function(e){return e.checked=t}))},changeType:function(t){this.type=t,this.list=[],this.finished=!1,this.params.page=1,this.manageType=!1,0==this.type?this.getQuestionList():1==this.type?this.getAnswerList():this.getCommentList()},getQuestionList:function(){var t=this;w["f"].praiseForumList(this.params).then((function(e){var n=e.data,a=n.list.map((function(t){return j({checked:!1},t)}));t.list=1===t.params.page?a:[].concat(Object(s["a"])(t.list),Object(s["a"])(a)),a.length<t.params.page_num?t.finished=!0:t.params.page++,t.handleRead(t.list)}))},getAnswerList:function(){var t=this;w["f"].praiseReplyList(this.params).then((function(e){var n=e.data,a=n.list.map((function(t){return j({checked:!1},t)}));t.list=1===t.params.page?a:[].concat(Object(s["a"])(t.list),Object(s["a"])(a)),a.length<t.params.page_num?t.finished=!0:t.params.page++,t.handleRead(t.list)}))},getCommentList:function(){var t=this;w["f"].praiseCommentList(this.params).then((function(e){var n=e.data,a=n.list.map((function(t){return j({checked:!1},t)}));t.list=1===t.params.page?a:[].concat(Object(s["a"])(t.list),Object(s["a"])(a)),a.length<t.params.page_num?t.finished=!0:t.params.page++,t.handleRead(t.list)}))},handleDelete:function(t){var e=this;this.showConfirmPopup("确定要删除该信息?").then((function(){var n={id:"",type:1};n.id=t.map((function(t){return t.id})).join(","),n.id&&w["f"].batchesDel(n).then((function(t){t.data;var a=e.list.map((function(t){return n.id.split(",").includes(t.id+"")?"":t})).filter((function(t){return t}));e.list=a,e.$message.success("删除成功!"),e.manageType=!1}))})).catch((function(t){}))},handleRead:function(t){var e=this,n={id:"",type:0==this.type?6:1==this.type?7:8,is_read:1};n.id=t.map((function(t){return t.id})).join(","),n.id&&w["f"].unreadChange(n).then((function(t){e.list.forEach((function(t){n.id.split(",").includes(t.id+"")&&(t.is_read=n.is_read)})),e.$store.dispatch("getMarkNum","forum")}))},handleToDetail:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"question",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{forum_id:"forum_id",reply_id:"id"};if(Object.keys(t).includes("is_normal")&&!t.is_normal)return this.$message.error("该问题已失效");this.$router.push({path:"question"==e?"/forum-question-details":"/forum-answer-item",query:{forum_id:t[n.forum_id],reply_id:t[n.reply_id]}})},handleSearch:function(t){this.list_copy||(this.list_copy=this.list),t?this.list=this.list_copy.filter((function(e){return e.content.includes(t)})):(this.list=this.list_copy,this.list_copy="")}}},_=T,D=(n("046b"),Object(v["a"])(_,a,i,!1,null,"56535dd1",null));e["default"]=D.exports},ef3e:function(t,e,n){"use strict";n("cb29")},f699:function(t,e,n){"use strict";n("d1c3")}}]);
  2. //# sourceMappingURL=chunk-24e88122.ce968f8e.js.map