1 |
- {"version":3,"sources":["uni-app:///main.js","webpack:///D:/Code2024/sulibao-mini/pages/index/index.vue?4705","webpack:///D:/Code2024/sulibao-mini/pages/index/index.vue?1b7e","webpack:///D:/Code2024/sulibao-mini/pages/index/index.vue?4f0b","webpack:///D:/Code2024/sulibao-mini/pages/index/index.vue?73e6","uni-app:///pages/index/index.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","renderjs","component","options","__file","components","tnTabbar","e","message","indexOf","console","error","render","_vm","this","_h","$createElement","_self","_c","recyclableRender","staticRenderFns","_withStripped","Home","Comm","Discovery","Mine","data","tabbarList","title","activeIcon","inactiveIcon","currentIndex","tabberPageLoadFlag","onLoad","onShow","methods","switchTabbar","getOpenId","request","code","platType","mpType","uni","loginByCode","success","appType","encryptedData","iv","login","warn","loading","that","fail","tabbarPageScrollLower","_switchTabbarPage"],"mappings":"2IAAA,MAGA,aACA,WAFAA,EAAGC,kCAAoCC,EAGvCC,EAAWC,a,+ECLX,2HACIC,EADJ,QAQIC,EAAY,qBACd,aACA,YACA,sBACA,EACA,KACA,WACA,MACA,EACA,gBACAD,GAGFC,EAAUC,QAAQC,OAAS,wBACZ,aAAAF,E,yCCtBf,sQ,gCCAA,IAAIG,EAAJ,0LACA,IACEA,EAAa,CACXC,SAAU,WACR,OAAO,yEAKX,MAAOC,GACP,IAC+C,IAA7CA,EAAEC,QAAQC,QAAQ,wBACa,IAA/BF,EAAEC,QAAQC,QAAQ,QAWlB,MAAMF,EATNG,QAAQC,MAAMJ,EAAEC,SAChBE,QAAQC,MAAM,mBACdD,QAAQC,MACN,uFAEFD,QAAQC,MACN,mDAMN,IAAIC,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACJH,EAAII,MAAMC,IAEjBC,GAAmB,EACnBC,EAAkB,GACtBR,EAAOS,eAAgB,G,gCCjCvB,wHAA0zB,eAAG,G,4HCsC7zB,ubACA,CACAhB,YACAiB,OACAC,OACAC,YACAC,QAEAC,gBACA,OAEAC,aACAC,aACAC,6BACAC,2BAEA,CACAF,aACAC,uBACAC,qBAWA,CACAF,eACAC,sBACAC,2BAGA,CACAF,WACAC,qBACAC,oBAIAC,eAEAC,wBAGAC,mBACA,yBAEA,2DACA,gBAEA,sBAeAC,kBACA,wCACA,qCAEA,wCACA,6BAGAC,SAEAC,yBAEA,SADA,0BACA,SACA,wFAIAC,sBAEAC,qCACAC,OACAC,eACAC,oBACA,kBACA/B,iBACA,WAEAgC,4DAiCAC,wBACA,WACAD,wCACA9C,eACAgD,oBACAlC,iBACA4B,kCACAC,OACAM,aACAC,8BACAC,SACA,CACAC,SACAC,QACAC,aACA,kBACAxC,iBACA,WAEAgC,uCACAA,wDACAA,qDAEAhC,qBACAgC,wCAGAA,SACAE,oBACAlC,iBACAyC,qBAEAC,iBACA1C,iBACAgC,oBAKAhC,wBA+BA2C,kCACA,uBACA,2BAEA,uBACA,2BAEA,uBACA,0EAKAC,8BACA,sCACA,SAGA,QACA,+BAEA,wBAGA,c","file":"pages/index/index.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/index/index.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=57280228&scoped=true&\"\nvar renderjs\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../self software/HBuilderX.3.99.2023122611/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 \"57280228\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/index/index.vue\"\nexport default component.exports","export * from \"-!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=template&id=57280228&scoped=true&\"","var components\ntry {\n components = {\n tnTabbar: function () {\n return import(\n /* webpackChunkName: \"tuniao-ui/components/tn-tabbar/tn-tabbar\" */ \"@/tuniao-ui/components/tn-tabbar/tn-tabbar.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 \"-!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"start-index\">\r\n\t\t<view v-if=\"tabberPageLoadFlag[0]\" :style=\"{display: currentIndex === 0 ? '' : 'none'}\">\r\n\t\t\t<scroll-view class=\"custom-tabbar-page\" scroll-y enable-back-to-top @scrolltolower=\"tabbarPageScrollLower\">\r\n\t\t\t\t<Home ref=\"home\"></Home>\r\n\t\t\t</scroll-view>\r\n\t\t</view>\r\n\t\t<view v-if=\"tabberPageLoadFlag[1]\" :style=\"{display: currentIndex === 1 ? '' : 'none'}\">\r\n\t\t\t<scroll-view class=\"custom-tabbar-page\" scroll-y enable-back-to-top @scrolltolower=\"tabbarPageScrollLower\">\r\n\t\t\t\t<Comm ref=\"comm\"></Comm>\r\n\t\t\t</scroll-view>\r\n\t\t</view>\r\n\t\t<view v-if=\"tabberPageLoadFlag[2]\" :style=\"{display: currentIndex === 2 ? '' : 'none'}\">\r\n\t\t\t<scroll-view class=\"custom-tabbar-page\" scroll-y enable-back-to-top @scrolltolower=\"tabbarPageScrollLower\">\r\n\t\t\t\t<Discovery ref=\"discovery\"></Discovery>\r\n\t\t\t</scroll-view>\r\n\t\t</view>\r\n\t\t<!-- <view v-if=\"tabberPageLoadFlag[3]\" :style=\"{display: currentIndex === 3 ? '' : 'none'}\">\r\n <scroll-view class=\"custom-tabbar-page\" scroll-y enable-back-to-top @scrolltolower=\"tabbarPageScrollLower\">\r\n <Message ref=\"message\"></Message>\r\n </scroll-view>\r\n </view> -->\r\n\t\t<view v-if=\"tabberPageLoadFlag[3]\" :style=\"{display: currentIndex === 3 ? '' : 'none'}\">\r\n\t\t\t<scroll-view class=\"custom-tabbar-page\" scroll-y enable-back-to-top @scrolltolower=\"tabbarPageScrollLower\">\r\n\t\t\t\t<Mine ref=\"mine\"></Mine>\r\n\t\t\t</scroll-view>\r\n\t\t</view>\r\n\r\n\t\t<tn-tabbar v-model=\"currentIndex\" :list=\"tabbarList\" activeColor=\"#1d60b1\" inactiveColor=\"#AAAAAA\"\r\n\t\t\tactiveIconColor=\"#1d60b1\" :animation=\"true\" :safeAreaInsetBottom=\"true\" @change=\"switchTabbar\"></tn-tabbar>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport Home from '../home/home.vue'\r\n\timport Comm from '../comm/comm.vue'\r\n\timport Discovery from '../discovery/discovery.vue'\r\n\timport Mine from '../mine/mine.vue'\r\n import request from '../../utils/request'\r\n\texport default {\r\n\t\tcomponents: {\r\n\t\t\tHome,\r\n\t\t\tComm,\r\n\t\t\tDiscovery,\r\n\t\t\tMine\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\t// 底部tabbar菜单数据\r\n\t\t\t\ttabbarList: [{\r\n\t\t\t\t\t\ttitle: '我要什么',\r\n\t\t\t\t\t\tactiveIcon: 'home-smile-fill',\r\n\t\t\t\t\t\tinactiveIcon: 'home-smile'\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttitle: '我有什么',\r\n\t\t\t\t\t\tactiveIcon: 'shop-fill',\r\n\t\t\t\t\t\tinactiveIcon: 'shop'\r\n\t\t\t\t\t},\r\n\t\t\t\t\t// {\r\n\t\t\t\t\t// title: '发现',\r\n\t\t\t\t\t// activeIcon: 'rocket',\r\n\t\t\t\t\t// inactiveIcon: 'cube',\r\n\t\t\t\t\t// activeIconColor: '#FFFFFF',\r\n\t\t\t\t\t// inactiveIconColor: '#FFFFFF',\r\n\t\t\t\t\t// iconSize: 50,\r\n\t\t\t\t\t// out: true\r\n\t\t\t\t\t// },\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttitle: '供需发布平台',\r\n\t\t\t\t\t\tactiveIcon: 'add-fill',\r\n\t\t\t\t\t\tinactiveIcon: 'add-circle',\r\n\t\t\t\t\t\t// count: 12\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttitle: '我的',\r\n\t\t\t\t\t\tactiveIcon: 'my-fill',\r\n\t\t\t\t\t\tinactiveIcon: 'my'\r\n\t\t\t\t\t}\r\n\t\t\t\t],\r\n\t\t\t\t// tabbar当前被选中的序号\r\n\t\t\t\tcurrentIndex: 0,\r\n\t\t\t\t// 自定义底栏对应页面的加载情况\r\n\t\t\t\ttabberPageLoadFlag: []\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(options) {\r\n\t\t\tconst index = Number(options.index || 0)\r\n\t\t\t// 根据底部tabbar菜单列表设置对应页面的加载情况\r\n\t\t\tthis.tabberPageLoadFlag = this.tabbarList.map((item, tabbar_index) => {\r\n\t\t\t\treturn index === tabbar_index\r\n\t\t\t})\r\n\t\t\tthis.switchTabbar(index);\r\n\t\t\tlet that = this;\r\n\t\t\t \r\n\t\t\t// uni.login({\r\n\t\t\t// \tsuccess(res) {\r\n\t\t\t// \t\t console.error(res);\r\n\t\t\t// \t\t that.loginByCode(res.code);\r\n\t\t\t// \t},\r\n\t\t\t// \tfail(res) {\r\n\t\t\t// \t\t console.error(res);\r\n\t\t\t// \t\tuni.hideLoading();\r\n\t\t\t// \t}\r\n\t\t\t// });\r\n\r\n\t\t},\r\n\t\tonShow(){\r\n\t\t\tif (this.currentIndex === 3&&this.$refs.mine) {\r\n\t\t\t\tthis.$refs.mine.getContentRectInfo();\r\n\t\t\t}\r\n\t\t\tif (this.currentIndex === 1&&this.$refs.comm) {\r\n\t\t\t\tthis.$refs.comm.fetchData();\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 切换导航\r\n\t\t\tswitchTabbar(index) {\r\n\t\t\t\tthis._switchTabbarPage(index)\r\n\t\t\t\tif (index !== 1) {\r\n\t\t\t\t\tthis.$refs?.commRef?.stopAllVideo()\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t//获取openId,unionid\r\n\t\t\tgetOpenId(code) {\r\n\t\t\t\tconst that = this;\r\n\t\t\t\trequest.post('/wxma/code2Session',{\r\n\t\t\t\t\t\tcode: code,\r\n\t\t\t\t\t\tplatType: \"slb\",\r\n\t\t\t\t\t\tmpType: \"engineer\",\r\n\t\t\t\t\t}).then(res=>{\r\n\t\t\t\t\t\tconsole.error(res);\r\n\t\t\t\t\t\tif(res.success){\r\n\t\t\t\t\t\t\t//登录成功\r\n\t\t\t\t\t\t\tuni.setStorageSync('userMap', JSON.stringify(res.resultMap));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t})\r\n\t\t\t\t// wx.request({\r\n\t\t\t\t// \tmethod: 'post',\r\n\t\t\t\t// \turl: 'http://slb-m.dev.ml1993.com/lx-api/wxma/code2Session', //仅为示例,并非真实的接口地址\r\n\t\t\t\t// \tdata: {\r\n\t\t\t\t// \t\tcode: code,\r\n\t\t\t\t// \t\tplatType: \"slb\",\r\n\t\t\t\t// \t\tmpType: \"engineer\",\r\n\t\t\t\t// \t},\r\n\t\t\t\t// \theader: {\r\n\t\t\t\t// \t\t'content-type': 'application/json' ,// 默认值\r\n\t\t\t\t// \t\tplatType: \"slb\",\r\n\t\t\t\t// \t\tmpType: \"engineer\",\r\n\t\t\t\t// \t},\r\n\t\t\t\t// \tsuccess(res) {\r\n\t\t\t\t// \t\tconsole.warn(res);\r\n\t\t\t\t// \t\t//unionid存到本地\r\n\t\t\t\t// \t\twx.setStorage({\r\n\t\t\t\t// \t\t\tkey: \"frontlixiangsid\",\r\n\t\t\t\t// \t\t\tdata: res.data.resultMap.frontlixiangsid\r\n\t\t\t\t// \t\t}, {\r\n\t\t\t\t// \t\t\tkey: \"userId\",\r\n\t\t\t\t// \t\t\tdata: res.data.resultMap.unionid\r\n\t\t\t\t// \t\t})\r\n\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\r\n\t\t\tloginByCode(frontId) {\r\n\t\t\t\tconst that = this;\r\n\t\t\t\tuni.setStorageSync('loginStatus', 'false');\r\n\t\t\t\twx.getUserInfo({\r\n\t\t\t\t success: function(res) {\r\n\t\t\t\t\tconsole.error(res);\r\n\t\t\t\t\trequest.post(\"/slbMpAutoLogin\", {\r\n\t\t\t\t\t \t\tcode:frontId, \r\n\t\t\t\t\t \t appType:'ma',\r\n\t\t\t\t\t\t\tencryptedData:res.encryptedData,\r\n\t\t\t\t\t\t\tiv: res.iv\r\n\t\t\t\t\t \t}, {\r\n\t\t\t\t\t\tlogin: false,\r\n\t\t\t\t\t\twarn:false,\r\n\t\t\t\t\t\tloading:false\r\n\t\t\t\t\t}).then(res2=>{\r\n\t\t\t\t\t\tconsole.error(res2);\r\n\t\t\t\t\t\tif(res2.success){\r\n\t\t\t\t\t\t\t//登录成功\r\n\t\t\t\t\t\t\tuni.setStorageSync('loginStatus', 'true');\r\n\t\t\t\t\t\t\tuni.setStorageSync('userMap', JSON.stringify(res2.resultMap));\r\n\t\t\t\t\t\t\tuni.setStorageSync('userNo', res2.resultMap.accountName);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.error(12345);\r\n\t\t\t\t\t\t\tuni.setStorageSync('loginStatus', 'false');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//登录失败,\r\n\t\t\t\t\t\t\tuni.login({\r\n\t\t\t\t\t\t\t\tsuccess(res) {\r\n\t\t\t\t\t\t\t\t\t console.error(res);\r\n\t\t\t\t\t\t\t\t\t that.getOpenId(res.code);\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tfail(res) {\r\n\t\t\t\t\t\t\t\t\t console.error(res);\r\n\t\t\t\t\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconsole.error(res2);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t // uni.request({\r\n\t\t\t\t\t // \tmethod: 'post',\r\n\t\t\t\t\t // \turl: 'http://slb-m.dev.ml1993.com/lx-api/slbMpAutoLogin', //仅为示例,并非真实的接口地址\r\n\t\t\t\t\t // \tdata: {\r\n\t\t\t\t\t // \t\tcode:frontId, \r\n\t\t\t\t\t // \t appType:'ma',\r\n\t\t\t\t\t\t// \tencryptedData:res.encryptedData,\r\n\t\t\t\t\t\t// \tiv: res.iv\r\n\t\t\t\t\t // \t},\r\n\t\t\t\t\t // \theader: {\r\n\t\t\t\t\t // \t\t'content-type': 'application/json', // 默认值\r\n\t\t\t\t\t \t\t \r\n\t\t\t\t\t // \t\tplatType: \"slb\",\r\n\t\t\t\t\t // \t\tmpType: \"engineer\",\r\n\t\t\t\t\t // \t},\r\n\t\t\t\t\t // \tsuccess(res2) {\r\n\t\t\t\t\t // \t\tconsole.error(res2);\r\n\t\t\t\t\t // \t\t//unionid存到本地\r\n\t\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\t \r\n\t\t\t\t }\r\n\t\t\t\t})\r\n\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t},\r\n\r\n\t\t\t// 瀑布流导航页面滚动到底部\r\n\t\t\ttabbarPageScrollLower(e) {\r\n\t\t\t\tif (this.currentIndex === 0) {\r\n\t\t\t\t\tthis.$refs.home.loadMore();\r\n\t\t\t\t}\r\n\t\t\t\tif (this.currentIndex === 1) {\r\n\t\t\t\t\tthis.$refs.comm.loadMore();\r\n\t\t\t\t}\r\n\t\t\t\tif (this.currentIndex === 2) {\r\n\t\t\t\t\tthis.$refs.discovery.getRandomData && this.$refs.discovery.getRandomData()\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// 切换导航页面\r\n\t\t\t_switchTabbarPage(index) {\r\n\t\t\t\tconst selectPageFlag = this.tabberPageLoadFlag[index]\r\n\t\t\t\tif (selectPageFlag === undefined) {\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tif (selectPageFlag === false) {\r\n\t\t\t\t\tthis.tabberPageLoadFlag[index] = true\r\n\t\t\t\t}\r\n\t\t\t\tthis.currentIndex = index\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n</style>"],"sourceRoot":""}
|