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:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/ProductWindow.vue?46e9","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/ProductWindow.vue?64e9","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/ProductWindow.vue?0cb6","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/ProductWindow.vue?0e12","uni-app:///components/ProductWindow.vue","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/ProductWindow.vue?b224","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/ProductWindow.vue?d131"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsI;AACtI;AACiE;AACL;AACsC;;;AAGlG;AAC6M;AAC7M,gBAAgB,iNAAU;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;AAA4zB,CAAgB,2yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACoEh1B;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;AAAugD,CAAgB,m6CAAG,EAAC,C;;;;;;;;;;;ACA3hD;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 \"!../../../../../../Applications/HBuilderX.app/Contents/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 \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/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 \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/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 \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ProductWindow.vue?vue&type=script&lang=js&\"","<template>\n <view>\n <view class=\"product-window\" :class=\"attr.cartAttr === true ? 'on' : ''\">\n <view class=\"textpic acea-row row-between-wrapper\">\n <view class=\"pictrue\">\n <image @tap=\"previewImage\" :src=\"attr.productSelect.image\" class=\"image\" />\n </view>\n <view class=\"text\">\n <view class=\"line1\">{{ attr.productSelect.store_name }}</view>\n <view class=\"money font-color-red\" v-if=\"!isIntegral\">\n ¥\n <text class=\"num\">{{ attr.productSelect.price }}</text>\n <text class=\"stock\">库存: {{ attr.productSelect.stock }}</text>\n </view>\n <view class=\"money font-color-red\" v-if=\"isIntegral\">\n <text class=\"num\">{{ attr.productSelect.integral }}积分</text>\n <text class=\"stock\">库存: {{ attr.productSelect.stock }}</text>\n </view>\n </view>\n <view class=\"iconfont icon-guanbi\" @click=\"closeAttr\"></view>\n </view>\n <view class=\"productWinList\">\n <view\n class=\"item\"\n v-for=\"(item, indexw) in attr.productAttr\"\n :key=\"indexw\"\n >\n <view class=\"title\">{{ item.attrName }}</view>\n <view class=\"listn acea-row row-middle\">\n <view\n class=\"itemn\"\n :class=\"item.index == indexn ? 'on' : ''\"\n v-for=\"(itemn, indexn) in item.attrValue\"\n @click=\"tapAttr(indexw, indexn)\"\n :key=\"indexn\"\n >{{ itemn.attr }}</view\n >\n </view>\n </view>\n </view>\n <view class=\"cart\">\n <view class=\"title\">数量</view>\n <view class=\"carnum acea-row row-left\">\n <view\n class=\"item reduce\"\n :class=\"cartNum <= 1 ? 'on' : ''\"\n @click=\"CartNumDes\"\n >-</view\n >\n <view class=\"item num\">{{ cartNum }}</view>\n <view\n class=\"item plus\"\n :class=\"cartNum >= attr.productSelect.stock ? 'on' : ''\"\n @click=\"CartNumAdd\"\n >+</view\n >\n </view>\n </view>\n </view>\n <view\n class=\"mask\"\n @touchmove.prevent\n :hidden=\"attr.cartAttr === false\"\n @click=\"closeAttr\"\n ></view>\n </view>\n</template>\n<script>\nexport default {\n name: \"ProductWindow\",\n props: {\n isIntegral:Boolean,\n attr: {\n type: Object,\n default: () => {},\n },\n cartNum: {\n type: Number,\n default: () => 1,\n },\n },\n data: function () {\n return {};\n },\n mounted: function () {\n console.log(this);\n },\n watch: {\n attr(nextAttr) {\n },\n },\n methods: {\n closeAttr: function () {\n this.$emit(\"changeFun\", { action: \"changeattr\", value: false });\n },\n CartNumDes: function () {\n this.$emit(\"changeFun\", { action: \"ChangeCartNum\", value: false });\n },\n CartNumAdd: function () {\n this.$emit(\"changeFun\", { action: \"ChangeCartNum\", value: 1 });\n },\n tapAttr: function (indexw, indexn) {\n // 修改商品规格不生效的原因:\n // H5端下面写法,attr更新,但是除H5外其他端不支持,\n // 尽量避免下面的骚写法,不要在子组件内更新props\n // 这里修改是为了能获取到被选中的属性\n this.attr.productAttr[indexw].index = indexn;\n let that = this;\n let value = that.getCheckedValue().sort().join(\",\");\n that.$emit(\"changeFun\", {\n action: \"ChangeAttr\",\n value: {\n value,\n indexw,\n indexn,\n },\n });\n },\n //获取被选中属性;\n getCheckedValue: function () {\n let productAttr = this.attr.productAttr;\n let value = [];\n for (let i = 0; i < productAttr.length; i++) {\n for (let j = 0; j < productAttr[i].attrValueArr.length; j++) {\n if (productAttr[i].index === j) {\n value.push(productAttr[i].attrValueArr[j]);\n }\n }\n }\n return value;\n },\n previewImage() {\n uni.previewImage({\n current: 0,\n urls: [this.attr.productSelect.image],\n });\n },\n },\n};\n</script>\n<style scoped lang=\"less\">\n\t.product-window{\n\t\tpadding-bottom: 190rpx;\n\t}\n</style>\n","import mod from \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-2!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-5!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/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 \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-2!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-5!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/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 // 1635513135601\n var cssReload = require(\"/Applications/HBuilderX.app/Contents/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":""}