1 |
- {"version":3,"sources":["webpack:///./src/views/shop/EvaluateList.vue?cb15","webpack:///./src/views/shop/EvaluateList.vue?bcbc","webpack:///src/views/shop/EvaluateList.vue","webpack:///./src/views/shop/EvaluateList.vue?305e","webpack:///./src/views/shop/EvaluateList.vue"],"names":["_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_EvaluateList_vue_vue_type_style_index_0_id_33370719_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_EvaluateList_vue_vue_type_style_index_0_id_33370719_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","n","render","_vm","this","_h","$createElement","_c","_self","ref","staticClass","_v","class","replyData","reply_star","_s","reply_chance","_l","item","index","key","on","click","$event","changeType","currentActive","evaluate","num","_e","attrs","reply","loaded","loadend","loading","staticRenderFns","NAME","EvaluateListvue_type_script_lang_js_","name","components","UserEvaluation","Loading","props","data","product_id","navList","page","limit","loadTitle","watch","$route","params","id","$set","getProductReplyCount","getProductReplyList","mounted","_this","$scroll","$refs","container","methods","that","Object","store","then","res","sum_count","good_count","in_count","poor_count","q","type","push","apply","length","shop_EvaluateListvue_type_script_lang_js_","component","componentNormalizer","__webpack_exports__"],"mappings":"2IAAA,IAAAA,EAAAC,EAAA,QAAAC,EAAAD,EAAAE,EAAAH,GAA0fE,EAAG,4CCA7f,IAAA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SAAA,EAEA4B,EAAA/B,MAAA0C,KAAAC,MAAAZ,EAAA/B,MAAAmC,EAAAvB,MACAmB,EAAA7B,QAAAiC,EAAAvB,KAAAgC,OAAAb,EAAAf,MACAe,EAAAhB,KAAAgB,EAAAhB,KAAA,MAGArB,WAAA,SAAAL,GACA,IAAA0C,EAAAzD,KACAyD,EAAApC,cAAAN,EACA0C,EAAAhB,KAAA,EACAgB,EAAA7B,SAAA,EACA6B,EAAAT,KAAAS,EAAA,YACAA,EAAAP,yBCrHqWqB,EAAA,0BCQrWC,EAAgBd,OAAAe,EAAA,KAAAf,CACda,EACAzE,EACAgC,GACF,EACA,KACA,WACA,MAIe4C,EAAA,WAAAF","file":"h5/js/chunk-5bfab075.79191bcc.js","sourcesContent":["import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EvaluateList.vue?vue&type=style&index=0&id=33370719&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EvaluateList.vue?vue&type=style&index=0&id=33370719&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"container\",staticClass:\"evaluate-list\"},[_c('div',{staticClass:\"header\"},[_c('div',{staticClass:\"generalComment acea-row row-between-wrapper\"},[_c('div',{staticClass:\"acea-row row-middle font-color-red\"},[_c('div',{staticClass:\"evaluate\"},[_vm._v(\"评分\")]),_c('div',{staticClass:\"start\",class:'star' + _vm.replyData.reply_star})]),_c('div',[_c('span',{staticClass:\"font-color-red\"},[_vm._v(_vm._s(_vm.replyData.reply_chance || 0)+\"%\")]),_vm._v(\"好评率\\n \")])]),_c('div',{staticClass:\"nav acea-row row-middle\"},_vm._l((_vm.navList),function(item,index){return _c('div',{key:index,staticClass:\"acea-row row-center-wrapper\",on:{\"click\":function($event){return _vm.changeType(index)}}},[(item.num)?_c('div',{staticClass:\"item\",class:_vm.currentActive === index ? 'bg-color-red' : ''},[_vm._v(\"\\n \"+_vm._s(item.evaluate)+\"(\"+_vm._s(item.num)+\")\\n \")]):_vm._e()])}),0)]),_c('UserEvaluation',{attrs:{\"reply\":_vm.reply}}),_c('Loading',{attrs:{\"loaded\":_vm.loadend,\"loading\":_vm.loading}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"evaluate-list\" ref=\"container\">\r\n <div class=\"header\">\r\n <div class=\"generalComment acea-row row-between-wrapper\">\r\n <div class=\"acea-row row-middle font-color-red\">\r\n <div class=\"evaluate\">评分</div>\r\n <div class=\"start\" :class=\"'star' + replyData.reply_star\"></div>\r\n </div>\r\n <div>\r\n <span class=\"font-color-red\">{{ replyData.reply_chance || 0 }}%</span\r\n >好评率\r\n </div>\r\n </div>\r\n <div class=\"nav acea-row row-middle\">\r\n <div\r\n class=\"acea-row row-center-wrapper\"\r\n v-for=\"(item, index) in navList\"\r\n :key=\"index\"\r\n @click=\"changeType(index)\"\r\n >\r\n <div\r\n class=\"item\"\r\n :class=\"currentActive === index ? 'bg-color-red' : ''\"\r\n v-if=\"item.num\"\r\n >\r\n {{ item.evaluate }}({{ item.num }})\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <UserEvaluation :reply=\"reply\"></UserEvaluation>\r\n <Loading :loaded=\"loadend\" :loading=\"loading\"></Loading>\r\n </div>\r\n</template>\r\n<script>\r\nimport UserEvaluation from \"@components/UserEvaluation\";\r\nimport { getReplyConfig, getReplyList } from \"@api/store\";\r\nimport Loading from \"@components/Loading\";\r\nlet NAME = \"EvaluateList\";\r\n\r\nexport default {\r\n name: \"EvaluateList\",\r\n components: {\r\n UserEvaluation,\r\n Loading\r\n },\r\n props: {},\r\n data: function() {\r\n return {\r\n product_id: 0,\r\n replyData: {},\r\n navList: [\r\n { evaluate: \"全部\", num: 0 },\r\n { evaluate: \"好评\", num: 0 },\r\n { evaluate: \"中评\", num: 0 },\r\n { evaluate: \"差评\", num: 0 }\r\n ],\r\n currentActive: 0,\r\n page: 1,\r\n limit: 8,\r\n reply: [],\r\n loadTitle: \"\",\r\n loading: false,\r\n loadend: false\r\n };\r\n },\r\n watch: {\r\n $route(n) {\r\n if (n.name === NAME) {\r\n this.product_id = this.$route.params.id;\r\n this.loadend = false;\r\n this.page = 1;\r\n this.$set(this, \"reply\", []);\r\n this.getProductReplyCount();\r\n this.getProductReplyList();\r\n }\r\n }\r\n },\r\n mounted: function() {\r\n this.product_id = this.$route.params.id;\r\n this.getProductReplyCount();\r\n this.getProductReplyList();\r\n this.$scroll(this.$refs.container, () => {\r\n !this.loading && this.getProductReplyList();\r\n });\r\n },\r\n methods: {\r\n getProductReplyCount: function() {\r\n let that = this;\r\n getReplyConfig(that.product_id).then(res => {\r\n that.$set(that, \"replyData\", res.data);\r\n that.navList[0].num = res.data.sum_count;\r\n that.navList[1].num = res.data.good_count;\r\n that.navList[2].num = res.data.in_count;\r\n that.navList[3].num = res.data.poor_count;\r\n });\r\n },\r\n getProductReplyList: function() {\r\n let that = this;\r\n if (that.loading) return; //阻止下次请求(false可以进行请求);\r\n if (that.loadend) return; //阻止结束当前请求(false可以进行请求);\r\n that.loading = true;\r\n let q = { page: that.page, limit: that.limit, type: that.currentActive };\r\n getReplyList(that.product_id, q).then(res => {\r\n that.loading = false;\r\n //apply();js将一个数组插入另一个数组;\r\n that.reply.push.apply(that.reply, res.data);\r\n that.loadend = res.data.length < that.limit; //判断所有数据是否加载完成;\r\n that.page = that.page + 1;\r\n });\r\n },\r\n changeType: function(index) {\r\n let that = this;\r\n that.currentActive = index;\r\n that.page = 1;\r\n that.loadend = false;\r\n that.$set(that, \"reply\", []);\r\n that.getProductReplyList();\r\n }\r\n }\r\n};\r\n</script>\r\n<style scoped>\r\n.noCommodity {\r\n height: 8rem;\r\n background-color: #fff;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EvaluateList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EvaluateList.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./EvaluateList.vue?vue&type=template&id=33370719&scoped=true&\"\nimport script from \"./EvaluateList.vue?vue&type=script&lang=js&\"\nexport * from \"./EvaluateList.vue?vue&type=script&lang=js&\"\nimport style0 from \"./EvaluateList.vue?vue&type=style&index=0&id=33370719&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"33370719\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|