(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{258:function(t,s,i){"use strict";i.r(s);var e=i(438),a=i(313);for(var n in a)"default"!==n&&function(t){i.d(s,t,function(){return a[t]})}(n);i(388);var o=i(3),r=Object(o.a)(a.default,e.a,e.b,!1,null,"0c6a05d0",null);r.options.__file="discussion.vue",s.default=r.exports},313:function(t,s,i){"use strict";i.r(s);var e=i(314),a=i.n(e);for(var n in e)"default"!==n&&function(t){i.d(s,t,function(){return e[t]})}(n);s.default=a.a},314:function(t,s,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var e,a=i(68),n=(e=a)&&e.__esModule?e:{default:e};s.default={components:{},data:function(){return{tabs:[{title:"我提出的问题",isShow:!0,path:"/my"},{title:"我参与的问题",isShow:!1,path:"/involved"}],discussList:[],param:{limit:10,offset:0}}},mounted:function(){this.loadAjax(),window.addEventListener("resize",this.resizeRoot.bind(this),!1)},destroyed:function(){window.removeEventListener("resize",this.resizeRoot.bind(this),!1)},updated:function(){this.resizeRoot()},methods:{resizeRoot:function(){var a=this,t=document.querySelectorAll(".ellipsis"),n=getComputedStyle(window.document.documentElement)["font-size"].replace("px","");t.forEach(function(t,s){t.previousSibling.style.height="auto";var i=t.previousSibling.offsetHeight,e=.18*n*1.5*2;e<i?(a.discussList[s].isShow=!0,t.previousSibling.style.height=e+"px"):a.discussList[s].isShow=!1})},loadAjax:function(){for(var s=this,t="",i=0;i<this.tabs.length;i++)this.tabs[i].isShow&&(t=this.tabs[i].path);var e=this.$loading({lock:!0,text:"",spinner:"",background:"rgba(255, 255, 255, 0.9)"});n.default.discussAction.getDiscussList(t,this.param).then(function(t){s.discussList=t}).catch(function(t){s.$message.error(t.message)}).finally(function(){e.close()})},tabSelect:function(t){for(var s=t.currentTarget.dataset.index,i=this.tabs,e=0;e<i.length;e++)i[e].isShow=!1;i[s].isShow=!0,this.tabs=i,this.param.offset=0,this.loadAjax()},goDiscussDetail:function(t){var s=t.currentTarget.dataset.id,i=t.currentTarget.dataset.sid,e=t.currentTarget.dataset.cid;this.$router.push({path:"/app/my-learn/discuss-detail/"+i+"/"+e+"/"+s})}}}},315:function(t,s,i){},388:function(t,s,i){"use strict";var e=i(315);i.n(e).a},438:function(t,s,a){"use strict";var i=function(){var i=this,t=i.$createElement,e=i._self._c||t;return e("div",[e("div",{staticClass:"con-title"},[i._v("我的讨论")]),i._v(" "),e("div",{staticClass:"con-box"},[e("div",{staticClass:"tab-select"},[i._l(i.tabs,function(t,s){return[e("div",{key:s,class:["item",t.isShow?"on":""],attrs:{"data-index":s},on:{click:i.tabSelect}},[i._v(i._s(t.title))])]})],2),i._v(" "),e("div",{staticClass:"discuss-scroll"},[i._l(i.discussList,function(t,s){return[e("div",{key:s,staticClass:"item-list",attrs:{"data-id":t.id,"data-sid":t.sid,"data-cid":t.cid,"data-index":s},on:{click:i.goDiscussDetail}},[e("div",{staticClass:"user"},[t.user.url?[e("img",{staticClass:"img",attrs:{src:t.user.url}})]:[e("img",{staticClass:"img",attrs:{src:a(107)}})],i._v(" "),e("div",{staticClass:"right"},[e("div",{staticClass:"name"},[i._v(i._s(t.user.name))]),i._v(" "),e("div",{staticClass:"time"},[i._v(i._s(t.user.time))])])],2),i._v(" "),e("div",{staticClass:"title"},[i._v(i._s(t.title))]),i._v(" "),e("div",{class:["text"],domProps:{innerHTML:i._s(t.text)}}),e("div",{class:["ellipsis",t.isShow?"on":""]},[i._v("....")]),i._v(" "),e("div",{staticClass:"result"},[i._v(i._s(t.askCnt)+" 回答"),e("div",{staticStyle:{display:"inline-block",width:"20px"}}),i._v(i._s(t.TouCnt)+" 投票")])])]}),i._v(" "),i.discussList.length?i._e():[e("div",{staticClass:"no-data"},[i._v("暂无相关讨论")])]],2)])])},e=[];a.d(s,"a",function(){return i}),a.d(s,"b",function(){return e})}}]);