1 line
8.2 KiB
JSON
1 line
8.2 KiB
JSON
{"remainingRequest":"/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/node_modules/babel-loader/lib/index.js!/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/src/views/account/center/page/Article.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/src/views/account/center/page/Article.vue","mtime":1742646402775},{"path":"/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/babel.config.js","mtime":1742646402652},{"path":"/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/node_modules/cache-loader/dist/cjs.js","mtime":1743264595665},{"path":"/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/node_modules/babel-loader/lib/index.js","mtime":1743264596348},{"path":"/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/node_modules/cache-loader/dist/cjs.js","mtime":1743264595665},{"path":"/Users/shuguang/Desktop/毕设/CodeMaster/CodeMaster/node_modules/vue-loader/lib/index.js","mtime":1743264596512}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:aW1wb3J0IHsgQWxsQXJ0aWNsZSwgQWxsVXNlciwgRGV0ZWxlQXJ0aWNsZUJ5SWQgfSBmcm9tICdAL2FwaSc7CmltcG9ydCBJY29uVGV4dCBmcm9tICcuLi8uLi8uLi8uLi92aWV3cy9jb21tdW50aXkvY29tcG9uZW50cy9JY29uVGV4dC52dWUnOwppbXBvcnQgQXJ0aWNsZUxpc3RDb250ZW50IGZyb20gJy4uLy4uLy4uLy4uL2NvbXBvbmVudHMvQXJ0aWNsZUxpc3RDb250ZW50JzsKZXhwb3J0IGRlZmF1bHQgewogIG5hbWU6ICdBcnRpY2xlJywKICBjb21wb25lbnRzOiB7CiAgICBJY29uVGV4dCwKICAgIEFydGljbGVMaXN0Q29udGVudAogIH0sCiAgZGF0YSgpIHsKICAgIHJldHVybiB7CiAgICAgIHVzZXJEYXRhOiBbXSwKICAgICAgbG9hZGluZzogdHJ1ZSwKICAgICAgbG9hZGluZ01vcmU6IGZhbHNlLAogICAgICBkYXRhOiBbXQogICAgfTsKICB9LAogIG1vdW50ZWQoKSB7CiAgICB0aGlzLmdldExpc3QoKTsKICAgIHRoaXMuZ2V0VXNlcigpOwogIH0sCiAgbWV0aG9kczogewogICAgZ2V0TGlzdCgpIHsKICAgICAgQWxsQXJ0aWNsZSgpLnRoZW4ocmVzID0+IHsKICAgICAgICBjb25zb2xlLmxvZygncmVzJywgcmVzKTsKICAgICAgICB0aGlzLmRhdGEgPSByZXMuZGF0YS5maWx0ZXIoYXJ0aWNsZSA9PiBhcnRpY2xlLnVzZXJJZCA9IHRoaXMuJHN0b3JlLnN0YXRlLnVzZXIudXNlcklkKTsKICAgICAgICB0aGlzLmxvYWRpbmcgPSBmYWxzZTsKICAgICAgfSk7CiAgICB9LAogICAgZGVsZXRlQ29udGVudChpZCkgewogICAgICBEZXRlbGVBcnRpY2xlQnlJZCh7CiAgICAgICAgaWQKICAgICAgfSkudGhlbihyZXMgPT4gewogICAgICAgIGlmIChyZXMuY29kZSA9PSAyMDApIHsKICAgICAgICAgIHRoaXMuJG1lc3NhZ2Uuc3VjY2Vzcygi5Yig6Zmk5oiQ5YqfIik7CiAgICAgICAgfQogICAgICB9KS5jYXRjaChlcnJvciA9PiB7CiAgICAgICAgdGhpcy4kbWVzc2FnZS5lcnJvcihlcnJvcik7CiAgICAgIH0pOwogICAgfSwKICAgIGdldFVzZXIoKSB7CiAgICAgIEFsbFVzZXIoKS50aGVuKHJlcyA9PiB7CiAgICAgICAgY29uc3QgdXNlcnMgPSByZXMuZGF0YTsKICAgICAgICBjb25zdCB1c2VyTWFwID0ge307CiAgICAgICAgdXNlcnMuZm9yRWFjaCh1c2VyID0+IHsKICAgICAgICAgIHVzZXJNYXBbdXNlci51c2VySWRdID0gdXNlci51c2VyTmFtZTsKICAgICAgICB9KTsKICAgICAgICB0aGlzLnVzZXJEYXRhID0gdXNlck1hcDsKICAgICAgICBjb25zb2xlLmxvZyh0aGlzLnVzZXJEYXRhKTsKICAgICAgfSkuY2F0Y2goZXJyb3IgPT4gewogICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyb3IpOwogICAgICB9KTsKICAgIH0sCiAgICBsb2FkTW9yZSgpIHsKICAgICAgY29uc29sZS5sb2codGhpcy51c2VyRGF0YSk7CiAgICAgIHRoaXMubG9hZGluZ01vcmUgPSB0cnVlOwogICAgICB0aGlzLiRodHRwLmdldCgnL2xpc3QvYXJ0aWNsZScpLnRoZW4ocmVzID0+IHsKICAgICAgICB0aGlzLmRhdGEgPSB0aGlzLmRhdGEuY29uY2F0KHJlcy5yZXN1bHQpOwogICAgICB9KS5maW5hbGx5KCgpID0+IHsKICAgICAgICB0aGlzLmxvYWRpbmdNb3JlID0gZmFsc2U7CiAgICAgIH0pOwogICAgfQogIH0KfTs="},{"version":3,"names":["AllArticle","AllUser","DeteleArticleById","IconText","ArticleListContent","name","components","data","userData","loading","loadingMore","mounted","getList","getUser","methods","then","res","console","log","filter","article","userId","$store","state","user","deleteContent","id","code","$message","success","catch","error","users","userMap","forEach","userName","loadMore","$http","get","concat","result","finally"],"sources":["src/views/account/center/page/Article.vue"],"sourcesContent":["<template>\n <a-list\n size=\"large\"\n rowKey=\"id\"\n :loading=\"loading\"\n itemLayout=\"vertical\"\n :dataSource=\"data\"\n >\n <a-list-item :key=\"item.id\" slot=\"renderItem\" slot-scope=\"item\">\n\t\t\t\n <template slot=\"actions\">\n <icon-text type=\"star-o\" :text=\"item.star\" />\n <icon-text type=\"like-o\" :text=\"item.like\" />\n <icon-text type=\"message\" :text=\"item.message\" />\n </template>\n <a-list-item-meta>\n <a slot=\"title\">{{ item.articleTitle }}</a>\n <template slot=\"description\">\n <span>\n\t\t\t\t\t\t<a-button type=\"primary\" shape=\"circle\" @click=\"deleteContent(item.articleId)\" icon=\"delete\" style=\"float: inline-end;margin-left: 8px;\" />\n\t\t\t\t\t\t<router-link :to=\"'/community/editcontent?id=' + item.articleId\">\n\t\t\t\t\t\t <a-button type=\"primary\" shape=\"circle\" icon=\"edit\" style=\"float: inline-end;\" />\n\t\t\t\t\t </router-link>\n\t\t\t\t\t\t\n <a-tag>{{ item.articleType }}</a-tag>\n </span>\n </template>\n </a-list-item-meta>\n\t\t\t<router-link :to=\"'/pages?id=' + item.articleId\">\n\t\t\t\t<!-- 头像 -->\n <article-list-content :description=\"item.articleContent\" :owner=\"userData[item.userId]\" :avatar=\"`/logo.png`\"/>\n\t\t\t</router-link>\n </a-list-item>\n <div slot=\"footer\" v-if=\"data.length > 0\" style=\"text-align: center; margin-top: 16px;\">\n <a-button @click=\"loadMore\" :loading=\"loadingMore\">加载更多</a-button>\n </div>\n </a-list>\n</template>\n\n<script>\nimport {AllArticle,AllUser,DeteleArticleById} from '@/api'\nimport IconText from '../../../../views/communtiy/components/IconText.vue'\nimport ArticleListContent from '../../../../components/ArticleListContent'\n\nexport default {\n name: 'Article',\n components: {\n IconText,\n ArticleListContent\n },\n data () {\n return {\n\t\t\tuserData:[],\n loading: true,\n loadingMore: false,\n data: []\n }\n },\n mounted () {\n this.getList()\n\t\tthis.getUser() \n },\n methods: {\n getList () {\n AllArticle().then(res => {\n console.log('res', res)\n this.data = res.data.filter(article =>article.userId = this.$store.state.user.userId)\n this.loading = false\n })\n },\n\t\tdeleteContent(id){\n\t\t\tDeteleArticleById({id}).then((res)=>{\n\t\t\t\tif(res.code==200){\n\t\t\t\t\tthis.$message.success(\"删除成功\");\n\t\t\t\t}\n\t\t\t}).catch(error=>{\n\t\t\t\tthis.$message.error(error);\n\t\t\t})\n\t\t},\n\t\tgetUser() {\n AllUser().then(res => {\n const users = res.data;\n const userMap = {};\n users.forEach(user => {\n userMap[user.userId] = user.userName;\n });\n this.userData = userMap;\n\t\tconsole.log(this.userData)\n }).catch(error => {\n console.error(error);\n });\n},\n loadMore () {\n\t\t\tconsole.log(this.userData)\n this.loadingMore = true\n this.$http.get('/list/article').then(res => {\n this.data = this.data.concat(res.result)\n }).finally(() => {\n this.loadingMore = false\n })\n }\n }\n}\n</script>\n\n<style scoped>\n\n</style>\n"],"mappings":"AAwCA,SAAAA,UAAA,EAAAC,OAAA,EAAAC,iBAAA;AACA,OAAAC,QAAA;AACA,OAAAC,kBAAA;AAEA;EACAC,IAAA;EACAC,UAAA;IACAH,QAAA;IACAC;EACA;EACAG,KAAA;IACA;MACAC,QAAA;MACAC,OAAA;MACAC,WAAA;MACAH,IAAA;IACA;EACA;EACAI,QAAA;IACA,KAAAC,OAAA;IACA,KAAAC,OAAA;EACA;EACAC,OAAA;IACAF,QAAA;MACAZ,UAAA,GAAAe,IAAA,CAAAC,GAAA;QACAC,OAAA,CAAAC,GAAA,QAAAF,GAAA;QACA,KAAAT,IAAA,GAAAS,GAAA,CAAAT,IAAA,CAAAY,MAAA,CAAAC,OAAA,IAAAA,OAAA,CAAAC,MAAA,QAAAC,MAAA,CAAAC,KAAA,CAAAC,IAAA,CAAAH,MAAA;QACA,KAAAZ,OAAA;MACA;IACA;IACAgB,cAAAC,EAAA;MACAxB,iBAAA;QAAAwB;MAAA,GAAAX,IAAA,CAAAC,GAAA;QACA,IAAAA,GAAA,CAAAW,IAAA;UACA,KAAAC,QAAA,CAAAC,OAAA;QACA;MACA,GAAAC,KAAA,CAAAC,KAAA;QACA,KAAAH,QAAA,CAAAG,KAAA,CAAAA,KAAA;MACA;IACA;IACAlB,QAAA;MACAZ,OAAA,GAAAc,IAAA,CAAAC,GAAA;QACA,MAAAgB,KAAA,GAAAhB,GAAA,CAAAT,IAAA;QACA,MAAA0B,OAAA;QACAD,KAAA,CAAAE,OAAA,CAAAV,IAAA;UACAS,OAAA,CAAAT,IAAA,CAAAH,MAAA,IAAAG,IAAA,CAAAW,QAAA;QACA;QACA,KAAA3B,QAAA,GAAAyB,OAAA;QACAhB,OAAA,CAAAC,GAAA,MAAAV,QAAA;MACA,GAAAsB,KAAA,CAAAC,KAAA;QACAd,OAAA,CAAAc,KAAA,CAAAA,KAAA;MACA;IACA;IACAK,SAAA;MACAnB,OAAA,CAAAC,GAAA,MAAAV,QAAA;MACA,KAAAE,WAAA;MACA,KAAA2B,KAAA,CAAAC,GAAA,kBAAAvB,IAAA,CAAAC,GAAA;QACA,KAAAT,IAAA,QAAAA,IAAA,CAAAgC,MAAA,CAAAvB,GAAA,CAAAwB,MAAA;MACA,GAAAC,OAAA;QACA,KAAA/B,WAAA;MACA;IACA;EACA;AACA","ignoreList":[]}]} |