公司小程序
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 lines
10 KiB

{"version":3,"sources":["uni-app:///main.js","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/WxLogin/WxLogin.vue?8c56","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/WxLogin/WxLogin.vue?5d45","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/WxLogin/WxLogin.vue?9dd6","uni-app:///pages/WxLogin/WxLogin.vue","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/WxLogin/WxLogin.vue?07a4"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","renderjs","component","options","__file","components","uNavbar","uGap","e","message","indexOf","console","error","render","_vm","this","_h","$createElement","_self","_c","staticRenderFns","_withStripped"],"mappings":"mIAAA,KACA,YACA,Y,mDAFmBA,GAAGC,kCAAoCC,EAG1DC,EAAWC,a,gECHX,uHACIC,EADJ,OASIC,EAAY,eACd,aACA,OACA,QACA,EACA,KACA,WACA,MACA,EACA,OACAD,GAGFC,EAAUC,QAAQC,OAAS,4BACZ,aAAAF,E,0CCvBf,qBAA89B,EAAG,G,gCCAj+B,6GAAiqB,eAAG,G,qHCiCpqB,CACE,KADF,WAEI,MAAJ,CACM,WAAN,GACM,OAAN,GACM,SAAN,KACM,UAAN,KACM,SAAN,mCAGE,QAAF,CAEA,cAFA,WAGA,oBAKA,MARA,WAUA,eACA,iBAIA,SACA,kBACA,oBACA,eACA,aAEA,WACA,yDACA,MACA,QAEA,cACA,QACA,mCAEA,oBAEA,oBACA,eACA,iBAEA,iBACA,eACA,uBAOA,OA7CA,e,+FC3CA,IAAIG,E,sGACJ,IACEA,EAAa,CACXC,QAAS,WACP,OAAO,qHAITC,KAAM,WACJ,OAAO,gHAKX,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,IAGjBC,EAAkB,GACtBP,EAAOQ,eAAgB,I","file":"pages/WxLogin/WxLogin.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/WxLogin/WxLogin.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./WxLogin.vue?vue&type=template&id=681b0ed8&scoped=true&\"\nvar renderjs\nimport script from \"./WxLogin.vue?vue&type=script&lang=js&\"\nexport * from \"./WxLogin.vue?vue&type=script&lang=js&\"\nimport style0 from \"./WxLogin.vue?vue&type=style&index=0&id=681b0ed8&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../Tools/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 \"681b0ed8\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/WxLogin/WxLogin.vue\"\nexport default component.exports","import mod from \"-!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./WxLogin.vue?vue&type=style&index=0&id=681b0ed8&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./WxLogin.vue?vue&type=style&index=0&id=681b0ed8&scoped=true&lang=css&\"","import mod from \"-!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./WxLogin.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../Tools/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./WxLogin.vue?vue&type=script&lang=js&\"","<!--微信授权登录界面-->\r\n<template>\n <view>\n <!-- #ifdef MP-WEIXIN -->\n <view v-if=\"isCanUse\" class=\"back\">\r\n\t\t\t<u-navbar\r\n\t\t\t\ttitle=\"微信授权登录\"\r\n\t\t\t\t:safeAreaInsetTop=\"true\"\r\n\t\t\t\t:fixed=\"true\"\r\n\t\t\t\tbgColor=\"#FFFFFF00\"\r\n\t\t\t\t:placeholder=\"true\"\r\n\t\t\t\t@leftClick=\"onBackTouched\"\r\n\t\t\t/>\r\n\t\t\t<view class=\"body\">\r\n\t\t\t\t<view class='header'>\r\n\t\t\t\t <image src='../../static/images/wx_icon.png'></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<u-gap height=\"50rpx\" />\r\n\t\t\t\t<view class='content'>\r\n\t\t\t\t <view>申请获取以下权限</view>\r\n\t\t\t\t <text>获得你的公开信息(昵称,头像、地区等)</text>\r\n\t\t\t\t</view>\r\n\t\t\t\t\r\n\t\t\t\t<button class='bottom' type='primary' open-type=\"getUserInfo\" withCredentials=\"true\" lang=\"zh_CN\" @getuserinfo=\"login\">\r\n\t\t\t\t 授权登录\r\n\t\t\t\t</button>\r\n\t\t\t</view>\n </view>\n <!-- #endif -->\n </view>\n</template>\n\n<script>\n export default {\n data() {\n return {\n SessionKey: '',\n OpenId: '',\n nickName: null,\n avatarUrl: null,\n isCanUse: uni.getStorageSync('isCanUse')||true//默认为true\n };\n },\n methods: {\r\n\t\t\t\r\n\t\t\tonBackTouched(){\r\n\t\t\t\tuni.navigateBack({\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t},\n  //登录\n\t\t\tlogin() {\n\t\t\t\tlet _this = this;\n\t\t\t\tuni.showLoading({\n\t\t\t\t\ttitle: '登录中...'\n\t\t\t\t});\n\t\t\t \n\t\t\t // 1.wx获取登录用户code\n\t\t\t\tuni.login({\n\t\t\t\t\tprovider: 'weixin',\n\t\t\t\t\tsuccess: function(loginRes) {\r\n\t\t\t\t\t\tconsole.log(loginRes);\n\t\t\t\t\t\tlet code = loginRes.code;\n\t\t\t\t\t\t//2.将用户登录code传递到后台置换用户SessionKey、OpenId等信息\n\t\t\t\t\t\tuni.request({\n\t\t\t\t\t\t\turl: 'http://192.168.31.11:8888/app/v1/login/wechatlogin',\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tcode: code,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\theader: {\n\t\t\t\t\t\t\t\t'content-type': 'application/json'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsuccess: (res) => {\n\t\t\t\t\t\t\t\t//openId、或SessionKdy存储//隐藏loading\r\n\t\t\t\t\t\t\t\tconsole.log(\"!!!!\");\r\n\t\t\t\t\t\t\t\tconsole.log(res);\n\t\t\t\t\t\t\t\tuni.hideLoading();\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tfail: (e) => {\r\n\t\t\t\t\t\t\t\tconsole.log(e);\r\n\t\t\t\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t},\n \n\t\t\tonLoad() {//默认加载\n\t\t\t\t//this.login();\n\t\t\t}\n\t\t},\r\n\t}\n</script>\n\n<style scoped>\r\n\t\r\n\t.body{\r\n\t\twidth: 100%;\r\n\t\t//background-color: #0081FF;\r\n\t\tposition: relative;\r\n\t}\n .header {\n border-bottom: 1px solid #ccc;\n text-align: center;\n width: 750rpx;\n height: 300rpx;\n line-height: 450rpx;\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row;\r\n\t\talign-items: center;\r\n\t\tjustify-content: center;\n }\n\n .header image {\n width: 200rpx;\n height: 200rpx;\n }\n\n .content {\n margin-left: 50rpx;\n margin-bottom: 90rpx;\n }\n\n .content text {\n display: block;\n color: #9d9d9d;\n margin-top: 40rpx;\n }\n\n .bottom {\n border-radius: 80rpx;\n margin: 70rpx 50rpx;\n font-size: 35rpx;\n }\n</style>\n","var components\ntry {\n components = {\n uNavbar: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-navbar/u-navbar\" */ \"@/uni_modules/uview-ui/components/u-navbar/u-navbar.vue\"\n )\n },\n uGap: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-gap/u-gap\" */ \"@/uni_modules/uview-ui/components/u-gap/u-gap.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 }"],"sourceRoot":""}