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 lines
14 KiB

{"version":3,"sources":["webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/ProductWindow.vue?9b6e","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/ProductWindow.vue?0659","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/ProductWindow.vue?c8b1","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/ProductWindow.vue?2e17","uni-app:///components/ProductWindow.vue","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/ProductWindow.vue?a9a9","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/ProductWindow.vue?8db6"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsI;AACtI;AACiE;AACL;AACsC;;;AAGlG;AAC+M;AAC/M,gBAAgB,uNAAU;AAC1B,EAAE,mFAAM;AACR,EAAE,oGAAM;AACR,EAAE,6GAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,wGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAyzB,CAAgB,y0BAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACoE70B;AACA,uBADA;AAEA;AACA,uBADA;AAEA;AACA,kBADA;AAEA,qCAFA,EAFA;;AAMA;AACA,kBADA;AAEA,8CAFA,EANA,EAFA;;;AAaA;AACA;AACA,GAfA;AAgBA;AACA;AACA,GAlBA;AAmBA;AACA,QADA,gBACA,QADA,EACA;AACA,KAFA,EAnBA;;AAuBA;AACA;AACA;AACA,KAHA;AAIA;AACA;AACA,KANA;AAOA;AACA;AACA,KATA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BADA;AAEA;AACA,sBADA;AAEA,wBAFA;AAGA,wBAHA,EAFA;;;AAQA,KA1BA;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAvCA;AAwCA,gBAxCA,0BAwCA;AACA;AACA,kBADA;AAEA,6CAFA;;AAIA,KA7CA,EAvBA,E;;;;;;;;;;;;;ACpEA;AAAA;AAAA;AAAA;AAAigD,CAAgB,y9CAAG,EAAC,C;;;;;;;;;;;ACArhD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/ProductWindow.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./ProductWindow.vue?vue&type=template&id=580f2cf4&scoped=true&\"\nvar renderjs\nimport script from \"./ProductWindow.vue?vue&type=script&lang=js&\"\nexport * from \"./ProductWindow.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ProductWindow.vue?vue&type=style&index=0&id=580f2cf4&scoped=true&lang=less&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"580f2cf4\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/ProductWindow.vue\"\nexport default component.exports","export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./ProductWindow.vue?vue&type=template&id=580f2cf4&scoped=true&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./ProductWindow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./ProductWindow.vue?vue&type=script&lang=js&\"","<template>\r\n <view>\r\n <view class=\"product-window\" :class=\"attr.cartAttr === true ? 'on' : ''\">\r\n <view class=\"textpic acea-row row-between-wrapper\">\r\n <view class=\"pictrue\">\r\n <image @tap=\"previewImage\" :src=\"attr.productSelect.image\" class=\"image\" />\r\n </view>\r\n <view class=\"text\">\r\n <view class=\"line1\">{{ attr.productSelect.store_name }}</view>\r\n <view class=\"money font-color-red\" v-if=\"!isIntegral\">\r\n ¥\r\n <text class=\"num\">{{ attr.productSelect.price }}</text>\r\n <text class=\"stock\">库存: {{ attr.productSelect.stock }}</text>\r\n </view>\r\n <view class=\"money font-color-red\" v-if=\"isIntegral\">\r\n <text class=\"num\">{{ attr.productSelect.integral }}积分</text>\r\n <text class=\"stock\">库存: {{ attr.productSelect.stock }}</text>\r\n </view>\r\n </view>\r\n <view class=\"iconfont icon-guanbi\" @click=\"closeAttr\"></view>\r\n </view>\r\n <view class=\"productWinList\">\r\n <view\r\n class=\"item\"\r\n v-for=\"(item, indexw) in attr.productAttr\"\r\n :key=\"indexw\"\r\n >\r\n <view class=\"title\">{{ item.attrName }}</view>\r\n <view class=\"listn acea-row row-middle\">\r\n <view\r\n class=\"itemn\"\r\n :class=\"item.index == indexn ? 'on' : ''\"\r\n v-for=\"(itemn, indexn) in item.attrValue\"\r\n @click=\"tapAttr(indexw, indexn)\"\r\n :key=\"indexn\"\r\n >{{ itemn.attr }}</view\r\n >\r\n </view>\r\n </view>\r\n </view>\r\n <view class=\"cart\">\r\n <view class=\"title\">数量</view>\r\n <view class=\"carnum acea-row row-left\">\r\n <view\r\n class=\"item reduce\"\r\n :class=\"cartNum <= 1 ? 'on' : ''\"\r\n @click=\"CartNumDes\"\r\n >-</view\r\n >\r\n <view class=\"item num\">{{ cartNum }}</view>\r\n <view\r\n class=\"item plus\"\r\n :class=\"cartNum >= attr.productSelect.stock ? 'on' : ''\"\r\n @click=\"CartNumAdd\"\r\n >+</view\r\n >\r\n </view>\r\n </view>\r\n </view>\r\n <view\r\n class=\"mask\"\r\n @touchmove.prevent\r\n :hidden=\"attr.cartAttr === false\"\r\n @click=\"closeAttr\"\r\n ></view>\r\n </view>\r\n</template>\r\n<script>\r\nexport default {\r\n name: \"ProductWindow\",\r\n props: {\r\n isIntegral:Boolean,\r\n attr: {\r\n type: Object,\r\n default: () => {},\r\n },\r\n cartNum: {\r\n type: Number,\r\n default: () => 1,\r\n },\r\n },\r\n data: function () {\r\n return {};\r\n },\r\n mounted: function () {\r\n console.log(this);\r\n },\r\n watch: {\r\n attr(nextAttr) {\r\n },\r\n },\r\n methods: {\r\n closeAttr: function () {\r\n this.$emit(\"changeFun\", { action: \"changeattr\", value: false });\r\n },\r\n CartNumDes: function () {\r\n this.$emit(\"changeFun\", { action: \"ChangeCartNum\", value: false });\r\n },\r\n CartNumAdd: function () {\r\n this.$emit(\"changeFun\", { action: \"ChangeCartNum\", value: 1 });\r\n },\r\n tapAttr: function (indexw, indexn) {\r\n // 修改商品规格不生效的原因:\r\n // H5端下面写法,attr更新,但是除H5外其他端不支持,\r\n // 尽量避免下面的骚写法,不要在子组件内更新props\r\n // 这里修改是为了能获取到被选中的属性\r\n this.attr.productAttr[indexw].index = indexn;\r\n let that = this;\r\n let value = that.getCheckedValue().sort().join(\",\");\r\n that.$emit(\"changeFun\", {\r\n action: \"ChangeAttr\",\r\n value: {\r\n value,\r\n indexw,\r\n indexn,\r\n },\r\n });\r\n },\r\n //获取被选中属性;\r\n getCheckedValue: function () {\r\n let productAttr = this.attr.productAttr;\r\n let value = [];\r\n for (let i = 0; i < productAttr.length; i++) {\r\n for (let j = 0; j < productAttr[i].attrValueArr.length; j++) {\r\n if (productAttr[i].index === j) {\r\n value.push(productAttr[i].attrValueArr[j]);\r\n }\r\n }\r\n }\r\n return value;\r\n },\r\n previewImage() {\r\n uni.previewImage({\r\n current: 0,\r\n urls: [this.attr.productSelect.image],\r\n });\r\n },\r\n },\r\n};\r\n</script>\r\n<style scoped lang=\"less\">\r\n\t.product-window{\r\n\t\tpadding-bottom: 190rpx;\r\n\t}\r\n</style>\r\n","import mod from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--10-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--10-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\less-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-4!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-5!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./ProductWindow.vue?vue&type=style&index=0&id=580f2cf4&scoped=true&lang=less&\"; export default mod; export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--10-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--10-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\less-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-4!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-5!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./ProductWindow.vue?vue&type=style&index=0&id=580f2cf4&scoped=true&lang=less&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1635767016165\n var cssReload = require(\"D:/Program Files/HBuilderX.3.1.13.20210514/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}