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
17 KiB
1 lines
17 KiB
{"version":3,"sources":["webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/authorization/index.vue?447b","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/authorization/index.vue?bf7e","uni-app:///pages/authorization/index.vue","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/authorization/index.vue?d26d","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/authorization/index.vue?ecf1","uni-app:///main.js","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/authorization/index.vue?6a9e","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/authorization/index.vue?ef82"],"names":["createPage","Page"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAizB,CAAgB,i0BAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4Br0B;AACA;AACA;AACA;AACA,oD;;AAEA;AACA,MADA,kBACA;AACA;AACA,sBADA;AAEA,kCAFA;;AAIA,GANA;AAOA;AACA,kEADA,CAPA;;AAUA,QAVA,oBAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAlBA;AAmBA,QAnBA,oBAmBA;AACA;AACA;AACA,GAtBA;AAuBA,UAvBA,sBAuBA;AACA;AACA;AACA,GA1BA;AA2BA;AACA,+DADA;AAEA,sDAFA;AAGA,WAHA,qBAGA;AACA;AACA,8CADA;AAEA,iBAFA;;AAIA,KARA;AASA,QATA,kBASA;AACA;AACA,iCADA;AAEA,iBAFA;;AAIA,KAdA;AAeA,eAfA,uBAeA,IAfA,EAeA;AACA;AACA;AACA;AACA;AACA,uBADA;AAEA,sBAFA;AAGA,wBAHA;;AAKA;AACA;AACA;AACA,oBADA;;AAGA;AACA,UADA,CACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCADA;;AAGA,OAVA;AAWA,WAXA,CAWA;AACA;AACA;AACA;AACA,sBADA;AAEA,sBAFA;AAGA,wBAHA;;AAKA,OAnBA;AAoBA,KAjDA;AAkDA,sBAlDA,8BAkDA,IAlDA,EAkDA;AACA;AACA;AACA,qBADA;AAEA,4BAFA;AAGA;AACA;AACA;AACA,wBADA;;AAGA;AACA,cADA,CACA;AACA;AACA;AACA,sEADA;;AAGA,WANA;AAOA,eAPA,CAOA;AACA;AACA;AACA,0BADA;AAEA,0BAFA;AAGA,4BAHA;;AAKA,WAdA;AAeA,SAvBA;;AAyBA,KA7EA,GA3BA;;AA0GA,SA1GA,qBA0GA;AACA;AACA;AACA;AACA;AACA;AACA,GAhHA,E;;;;;;;;;;;;;AClCA;AAAA;AAAA;AAAA;AAAi+C,CAAgB,y7CAAG,EAAC,C;;;;;;;;;;;ACAr/C;AACA,OAAO,KAAU,EAAE,kBAKd;;;;;;;;;;;;;kDCNL;AACA;AACA,oG;AACAA,UAAU,CAACC,cAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkH;AAClH;AACyD;AACL;AACc;;;AAGlE;AAC+M;AAC/M,gBAAgB,uNAAU;AAC1B,EAAE,2EAAM;AACR,EAAE,gFAAM;AACR,EAAE,yFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","file":"pages/authorization/index.js","sourcesContent":["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 \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\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 \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=script&lang=js&\"","<template>\r\n <view class=\"container\">\r\n <!-- #ifdef MP-WEIXIN -->\r\n <view class=\"force-login-wrap\">\r\n <!-- <image class=\"logo-bg\" :src=\"`${$VUE_APP_RESOURCES_URL}/images/logo_bg.png`\" mode=\"aspectFill\"></image> -->\r\n <view class=\"force-login__content y-f\">\r\n <open-data class=\"user-avatar\" type=\"userAvatarUrl\"></open-data>\r\n <open-data class=\"user-name\" type=\"userNickName\"></open-data>\r\n <view class=\"login-notice\">为了提供更优质的服务,需要您授权基本信息</view>\r\n <button class=\"cu-btn author-btn\" v-if=\"canIUseGetUserProfile\" @tap=\"getUserInfoProfile\">授权并查看</button>\r\n <button class=\"cu-btn author-btn\" v-else @getuserinfo=\"getUserInfo\" open-type=\"getUserInfo\">授权并查看</button>\r\n <button class=\"cu-btn close-btn\" @tap=\"back\">暂不授权</button>\r\n </view>\r\n </view>\r\n <!-- #endif -->\r\n <!-- #ifndef MP-WEIXIN -->\r\n <view class=\"force-login-wrap\">\r\n <!-- <image class=\"logo-bg\" :src=\"`${$VUE_APP_RESOURCES_URL}/images/logo_bg.png`\" mode=\"aspectFill\"></image> -->\r\n <view class=\"force-login__content y-f\">\r\n <view class=\"login-notice\">为了提供更优质的服务,请先登录</view>\r\n <button class=\"cu-btn author-btn\" @tap=\"toLogin\">去登录</button>\r\n </view>\r\n </view>\r\n <!-- #endif -->\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport { mapState, mapMutations, mapActions } from 'vuex'\r\nimport { wxappAuth, getUser } from '@/api/user'\r\nimport dayjs from 'dayjs'\r\nimport cookie from '@/utils/store/cookie'\r\nimport { login, authorize } from '@/utils'\r\n\r\nexport default {\r\n data() {\r\n return {\r\n authorize: false,\r\n canIUseGetUserProfile: false,\r\n }\r\n },\r\n computed: {\r\n ...mapState(['isAuthorization', '$deviceType', 'token']),\r\n },\r\n onLoad() {\r\n console.log(wx.getUserProfile)\r\n if (wx.getUserProfile) {\r\n console.log(this)\r\n this.canIUseGetUserProfile = true\r\n console.log(this.canIUseGetUserProfile)\r\n }\r\n // // 先校验用户是否授权,如果没有授权,显示授权按钮\r\n },\r\n onHide() {\r\n this.updateAuthorizationPage(false)\r\n this.changeAuthorization(false)\r\n },\r\n onUnload() {\r\n this.updateAuthorizationPage(false)\r\n this.changeAuthorization(false)\r\n },\r\n methods: {\r\n ...mapActions(['changeAuthorization', 'setUserInfo']),\r\n ...mapMutations(['updateAuthorizationPage']),\r\n toLogin() {\r\n this.$yrouter.push({\r\n path: '/pagesB/pages/user/Login/index',\r\n query: {},\r\n })\r\n },\r\n back() {\r\n this.$yrouter.switchTab({\r\n path: '/pages/home/index',\r\n query: {},\r\n })\r\n },\r\n getUserInfo(data) {\r\n console.log(data)\r\n console.log('getUserInfo')\r\n if (data.detail.errMsg == 'getUserInfo:fail auth deny') {\r\n uni.showToast({\r\n title: '取消授权',\r\n icon: 'none',\r\n duration: 2000,\r\n })\r\n return\r\n }\r\n uni.showLoading({\r\n title: '登录中',\r\n })\r\n login()\r\n .then(e => {\r\n uni.hideLoading()\r\n console.log('重定向')\r\n // this.$yrouter.reLaunch({\r\n // path: cookie.get('redirect').replace(/\\ /g, ''),\r\n // })\r\n\t\t\t\t\tthis.$yrouter.reLaunch({\r\n\t\t\t\t\t path: \"/pages/user/index\",\r\n\t\t\t\t\t})\r\n })\r\n .catch(error => {\r\n uni.hideLoading()\r\n console.log(error)\r\n uni.showToast({\r\n title: error,\r\n icon: 'none',\r\n duration: 2000,\r\n })\r\n })\r\n },\r\n getUserInfoProfile(data) {\r\n console.log('getUserInfoProfile')\r\n wx.getUserProfile({\r\n lang: 'zh_CN',\r\n desc: '需要获取您的信息用来展示',\r\n success: res => {\r\n console.log(res)\r\n uni.showLoading({\r\n title: '登录中',\r\n })\r\n login(res)\r\n .then(e => {\r\n console.log('重定向')\r\n this.$yrouter.reLaunch({\r\n path: cookie.get('redirect').replace(/\\ /g, ''),\r\n })\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n uni.showToast({\r\n title: error,\r\n icon: 'none',\r\n duration: 2000,\r\n })\r\n })\r\n },\r\n })\r\n },\r\n },\r\n mounted() {\r\n if (wx.getUserProfile) {\r\n console.log(this)\r\n this.canIUseGetUserProfile = true\r\n console.log(this.canIUseGetUserProfile)\r\n }\r\n },\r\n}\r\n</script>\r\n\r\n<style lang=\"less\">\r\n.container {\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: flex-start;\r\n position: relative;\r\n\theight: 100vh;\r\n}\r\n\r\n.force-login-wrap {\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n z-index: 11111;\r\n top: 0;\r\n\r\n .logo-bg {\r\n width: 640rpx;\r\n height: 300rpx;\r\n }\r\n\r\n .force-login__content {\r\n position: absolute;\r\n left: 50%;\r\n top: 50%;\r\n transform: translate(-50%, -50%);\r\n\r\n .user-avatar {\r\n width: 160rpx;\r\n height: 160rpx;\r\n border-radius: 50%;\r\n overflow: hidden;\r\n margin-bottom: 40rpx;\r\n }\r\n\r\n .user-name {\r\n font-size: 35rpx;\r\n font-family: PingFang SC;\r\n font-weight: bold;\r\n color: #000;\r\n margin-bottom: 30rpx;\r\n }\r\n\r\n .login-notice {\r\n font-size: 28rpx;\r\n font-family: PingFang SC;\r\n font-weight: 400;\r\n color: #000;\r\n line-height: 44rpx;\r\n width: 500rpx;\r\n text-align: center;\r\n margin-bottom: 80rpx;\r\n }\r\n\r\n .author-btn {\r\n width: 630rpx;\r\n height: 80rpx;\r\n background: linear-gradient(to right, #f35447 0%, #ff8e3c 100%);\r\n background: -moz-linear-gradient(to right, #f35447 0%, #ff8e3c 100%);\r\n // box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);\r\n border-radius: 40rpx;\r\n font-size: 30rpx;\r\n font-family: PingFang SC;\r\n font-weight: 500;\r\n color: rgba(255, 255, 255, 1);\r\n }\r\n\r\n .close-btn {\r\n width: 630rpx;\r\n height: 80rpx;\r\n margin-top: 30rpx;\r\n border-radius: 40rpx;\r\n border: 2rpx solid #eb3729;\r\n background: none;\r\n font-size: 30rpx;\r\n font-family: PingFang SC;\r\n font-weight: 500;\r\n color: #eb3729;\r\n }\r\n }\r\n}\r\n</style>\r\n","import mod from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--10-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--10-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\less-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-4!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-5!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=style&index=0&lang=less&\"; export default mod; export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--10-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--10-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\less-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-4!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-5!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=style&index=0&lang=less&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1635494611487\n var cssReload = require(\"D:/Program Files/HBuilderX.3.1.13.20210514/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 ","import 'uni-pages';\nimport Vue from 'vue'\nimport Page from './pages/authorization/index.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=7ba8a2d3&\"\nvar renderjs\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&lang=less&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\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/authorization/index.vue\"\nexport default component.exports","export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=template&id=7ba8a2d3&\""],"sourceRoot":""} |