(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/app_admin/comment/comment"],{"00ae":function(t,i,e){"use strict";var n;e.d(i,"b",(function(){return s})),e.d(i,"c",(function(){return a})),e.d(i,"a",(function(){return n}));var s=function(){var t=this,i=t.$createElement;t._self._c},a=[]},"8a44":function(t,i,e){"use strict";e.r(i);var n=e("00ae"),s=e("9bf4");for(var a in s)"default"!==a&&function(t){e.d(i,t,(function(){return s[t]}))}(a);e("af04");var r,o=e("f0c5"),c=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"209b24de",null,!1,n["a"],r);i["default"]=c.exports},"9bf4":function(t,i,e){"use strict";e.r(i);var n=e("ba80"),s=e.n(n);for(var a in n)"default"!==a&&function(t){e.d(i,t,(function(){return n[t]}))}(a);i["default"]=s.a},af04:function(t,i,e){"use strict";var n=e("e93d"),s=e.n(n);s.a},ba80:function(t,i,e){"use strict";(function(t){function e(t){return r(t)||a(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 o(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)?o(t,i):void 0}}function a(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function r(t){if(Array.isArray(t))return o(t)}function o(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.$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}),this.$request({url:this.$api.app_admin.comments,data:{score:this.score,is_reply:this.is_reply,page:this.page}}).then((function(t){0===t.code&&(e.list=t.data.list)}))},setActiveReply:function(t){var i=this;this.page=1,this.is_reply=t,this.over=!1,this.$request({url:this.$api.app_admin.comments,data:{score:this.score,is_reply:this.is_reply,page:this.page}}).then((function(t){0===t.code&&(i.list=t.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(a){0===a.code&&(i.is_top=s,n.list.splice(e,1,i),t.showToast({title:a.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"])},d207:function(t,i,e){"use strict";(function(t){e("b8bc");n(e("66fd"));var i=n(e("8a44"));function n(t){return t&&t.__esModule?t:{default:t}}t(i.default)}).call(this,e("543d")["createPage"])},e93d:function(t,i,e){}},[["d207","common/runtime","common/vendor"]]]);