f2eb96d91f50c8a70135bd8c8d80bc39.json 16 KB

1
  1. {"remainingRequest":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\front\\item\\zyAdmin\\src\\components\\mobileConfig\\c_home_goods_list.vue?vue&type=style&index=0&id=968cdaa0&scoped=true&lang=scss","dependencies":[{"path":"D:\\front\\item\\zyAdmin\\src\\components\\mobileConfig\\c_home_goods_list.vue","mtime":1761614938959},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\css-loader\\index.js","mtime":1761614929364},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1761614937403},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\postcss-loader\\src\\index.js","mtime":1761614935133},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\sass-loader\\dist\\cjs.js","mtime":1761614936391},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1761614927801},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js","mtime":1761614937402}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:DQoucHJvIHsNCiAgcGFkZGluZzogMTVweCAxNXB4IDA7DQogIC50aXBzIHsNCiAgICBoZWlnaHQ6IDUwcHg7DQogICAgbGluZS1oZWlnaHQ6IDUwcHg7DQogICAgY29sb3I6ICM5OTk7DQogICAgZm9udC1zaXplOiAxMnB4Ow0KICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCByZ2JhKDAsIDAsIDAsIDAuMDUpOw0KICB9DQp9DQouYnRuLWJveCB7DQogIHBhZGRpbmctYm90dG9tOiAyMHB4Ow0KfQ0K"},{"version":3,"sources":["c_home_goods_list.vue"],"names":[],"mappings":";AAueA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"c_home_goods_list.vue","sourceRoot":"src/components/mobileConfig","sourcesContent":["<template>\r\n <div class=\"mobile-config\">\r\n <div v-for=\"(item, key) in rCom\" :key=\"key\">\r\n <component\r\n :is=\"item.components.name\"\r\n :configObj=\"configObj\"\r\n ref=\"childData\"\r\n :configNme=\"item.configNme\"\r\n :key=\"key\"\r\n @getConfig=\"getConfig\"\r\n :index=\"activeIndex\"\r\n :number=\"num\"\r\n :num=\"item.num\"\r\n ></component>\r\n </div>\r\n <rightBtn :activeIndex=\"activeIndex\" :configObj=\"configObj\"></rightBtn>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { getCategory, getProProduct } from '@/api/diy';\r\nimport toolCom from '@/components/mobileConfigRight/index.js';\r\nimport { mapState, mapMutations, mapActions } from 'vuex';\r\nimport rightBtn from '@/components/rightBtn/index.vue';\r\nexport default {\r\n name: 'c_home_goods_list',\r\n componentsName: 'home_goods_list',\r\n cname: '产品列表',\r\n props: {\r\n activeIndex: {\r\n type: null,\r\n },\r\n num: {\r\n type: null,\r\n },\r\n index: {\r\n type: null,\r\n },\r\n },\r\n components: {\r\n ...toolCom,\r\n rightBtn,\r\n },\r\n data() {\r\n return {\r\n configObj: {},\r\n rCom: [\r\n {\r\n components: toolCom.c_set_up,\r\n configNme: 'setUp',\r\n },\r\n ],\r\n oneContent: [\r\n {\r\n components: toolCom.c_title,\r\n configNme: 'titleLeft',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'styleConfig',\r\n },\r\n {\r\n components: toolCom.c_title,\r\n configNme: 'titleGoods',\r\n },\r\n {\r\n components: toolCom.c_select,\r\n configNme: 'typeConfig',\r\n },\r\n ],\r\n oneContent1: [\r\n {\r\n components: toolCom.c_goods,\r\n configNme: 'goodsList',\r\n },\r\n ],\r\n oneContent2: [\r\n {\r\n components: toolCom.c_brand,\r\n configNme: 'brandList',\r\n },\r\n {\r\n components: toolCom.c_slider,\r\n configNme: 'numberConfig',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'goodsSort',\r\n },\r\n ],\r\n oneContent3: [\r\n {\r\n components: toolCom.c_classify,\r\n configNme: 'classList',\r\n },\r\n {\r\n components: toolCom.c_slider,\r\n configNme: 'numberConfig',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'goodsSort',\r\n },\r\n ],\r\n oneContent4: [\r\n {\r\n components: toolCom.c_goods_label,\r\n configNme: 'goodsLabel',\r\n },\r\n {\r\n components: toolCom.c_slider,\r\n configNme: 'numberConfig',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'goodsSort',\r\n },\r\n ],\r\n twoContent: [\r\n {\r\n components: toolCom.c_title,\r\n configNme: 'titleContents',\r\n },\r\n {\r\n components: toolCom.c_checkbox,\r\n configNme: 'checkboxInfo',\r\n },\r\n ],\r\n threeContent: [\r\n {\r\n components: toolCom.c_title,\r\n configNme: 'titleCart',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'cartConfig',\r\n },\r\n ],\r\n threeContent1: [\r\n {\r\n components: toolCom.c_button_img,\r\n configNme: 'bntStyleConfig',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'bntConfig',\r\n },\r\n ],\r\n oneStyle: [\r\n {\r\n components: toolCom.c_title,\r\n configNme: 'titleRight',\r\n },\r\n {\r\n components: toolCom.c_fillet,\r\n configNme: 'filletImg',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'goodsName',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'toneConfig',\r\n },\r\n ],\r\n oneStyle1: [\r\n {\r\n components: toolCom.c_bg_color,\r\n configNme: 'goodsNameColor',\r\n },\r\n {\r\n components: toolCom.c_bg_color,\r\n configNme: 'goodsPriceColor',\r\n },\r\n ],\r\n oneStyle2: [\r\n {\r\n components: toolCom.c_bg_color,\r\n configNme: 'soldNumColor',\r\n },\r\n ],\r\n oneStyle3: [\r\n {\r\n components: toolCom.c_bg_color,\r\n configNme: 'scoreColor',\r\n },\r\n ],\r\n twoStyle: [\r\n {\r\n components: toolCom.c_title,\r\n configNme: 'titleCart',\r\n },\r\n {\r\n components: toolCom.c_radio,\r\n configNme: 'toneCartConfig',\r\n },\r\n ],\r\n twoStyle1: [\r\n {\r\n components: toolCom.c_bg_color,\r\n configNme: 'bntBgColor',\r\n },\r\n ],\r\n currencyTitleStyle: [\r\n {\r\n components: toolCom.c_title,\r\n configNme: 'titleCurrency',\r\n },\r\n ],\r\n moduleColorStyle: [\r\n {\r\n components: toolCom.c_bg_color,\r\n configNme: 'moduleColor',\r\n },\r\n ],\r\n currencyStyle: [\r\n {\r\n components: toolCom.c_bg_color,\r\n configNme: 'bottomBgColor',\r\n },\r\n {\r\n components: toolCom.c_slider,\r\n configNme: 'topConfig',\r\n },\r\n {\r\n components: toolCom.c_slider,\r\n configNme: 'bottomConfig',\r\n },\r\n {\r\n components: toolCom.c_slider,\r\n configNme: 'prConfig',\r\n },\r\n {\r\n components: toolCom.c_slider,\r\n configNme: 'mbConfig',\r\n },\r\n {\r\n components: toolCom.c_fillet,\r\n configNme: 'fillet',\r\n },\r\n ],\r\n setUp: 0,\r\n type: 0,\r\n type2: 0,\r\n type3: 0,\r\n type4: 0,\r\n type5: 0,\r\n lockStatus: false,\r\n };\r\n },\r\n watch: {\r\n num(nVal) {\r\n let value = JSON.parse(JSON.stringify(this.$store.state.mobildConfig.defaultArray[nVal]));\r\n this.configObj = value;\r\n if (!value.selectConfig.list || !value.selectConfig.list[0].value) {\r\n this.getCategory();\r\n }\r\n },\r\n configObj: {\r\n handler(nVal, oVal) {\r\n this.$store.commit('mobildConfig/UPDATEARR', { num: this.num, val: nVal });\r\n },\r\n deep: true,\r\n },\r\n 'configObj.setUp.tabVal': {\r\n handler(nVal, oVal) {\r\n this.setUp = nVal;\r\n var arr = [this.rCom[0]];\r\n if (nVal == 0) {\r\n this.getRComContent(arr, this.type, this.type2, this.type3);\r\n } else {\r\n this.getRComStyle(arr, this.type, this.type3, this.type4, this.type5);\r\n }\r\n },\r\n deep: true,\r\n },\r\n 'configObj.styleConfig.tabVal': {\r\n handler(nVal, oVal) {\r\n this.type = nVal;\r\n var arr = [this.rCom[0]];\r\n if (this.setUp === 0) {\r\n this.getRComContent(arr, nVal, this.type2, this.type3);\r\n } else {\r\n this.getRComStyle(arr, nVal, this.type3, this.type4, this.type5);\r\n }\r\n },\r\n deep: true,\r\n },\r\n 'configObj.typeConfig.activeValue': {\r\n handler(nVal, oVal) {\r\n this.type2 = nVal;\r\n var arr = [this.rCom[0]];\r\n if (this.setUp === 0) {\r\n this.getRComContent(arr, this.type, nVal, this.type3);\r\n }\r\n },\r\n deep: true,\r\n },\r\n 'configObj.cartConfig.tabVal': {\r\n handler(nVal, oVal) {\r\n this.type3 = nVal;\r\n var arr = [this.rCom[0]];\r\n if (this.setUp === 0) {\r\n this.getRComContent(arr, this.type, this.type2, nVal);\r\n } else {\r\n this.getRComStyle(arr, this.type, nVal, this.type4, this.type5);\r\n }\r\n },\r\n deep: true,\r\n },\r\n 'configObj.toneConfig.tabVal': {\r\n handler(nVal, oVal) {\r\n this.type4 = nVal;\r\n var arr = [this.rCom[0]];\r\n if (this.setUp) {\r\n this.getRComStyle(arr, this.type, this.type3, nVal, this.type5);\r\n }\r\n },\r\n deep: true,\r\n },\r\n 'configObj.toneCartConfig.tabVal': {\r\n handler(nVal, oVal) {\r\n this.type5 = nVal;\r\n var arr = [this.rCom[0]];\r\n if (this.setUp) {\r\n this.getRComStyle(arr, this.type, this.type3, this.type4, nVal);\r\n }\r\n },\r\n deep: true,\r\n },\r\n },\r\n mounted() {\r\n this.$nextTick(() => {\r\n let value = JSON.parse(JSON.stringify(this.$store.state.mobildConfig.defaultArray[this.num]));\r\n this.configObj = value;\r\n this.getCategory();\r\n });\r\n },\r\n methods: {\r\n getRComContent(arr, type, type2, type3) {\r\n if (type == 3) {\r\n if (type2 == 1) {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent1, ...this.twoContent];\r\n } else if (type2 == 2) {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent2, ...this.twoContent];\r\n } else if (type2 == 3) {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent3, ...this.twoContent];\r\n } else {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent4, ...this.twoContent];\r\n }\r\n } else {\r\n if (type2 == 1) {\r\n if (type3 == 0) {\r\n this.rCom = [\r\n ...arr,\r\n ...this.oneContent,\r\n ...this.oneContent1,\r\n ...this.twoContent,\r\n ...this.threeContent,\r\n ...this.threeContent1,\r\n ];\r\n } else {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent1, ...this.twoContent, ...this.threeContent];\r\n }\r\n } else if (type2 == 2) {\r\n if (type3 == 0) {\r\n this.rCom = [\r\n ...arr,\r\n ...this.oneContent,\r\n ...this.oneContent2,\r\n ...this.twoContent,\r\n ...this.threeContent,\r\n ...this.threeContent1,\r\n ];\r\n } else {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent2, ...this.twoContent, ...this.threeContent];\r\n }\r\n } else if (type2 == 3) {\r\n if (type3 == 0) {\r\n this.rCom = [\r\n ...arr,\r\n ...this.oneContent,\r\n ...this.oneContent3,\r\n ...this.twoContent,\r\n ...this.threeContent,\r\n ...this.threeContent1,\r\n ];\r\n } else {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent3, ...this.twoContent, ...this.threeContent];\r\n }\r\n } else {\r\n if (type3 == 0) {\r\n this.rCom = [\r\n ...arr,\r\n ...this.oneContent,\r\n ...this.oneContent4,\r\n ...this.twoContent,\r\n ...this.threeContent,\r\n ...this.threeContent1,\r\n ];\r\n } else {\r\n this.rCom = [...arr, ...this.oneContent, ...this.oneContent4, ...this.twoContent, ...this.threeContent];\r\n }\r\n }\r\n }\r\n },\r\n getRComStyle(arr, type, type3, type4, type5) {\r\n let obj4 = [],\r\n currencyStyle = [];\r\n if (type4) {\r\n if (type == 1 || type == 4) {\r\n obj4 = [...this.oneStyle1, ...this.oneStyle2];\r\n currencyStyle = [...this.currencyTitleStyle, ...this.currencyStyle];\r\n } else if (type == 0) {\r\n obj4 = [...this.oneStyle1, ...this.oneStyle2, ...this.oneStyle3];\r\n currencyStyle = [...this.currencyTitleStyle, ...this.currencyStyle];\r\n } else if (type == 2 || type == 3) {\r\n obj4 = [...this.oneStyle1];\r\n currencyStyle = [...this.currencyTitleStyle, ...this.moduleColorStyle, ...this.currencyStyle];\r\n } else {\r\n obj4 = [...this.oneStyle1, ...this.oneStyle2];\r\n currencyStyle = [...this.currencyTitleStyle, ...this.moduleColorStyle, ...this.currencyStyle];\r\n }\r\n } else {\r\n if (type == 0 || type == 1 || type == 4) {\r\n currencyStyle = [...this.currencyTitleStyle, ...this.currencyStyle];\r\n } else {\r\n currencyStyle = [...this.currencyTitleStyle, ...this.moduleColorStyle, ...this.currencyStyle];\r\n }\r\n }\r\n let obj5 = [];\r\n if (type != 3) {\r\n if (type5) {\r\n obj5 = [...this.twoStyle, ...this.twoStyle1];\r\n } else {\r\n obj5 = [...this.twoStyle];\r\n }\r\n }\r\n if (type3 == 0) {\r\n this.rCom = [...arr, ...this.oneStyle, ...obj4, ...obj5, ...currencyStyle];\r\n } else {\r\n this.rCom = [...arr, ...this.oneStyle, ...obj4, ...currencyStyle];\r\n }\r\n },\r\n getConfig(data, name) {\r\n console.log(data, name);\r\n if (name != 'radio' && !data.name && data == 1) {\r\n this.configObj.goodsList.list = [];\r\n return;\r\n }\r\n if (name != 'radio' && !data.name && data == 0 && !this.configObj.classList.classVal.length) {\r\n this.configObj.goodsList.list = [];\r\n return;\r\n }\r\n // if( data.name=='radio'){\r\n // return;\r\n // }\r\n let type = this.configObj.typeConfig.activeValue;\r\n let dataObj = {\r\n page: 1,\r\n limit: this.configObj.numberConfig.val,\r\n priceOrder: this.configObj.goodsSort.tabVal == 2 ? 'desc' : '',\r\n salesOrder: this.configObj.goodsSort.tabVal == 1 ? 'desc' : '',\r\n };\r\n if (type == 1) {\r\n this.configObj.productList.list = [];\r\n return;\r\n } else if (type == 3) {\r\n dataObj.cate_id = this.configObj.classList.classVal;\r\n } else {\r\n dataObj.store_label_id = this.configObj.goodsLabel.activeValue;\r\n }\r\n getProProduct(dataObj).then((res) => {\r\n this.configObj.productList.list = res.data;\r\n });\r\n },\r\n getCategory() {\r\n getCategory().then((res) => {\r\n this.$set(this.configObj.selectConfig, 'list', res.data);\r\n });\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.pro {\r\n padding: 15px 15px 0;\r\n .tips {\r\n height: 50px;\r\n line-height: 50px;\r\n color: #999;\r\n font-size: 12px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\r\n }\r\n}\r\n.btn-box {\r\n padding-bottom: 20px;\r\n}\r\n</style>\r\n"]}]}