chunk-4abea3da.aa65e66d.js.map 11 KB

1
  1. {"version":3,"sources":["webpack:///./src/views/shop/EvaluateList.vue?6c0c","webpack:///./src/views/shop/EvaluateList.vue?57a5","webpack:///src/views/shop/EvaluateList.vue","webpack:///./src/views/shop/EvaluateList.vue?4d55","webpack:///./src/views/shop/EvaluateList.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","ref","staticClass","_v","class","replyData","reply_star","_s","reply_chance","_l","item","index","key","on","$event","changeType","currentActive","evaluate","num","_e","attrs","reply","loadend","loading","staticRenderFns","name","components","UserEvaluation","Loading","props","data","product_id","navList","page","limit","loadTitle","watch","$route","n","NAME","params","id","$set","getProductReplyCount","getProductReplyList","mounted","$scroll","$refs","container","methods","that","res","sum_count","good_count","in_count","poor_count","push","apply","length","component"],"mappings":"kHAAA,yBAA2nB,EAAG,G,kECA9nB,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,IAAI,YAAYC,YAAY,iBAAiB,CAACH,EAAG,MAAM,CAACG,YAAY,UAAU,CAACH,EAAG,MAAM,CAACG,YAAY,+CAA+C,CAACH,EAAG,MAAM,CAACG,YAAY,sCAAsC,CAACH,EAAG,MAAM,CAACG,YAAY,YAAY,CAACP,EAAIQ,GAAG,QAAQJ,EAAG,MAAM,CAACG,YAAY,QAAQE,MAAM,OAAST,EAAIU,UAAUC,eAAeP,EAAG,MAAM,CAACA,EAAG,OAAO,CAACG,YAAY,kBAAkB,CAACP,EAAIQ,GAAGR,EAAIY,GAAGZ,EAAIU,UAAUG,cAAgB,GAAG,OAAOb,EAAIQ,GAAG,mBAAmBJ,EAAG,MAAM,CAACG,YAAY,2BAA2BP,EAAIc,GAAId,EAAW,SAAE,SAASe,EAAKC,GAAO,OAAOZ,EAAG,MAAM,CAACa,IAAID,EAAMT,YAAY,8BAA8BW,GAAG,CAAC,MAAQ,SAASC,G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YAAaC,EAAIrB,MACjCoB,EAAKlB,QAAQ,GAAGd,IAAMiC,EAAIrB,KAAKsB,UAC/BF,EAAKlB,QAAQ,GAAGd,IAAMiC,EAAIrB,KAAKuB,WAC/BH,EAAKlB,QAAQ,GAAGd,IAAMiC,EAAIrB,KAAKwB,SAC/BJ,EAAKlB,QAAQ,GAAGd,IAAMiC,EAAIrB,KAAKyB,eAGnCX,oBAAqB,WACnB,IAAN,OACM,IAAIM,EAAK3B,UACL2B,EAAK5B,QAAT,CACA4B,EAAK3B,SAAU,EACf,IAAN,mDACM,OAAN,OAAM,CAAN,kCACQ2B,EAAK3B,SAAU,EAEf2B,EAAK7B,MAAMmC,KAAKC,MAAMP,EAAK7B,MAAO8B,EAAIrB,MACtCoB,EAAK5B,QAAU6B,EAAIrB,KAAK4B,OAASR,EAAKhB,MACtCgB,EAAKjB,KAAOiB,EAAKjB,KAAO,OAG5BlB,WAAY,SAAhB,GACM,IAAN,OACMmC,EAAKlC,cAAgBL,EACrBuC,EAAKjB,KAAO,EACZiB,EAAK5B,SAAU,EACf4B,EAAKR,KAAKQ,EAAM,QAAS,IACzBA,EAAKN,yBCrH8b,I,wBCQrce,EAAY,eACd,EACAjE,EACA8B,GACA,EACA,KACA,WACA,MAIa,aAAAmC,E","file":"h5/js/chunk-4abea3da.aa65e66d.js","sourcesContent":["import mod from \"-!../../../node_modules/_mini-css-extract-plugin@0.8.2@mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/_css-loader@1.0.1@css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@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@0.8.2@mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/_css-loader@1.0.1@css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@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@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./EvaluateList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@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@15.9.0@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":""}