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
16 KiB
1 line
16 KiB
{"remainingRequest":"D:\\code\\vue\\front\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\code\\vue\\front\\src\\pages\\forum\\list.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\code\\vue\\front\\src\\pages\\forum\\list.vue","mtime":1709633805000},{"path":"D:\\code\\vue\\front\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\code\\vue\\front\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\code\\vue\\front\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\code\\vue\\front\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:DQogIGV4cG9ydCBkZWZhdWx0IHsNCiAgICAvL+aVsOaNrumbhuWQiA0KICAgIGRhdGEoKSB7DQogICAgICByZXR1cm4gew0KCQlmb3JtU2VhcmNoOiB7fSwNCiAgICAgICAgdGl0bGU6ICcnLA0KICAgICAgICBsYXlvdXRzOiAnJywNCiAgICAgICAgZm9ydW1MaXN0OiBbXSwNCiAgICAgICAgdG90YWw6IDEsDQogICAgICAgIHBhZ2VTaXplOiAxMCxwYWdlU2l6ZXM6IFsxMCwyMCwzMCw1MF0sDQogICAgICAgIHRvdGFsUGFnZTogMQ0KICAgICAgfQ0KICAgIH0sDQogICAgY3JlYXRlZCgpIHsNCiAgICAgIHRoaXMuZ2V0Rm9ydW1MaXN0KDEpOw0KICAgIH0sDQogICAgLy/mlrnms5Xpm4blkIgNCiAgICBtZXRob2RzOiB7DQogICAgICBnZXRGb3J1bUxpc3QocGFnZSkgew0KICAgICAgICBsZXQgcGFyYW1zID0ge3BhZ2UsIGxpbWl0OiB0aGlzLnBhZ2VTaXplLCBpc2RvbmU6ICflvIDmlL4nLCBzb3J0OiAnaXN0b3AsdG9wdGltZ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HRoaXMuJHJvdXRlci5wdXNoKCcvaW5kZXgvZm9ydW1BZGQnKTsNCiAgICAgIH0sDQogICAgICB0b0ZvcnVtRGV0YWlsKGl0ZW0pIHsNCiAgICAgICAgdGhpcy4kcm91dGVyLnB1c2goe3BhdGg6ICcvaW5kZXgvZm9ydW1EZXRhaWwnLCBxdWVyeToge2lkOiBpdGVtLmlkfX0pOw0KICAgICAgfQ0KICAgIH0NCiAgfQ0K"},{"version":3,"sources":["list.vue"],"names":[],"mappings":";AAiDA;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","file":"list.vue","sourceRoot":"src/pages/forum","sourcesContent":["<template>\r\n<div class=\"forum-preview\" :style='{\"width\":\"100%\",\"padding\":\"30px 7% 40px\",\"margin\":\"0px auto\",\"position\":\"relative\",\"background\":\"#fff\"}'>\r\n <div :style='{\"width\":\"100%\",\"lineHeight\":\"54px\",\"textAlign\":\"center\",\"background\":\"#333\",\"height\":\"54px\"}'>\r\n\t\t<div :style='{\"padding\":\"0 20px\",\"color\":\"#fff\",\"textAlign\":\"center\",\"background\":\"none\",\"display\":\"inline-block\",\"width\":\"auto\",\"fontSize\":\"20px\"}'>互动交流</div>\r\n\t</div>\r\n <el-form :style='{\"padding\":\"10px\",\"margin\":\"10px 0\",\"alignItems\":\"center\",\"flexWrap\":\"wrap\",\"background\":\"none\",\"display\":\"flex\",\"width\":\"100%\",\"justifyContent\":\"center\",\"height\":\"auto\"}' :inline=\"true\" :model=\"formSearch\" class=\"list-form-pv\">\r\n\t\t<el-form-item :style='{\"margin\":\"0 10px\"}'>\r\n\t\t\t<el-input v-model=\"title\" placeholder=\"标题\"></el-input>\r\n\t\t</el-form-item>\r\n\t\t<div :style='{\"display\":\"flex\"}'>\r\n\t\t\t<el-button class=\"searchBtn\" type=\"primary\" @click=\"getForumList(1)\">\r\n\t\t\t\t<span class=\"icon iconfont icon-shouye-zhihui\" :style='{\"color\":\"#fff\",\"margin\":\"0 10px 0 0\",\"fontSize\":\"14px\"}'></span>\r\n\t\t\t\t查询\r\n\t\t\t</el-button>\r\n\t\t\t<el-button class=\"pubBtn\" type=\"primary\" @click=\"toForumAdd\">\r\n\t\t\t\t<span class=\"icon iconfont icon-shouye-zhihui\" :style='{\"color\":\"#fff\",\"margin\":\"0 10px 0 0\",\"fontSize\":\"14px\"}'></span>\r\n\t\t\t\t发布帖子\r\n\t\t\t</el-button>\r\n\t\t</div>\r\n </el-form>\r\n\t<div class=\"z-box\" :style='{\"width\":\"100%\",\"padding\":\"0px\"}'>\r\n\t\t<div class=\"section-content\" v-for=\"item in forumList\" :key=\"item.id\" @click=\"toForumDetail(item)\">\r\n\t\t <div :style='{\"overflow\":\"hidden\",\"whiteSpace\":\"nowrap\",\"color\":\"#333\",\"flex\":\"1\",\"width\":\"calc(100% - 260px)\",\"fontSize\":\"14px\",\"textOverflow\":\"ellipsis\"}' class=\"item-style\">{{item.title}}</div>\r\n\t\t <div :style='{\"color\":\"#999\",\"margin\":\"0 30px 0 0\",\"fontSize\":\"14px\"}' class=\"item-style\">发布人:{{item.username}}</div>\r\n\t\t <div :style='{\"color\":\"#999\",\"fontSize\":\"14px\"}' class=\"item-style\">{{item.addtime}}</div>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n <el-pagination\r\n background\r\n id=\"pagination\" class=\"pagination\"\r\n :pager-count=\"7\"\r\n :page-size=\"pageSize\"\r\n :page-sizes=\"pageSizes\"\r\n\t prev-text=\"<\"\r\n next-text=\">\"\r\n :hide-on-single-page=\"false\"\r\n :layout='[\"total\",\"prev\",\"pager\",\"next\",\"sizes\",\"jumper\"].join()'\r\n :total=\"total\"\r\n :style='{\"padding\":\"0 7%\",\"margin\":\"10px auto\",\"whiteSpace\":\"nowrap\",\"overflow\":\"hidden\",\"color\":\"#333\",\"textAlign\":\"center\",\"width\":\"100%\",\"clear\":\"both\",\"fontWeight\":\"500\",\"order\":\"50\"}'\r\n @current-change=\"curChange\"\r\n @prev-click=\"prevClick\"\r\n @next-click=\"nextClick\"\r\n ></el-pagination>\r\n\t\r\n</div>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n //数据集合\r\n data() {\r\n return {\r\n\t\tformSearch: {},\r\n title: '',\r\n layouts: '',\r\n forumList: [],\r\n total: 1,\r\n pageSize: 10,pageSizes: [10,20,30,50],\r\n totalPage: 1\r\n }\r\n },\r\n created() {\r\n this.getForumList(1);\r\n },\r\n //方法集合\r\n methods: {\r\n getForumList(page) {\r\n let params = {page, limit: this.pageSize, isdone: '开放', sort: 'istop,toptime', order: 'desc,desc'};\r\n let searchWhere = {};\r\n if(this.title != '') searchWhere.title = '%' + this.title + '%';\r\n this.$http.get('forum/flist', {params: Object.assign(params, searchWhere)}).then(res => {\r\n if (res.data.code == 0) {\r\n this.forumList = res.data.data.list;\r\n this.total = res.data.data.total;\r\n this.pageSize = res.data.data.pageSize;this.pageSizes = [this.pageSize, this.pageSize*2, this.pageSize*3, this.pageSize*5];\r\n this.totalPage = res.data.data.totalPage;\r\n }\r\n });\r\n },\r\n curChange(page) {\r\n this.getForumList(page);\r\n },\r\n prevClick(page) {\r\n this.getForumList(page);\r\n },\r\n nextClick(page) {\r\n this.getForumList(page);\r\n },\r\n toForumAdd() {\r\n this.$router.push('/index/forumAdd');\r\n },\r\n toForumDetail(item) {\r\n this.$router.push({path: '/index/forumDetail', query: {id: item.id}});\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style rel=\"stylesheet/scss\" lang=\"scss\" scoped>\r\n .section {\r\n width: 900px;\r\n margin: 0 auto;\r\n }\r\n\r\n .section-content {\r\n display: flex;\r\n justify-content: space-between;\r\n line-height: 60px;\r\n cursor: pointer;\r\n box-sizing: border-box;\r\n padding: 0 10px;\r\n }\r\n .section-content:hover {\r\n background-color: #E4E7ED;\r\n color: #fff;\r\n }\r\n .item-style {\r\n color: #909399;\r\n font-weight: 400;\r\n }\r\n .section-btn {\r\n text-align: right;\r\n margin-bottom: 15px;\r\n padding-right: 10px;\r\n }\r\n \r\n\t.forum-preview .el-form-item /deep/ .el-form-item__content {\r\n\t\t\t\tdisplay: flex;\r\n\t\t\t\talign-items: center;\r\n\t\t\t}\r\n\t\r\n\t.forum-preview .el-form-item .el-input /deep/ .el-input__inner {\r\n\t\t\t\tborder: 1px solid #eee;\r\n\t\t\t\tborder-radius: 4px;\r\n\t\t\t\tpadding: 0 10px;\r\n\t\t\t\tmargin: 0;\r\n\t\t\t\toutline: none;\r\n\t\t\t\tcolor: #333;\r\n\t\t\t\twidth: 280px;\r\n\t\t\t\tfont-size: 14px;\r\n\t\t\t\tline-height: 36px;\r\n\t\t\t\theight: 36px;\r\n\t\t\t}\r\n\t\r\n\t.forum-preview .searchBtn {\r\n\t\t\t\tcursor: pointer;\r\n\t\t\t\tborder: 0;\r\n\t\t\t\tborder-radius: 4px;\r\n\t\t\t\tpadding: 0px 15px;\r\n\t\t\t\tmargin: 0 10px 0 0;\r\n\t\t\t\toutline: none;\r\n\t\t\t\tcolor: #fff;\r\n\t\t\t\tbackground: #F5BB00;\r\n\t\t\t\twidth: auto;\r\n\t\t\t\tfont-size: 14px;\r\n\t\t\t\tline-height: 36px;\r\n\t\t\t\theight: 36px;\r\n\t\t\t}\r\n\t\r\n\t.forum-preview .searchBtn:hover {\r\n\t\t\t\tbackground: #F5BB0090;\r\n\t\t\t}\r\n\t\r\n\t.forum-preview .pubBtn {\r\n\t\t\t\tcursor: pointer;\r\n\t\t\t\tborder: 0;\r\n\t\t\t\tborder-radius: 4px;\r\n\t\t\t\tpadding: 0px 15px;\r\n\t\t\t\tmargin: 0 10px 0 0;\r\n\t\t\t\toutline: none;\r\n\t\t\t\tcolor: #fff;\r\n\t\t\t\tbackground: #333;\r\n\t\t\t\twidth: auto;\r\n\t\t\t\tfont-size: 14px;\r\n\t\t\t\tline-height: 36px;\r\n\t\t\t\theight: 36px;\r\n\t\t\t}\r\n\t\r\n\t.forum-preview .pubBtn:hover {\r\n\t\t\t\tbackground: #33333390;\r\n\t\t\t}\r\n\t\r\n\t.forum-preview .z-box .section-content {\r\n\t\t\t\tcursor: pointer;\r\n\t\t\t\tpadding: 0 20px;\r\n\t\t\t\tcolor: #333;\r\n\t\t\t\tbackground: #fff;\r\n\t\t\t\tdisplay: flex;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\tborder-color: #ddd;\r\n\t\t\t\tborder-width: 0 0 1px 0;\r\n\t\t\t\tline-height: 40px;\r\n\t\t\t\talign-items: center;\r\n\t\t\t\tborder-style: dashed;\r\n\t\t\t\theight: 40px;\r\n\t\t\t}\r\n\t\r\n\t.forum-preview .z-box .section-content:hover {\r\n\t\t\t\tcolor: #fff;\r\n\t\t\t\tbackground: #e4e7ed20;\r\n\t\t\t}\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__total {\r\n \t \tmargin: 0 10px 0 0;\r\n \t \tcolor: #666;\r\n \t \tfont-weight: 400;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .btn-prev {\r\n \t \tborder: none;\r\n \t \tborder-radius: 2px;\r\n \t \tpadding: 0;\r\n \t \tmargin: 0 5px;\r\n \t \tcolor: #666;\r\n \t \tbackground: #f4f4f5;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \tmin-width: 35px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .btn-next {\r\n \t \tborder: none;\r\n \t \tborder-radius: 2px;\r\n \t \tpadding: 0;\r\n \t \tmargin: 0 5px;\r\n \t \tcolor: #666;\r\n \t \tbackground: #f4f4f5;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \tmin-width: 35px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .btn-prev:disabled {\r\n \t \tborder: none;\r\n \t \tcursor: not-allowed;\r\n \t \tborder-radius: 2px;\r\n \t \tpadding: 0;\r\n \t \tmargin: 0 5px;\r\n \t \tcolor: #C0C4CC;\r\n \t \tbackground: #f4f4f5;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .btn-next:disabled {\r\n \t \tborder: none;\r\n \t \tcursor: not-allowed;\r\n \t \tborder-radius: 2px;\r\n \t \tpadding: 0;\r\n \t \tmargin: 0 5px;\r\n \t \tcolor: #C0C4CC;\r\n \t \tbackground: #f4f4f5;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pager {\r\n \t \tpadding: 0;\r\n \t \tmargin: 0;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pager .number {\r\n \t \tcursor: pointer;\r\n \t \tpadding: 0 4px;\r\n \t \tmargin: 0 5px;\r\n \t \tcolor: #666;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \tborder-radius: 2px;\r\n \t \tbackground: #f4f4f5;\r\n \t \ttext-align: center;\r\n \t \tmin-width: 30px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pager .number:hover {\r\n \t \tcursor: pointer;\r\n \t \tpadding: 0 4px;\r\n \t \tmargin: 0 5px;\r\n \t \tcolor: #fff;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \tborder-radius: 2px;\r\n \t \tbackground: #F5BB00;\r\n \t \ttext-align: center;\r\n \t \tmin-width: 30px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pager .number.active {\r\n \t \tcursor: default;\r\n \t \tpadding: 0 4px;\r\n \t \tmargin: 0 5px;\r\n \t \tcolor: #FFF;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \tborder-radius: 2px;\r\n \t \tbackground: #F5BB00;\r\n \t \ttext-align: center;\r\n \t \tmin-width: 30px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__sizes {\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__sizes .el-input {\r\n \t \tmargin: 0 5px;\r\n \t \twidth: 100px;\r\n \t \tposition: relative;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__sizes .el-input .el-input__inner {\r\n \t \tborder: 1px solid #DCDFE6;\r\n \t \tcursor: pointer;\r\n \t \tpadding: 0 25px 0 8px;\r\n \t \tcolor: #606266;\r\n \t \tdisplay: inline-block;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \tborder-radius: 3px;\r\n \t \toutline: 0;\r\n \t \tbackground: #FFF;\r\n \t \twidth: 100%;\r\n \t \ttext-align: center;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__sizes .el-input span.el-input__suffix {\r\n \t \ttop: 0;\r\n \t \tposition: absolute;\r\n \t \tright: 0;\r\n \t \theight: 100%;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__sizes .el-input .el-input__suffix .el-select__caret {\r\n \t \tcursor: pointer;\r\n \t \tcolor: #C0C4CC;\r\n \t \twidth: 25px;\r\n \t \tfont-size: 14px;\r\n \t \tline-height: 28px;\r\n \t \ttext-align: center;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__jump {\r\n \t \tmargin: 0 0 0 24px;\r\n \t \tcolor: #606266;\r\n \t \tdisplay: inline-block;\r\n \t \tvertical-align: top;\r\n \t \tfont-size: 13px;\r\n \t \tline-height: 28px;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__jump .el-input {\r\n \t \tborder-radius: 3px;\r\n \t \tpadding: 0 2px;\r\n \t \tmargin: 0 2px;\r\n \t \tdisplay: inline-block;\r\n \t \twidth: 50px;\r\n \t \tfont-size: 14px;\r\n \t \tline-height: 18px;\r\n \t \tposition: relative;\r\n \t \ttext-align: center;\r\n \t \theight: 28px;\r\n \t }\r\n \r\n #pagination.el-pagination /deep/ .el-pagination__jump .el-input .el-input__inner {\r\n \t \tborder: 1px solid #DCDFE6;\r\n \t \tcursor: pointer;\r\n \t \tpadding: 0 3px;\r\n \t \tcolor: #606266;\r\n \t \tdisplay: inline-block;\r\n \t \tfont-size: 14px;\r\n \t \tline-height: 28px;\r\n \t \tborder-radius: 3px;\r\n \t \toutline: 0;\r\n \t \tbackground: #FFF;\r\n \t \twidth: 100%;\r\n \t \ttext-align: center;\r\n \t \theight: 28px;\r\n \t }\r\n</style>\r\n"]}]} |