You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
7.7 KiB
1 line
7.7 KiB
{"remainingRequest":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/linhuakun/Downloads/coderlhk/codewhy/src/components/content/moments/MomentListItem.vue?vue&type=style&index=0&id=75b75af5&scoped=true&lang=css&","dependencies":[{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/src/components/content/moments/MomentListItem.vue","mtime":1609669761786},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/css-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/loaders/stylePostLoader.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/postcss-loader/src/index.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKLm1vbWVudC1pdGVtcyB7CiAgcG9zaXRpb246IHJlbGF0aXZlOwogIGJhY2tncm91bmQtY29sb3I6IHJnYigyNTUsIDI1NSwgMjU1KTsKICB3aWR0aDogMTAwJTsKICBmb250LXNpemU6IDVweDsKfQouYXZhdGFyIHsKICBmbG9hdDogbGVmdDsKICB3aWR0aDogNTBweDsKICBoZWlnaHQ6IDUwcHg7CiAgYm9yZ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;;;;;;;;;;;;;;;;;;;AAyJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"MomentListItem.vue","sourceRoot":"src/components/content/moments","sourcesContent":["<template>\n <div class=\"moment-items\" v-if=\"isExist\">\n <div>\n <img\n v-image-preview\n class=\"avatar\"\n :src=\"moments.author.avatarUrl\"\n @load=\"uploadavatar\"\n />\n </div>\n <div class=\"name\">{{ moments.author.name }}</div>\n\n <i\n @click=\"remove\"\n id=\"delete\"\n class=\"el-icon-delete\"\n style=\"font-size: 20px\"\n ></i>\n\n <div class=\"time\">\n {{ this.$moment(moments.createAT).format(\"YYYY-MM-DD HH:mm:ss\") }}\n </div>\n <div class=\"content\">\n <div class=\"text\">{{ moments.content }}</div>\n <div class=\"image\">\n <li\n v-for=\"(item, index) in moments.images\"\n :key=\"index\"\n class=\"picture\"\n >\n <img\n v-image-preview\n :src=\"item\"\n @load=\"uploadavatar\"\n width=\"100px\"\n height=\"100px\"\n />\n </li>\n </div>\n </div>\n\n <div class=\"icon\" v-if=\"this.isdisplay\">\n <i id=\"icon-1\" @click=\"clickpraise\"\n ><img src=\"@/assets/img/moment/praise.svg\" /></i\n >{{ this.praise.promiseCount }}\n <i\n id=\"icon-1\"\n class=\"el-icon-chat-dot-square\"\n style=\"font-size: 20px\"\n @click=\"comment\"\n ></i>\n <div class=\"number\">{{ moments.commentCount }}</div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"MomentListItem\",\n props: {\n moments: {\n type: Object,\n default() {\n return {};\n },\n },\n },\n data() {\n return {\n id: this.moments.id,\n isExist: true,\n images: [],\n praise: {},\n isdisplay: true,\n number: \"\",\n isfrist: true,\n };\n },\n created() {\n this.getAllPraise();\n window.sessionStorage.setItem(\"number\", \"0\");\n },\n methods: {\n uploadavatar() {\n this.$bus.$emit(\"upload\");\n },\n async remove() {\n const { data: res } = await this.$http.delete(\"/moment/\" + this.id);\n if (res.status == 200) {\n this.isExist = !this.isExist;\n return this.$message.success(\"删除成功\");\n this.$bus.$emit(\"upload\");\n } else {\n return this.$message.error(\"你不具备删除该动态权限\");\n }\n },\n comment() {\n this.$router.push(\"detailcomment/\" + this.moments.id);\n },\n async getAllPraise() {\n const { data: res } = await this.$http.get(\"/praise/\" + this.moments.id);\n this.praise = res;\n },\n refresh() {\n this.isdisplay = false;\n this.$nextTick(() => {\n this.isdisplay = true;\n }, 100);\n this.getAllPraise();\n },\n //发表成功评论\n async clickpraise() {\n \n const {data:res}= await this.$http.post('/praise/ispraise/'+this.moments.id)\n if(res.status!= \"200\"){\n this.number=window.sessionStorage.getItem(\"number\");\n if (this.number === \"1\") window.sessionStorage.setItem(\"number\", \"0\");\n else {\n window.sessionStorage.setItem(\"number\", \"1\");\n }\n }\n if (res.status == \"200\") {\n await this.$http.post(\"/praise/\" + this.moments.id);\n this.$nextTick(() => {\n this.refresh();\n }, 100);\n } else {\n \n this.number = window.sessionStorage.getItem(\"number\");\n const content = {\n ispraise: \"\",\n };\n content.ispraise = this.number;\n const { data: res } = await this.$http.post(\n \"/praise/update/\" + this.moments.id,\n content\n );\n this.$nextTick(() => {\n this.refresh();\n }, 100);\n }\n },\n isclickpraise(){\n console.log(1);\n }\n },\n mounted() {\n this.$bus.$on(\"aaispraise\", this.isclickpraise);\n },\n};\n</script>\n\n<style scoped>\n.moment-items {\n position: relative;\n background-color: rgb(255, 255, 255);\n width: 100%;\n font-size: 5px;\n}\n.avatar {\n float: left;\n width: 50px;\n height: 50px;\n border-radius: 25px;\n}\n.name {\n float: left;\n margin-top: 5px;\n margin-left: 10px;\n color: rgb(0, 0, 0);\n font-size: 15px;\n}\n.time {\n margin-left: 60px;\n margin-top: 30px;\n font-size: 6px;\n}\n.content {\n margin-top: 15px;\n margin-left: 5px;\n font-size: 15px;\n margin-bottom: 15px;\n}\n.icon {\n margin-top: 15px;\n display: flex;\n border-top-style: solid;\n border-width: 0.1px;\n border-color: rgb(230, 220, 220);\n}\n#icon-1 {\n margin-left: 30%;\n}\n#delete {\n float: right;\n}\n.el-icon-delete {\n margin-left: 20px;\n}\n.remove {\n margin-left: 20px;\n}\n.picture {\n margin-top: 30px;\n display: inline;\n}\n\n.text {\n margin-top: 15px;\n}\n.image {\n margin-top: 10px;\n}\n</style>\n"]}]} |