(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/app_admin/comment/comment"],{"13d0":function(t,i,e){"use strict";(function(t){e("2d0a");n(e("66fd"));var i=n(e("7d4a"));function n(t){return t&&t.__esModule?t:{default:t}}t(i.default)}).call(this,e("543d")["createPage"])},"54a7":function(t,i,e){"use strict";e.r(i);var n=e("8156"),s=e.n(n);for(var o in n)"default"!==o&&function(t){e.d(i,t,(function(){return n[t]}))}(o);i["default"]=s.a},"7d4a":function(t,i,e){"use strict";e.r(i);var n=e("ecca"),s=e("54a7");for(var o in s)"default"!==o&&function(t){e.d(i,t,(function(){return s[t]}))}(o);e("b917");var a,r=e("f0c5"),c=Object(r["a"])(s["default"],n["b"],n["c"],!1,null,"c447a260",null,!1,n["a"],a);i["default"]=c.exports},8156:function(t,i,e){"use strict";(function(t){function e(t){return a(t)||o(t)||s(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,i){if(t){if("string"===typeof t)return r(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,i):void 0}}function o(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function a(t){if(Array.isArray(t))return r(t)}function r(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var c={name:"comment",data:function(){return{list:[],over:!1,page:1,is_reply:2,score:3,first:!0}},onLoad:function(){var t=this;this.$commonLoad.onload(),this.$showLoading({type:"global",text:"加载中..."}),this.$request({url:this.$api.app_admin.comments,data:{score:3,is_reply:2,page:1}}).then((function(i){t.$hideLoading(),0===i.code&&(t.first=!1,t.list=i.data.list)}))},onReachBottom:function(){this.over||(this.page++,this.request())},onShow:function(){var t=this;if(this.first)return!1;this.$request({url:this.$api.app_admin.comments,data:{score:this.score,is_reply:this.is_reply,page:this.page}}).then((function(i){if(0===i.code)for(var e in i.data.list)for(var n in t.list)t.list=i.data.list}))},methods:{setActiveNav:function(i){var e=this;this.page=1,this.score=i,this.is_reply=2,this.over=!1,t.pageScrollTo({scrollTop:0}),t.showLoading({title:"加载中..."}),this.$request({url:this.$api.app_admin.comments,data:{score:this.score,is_reply:this.is_reply,page:this.page}}).then((function(i){t.hideLoading(),0===i.code&&(e.list=i.data.list)}))},setActiveReply:function(i){var e=this;this.page=1,this.is_reply=i,this.over=!1,t.showLoading({title:"加载中..."}),this.$request({url:this.$api.app_admin.comments,data:{score:this.score,is_reply:this.is_reply,page:this.page}}).then((function(i){t.hideLoading(),0===i.code&&(e.list=i.data.list)}))},request:function(){var t=this;this.$request({url:this.$api.app_admin.comments,data:{score:this.score,is_reply:this.is_reply,page:this.page}}).then((function(i){0===i.code&&(i.data.list.length>0?t.list=[].concat(e(t.list),e(i.data.list)):t.over=!0)}))},isTop:function(i,e){var n=this,s=1==i.is_top?0:1;n.$request({url:n.$api.app_admin.comments_top,method:"POST",data:{status:s,id:i.id}}).then((function(o){0===o.code&&(i.is_top=s,n.list.splice(e,1,i),t.showToast({title:o.msg,icon:"none"}))}))},isShow:function(t){var i=this;0===t.is_show?this.$request({url:this.$api.app_admin.comments_show,method:"POST",data:{is_show:1,id:t.id}}).then((function(e){if(0===e.code)for(var n=0;n<i.list.length;n++)t.id===i.list[n].id&&(i.list[n].is_show=1)})):this.$request({url:this.$api.app_admin.comments_show,method:"POST",data:{is_show:0,id:t.id}}).then((function(e){if(0===e.code)for(var n=0;n<i.list.length;n++)t.id===i.list[n].id&&(i.list[n].is_show=0)}))}}};i.default=c}).call(this,e("543d")["default"])},"9c6d":function(t,i,e){},b917:function(t,i,e){"use strict";var n=e("9c6d"),s=e.n(n);s.a},ecca:function(t,i,e){"use strict";var n;e.d(i,"b",(function(){return s})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){return n}));var s=function(){var t=this,i=t.$createElement;t._self._c},o=[]}},[["13d0","common/runtime","common/vendor"]]]);