qauMaWeb/node_modules/.cache/babel-loader/9ac0a58565b60aa45066637b049...

1 line
8.4 KiB
JSON
Raw Normal View History

2024-10-13 18:02:27 +08:00
{"ast":null,"code":"import \"core-js/modules/es.number.constructor.js\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport search from \"../../../components/Search\";\nexport default {\n name: \"GoodList\",\n data: function data() {\n return {\n //分类icon每个icon包含id、value、categories对象数组.categoryidname\n icons: [],\n total: 0,\n pageSize: 8,\n currentPage: 1,\n //选择的分类\n categoryId: Number,\n //搜索的内容\n searchText: \"\",\n good: [],\n baseApi: this.$store.state.baseApi\n };\n },\n components: {\n search: search\n },\n created: function created() {\n //二者一般不同时存在\n this.searchText = this.$route.query.searchText;\n this.categoryId = this.$route.query.categoryId;\n this.loadCategories();\n this.load();\n },\n methods: {\n loadCategories: function loadCategories() {\n var _this = this;\n\n this.request.get(\"/api/icon\").then(function (res) {\n if (res.code === \"200\") {\n _this.icons = res.data;\n }\n });\n },\n handleCurrentPage: function handleCurrentPage(currentPage) {\n this.currentPage = currentPage;\n this.load();\n },\n handleSearch: function handleSearch(text) {\n this.searchText = text;\n this.load();\n },\n load: function load(categoryId) {\n var _this2 = this;\n\n if (categoryId != undefined) {\n this.categoryId = categoryId;\n this.$router.push({\n path: \"/goodlist\",\n query: {\n categoryId: this.categoryId\n }\n });\n }\n\n this.request.get(\"/api/good/page\", {\n params: {\n pageNum: this.currentPage,\n pageSize: this.pageSize,\n searchText: this.searchText,\n categoryId: this.categoryId\n }\n }).then(function (res) {\n if (res.code === \"200\") {\n _this2.total = res.data.total;\n _this2.good = res.data.records;\n }\n });\n }\n }\n};","map":{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA;AAEA;AACAA,kBADA;AAEAC,MAFA,kBAEA;AACA;AACA;AACAC,eAFA;AAGAC,cAHA;AAIAC,iBAJA;AAKAC,oBALA;AAMA;AACAC,wBAPA;AAQA;AACAC,oBATA;AAUAC,cAVA;AAWAC;AAXA;AAaA,GAhBA;AAiBAC;AACAC;AADA,GAjBA;AAoBAC,SApBA,qBAoBA;AACA;AACA;AACA;AAEA;AACA;AACA,GA3BA;AA4BAC;AACAC,kBADA,4BACA;AAAA;;AACA;AACA;AACA;AACA;AACA,OAJA;AAKA,KAPA;AAQAC,qBARA,6BAQAV,WARA,EAQA;AACA;AACA;AACA,KAXA;AAYAW,gBAZA,wBAYAC,IAZA,EAYA;AACA;AACA;AACA,KAfA;AAgBAC,QAhBA,gBAgBAZ,UAhBA,EAgBA;AAAA;;AACA;AACA;AAEA;AACAa,2BADA;AAEAC;AAAAd;AAAA;AAFA;AAIA;;AACA,mBACAe,GADA,CACA,gBADA,EACA;AACAC;AACAC,mCADA;AAEAnB,iCAFA;AAGAG,qCAHA;AAIAD;AAJA;AADA,OADA,EASAkB,IATA,CASA;AACA;AACA;AACA;AAEA;AACA,OAfA;AAgBA;AAzCA;AA5BA","names":["name","data","icons","total","pageSize","currentPage","categoryId","searchText","good","baseApi","components","search","created","methods","loadCategories","handleCurrentPage","handleSearch","text","load","path","query","get","params","pageNum","then"],"sourceRoot":"src/views/front/good","sources":["GoodList.vue"],"sourcesContent":["<template>\r\n <div>\r\n <search @search=\"handleSearch\"></search>\r\n <div class=\"main-box\">\r\n <div style=\"margin: 20px auto\">\r\n <h2 class=\"cate\" style=\"font-size: 24px;\">\r\n 选择商品分类\r\n </h2>\r\n <!-- 类别菜单-->\r\n <el-row :gutter=\"20\" style=\"font-size: 18px;\">\r\n <el-col v-for=\"(item, index) in icons\" :key=\"index\" :span=\"6\">\r\n <i class=\"iconfont\" v-html=\"item.value\"></i> \r\n <span v-for=\"(category, index2) in item.categories\" :key=\"index2\">\r\n <b>\r\n <a\r\n