1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/app_admin/comment/comment"],{"5fb6":function(t,e,i){"use strict";(function(t){i("8748");n(i("66fd"));var e=n(i("af5e"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},"7a36":function(t,e,i){"use strict";var n,s=function(){var t=this,e=t.$createElement;t._self._c},o=[];i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}))},"8b3a":function(t,e,i){"use strict";var n=i("f158"),s=i.n(n);s.a},af5e:function(t,e,i){"use strict";i.r(e);var n=i("7a36"),s=i("c8bf");for(var o in s)"default"!==o&&function(t){i.d(e,t,(function(){return s[t]}))}(o);i("8b3a");var r,a=i("f0c5"),c=Object(a["a"])(s["default"],n["b"],n["c"],!1,null,"21b8fa78",null,!1,n["a"],r);e["default"]=c.exports},c8bf:function(t,e,i){"use strict";i.r(e);var n=i("e697"),s=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=s.a},e697:function(t,e,i){"use strict";(function(t){function i(t){return r(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,e){if(t){if("string"===typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}function o(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function r(t){if(Array.isArray(t))return a(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c={name:"comment",data:function(){return{list:[],over:!1,page:1,is_reply:2,score:3}},onLoad:function(){var t=this;this.$request({url:this.$api.app_admin.comments,data:{score:3,is_reply:2,page:1}}).then((function(e){0===e.code&&(t.list=e.data.list)}))},onReachBottom:function(){this.over||(this.page++,this.request())},methods:{setActiveNav:function(e){var i=this;this.page=1,this.score=e,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&&(i.list=t.data.list)}))},setActiveReply:function(t){var e=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&&(e.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(e){0===e.code&&(e.data.list.length>0?t.list=[].concat(i(t.list),i(e.data.list)):t.over=!0)}))},isTop:function(e,i){var n=this,s=1==e.is_top?0:1;n.$request({url:n.$api.app_admin.comments_top,method:"POST",data:{status:s,id:e.id}}).then((function(o){0===o.code&&(e.is_top=s,n.list.splice(i,1,e),t.showToast({title:o.msg,icon:"none"}))}))},isShow:function(t){var e=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(i){if(0===i.code)for(var n=0;n<e.list.length;n++)t.id===e.list[n].id&&(e.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(i){if(0===i.code)for(var n=0;n<e.list.length;n++)t.id===e.list[n].id&&(e.list[n].is_show=0)}))}}};e.default=c}).call(this,i("543d")["default"])},f158:function(t,e,i){}},[["5fb6","common/runtime","common/vendor"]]]);
|