denglu.js.map
14.9 KB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/15121/Desktop/lianxi/pages/denglu/denglu.vue?9a82","webpack:///C:/Users/15121/Desktop/lianxi/pages/denglu/denglu.vue?d10f","webpack:///C:/Users/15121/Desktop/lianxi/pages/denglu/denglu.vue?0919","webpack:///C:/Users/15121/Desktop/lianxi/pages/denglu/denglu.vue?b0e9","uni-app:///pages/denglu/denglu.vue","webpack:///C:/Users/15121/Desktop/lianxi/pages/denglu/denglu.vue?db3b","webpack:///C:/Users/15121/Desktop/lianxi/pages/denglu/denglu.vue?435f"],"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,eAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmH;AACnH;AAC0D;AACL;AACc;;;AAGnE;AACuL;AACvL,gBAAgB,2LAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,iFAAM;AACR,EAAE,0FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,qFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAusB,CAAgB,srBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACkE3tB,sE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AADA,S,eAKA,EACA,IADA,kBACA,CACA,SACA,YADA,EAEA,aAFA,EAGA,MAHA,EAIA,iBAJA,GAMA,CARA,EASA;AACA,QAVA,oBAUA,CAEA,CAZA,EAaA,MAbA,oBAaA,CACA,YACA,eACA,oBACA,+CACA,CAFA,MAEA,CAEA,sBACA,CACA,CAtBA,EAuBA,WACA;AACA,WAFA,qBAEA,CACA,YACA,kBADA,EAEA,qCACA,0BACA,0CACA,CALA,IAOA,CAVA,EAWA;AACA,SAZA,mBAYA,CACA,qBACA,gBADA,EAEA,OAFA,mBAEA,GAFA,EAEA,CACA,sCACA,wCAFA,CAGA;AACA,0BACA,CAPA,IASA,CAtBA,EAuBA;AACA,kBAxBA,0BAwBA,CAxBA,EAwBA,CACA;AACA,qBACA,sBACA,4CACA,6CACA,gBACA,gBACA,gBADA,IAGA,CALA,MAKA,CACA,gBACA,kBADA,EAEA,aAFA,IAIA,CACA,CAxCA,EAyCA;AACA,YA1CA,sBA0CA,kRAEA,oEAFA,QAEA,GAFA,kBAEA;AACA;AACA;AACA;AACA,gEANA;AAOA;AACA;AACA,oCADA;AAEA,8BAFA;;AAIA,qDAZA;;AAcA,KAxDA;AAyDA;AACA,YA1DA,sBA0DA;;AAEA,0EAFA,SAEA,GAFA,mBAEA;AACA,6CAHA,CAGA;AAHA,0GAIA;AACA;AACA,qCADA;AAEA,8BAFA;;AAIA,sDATA;;AAWA,KArEA;AAsEA;AACA,QAvEA,kBAuEA;AACA;AACA,8BADA;;AAGA,KA3EA,EAvBA,E;;;;;;;;;;;;;ACtEA;AAAA;AAAA;AAAA;AAAk0C,CAAgB,6tCAAG,EAAC,C;;;;;;;;;;;ACAt1C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/denglu/denglu.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/denglu/denglu.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./denglu.vue?vue&type=template&id=14f1f734&\"\nvar renderjs\nimport script from \"./denglu.vue?vue&type=script&lang=js&\"\nexport * from \"./denglu.vue?vue&type=script&lang=js&\"\nimport style0 from \"./denglu.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../Program Files/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/denglu/denglu.vue\"\nexport default component.exports","export * from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./denglu.vue?vue&type=template&id=14f1f734&\"","var components\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 \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./denglu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./denglu.vue?vue&type=script&lang=js&\"","<template>\r\n\t<!-- onload和onshow的区别:\r\n\t onshow:每次进入页面都会执行\r\n\t onload:从二级页面返回不会执行\r\n\t -->\r\n\t<!-- 步骤:\r\n\t1、在onload/onshow调用getcode()\r\n\t2、getcode(){\r\n\t\tuni.login(){\r\n\t\tprovider: \"weixin\",\r\n\t\tsuccess: function(loginRes) {\r\n\t\t\tthat.code = loginRes.code\r\n\t\t\tuni.setStorageSync('code', loginRes.code)\r\n\t\t}\r\n\t\t}\r\n\t}\r\n\t3、点击请登录拉起小程序授权\r\n\t getvx(){\r\n\t\t uni.getUserProfile(){\r\n\t\t\t dsec:'获取您的用户信息'\r\n\t\t\t success(res){\r\n\t\t\t\t that.nickname = res.userInfo.nickName\r\n\t\t\t\t that.avatarUrl = res.userInfo.avatarUrl\r\n\t\t\t\t //调取小程序登录接口this.getlogin(后端接口)\r\n\t\t\t\t that.getlogin()\r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t 4、button按钮 getphoneNumber,会自动拉起手机号授权\r\n\t getphoneNumber(e){\r\n\t\t //调取this.getcode换取iv,encry\r\n\t\t this.iv=e.detail.iv\r\n\t\t this.encry..=e.detail.encry...\r\n\t\t if(e.detail.errMsg == \"getPhoneNumber:ok\"){\r\n\t\t\t //调取this.getphone\r\n\t\t }else{\r\n\t\t\t uni.showToast({\r\n\t\t\t\t title:'您已取消授权',\r\n\t\t\t\t icon:'none'\r\n\t\t\t })\r\n\t\t }\r\n\t }\r\n\t -->\r\n\t<view>\r\n\t\t<view class=\"mainbox\">\r\n\t\t\t<!-- 微信授权登录 -->\r\n\t\t\t<view class=\"denglu\">\r\n\t\t\t\t<view v-if=\"avatarUrl\">\r\n\t\t\t\t\t<image :src=\"avatarUrl\" mode=\"\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view v-else>\r\n\t\t\t\t\t<image src=\"/static/1.png\" mode=\"\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"name\" @click=\"getvx()\">{{nickname}}</view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 手机授权登录 -->\r\n\t\t\t<button class=\"btnphone\" open-type=\"getPhoneNumber\" @getphonenumber=\"getPhoneNumber\"\r\n\t\t\t\twithCredentials=\"true\">立即授权</button>\r\n\t\t\t<!-- 按钮 -->\r\n\t\t\t<view class=\"next\" @click=\"next()\">下一个</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\tvar that;\r\n\timport {\r\n\t\tgetlogin,\r\n\t\tgetPhone,\r\n\t} from '../../api/mycenter.js'\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tnickname: \"\",\r\n\t\t\t\tavatarUrl: \"\",\r\n\t\t\t\tiv: '',\r\n\t\t\t\tencryptedData: '',\r\n\t\t\t};\r\n\t\t},\r\n\t\t// onload和onshow的区别\r\n\t\tonShow() {\r\n\r\n\t\t},\r\n\t\tonLoad() {\r\n\t\t\tthat = this\r\n\t\t\tthis.getcode()\r\n\t\t\tif (this.nickname) {\r\n\t\t\t\tthis.nickname = uni.getStorageSync('nickname')\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthis.nickname = '请登录'\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t//1、获取code\r\n\t\t\tgetcode() {\r\n\t\t\t\tuni.login({\r\n\t\t\t\t\tprovider: \"weixin\",\r\n\t\t\t\t\tsuccess: function(loginRes) {\r\n\t\t\t\t\t\tthat.code = loginRes.code\r\n\t\t\t\t\t\tuni.setStorageSync('code', loginRes.code)\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t//2、拉起微信授权弹窗\r\n\t\t\tgetvx() {\r\n\t\t\t\tuni.getUserProfile({\r\n\t\t\t\t\tdesc: '获取您的用户信息',\r\n\t\t\t\t\tsuccess(res) {\r\n\t\t\t\t\t\tthat.nickname = res.userInfo.nickName\r\n\t\t\t\t\t\tthat.avatarUrl = res.userInfo.avatarUrl\r\n\t\t\t\t\t\t//3、调取小程序登录接口\r\n\t\t\t\t\t\tthat.getlogin()\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t//3、拉起手机号授权\r\n\t\t\tgetPhoneNumber(e) {\r\n\t\t\t\t//(1)调取code换iv、encryptedData\r\n\t\t\t\tthis.getcode()\r\n\t\t\t\tthis.iv = e.detail.iv\r\n\t\t\t\tthis.encryptedData = e.detail.encryptedData;\r\n\t\t\t\tif (e.detail.errMsg == \"getPhoneNumber:ok\") {\r\n\t\t\t\t\tthis.getPhone()\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: '授权手机号成功'\r\n\t\t\t\t\t})\r\n\t\t\t\t} else {\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: '您已拒绝授权手机号',\r\n\t\t\t\t\t\ticon:'error'\r\n\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t//小程序登录接口\r\n\t\t\tasync getlogin() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconst res = await getlogin(this.code, this.nickname, this.avatarUrl) //传后端需要的参数\r\n\t\t\t\t\tconsole.log('getlogin', res) \r\n\t\t\t\t\t//写判断,保存数据\r\n\t\t\t\t\tuni.setStorageSync('userInfo', res.userInfo)\r\n\t\t\t\t\tuni.setStorageSync('token', res.userInfo.token)\r\n\t\t\t\t} catch (err) { //错误\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: err,\r\n\t\t\t\t\t\ticon: 'none'\r\n\t\t\t\t\t})\r\n\t\t\t\t\tconsole.log('getlogin', err)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t//手机号接口\r\n\t\t\tasync getPhone() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconst res = await getPhone(this.iv,this.encryptedData) //传后端需要的参数\r\n\t\t\t\t\tconsole.log('getPhone', res) //写判断,保存数据\r\n\t\t\t\t} catch (err) { //错误\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: err,\r\n\t\t\t\t\t\ticon: 'none'\r\n\t\t\t\t\t})\r\n\t\t\t\t\tconsole.log('getPhone', err)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t//跳转下一页\r\n\t\t\tnext(){\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:'./fangdoujieliu'\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\t.mainbox {\r\n\t\tmargin: 0 32rpx;\r\n\t}\r\n\r\n\t.btnphone {\r\n\t\tmargin-top: 32rpx;\r\n\t\twidth: 264rpx;\r\n\t\theight: 76rpx;\r\n\t\tborder-radius: 16rpx;\r\n\t\tbackground: rgba(34, 94, 249, 1);\r\n\t\tcolor: rgba(255, 255, 255, 1);\r\n\t\tfont-size: 28rpx;\r\n\t\tfont-weight: 700;\r\n\r\n\t}\r\n\r\n\t.denglu {\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tmargin-top: 32rpx;\r\n\r\n\t\timage {\r\n\t\t\twidth: 80rpx;\r\n\t\t\theight: 80rpx;\r\n\t\t\tmargin-right: 24rpx;\r\n\t\t\talign-items: center;\r\n\t\t\tborder-radius: 50%;\r\n\t\t}\r\n\r\n\t\t.name {\r\n\t\t\tfont-size: 28rpx;\r\n\t\t\tfont-weight: 400;\r\n\t\t\tcolor: black;\r\n\t\t}\r\n\t}\r\n\t.next{\r\n\t\tposition: fixed;\r\n\t\tright: 32rpx;\r\n\t\tbottom: 32rpx;\r\n\t\tbackground: white;\r\n\t\tborder-radius: 15rpx;\r\n\t\tborder: 1rpx solid #000;\r\n\t\talign-items: center;\r\n\t\ttext-align: center;\r\n\t\tfont-size: 28rpx;\r\n\t\tfont-weight: 400;\r\n\t\tcolor:black;\r\n\t\theight: 40rpx;\r\n\t\twidth: 100rpx;\r\n\t}\r\n</style>\n","import mod from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./denglu.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./denglu.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1667894258124\n var cssReload = require(\"C:/Program Files/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":""}