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
14 KiB

{"version":3,"sources":["uni-app:///main.js","webpack:///E:/Git/GitHome/meituan_uniapp/App.vue?4622","webpack:///E:/Git/GitHome/meituan_uniapp/App.vue?988a","uni-app:///App.vue","webpack:///E:/Git/GitHome/meituan_uniapp/App.vue?8d95","webpack:///E:/Git/GitHome/meituan_uniapp/App.vue?efba"],"names":["Vue","prototype","request","component","nodata","config","productionTip","mixin","methods","setData","obj","callback","that","handleData","tepData","tepKey","afterKey","split","forEach","item","undefined","reg","test","isFn","value","Object","keys","key","val","replace","front","after","index_after","lastIndexOf","slice","$data","defineProperty","get","set","newValue","$forceUpdate","enumerable","configurable","$set","$nextTick","App","mpType","app","$mount"],"mappings":";;;;;;;;;iDAAA,wCAAmB;AACnB;;AAEA;;;AAGA,2E,g7CAA0B;;;AAG1BA,aAAIC,SAAJ,CAAcC,OAAd,GAAwBA,iBAAQA,OAAhC,C,CAAwC;AACxCF,aAAIG,SAAJ,CAAc,QAAd,EAAwBC,MAAxB;AACAJ,aAAIK,MAAJ,CAAWC,aAAX,GAA2B,KAA3B;AACAN,aAAIO,KAAJ,CAAU;AACTC,SAAO,EAAE;AACRC,WAAO,EAAE,iBAASC,GAAT,EAAcC,QAAd,EAAwB;AAChC,UAAIC,IAAI,GAAG,IAAX;AACA,UAAMC,UAAU,GAAG,SAAbA,UAAa,CAACC,OAAD,EAAUC,MAAV,EAAkBC,QAAlB,EAA+B;AACjDD,cAAM,GAAGA,MAAM,CAACE,KAAP,CAAa,GAAb,CAAT;AACAF,cAAM,CAACG,OAAP,CAAe,UAAAC,IAAI,EAAI;AACtB,cAAIL,OAAO,CAACK,IAAD,CAAP,KAAkB,IAAlB,IAA0BL,OAAO,CAACK,IAAD,CAAP,KAAkBC,SAAhD,EAA2D;AAC1D,gBAAIC,GAAG,GAAG,UAAV;AACAP,mBAAO,CAACK,IAAD,CAAP,GAAgBE,GAAG,CAACC,IAAJ,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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCADA;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,gBAFA;AAGA,4BAHA;;AAKA;AACA,GAzEA;AA0EA;AACA,kBADA;AAEA,sBAFA,EAEA;AACA,eAHA,EAGA;AACA,mCAJA,EAIA;AACA,qCALA,CAKA;AALA,GA1EA;AAiFA,aAjFA,E;;;;;;;;;;;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAsnC,CAAgB,0nCAAG,EAAC,C;;;;;;;;;;ACA1oC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"common/main.js","sourcesContent":["import 'uni-pages';import Vue from 'vue';\r\nimport App from './App';\r\nimport nodata from \"./pages/commponent/public/nodata\";\r\nimport request from 'utils/request.js' //引入异步请求函数\r\n\r\n\r\nimport Json from './json' //测试用数据\r\n\r\n\r\nVue.prototype.request = request.request //挂载到全局\r\nVue.component(\"nodata\", nodata);\r\nVue.config.productionTip = false;\r\nVue.mixin({\r\n\tmethods: {\r\n\t\tsetData: function(obj, callback) {\r\n\t\t\tlet that = this;\r\n\t\t\tconst handleData = (tepData, tepKey, afterKey) => {\r\n\t\t\t\ttepKey = tepKey.split('.');\r\n\t\t\t\ttepKey.forEach(item => {\r\n\t\t\t\t\tif (tepData[item] === null || tepData[item] === undefined) {\r\n\t\t\t\t\t\tlet reg = /^[0-9]+$/;\r\n\t\t\t\t\t\ttepData[item] = reg.test(afterKey) ? [] : {};\r\n\t\t\t\t\t\ttepData = tepData[item];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttepData = tepData[item];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\treturn tepData;\r\n\t\t\t};\r\n\t\t\tconst isFn = function(value) {\r\n\t\t\t\treturn typeof value == 'function' || false;\r\n\t\t\t};\r\n\t\t\tObject.keys(obj).forEach(function(key) {\r\n\t\t\t\tlet val = obj[key];\r\n\t\t\t\tkey = key.replace(/\\]/g, '').replace(/\\[/g, '.');\r\n\t\t\t\tlet front, after;\r\n\t\t\t\tlet index_after = key.lastIndexOf('.');\r\n\t\t\t\tif (index_after != -1) {\r\n\t\t\t\t\tafter = key.slice(index_after + 1);\r\n\t\t\t\t\tfront = handleData(that, key.slice(0, index_after), after);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tafter = key;\r\n\t\t\t\t\tfront = that;\r\n\t\t\t\t}\r\n\t\t\t\tif (front.$data && front.$data[after] === undefined) {\r\n\t\t\t\t\tObject.defineProperty(front, after, {\r\n\t\t\t\t\t\tget() {\r\n\t\t\t\t\t\t\treturn front.$data[after];\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tset(newValue) {\r\n\t\t\t\t\t\t\tfront.$data[after] = newValue;\r\n\t\t\t\t\t\t\tthat.$forceUpdate();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\t\tconfigurable: true\r\n\t\t\t\t\t});\r\n\t\t\t\t\tfront[after] = val;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthat.$set(front, after, val);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tisFn(callback) && this.$nextTick(callback);\r\n\t\t}\r\n\t}\r\n});\r\nApp.mpType = 'app';\r\nconst app = new Vue({\r\n ...App\r\n});\r\napp.$mount();","var render, staticRenderFns, recyclableRender, components\nvar renderjs\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/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 = \"App.vue\"\nexport default component.exports","import mod from \"-!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=script&lang=js&\"","<script>\nimport { getConfig, setConfig, getCart, getToken } from \"./utils/auth\";\r\nimport myconfig from \"./utils/config\";\r\nimport request from \"./utils/request\";\r\nlet colors = getConfig();\r\nlet nowColor = ''\r\nif(colors){\r\n\tnowColor = colors.color\r\n}\r\nuni.$ajax = request.request; //挂载全局请求方法\r\nexport default {\n onLaunch: function () {\r\n\t// #ifdef MP-WEIXIN\r\n\tuni.getSetting({\r\n\t success: res => {\r\n\t if (res.authSetting['scope.userInfo']) {\r\n\t // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框\r\n\t uni.getUserInfo({\r\n\t success: res => {\r\n\t // 可以将 res 发送给后台解码出 unionId\r\n\t this.globalData.userInfo = res.userInfo; // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回\r\n\t // 所以此处加入 callback 以防止这种情况\r\n\t if (this.userInfoReadyCallback) {\r\n\t this.userInfoReadyCallback(res); \r\n\t }\r\n\t }\r\n\t });\r\n\t }\r\n\t }\r\n\t});\r\n\t// #endif\n uni.getSystemInfo({ // 获取手机状态栏高度\n complete: res => {\n this.globalData.statusHeight = res.statusBarHeight;\n if (res.platform == \"ios\") {\n this.globalData.toBar = 44;\n } else if (res.platform == \"android\") {\n this.globalData.toBar = 48;\n } else {\n this.globalData.toBar = 44;\n }\n }\n }); // 设置默认主题颜色\n let config = getConfig();\n if (config && config.color !== '') {\n //如果存在设置的主题 使用设置的主题\n uni.setTabBarStyle({\n selectedColor: config.color\n });\n let tabList = config.tabList;\n if (config.tabList) {\n for (var i = 0; i < tabList.length; i++) {\n let img = tabList[i];\n uni.setTabBarItem({\n //设置tabBar 首页图标\n index: i,\n selectedIconPath: img\n });\n }\n }\n } else {\n //如果不存在主题 使用默认主题\n let fristColor = {};\n fristColor.color = '#39b54a';\n fristColor.name = \"green\";\n setConfig(fristColor);\n uni.setTabBarStyle({\n selectedColor: '#39b54a'\n });\n }\r\n\t/**\r\n\t * 模拟获取购物车的数量 getCart\r\n\t */\r\n\tlet cart = getCart()\r\n\tlet length = ''\r\n\tif(cart && getToken()){\r\n\t\tlength = cart.length\r\n\t\tuni.setTabBarBadge({\r\n\t\t //给tabBar添加角标\r\n\t\t index: 2,\r\n\t\t text: String(length)\r\n\t\t});\r\n\t}\n },\n globalData: {\n userInfo: null,\n statusHeight: '20', //状态栏高度\n toBar: '44', //标题栏高度\n newColor: nowColor || '#39b54a', //小程序主题颜色\n config: myconfig.themeList //主题图标\n },\n methods: {}\n};\r\n</script>\r\n<style>\r\n@import \"./app.css\";\r\n</style>","import mod from \"-!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1611123852250\n var cssReload = require(\"E:/HBuilderX/HBuilderX.2.9.3.20201014.full/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}