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 line
7.5 KiB
1 line
7.5 KiB
{"remainingRequest":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/linhuakun/Downloads/coderlhk/codewhy/src/views/detail/Detail.vue?vue&type=style&index=0&id=17916f8c&scoped=true&lang=css&","dependencies":[{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/src/views/detail/Detail.vue","mtime":1615908607467},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/css-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/loaders/stylePostLoader.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/postcss-loader/src/index.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCi5kZXRhaWx7CiAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZmZmZjsKICBoZWlnaHQ6IDEwMHZoOwp9CiNkZXRhaWwtbmF2ewogICAgcG9zaXRpb246IHJlbGF0aXZlICFpbXBvcnRhbnQ7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOnJnYigyNDUsIDI0MywgMjQzKSA7CiAgICBjb2xvcjojOTk5OwogICAgCn0KI2JvdHRvbS1uYXZ7CiAgei1pbmRleDo5OwogIHBvc2l0aW9uOiByZWxhdGl2ZSAhaW1wb3J0YW50Owp9Ci5jb250ZW50ewogIGhlaWdodDogY2FsYygxMDAlIC0gMTA2cHgpOwogIHBvc2l0aW9uOiByZWxhdGl2ZTsKfQouYmFja3VwewogIHotaW5kZXg6IDk7Cn0K"},{"version":3,"sources":["Detail.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"Detail.vue","sourceRoot":"src/views/detail","sourcesContent":["<template>\n <div class=\"detail\" >\n <DetailNewBar id=\"detail-nav\" @titleClick=\"titleClick\" ref=\"nav\"/>\n <scroll class=\"content\" ref=\"scroll\"\n :probe-type=\"3\"\n :pull-up-load=\"true\"\n @pullingUp=\"loadMore\"\n @pullingDown=\"pullingDown\"\n @scrollw=\"contentScoll\"\n >\n <DetailSwiper :top-images=\"topImages\"/>\n <DetailBaseInfo :goods=\"goods\"/>\n <DetailCommentInfo ref=\"comment\" :comment-info=\"commentInfo\"/>\n <DetailGoodsInfo ref=\"shopDetail\" :detail-info=\"detailInfo\" @detailImageload=\"detailImageload\"/>\n <DetailParamInfo ref=\"Tip\" />\n </scroll>\n <detail-bottom-bar id=\"bottom-nav\" />\n <detail-bottom-bar class=\"bottom-nav\" @addToCart=\"addToCart\"/>\n\n <back-top clas=\"backup\" @click.native=\"backClick\" v-show=\"isShowBackTop\"/>\n </div>\n</template>\n\n<script>\nimport DetailNewBar from \"@/views/detail/childComps/DetailNewBar\";\nimport DetailSwiper from \"@/views/detail/childComps/DetailSwiper\";\nimport DetailBaseInfo from \"@/views/detail/childComps/DetailBaseInfo\";\nimport DetailShopInfo from \"@/views/detail/childComps/DetailShopInfo\";\nimport DetailGoodsInfo from \"@/views/detail/childComps/DetailGoodsInfo\";\nimport DetailParamInfo from \"@/views/detail/childComps/DetailParamInfo\";\nimport DetailCommentInfo from \"@/views/detail/childComps/DetailCommentInfo\";\nimport DetailBottomBar from \"@/views/detail/childComps/DetailBottomBar\";\n\nimport backTop from \"@/components/content/backTop/backTop\";\nimport scroll from \"@/components/common/Scroll/Scroll\";\n\nimport {itemListenerMixin,backTopMixin} from \"@/common/mixin\";\nimport {debounce} from \"@/common/utils\";\n\n\nimport {getDetail} from \"@/network/detail\";\n\n\nexport default {\n name: \"Detail\",\n components: {\n DetailNewBar,\n DetailSwiper,\n DetailBaseInfo,\n DetailShopInfo,\n DetailGoodsInfo,\n DetailParamInfo,\n DetailCommentInfo,\n DetailBottomBar,\n\n backTop,\n scroll,\n\n },\n mixins: [itemListenerMixin,backTopMixin],\n data() {\n return {\n iid: null,\n topImages: [],\n goods: {},\n shop: {},\n detailInfo: [],\n paramInfo: {},\n commentInfo: {},\n recommends: [],\n themeTopYs: [],\n getThemeTopY: null,\n currentIndex:0,\n\n message:'',\n show:false\n }\n },\n created() {\n // //home主页传入id\n this.iid = this.$route.params.id\n // //数据的展示\n getDetail(this.iid).then(res => {\n const data = res.data.data;\n // //轮播图的切换\n this.topImages = data.topBanner\n // //商品介绍\n this.goods = data.shopMessage\n // //店铺名的展示\n this.shop = data.content\n // //穿着展示\n this.detailInfo = data.special\n // //商品推荐的展示\n // this.paramInfo = data.special\n this.commentInfo = data.comment;\n // 导航栏点击切换\n this.getThemeTopY = debounce(() => {\n this.themeTopYs = []\n this.themeTopYs.push(0);\n this.themeTopYs.push(this.$refs.comment.$el.offsetTop)\n this.themeTopYs.push(this.$refs.shopDetail.$el.offsetTop)\n this.themeTopYs.push(this.$refs.Tip.$el.offsetTop)\n this.themeTopYs.push(Number.MAX_VALUE)\n }, 500)\n\n })\n },\n mounted() {\n },\n destroyed() {\n //无keep-live时activated无法使用\n this.$bus.$off('itemImgLoad', this.itemImgListener)\n },\n methods: {\n //上拉图片加载\n detailImageload() {\n this.itemImgListener()\n this.getThemeTopY()\n },\n //导航栏点击切换\n titleClick(index) {\n this.$refs.scroll.scrollTo(0, -this.themeTopYs[index], 1000);\n },\n loadMore(){\n // this.getHomeGoods(this.currentType)\n this.$refs.scroll.refresh()\n },\n pullingDown() {\n this.pullingdown = true;\n setTimeout(() => {\n this.pullingdown = false;\n this.$refs.scroll.finishPullDown();\n }, 0)\n },\n //位置移动时导航栏跟着移动\n positionScroll(position) {\n const positionY = -position.y\n let length = this.themeTopYs.length\n for (let i = 0; i < length-1; i++) {\n if(this.currentIndex!==i&&(positionY>=this.themeTopYs[i]&&positionY<this.themeTopYs[i+1]))\n {\n this .currentIndex=i;\n this.$refs.nav.currentIndex=this.currentIndex\n }\n }\n },\n //mixin混入回退顶部的按钮\n totalScroll(position){\n this.positionScroll(position)\n this.contentScoll(position)\n },\n // //加入购物车\n addToCart(){\n //获取购物车需要展示的东西\n const product={}\n product.image=this.topImages[0];\n product.title=this.goods.title;\n product.desc=this.goods.desc;\n product.price=this.goods.newprice;\n product.iid=this.iid;\n this.$store.dispatch('addCart',product).then(res=>{\n this.$toast.show(res,2000)\n })\n }\n }\n}\n</script>\n\n<style scoped>\n.detail{\n background-color: #ffffff;\n height: 100vh;\n}\n#detail-nav{\n position: relative !important;\n background-color:rgb(245, 243, 243) ;\n color:#999;\n \n}\n#bottom-nav{\n z-index:9;\n position: relative !important;\n}\n.content{\n height: calc(100% - 106px);\n position: relative;\n}\n.backup{\n z-index: 9;\n}\n</style>\n"]}]} |