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
8.0 KiB
1 lines
8.0 KiB
{"version":3,"sources":["webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/Recommend.vue?940a","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/Recommend.vue?e99c","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/Recommend.vue?9fac","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/Recommend.vue?c8a3","uni-app:///components/Recommend.vue"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsH;AACtH;AAC6D;AACL;;;AAGxD;AAC+M;AAC/M,gBAAgB,uNAAU;AAC1B,EAAE,+EAAM;AACR,EAAE,oFAAM;AACR,EAAE,6FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,wFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;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;AAAqzB,CAAgB,q0BAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBz0B,yD;;;;;;;;;;;;;;;;;;;;;;;oSAIA,EACA,iBADA,EAEA,SACA,yBADA,EAFA,EAKA,cACA,gBADA,EALA,EAQA,SACA,gBADA,4BACA,WADA,EACA,CACA,kBACA,oBACA,CACA,CALA,EARA,EAeA,uBACA,SACA,eADA,EAEA,OAFA,EAGA,SAHA;AAIA,mBAJA;AAKA,oBALA;AAMA,oBANA;;AAQA,GAxBA;AAyBA;AACA;AACA,GA3BA;AA4BA;AACA,YADA,oBACA,IADA,EACA;AACA;AACA,0CADA;AAEA;AACA,qBADA,EAFA;;;AAMA,KARA;AASA;AACA;AACA,+BAFA,CAEA;AACA,+BAHA,CAGA;AACA;AACA;AACA;AACA;AACA;AACA,oDAJA,CAIA;AACA;AACA;AACA,OAPA;AAQA,KAtBA,EA5BA,E","file":"components/Recommend.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./Recommend.vue?vue&type=template&id=4fa327f1&\"\nvar renderjs\nimport script from \"./Recommend.vue?vue&type=script&lang=js&\"\nexport * from \"./Recommend.vue?vue&type=script&lang=js&\"\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 null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/Recommend.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!./Recommend.vue?vue&type=template&id=4fa327f1&\"","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!./Recommend.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!./Recommend.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"recommend\" ref=\"container\">\r\n\t\t<view class=\"title acea-row row-center-wrapper\">\r\n\t\t\t<text class=\"iconfont icon-zhuangshixian\"></text>\r\n\t\t\t<text class=\"name\">为你推荐</text>\r\n\t\t\t<text class=\"iconfont icon-zhuangshixian lefticon\"></text>\r\n\t\t</view>\r\n\t\t<view class=\"recommendList acea-row row-between-wrapper\">\r\n\t\t\t<view @click=\"routerGo(item)\" class=\"item\" v-for=\"(item, recommendIndex) in hostProduct\"\r\n\t\t\t\t:key=\"recommendIndex\">\r\n\t\t\t\t<view class=\"pictrue\">\r\n\t\t\t\t\t<image :src=\"item.image\" class=\"image\" />\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"name line1\">{{ item.storeName }}</view>\r\n\t\t\t\t<view class=\"money font-color-red\">\r\n\t\t\t\t\t¥\r\n\t\t\t\t\t<text class=\"num\">{{ item.price }}</text>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<Loading :loaded=\"loadend\" :loading=\"loading\"></Loading>\r\n\t</view>\r\n</template>\r\n<script>\r\n\timport {\r\n\t\tgetHostProducts\r\n\t} from '@/api/store';\r\n\timport Loading from '@/components/Loading';\r\n\texport default {\r\n\t\tname: 'Recommend',\r\n\t\tprops: {\r\n\t\t\trecommendLoading: Boolean\r\n\t\t},\r\n\t\tcomponents: {\r\n\t\t\tLoading\r\n\t\t},\r\n\t\twatch: {\r\n\t\t\trecommendLoading(nextLoading) {\r\n\t\t\t\tif (nextLoading) {\r\n\t\t\t\t\tthis.hostProducts()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata: function () {\r\n\t\t\treturn {\r\n\t\t\t\thostProduct: [],\r\n\t\t\t\tpage: 1,\r\n\t\t\t\tlimit: 20,\r\n\t\t\t\tloadTitle: '',\r\n\t\t\t\tloading: false,\r\n\t\t\t\tloadend: false\r\n\t\t\t};\r\n\t\t},\r\n\t\tmounted: function () {\r\n\t\t\tthis.hostProducts();\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\trouterGo(item) {\r\n\t\t\t\tthis.$yrouter.push({\r\n\t\t\t\t\tpath: '/pages/shop/GoodsCon/index',\r\n\t\t\t\t\tquery: {\r\n\t\t\t\t\t\tid: item.id\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\thostProducts: function () {\r\n\t\t\t\tlet that = this;\r\n\t\t\t\tif (that.loading) return; //阻止下次请求(false可以进行请求);\r\n\t\t\t\tif (that.loadend) return; //阻止结束当前请求(false可以进行请求);\r\n\t\t\t\tthat.loading = true;\r\n\t\t\t\tgetHostProducts(that.page, that.limit).then(res => {\r\n\t\t\t\t\tthat.loading = false;\r\n\t\t\t\t\t//apply();js将一个数组插入另一个数组;\r\n\t\t\t\t\tthat.hostProduct.push.apply(that.hostProduct, res.data);\r\n\t\t\t\t\tthat.loadend = res.data.length < that.limit; //判断所有数据是否加载完成;\r\n\t\t\t\t\tthat.page = that.page + 1;\r\n\t\t\t\t\tthis.$emit('changeRecommendLoading', false)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t};\r\n</script>\r\n"],"sourceRoot":""} |