luban-mall/unpackage/dist/dev/.sourcemap/mp-weixin/pages/tabbar/news/collection.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/news/collection.vue?c94f","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/news/collection.vue?77d0","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/news/collection.vue?d849","uni-app:///pages/tabbar/news/collection.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,4G,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,mBAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAuH;AACvH;AAC8D;AACL;;;AAGzD;AACuL;AACvL,gBAAgB,2LAAU;AAC1B,EAAE,gFAAM;AACR,EAAE,qFAAM;AACR,EAAE,8FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,yFAAU;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,kLAEN;AACP,KAAK;AACL;AACA,aAAa,8LAEN;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;AAA2sB,CAAgB,0rBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACqB/tB,sE;AACA;AACA;AACA,wBADA;AAEA,kBAFA;AAGA,sBAHA,EADA;;AAMA,MANA,kBAMA;AACA;AACA,uGADA;AAEA,mDAFA;AAGA,0DAHA;AAIA,wBAJA,EAIA;AACA;AACA,oBADA;AAEA,oBAFA,CALA;;AASA,qBATA,EASA;AACA,aAVA,EAUA;AACA,cAXA,EAWA;AACA,cAZA,EAYA;AACA,kBAbA,EAaA;AACA,kBAdA,EAcA;AACA,yBAfA,EAeA;AACA,sBAhBA;;AAkBA,GAzBA;AA0BA,QA1BA,kBA0BA,EA1BA,EA0BA;AACA;AACA;AACA;AACA,GA9BA;AA+BA,QA/BA,oBA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,KARA,MAQA;AACA;AACA;AACA;AACA;AACA,GA7CA;AA8CA,eA9CA,yBA8CA,CA9CA,EA8CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GArDA;AAsDA;AACA,mBAvDA,+BAuDA;AACA;AACA;AACA,gBADA;;AAGA,GA5DA;AA6DA;AACA,iBA9DA,2BA8DA,GA9DA,EA8DA;AACA;AACA;AACA,gBADA;;AAGA,GAnEA;AAoEA;AACA;AACA,YAFA,oBAEA,IAFA,EAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAjBA;AAkBA;AACA,qBAnBA,+BAmBA;AACA;AACA,uBADA;AAEA,uBAFA;;AAIA;AACA;AACA;AACA,sBADA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,2BADA;AAEA,+BAFA;AAGA,gCAHA;AAIA,wBAJA;;AAMA;AACA,aARA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SApBA;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BADA;AAEA,+BAFA;AAGA,iCAHA;AAIA,2EAJA;;AAMA;AACA,aARA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SApBA;AAqBA;AACA,KA1EA;AA2EA;AACA,cA5EA,sBA4EA,QA5EA,EA4EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KArFA;AAsFA;AACA,gBAvFA,wBAuFA,EAvFA,EAuFA;;AAEA;AACA;AACA,mBADA;AAEA,2BAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,SANA;AAOA;AACA;AACA;AACA,2BADA;AAEA,2BAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,SANA;AAOA;AACA,KAnHA;AAoHA;AACA,mBArHA,2BAqHA,EArHA,EAqHA;AACA;AACA;AACA,sEADA;;AAGA;AACA;AACA;AACA,4DADA;;AAGA;AACA,KAhIA,EApEA,E","file":"pages/tabbar/news/collection.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/news/collection.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./collection.vue?vue&type=template&id=9606a23c&\"\nvar renderjs\nimport script from \"./collection.vue?vue&type=script&lang=js&\"\nexport * from \"./collection.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/news/collection.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!./collection.vue?vue&type=template&id=9606a23c&\"","var components\ntry {\n components = {\n navTab: function() {\n return import(\n /* webpackChunkName: \"components/nav-tab/nav-tab\" */ \"@/components/nav-tab/nav-tab.vue\"\n )\n },\n pullList: function() {\n return import(\n /* webpackChunkName: \"components/pull-list/pull-list\" */ \"@/components/pull-list/pull-list.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!./collection.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!./collection.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<status-nav :ifReturn=\"true\" navBarTitle=\"收藏\" :marginBottom=\"0\"></status-nav>\r\n\t\t<!-- 导航 -->\r\n\t\t<view class=\"nav-list-bg\" :style=\"{top:newTop+'px'}\">\r\n\t\t\t<nav-tab :list=\"navTabList\" @chooseEv=\"chooseEv\"></nav-tab>\r\n\t\t</view>\r\n\t\t<!-- 列表 -->\r\n\t\t<view class=\"news-list-bg\" v-if=\"isLoading\">\r\n\t\t\t<pull-list :list=\"collectionList\" :collection=\"1\" :isShop=\"isShop\" @toDetail=\"toArticleDetail\" @collectionEv=\"collectionEv\"></pull-list>\r\n\t\t</view>\r\n\t\t<!-- 暂无更多内容 -->\r\n\t\t<view class=\"more-txt more-txt-other\" v-if=\"total!==0 && totalAll == total\">暂无更多内容</view>\r\n\t\t<nothing-page v-if=\"total==0&&totalAll == total\" content=\"还没有相关收藏哟(*^▽^*)\"></nothing-page>\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 navTab from '@/components/nav-tab/nav-tab.vue';\r\n\timport pullList from '@/components/pull-list/pull-list.vue';\r\n\timport {userInfoEv} from '@/jsFile/public-api.js';\r\n\texport default {\r\n\t\tcomponents:{\r\n\t\t\tstatusNav,\r\n\t\t\tnavTab,\r\n\t\t\tpullList\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\tnewTop:uni.getSystemInfoSync().statusBarHeight + 50,\r\n\t\t\t\tcollectionList:[], //解答&资讯列表\r\n\t\t\t\tnavTabList:[ //导航列表\r\n\t\t\t\t\t{name:'商品'},\r\n\t\t\t\t\t{name:'文章'},\r\n\t\t\t\t],\r\n\t\t\t\tcurrentIndex:0, //当前位置\r\n\t\t\t\tpage:1, //第几页\r\n\t\t\t\tsize:10, //查询条数\r\n\t\t\t\ttotal:0, //总数\r\n\t\t\t\ttotalAll:-1, //计算总数\r\n\t\t\t\tisShop:true, //是否商品\r\n\t\t\t\tcacheBusinessId:-1, //商户id\r\n\t\t\t\tisLoading:false,\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\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.collectionList = [];\r\n\t\t\t\t\t\tthis.getCollectionList();\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.collectionList = [];\r\n\t\t\t\tthis.getCollectionList();\r\n\t\t\t\tuserInfoEv();\r\n\t\t\t}\r\n\t\t},\r\n\t\tonReachBottom(e) {\r\n\t\t\tif(this.collectionList.length<this.total){\r\n\t\t\t\tthis.page++;\r\n\t\t\t\tthis.getArticleList();\r\n\t\t\t}\r\n\t\t\tthis.page++;\r\n\t\t\tthis.getCollectionList();\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\tchooseEv(type){\r\n\t\t\t\tif(type == 0){\r\n\t\t\t\t\tthis.isShop = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(type == 1){\r\n\t\t\t\t\tthis.isShop = false;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.currentIndex !== type){\r\n\t\t\t\t\tthis.total=0;\r\n\t\t\t\t\tthis.totalAll=-1;\r\n\t\t\t\t\tthis.page = 1;\r\n\t\t\t\t\tthis.currentIndex = type;\r\n\t\t\t\t\tthis.collectionList=[];\r\n\t\t\t\t\tthis.getCollectionList();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 获取收藏列表\r\n\t\t\tgetCollectionList(){\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\tpage:this.page,\r\n\t\t\t\t\tsize:this.size\r\n\t\t\t\t}\r\n\t\t\t\tthis.isLoading =false;\r\n\t\t\t\tif(this.currentIndex == 0){\r\n\t\t\t\t\tuni.showLoading({\r\n\t\t\t\t\t\ttitle: '加载中'\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.$requst.get('/api/spu/collection',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\t\tthis.total = res.data.total;\r\n\t\t\t\t\t\t\tlet newArr = [];\r\n\t\t\t\t\t\t\tres.data.list.forEach(item=>{\r\n\t\t\t\t\t\t\t\tlet obj = {\r\n\t\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\t\tsrc:item.cover,\r\n\t\t\t\t\t\t\t\t\ttitle:item.name,\r\n\t\t\t\t\t\t\t\t\ttime:'',\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tnewArr.push(obj)\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.collectionList = this.collectionList.concat(newArr);\r\n\t\t\t\t\t\t\tif(this.collectionList.length == this.total){\r\n\t\t\t\t\t\t\t\tthis.totalAll = this.total;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\t\tthis.isLoading =true;\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\tif(this.currentIndex == 1){\r\n\t\t\t\t\tthis.$requst.get('/api/archives/collects',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\t\tthis.total = res.data.total;\r\n\t\t\t\t\t\t\tlet newArr = [];\r\n\t\t\t\t\t\t\tres.data.list.forEach(item=>{\r\n\t\t\t\t\t\t\t\tlet obj = {\r\n\t\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\t\tsrc:item.cover,\r\n\t\t\t\t\t\t\t\t\ttitle:item.title,\r\n\t\t\t\t\t\t\t\t\ttime:this.dateFormat(item.created_at.replace(/-/g,'/')),\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tnewArr.push(obj)\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.collectionList = this.collectionList.concat(newArr);\r\n\t\t\t\t\t\t\tif(this.collectionList.length == this.total){\r\n\t\t\t\t\t\t\t\tthis.totalAll = this.total;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\t\tthis.isLoading =true;\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\tdateFormat (dateData) {\r\n\t\t\t var date = new Date(dateData)\r\n\t\t\t var y = date.getFullYear()\r\n\t\t\t var m = date.getMonth() + 1\r\n\t\t\t m = m < 10 ? '0' + m : m\r\n\t\t\t var d = date.getDate()\r\n\t\t\t d = d < 10 ? '0' + d : d\r\n\t\t\t const time = y + '.' + m + '.' + d\r\n\t\t\t return time\r\n\t\t\t},\r\n\t\t\t//收藏\r\n\t\t\tcollectionEv(id){\r\n\t\t\t\t\r\n\t\t\t\tif(this.currentIndex == 0){\r\n\t\t\t\t\tlet params = {\r\n\t\t\t\t\t\tid:id.id,\r\n\t\t\t\t\t\taction:'collect'\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$requst.post('/api/spu/un-record',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('取消收藏成功');\r\n\t\t\t\t\t\t\tthis.collectionList=[];\r\n\t\t\t\t\t\t\tthis.getCollectionList();\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\tif(this.currentIndex == 1){\r\n\t\t\t\t\tlet params = {\r\n\t\t\t\t\t\tarchive_id:id.id,\r\n\t\t\t\t\t\taction:'collect'\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$requst.post('/api/archives/un-record',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('取消收藏成功');\r\n\t\t\t\t\t\t\tthis.collectionList=[];\r\n\t\t\t\t\t\t\tthis.getCollectionList();\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\ttoArticleDetail(id){\r\n\t\t\t\tif(this.currentIndex == 0){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pagesA/shop/detail?id=${id.id}&source=shop`\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\tif(this.currentIndex == 1){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pages/tabbar/news/detail?id=${id.id}`\r\n\t\t\t\t\t})\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\r\n</style>\r\n"],"sourceRoot":""}