1 |
- {"version":3,"sources":["webpack:///./src/views/product/product-history.vue?199d","webpack:///./node_modules/core-js/modules/es6.function.name.js","webpack:///./src/assets/icon-176.png","webpack:///./src/views/product/product-history.vue","webpack:///src/views/product/product-history.vue","webpack:///./src/views/product/product-history.vue?46bd","webpack:///./src/views/product/product-history.vue?9bc4"],"names":["dP","f","FProto","Function","prototype","nameRE","NAME","configurable","get","this","match","e","module","exports","render","_vm","_c","_self","staticClass","attrs","require","on","$event","$router","back","_v","swipeCellList","openOrCloseEdit","_s","edit","ref","swipeCellOption","scopedSlots","_u","key","fn","item","time","toDetail","is_normal","cover","name","low_price","slice","length","staticRenderFns","components","SwipeCellList","data","searchKey","showSearch","timeKey","listApi","itemButtons","text","bgColor","click","bottomButtons","mounted","methods","batchesDel","ids","Toast","component"],"mappings":"kHAAA,W,uBCAA,IAAIA,EAAK,EAAQ,QAAgBC,EAC7BC,EAASC,SAASC,UAClBC,EAAS,wBACTC,EAAO,OAGXA,KAAQJ,GAAU,EAAQ,SAAqBF,EAAGE,EAAQI,EAAM,CAC9DC,cAAc,EACdC,IAAK,WACH,IACE,OAAQ,GAAKC,MAAMC,MAAML,GAAQ,GACjC,MAAOM,GACP,MAAO,Q,8CCZbC,EAAOC,QAAU,IAA0B,6B,uDCAvCC,EAAS,WAAkB,IAAIC,EAAIN,KAAKO,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACF,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACE,YAAY,aAAaC,MAAM,CAAC,IAAMC,EAAQ,QAAuB,IAAM,IAAIC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOP,EAAIQ,QAAQC,WAAWR,EAAG,IAAI,CAACE,YAAY,gBAAgB,CAACH,EAAIU,GAAG,UAAUT,EAAG,SAAS,CAACE,YAAY,aAAaC,MAAM,CAAC,KAAO,UAAUE,GAA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AACE,YAAY,eAAe,CAACH,EAAIU,GAAG,mBAAmB,IAEzGoB,EAAkB,G,gDCoDP,GACfC,YAAAC,sBACAC,gBAAA,WACA,OACAjB,iBACAkB,kBACAC,cACAC,eACAC,oBACA,kCAEAC,aACA,CACAC,UACAC,kBACAC,kBAAA,6BAGAC,eACA,CACAH,UACAC,kBACAC,iBAAA,gEACA,gBACA,iCAEA,8DAKA9B,qBAGAgC,mBACA,6CAEAC,SACArB,qBACA,gDACA,8DAGAsB,uBAAA,WACA,wBACAC,QACA,8BACAC,kBACA,4BACA,0CC3GwW,I,wBCQpWC,EAAY,eACd,EACAjD,EACA+B,GACA,EACA,KACA,WACA,MAIa,aAAAkB,E","file":"js/chunk-86af51a0.836d0840.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./product-history.vue?vue&type=style&index=0&id=21374c2a&prod&lang=scss&scoped=true&\"","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","module.exports = __webpack_public_path__ + \"img/icon-176.4d232e45.png\";","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"wrap\"},[_c('div',{staticClass:\"header-wrap\"},[_c('div',{staticClass:\"header\"},[_c('img',{staticClass:\"return-img\",attrs:{\"src\":require(\"@/assets/return.png\"),\"alt\":\"\"},on:{\"click\":function($event){return _vm.$router.back()}}}),_c('p',{staticClass:\"header-title\"},[_vm._v(\"浏览历史\")]),_c('button',{staticClass:\"header-btn\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.swipeCellList.openOrCloseEdit()}}},[_vm._v(\"\\n \"+_vm._s(_vm.swipeCellList && _vm.swipeCellList.edit ? \"取消\" : \"管理\")+\"\\n \")])])]),_c('swipe-cell-list',{ref:\"swipeCellList\",attrs:{\"option\":_vm.swipeCellOption},scopedSlots:_vm._u([{key:\"time\",fn:function({ item }){return [_c('p',{staticClass:\"my-collection-list-time\"},[_vm._v(_vm._s(item.time))])]}},{key:\"item\",fn:function({ item }){return [_c('div',{staticClass:\"list-item\",on:{\"click\":function($event){return _vm.toDetail(item)}}},[_c('div',{staticClass:\"cover-box\"},[(item.is_normal)?_c('img',{staticClass:\"cover\",attrs:{\"src\":item.cover}}):_c('img',{staticClass:\"normal\",attrs:{\"src\":require(\"@/assets/icon-176.png\"),\"alt\":\"\"}})]),(item.is_normal)?_c('div',{staticClass:\"info\"},[_c('div',{staticClass:\"name\"},[_vm._v(_vm._s(item.name))]),_c('div',{staticClass:\"price\"},[_vm._v(\"\\n ¥\"),_c('span',[_vm._v(_vm._s(item.low_price\n ? item.low_price.slice(0, item.low_price.length - 3)\n : \"0\"))]),_vm._v(_vm._s(item.low_price\n ? item.low_price.slice(item.low_price.length - 3)\n : \".00\")+\"\\n \")])]):_c('div',{staticClass:\"normal-text\"},[_vm._v(\"已下架\")])])]}}])})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"wrap\">\r\n <div class=\"header-wrap\">\r\n <div class=\"header\">\r\n <img\r\n src=\"@/assets/return.png\"\r\n class=\"return-img\"\r\n @click=\"$router.back()\"\r\n alt=\"\"\r\n />\r\n <p class=\"header-title\">浏览历史</p>\r\n <button\r\n type=\"button\"\r\n class=\"header-btn\"\r\n @click=\"swipeCellList.openOrCloseEdit()\"\r\n >\r\n {{ swipeCellList && swipeCellList.edit ? \"取消\" : \"管理\" }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <swipe-cell-list ref=\"swipeCellList\" :option=\"swipeCellOption\">\r\n <template #time=\"{ item }\">\r\n <p class=\"my-collection-list-time\">{{ item.time }}</p>\r\n </template>\r\n <template #item=\"{ item }\">\r\n <div class=\"list-item\" @click=\"toDetail(item)\">\r\n <div class=\"cover-box\">\r\n <img class=\"cover\" v-if=\"item.is_normal\" :src=\"item.cover\" />\r\n <img class=\"normal\" src=\"@/assets/icon-176.png\" v-else alt=\"\" />\r\n </div>\r\n <div class=\"info\" v-if=\"item.is_normal\">\r\n <div class=\"name\">{{ item.name }}</div>\r\n <div class=\"price\">\r\n ¥<span>{{\r\n item.low_price\r\n ? item.low_price.slice(0, item.low_price.length - 3)\r\n : \"0\"\r\n }}</span\r\n >{{\r\n item.low_price\r\n ? item.low_price.slice(item.low_price.length - 3)\r\n : \".00\"\r\n }}\r\n </div>\r\n </div>\r\n <div class=\"normal-text\" v-else>已下架</div>\r\n </div>\r\n </template>\r\n </swipe-cell-list>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { MallService, GeneralService } from \"@/common/service\";\r\nimport { Toast } from \"vant\";\r\nimport SwipeCellList from \"@/components/swipe-cell-list.vue\";\r\n\r\nexport default {\r\n components: { SwipeCellList },\r\n data() {\r\n return {\r\n swipeCellOption: {\r\n searchKey: \"title\",\r\n showSearch: true,\r\n timeKey: \"time\",\r\n listApi: (params) => {\r\n return MallService.getGoodsHistory(params);\r\n },\r\n itemButtons: [\r\n {\r\n text: \"删除\",\r\n bgColor: \"#2A63F3\",\r\n click: (item) => this.batchesDel(item.id),\r\n },\r\n ],\r\n bottomButtons: [\r\n {\r\n text: \"删除\",\r\n bgColor: \"#2A63F3\",\r\n click: (items = []) => {\r\n if (items.length === 0) {\r\n return Toast(\"请至少选择一个\");\r\n }\r\n this.batchesDel(items.map((item) => item.id).join(\",\"));\r\n },\r\n },\r\n ],\r\n },\r\n swipeCellList: null,\r\n };\r\n },\r\n mounted() {\r\n this.swipeCellList = this.$refs.swipeCellList;\r\n },\r\n methods: {\r\n toDetail(item) {\r\n if (item.is_normal === 0) return Toast(\"已下架\");\r\n this.$router.push(`/product-details?id=${item.goods_id}`);\r\n },\r\n // 删除\r\n batchesDel(ids) {\r\n return GeneralService.delTrack({\r\n ids: ids,\r\n }).then(({ msg }) => {\r\n Toast(msg);\r\n this.swipeCellList.resetList();\r\n this.swipeCellList.openOrCloseEdit(true);\r\n });\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.wrap {\r\n width: 100%;\r\n height: calc(100vh - 42px);\r\n display: flex;\r\n flex-direction: column;\r\n margin: 42px 0 0;\r\n box-sizing: border-box;\r\n background: #f4f4f4;\r\n overflow-y: auto;\r\n .header-wrap {\r\n width: 100%;\r\n height: 42px;\r\n display: flex;\r\n flex-direction: column;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n z-index: 500;\r\n background-color: #ffffff;\r\n .header {\r\n width: 100%;\r\n height: 44px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: #ffffff;\r\n z-index: 999;\r\n position: relative;\r\n box-sizing: border-box;\r\n .return-img {\r\n position: absolute;\r\n left: 15px;\r\n top: 50%;\r\n transform: translate(0, -50%);\r\n width: 20px;\r\n z-index: 99999;\r\n }\r\n .header-title {\r\n width: 100%;\r\n text-align: center;\r\n color: #333333;\r\n font-size: 18px;\r\n font-weight: bold;\r\n position: relative;\r\n }\r\n .header-btn {\r\n color: #222222;\r\n font-size: 14px;\r\n position: absolute;\r\n padding: 0 12px;\r\n right: 0;\r\n top: 50%;\r\n transform: translate(0, -50%);\r\n }\r\n }\r\n }\r\n .my-collection-list-time {\r\n color: #222222;\r\n font-size: 12px;\r\n font-weight: bold;\r\n width: 100%;\r\n padding: 0 0 10px 0;\r\n box-sizing: border-box;\r\n background: #f4f4f4;\r\n }\r\n\r\n .list-item {\r\n background: #ffffff;\r\n border-radius: 8px;\r\n padding: 12px 15px;\r\n display: flex;\r\n align-items: center;\r\n .cover-box {\r\n width: 98px;\r\n height: 98px;\r\n border-radius: 8px;\r\n .cover {\r\n width: 100%;\r\n height: 100%;\r\n border-radius: 8px;\r\n }\r\n .normal {\r\n width: 100%;\r\n height: 100%;\r\n border-radius: 8px;\r\n }\r\n }\r\n .info {\r\n width: calc(100% - 108px);\r\n height: 98px;\r\n margin-left: 10px;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-around;\r\n .name {\r\n height: 48px;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #222222;\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n -webkit-box-orient: vertical;\r\n }\r\n .price {\r\n font-size: 14px;\r\n font-weight: 400;\r\n color: #ff6700;\r\n line-height: 20px;\r\n span {\r\n font-size: 22px;\r\n font-weight: 500;\r\n }\r\n }\r\n }\r\n .normal-text {\r\n height: 98px;\r\n margin-left: 10px;\r\n }\r\n }\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!./product-history.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!./product-history.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./product-history.vue?vue&type=template&id=21374c2a&scoped=true&\"\nimport script from \"./product-history.vue?vue&type=script&lang=js&\"\nexport * from \"./product-history.vue?vue&type=script&lang=js&\"\nimport style0 from \"./product-history.vue?vue&type=style&index=0&id=21374c2a&prod&lang=scss&scoped=true&\"\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 \"21374c2a\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|