text: "use strict";layui.use(["layer","myExtend"],function(){var r=layui.layer,c=layui.myExtend;new Vue({el:"#article-list",data:{list:[]},methods:{remove:function(e,a){var l=this,i=c.normal_open("确认删除吗?","layer-delete-article",function(){r.close(i);var t=r.load(2);axios({url:"/system/admin/delete_article",method:"post",data:{article_id:e.id}}).then(function(e){r.close(t),e.data.errcode?(console.log(e),c.normal_open(e.data.errmsg,"layer-delete-article")):l.list.splice(a,1)}).catch(function(e){r.close(t),c.normal_open("发生错误: "+e,"layer-delete-article")})},["确认","取消"])}},created:function(){var t=this;axios({url:"/system/article_list",method:"post"}).then(function(e){e.data.errcode?c.normal_open(e.data.errmsg,"layer-article-list"):t.list=e.data.data}).catch(function(e){c.normal_open("发生错误: "+e,"layer-article-list")})},components:{"my-article":{props:["article"],template:"<fieldset class='layui-elem-field'><legend><img :src='article.avatar' alt=''><span>{{article.account}}</span><span style='margin-left: 15px'>收获点赞: {{article.heat}}</span></legend><div class='layui-field-box'><h4>{{article.title}}</h4><p>{{article.content}}</p><p>{{article.create_time}}</p></div></fieldset>"}}})});