luban-mall/unpackage/dist/dev/.sourcemap/mp-weixin/pages/tabbar/cate/cate.js.map

1 line
15 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"version":3,"sources":["uni-app:///main.js",null,"webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/cate/cate.vue?a0ff","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/cate/cate.vue?9845","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/cate/cate.vue?7831","uni-app:///pages/tabbar/cate/cate.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,gG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,aAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAiH;AACjH;AACwD;AACL;;;AAGnD;AACuL;AACvL,gBAAgB,2LAAU;AAC1B,EAAE,0EAAM;AACR,EAAE,+EAAM;AACR,EAAE,wFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,mFAAU;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,aAAa,oMAEN;AACP,KAAK;AACL;AACA,aAAa,wLAEN;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACtCA;AAAA;AAAA;AAAA;AAAqsB,CAAgB,orBAAG,EAAC,C;;;;;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ACA;AACA,wCADA,CACA;AACA;AACA;AACA;AACA;AACA,WAFA,MAEA;AACA;AACA;;AAEA;AACA,OAZA;AAaA,KArDA;AAsDA;AACA,eAvDA,uBAuDA,GAvDA,EAuDA;AACA;AACA,oBADA;;AAGA;AACA;AACA;AACA;AACA;AACA,qCAJA,CAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAtBA;AAuBA,KAlFA;AAmFA;AACA,iBApFA,yBAoFA,KApFA,EAoFA;AACA;AACA;AACA;AACA;AACA,SAFA,MAEA;AACA;AACA;AACA;AACA;AACA,KA9FA;AA+FA;AACA,UAhGA,kBAgGA,EAhGA,EAgGA;AACA;AACA,uHADA;;AAGA,KApGA,EA9DA,E","file":"pages/tabbar/cate/cate.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/tabbar/cate/cate.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./cate.vue?vue&type=template&id=70658717&\"\nvar renderjs\nimport script from \"./cate.vue?vue&type=script&lang=js&\"\nexport * from \"./cate.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../HBuilderX-app开发版/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 = \"pages/tabbar/cate/cate.vue\"\nexport default component.exports","export * from \"-!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./cate.vue?vue&type=template&id=70658717&\"","var components\ntry {\n components = {\n enterCart: function() {\n return import(\n /* webpackChunkName: \"components/enter-cart/enter-cart\" */ \"@/components/enter-cart/enter-cart.vue\"\n )\n },\n footTab: function() {\n return import(\n /* webpackChunkName: \"components/foot-tab/foot-tab\" */ \"@/components/foot-tab/foot-tab.vue\"\n )\n }\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范文档https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\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 \"-!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./cate.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./cate.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pad-b150\">\r\n\t\t<status-nav :ifReturn=\"false\" navBarTitle=\"分类\" :marginBottom=\"0\"></status-nav>\r\n\t\t<!-- 选择厂家 -->\r\n\t\t<view class=\"pull-all-bg\" v-show=\"isShow\" @tap=\"closeMore\"></view>\r\n\t\t<view class=\"company-top\" v-if=\"businessId==0\"></view>\r\n\t\t<view class=\"company\" :style=\"{'top':topHieght+'px'}\" v-if=\"businessId==0\">\r\n\t\t\t<input type=\"text\" :value=\"companyList[companyIndex].name?'工厂选择:'+ companyList[companyIndex].name:''\" @tap=\"openMore\" disabled>\r\n\t\t\t<scroll-view scroll-y=\"true\" class=\"company-list\" v-if=\"isShow\">\r\n\t\t\t\t<view @tap=\"checkValue(index,item.id)\" class=\"company-item\" :class=\"companyIndex == index?'cur':''\" v-for=\"(item,index) in companyList\">{{item.name}}</view>\r\n\t\t\t</scroll-view>\r\n\t\t</view>\r\n\t\t<!-- 一级分类列表 -->\r\n\t\t<scroll-view scroll-y=\"true\" class=\"cate-nav-bg\" :style=\"{'height':scrollHeight+'px','top':topHieght+'px'}\" :class=\"businessId==0?'':'to-top'\" v-if=\"cateList.length>0\">\r\n\t\t\t<view class=\"cate-nav\">\r\n\t\t\t\t<view class=\"cate-nav-item\" :class=\"cateIndex == index?'active':''\" @tap=\"changeCate(index,item.id)\" v-for=\"(item,index) in cateList\" :key=\"index\">{{item.title}}</view>\r\n\t\t\t</view>\r\n\t\t</scroll-view>\r\n\t\t<!-- 二级分类列表 -->\r\n\t\t<scroll-view scroll-y=\"true\" class=\"shop-list-bg\" :class=\"businessId==0?'':'to-top'\">\r\n\t\t\t<view class=\"shop-list flex\">\r\n\t\t\t\t<view class=\"shop-item\" @tap=\"toShop(item.id)\" v-for=\"(item,index) in secondList\" :key=\"index\">\r\n\t\t\t\t\t<view class=\"img flex\"><image :src=\"item.cover\" mode=\"widthFix\"></image></view>\r\n\t\t\t\t\t<view class=\"txt clips1\">{{item.title}}</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"tips\" v-if=\"secondList.length==0 && isTips\">---没有更多分类---</view>\r\n\t\t</scroll-view>\r\n\t\t<view class=\"cate-nothing-tips\" v-if=\"cateList.length==0\">---该商户没有分类---</view>\r\n\t\t<!-- 购物车btn -->\r\n\t\t<enter-cart></enter-cart>\r\n\t\t<!-- 底部tab -->\r\n\t\t<foot-tab current=\"1\"></foot-tab>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport statusNav from '@/components/status-navs/status-nav';\r\n\timport enterCart from '@/components/enter-cart/enter-cart.vue';\r\n\timport {getCartNum,userInfoEv} from '@/jsFile/public-api.js';\r\n\t// 底部组件\r\n\timport footTab from '@/components/foot-tab/foot-tab.vue';\r\n\texport default {\r\n\t\tcomponents:{\r\n\t\t\tstatusNav,\r\n\t\t\tenterCart,\r\n\t\t\tfootTab\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tscrollHeight:uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 50,\r\n\t\t\t\tnewWidth:uni.getSystemInfoSync().windowWidth,\r\n\t\t\t\ttopHieght: uni.getSystemInfoSync().statusBarHeight + 50,\r\n\t\t\t\tcompanyList:[], //工厂列表\r\n\t\t\t\tcompanyIndex: 0, //当前厂家\r\n\t\t\t\tisShow: false, //显示弹窗\r\n\t\t\t\tcateList:[], //一级分类列表\r\n\t\t\t\tcateIndex:0,\r\n\t\t\t\tsecondList:[], //二级分类列表\r\n\t\t\t\ttotal:0,\r\n\t\t\t\tflag:true,\r\n\t\t\t\tifLoading:false,\r\n\t\t\t\tbusinessId:0, //分类id\r\n\t\t\t\tisTips:false, //是否提示\r\n\t\t\t\tcacheBusinessId:-1, //商户id\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(op) {\r\n\t\t\tif(op.business_id){\r\n\t\t\t\tthis.cacheBusinessId = op.business_id;\r\n\t\t\t}\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\tthis.companyIndex = 0;\r\n\t\t\tif(this.cacheBusinessId !== -1){\r\n\t\t\t\tthis.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{\r\n\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\tthis.getUserInfo();\r\n\t\t\t\t\t\tuserInfoEv();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}else{\r\n\t\t\t\tthis.getUserInfo();\r\n\t\t\t\tuserInfoEv();\r\n\t\t\t}\r\n\t\t\tgetCartNum();\r\n\t\t},\r\n\t\tonReachBottom(e) {\r\n\t\t\t\r\n\t\t},\r\n\t\t// 分享到微信\r\n\t\tonShareAppMessage() {\r\n\t\t\tlet path = uni.getStorageSync('page-path-options')+'?business_id='+uni.getStorageSync('business_id');\r\n\t\t\treturn {\r\n\t\t\t\tpath:path\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 分享到朋友圈\r\n\t\tonShareTimeline(res){\r\n\t\t\tlet path = uni.getStorageSync('page-path-options')+'?business_id='+uni.getStorageSync('business_id');\r\n\t\t\treturn {\r\n\t\t\t\tpath:path\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 获取用户信息\r\n\t\t\tgetUserInfo(){\r\n\t\t\t\tthis.$requst.get('/api/user/info').then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tthis.businessId = res.data.business_id;\r\n\t\t\t\t\t\tthis.getCompanyList(res.data.business_id); //查询商户\r\n\t\t\t\t\t\tthis.getCateList(res.data.business_id); //查询一级分类\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 弹出厂家选择框\r\n\t\t\topenMore(){\r\n\t\t\t\tif(!this.isShow){\r\n\t\t\t\t\tthis.isShow = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.isShow = false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 关闭厂家选择\r\n\t\t\tcloseMore(){\r\n\t\t\t\tthis.isShow = false;\r\n\t\t\t},\r\n\t\t\t// 选择厂家\r\n\t\t\tcheckValue(index,id){\r\n\t\t\t\tthis.companyIndex = index;\r\n\t\t\t\tthis.getCateList(id); //查询一级分类\r\n\t\t\t\t// 关闭厂家选择\r\n\t\t\t\tthis.closeMore();\r\n\t\t\t},\r\n\t\t\t// 选择分类 \r\n\t\t\tchangeCate(index,id){\r\n\t\t\t\tthis.cateIndex = index;\r\n\t\t\t\t// 查询二级\r\n\t\t\t\tthis.isTips = false;\r\n\t\t\t\tthis.secondList=[];\r\n\t\t\t\tthis.getSecondList(this.cateIndex);\r\n\t\t\t},\r\n\t\t\t// 查询工厂列表\r\n\t\t\tgetCompanyList(business_id){\r\n\t\t\t\tthis.$requst.get('/api/spu/business',{business_id:business_id}).then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tthis.companyList = res.data; //商户列表\r\n\t\t\t\t\t\tconsole.log(this.companyList,11111)\r\n\t\t\t\t\t\t// 查询一级分类\r\n\t\t\t\t\t\tif(this.companyList.length>0){\r\n\t\t\t\t\t\t\tthis.getCateList(this.companyList[0].id);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.getCateList(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 查询一级分类\r\n\t\t\tgetCateList(pid){\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle: '加载中'\r\n\t\t\t\t});\r\n\t\t\t\tthis.$requst.get('/api/spu/category',{business_id:pid}).then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t// uni.setStorageSync('businessId',this.businessId); //工厂id\r\n\t\t\t\t\t\tthis.cateIndex = 0;\r\n\t\t\t\t\t\tthis.cateList = [];\r\n\t\t\t\t\t\tthis.cateList = res.data; //一级分类\r\n\t\t\t\t\t\t// 查询二级\r\n\t\t\t\t\t\tthis.getSecondList(this.cateIndex);\r\n\t\t\t\t\t\t// if(res.data.length>0){\r\n\t\t\t\t\t\t// \tuni.setStorageSync('companyIndex',this.companyIndex); //工厂index\r\n\t\t\t\t\t\t// \tuni.setStorageSync('businessId',this.businessId); //工厂id\r\n\t\t\t\t\t\t// \tthis.cateIndex = 0;\r\n\t\t\t\t\t\t// \tthis.cateList = [];\r\n\t\t\t\t\t\t// \tthis.cateList = res.data; //一级分类\r\n\t\t\t\t\t\t// \t// 查询二级\r\n\t\t\t\t\t\t// \tthis.getSecondList(this.cateIndex);\r\n\t\t\t\t\t\t// }else{\r\n\t\t\t\t\t\t// \tthis.$toolAll.tools.showToast('该商户不能选择');\r\n\t\t\t\t\t\t// \tthis.companyIndex = uni.getStorageSync('companyIndex'); //还原工厂index\r\n\t\t\t\t\t\t// \tthis.businessId = uni.getStorageSync('businessId'); //还原工厂id\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 查询二级分类\r\n\t\t\tgetSecondList(index){\r\n\t\t\t\tthis.secondList=[];\r\n\t\t\t\tif(this.cateList.length>0){\r\n\t\t\t\t\tif(this.cateList[index].has_children){\r\n\t\t\t\t\t\tthis.secondList = this.cateList[index].children;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.isTips = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tuni.hideLoading();\r\n\t\t\t},\t\t\t\r\n\t\t\t// 跳转详情页\r\n\t\t\ttoShop(id) {\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:`/pagesA/shop/shop?category_id=${id}&company_id=${this.companyList[this.companyIndex].id}`\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t\r\n</style>\r\n"],"sourceRoot":""}