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

{"version":3,"sources":["webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/pages/authorization/index.vue?8b02","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/pages/authorization/index.vue?d9f5","uni-app:///pages/authorization/index.vue","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/pages/authorization/index.vue?1912","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/pages/authorization/index.vue?177e","uni-app:///main.js","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/pages/authorization/index.vue?887d","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/pages/authorization/index.vue?2bc7"],"names":["createPage","Page"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAm0B,CAAgB,myBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4Bv1B;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;AAAkgD,CAAgB,m4CAAG,EAAC,C;;;;;;;;;;;ACAthD;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;AACgN;AAChN,gBAAgB,iNAAU;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 \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/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 \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js&\"","<template>\n <view class=\"container\">\n <!-- #ifdef MP-WEIXIN -->\n <view class=\"force-login-wrap\">\n <!-- <image class=\"logo-bg\" :src=\"`${$VUE_APP_RESOURCES_URL}/images/logo_bg.png`\" mode=\"aspectFill\"></image> -->\n <view class=\"force-login__content y-f\">\n <open-data class=\"user-avatar\" type=\"userAvatarUrl\"></open-data>\n <open-data class=\"user-name\" type=\"userNickName\"></open-data>\n <view class=\"login-notice\">为了提供更优质的服务,需要您授权基本信息</view>\n <button class=\"cu-btn author-btn\" v-if=\"canIUseGetUserProfile\" @tap=\"getUserInfoProfile\">授权并查看</button>\n <button class=\"cu-btn author-btn\" v-else @getuserinfo=\"getUserInfo\" open-type=\"getUserInfo\">授权并查看</button>\n <button class=\"cu-btn close-btn\" @tap=\"back\">暂不授权</button>\n </view>\n </view>\n <!-- #endif -->\n <!-- #ifndef MP-WEIXIN -->\n <view class=\"force-login-wrap\">\n <!-- <image class=\"logo-bg\" :src=\"`${$VUE_APP_RESOURCES_URL}/images/logo_bg.png`\" mode=\"aspectFill\"></image> -->\n <view class=\"force-login__content y-f\">\n <view class=\"login-notice\">为了提供更优质的服务,请先登录</view>\n <button class=\"cu-btn author-btn\" @tap=\"toLogin\">去登录</button>\n </view>\n </view>\n <!-- #endif -->\n </view>\n</template>\n\n<script>\nimport { mapState, mapMutations, mapActions } from 'vuex'\nimport { wxappAuth, getUser } from '@/api/user'\nimport dayjs from 'dayjs'\nimport cookie from '@/utils/store/cookie'\nimport { login, authorize } from '@/utils'\n\nexport default {\n data() {\n return {\n authorize: false,\n canIUseGetUserProfile: false,\n }\n },\n computed: {\n ...mapState(['isAuthorization', '$deviceType', 'token']),\n },\n onLoad() {\n console.log(wx.getUserProfile)\n if (wx.getUserProfile) {\n console.log(this)\n this.canIUseGetUserProfile = true\n console.log(this.canIUseGetUserProfile)\n }\n // // 先校验用户是否授权,如果没有授权,显示授权按钮\n },\n onHide() {\n this.updateAuthorizationPage(false)\n this.changeAuthorization(false)\n },\n onUnload() {\n this.updateAuthorizationPage(false)\n this.changeAuthorization(false)\n },\n methods: {\n ...mapActions(['changeAuthorization', 'setUserInfo']),\n ...mapMutations(['updateAuthorizationPage']),\n toLogin() {\n this.$yrouter.push({\n path: '/pagesB/pages/user/Login/index',\n query: {},\n })\n },\n back() {\n this.$yrouter.switchTab({\n path: '/pages/home/index',\n query: {},\n })\n },\n getUserInfo(data) {\n console.log(data)\n console.log('getUserInfo')\n if (data.detail.errMsg == 'getUserInfo:fail auth deny') {\n uni.showToast({\n title: '取消授权',\n icon: 'none',\n duration: 2000,\n })\n return\n }\n uni.showLoading({\n title: '登录中',\n })\n login()\n .then(e => {\n uni.hideLoading()\n console.log('重定向')\n // this.$yrouter.reLaunch({\n // path: cookie.get('redirect').replace(/\\ /g, ''),\n // })\n\t\t\t\t\tthis.$yrouter.reLaunch({\n\t\t\t\t\t path: \"/pages/user/index\",\n\t\t\t\t\t})\n })\n .catch(error => {\n uni.hideLoading()\n console.log(error)\n uni.showToast({\n title: error,\n icon: 'none',\n duration: 2000,\n })\n })\n },\n getUserInfoProfile(data) {\n console.log('getUserInfoProfile')\n wx.getUserProfile({\n lang: 'zh_CN',\n desc: '需要获取您的信息用来展示',\n success: res => {\n console.log(res)\n uni.showLoading({\n title: '登录中',\n })\n login(res)\n .then(e => {\n console.log('重定向')\n this.$yrouter.reLaunch({\n path: cookie.get('redirect').replace(/\\ /g, ''),\n })\n })\n .catch(error => {\n console.log(error)\n uni.showToast({\n title: error,\n icon: 'none',\n duration: 2000,\n })\n })\n },\n })\n },\n },\n mounted() {\n if (wx.getUserProfile) {\n console.log(this)\n this.canIUseGetUserProfile = true\n console.log(this.canIUseGetUserProfile)\n }\n },\n}\n</script>\n\n<style lang=\"less\">\n.container {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n position: relative;\n\theight: 100vh;\n}\n\n.force-login-wrap {\n width: 100%;\n height: 100%;\n overflow: hidden;\n z-index: 11111;\n top: 0;\n\n .logo-bg {\n width: 640rpx;\n height: 300rpx;\n }\n\n .force-login__content {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n .user-avatar {\n width: 160rpx;\n height: 160rpx;\n border-radius: 50%;\n overflow: hidden;\n margin-bottom: 40rpx;\n }\n\n .user-name {\n font-size: 35rpx;\n font-family: PingFang SC;\n font-weight: bold;\n color: #000;\n margin-bottom: 30rpx;\n }\n\n .login-notice {\n font-size: 28rpx;\n font-family: PingFang SC;\n font-weight: 400;\n color: #000;\n line-height: 44rpx;\n width: 500rpx;\n text-align: center;\n margin-bottom: 80rpx;\n }\n\n .author-btn {\n width: 630rpx;\n height: 80rpx;\n background: linear-gradient(to right, #f35447 0%, #ff8e3c 100%);\n background: -moz-linear-gradient(to right, #f35447 0%, #ff8e3c 100%);\n // box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);\n border-radius: 40rpx;\n font-size: 30rpx;\n font-family: PingFang SC;\n font-weight: 500;\n color: rgba(255, 255, 255, 1);\n }\n\n .close-btn {\n width: 630rpx;\n height: 80rpx;\n margin-top: 30rpx;\n border-radius: 40rpx;\n border: 2rpx solid #eb3729;\n background: none;\n font-size: 30rpx;\n font-family: PingFang SC;\n font-weight: 500;\n color: #eb3729;\n }\n }\n}\n</style>\n","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-5!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/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 \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--10-oneOf-1-5!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/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 // 1635513138977\n var cssReload = require(\"/Applications/HBuilderX.app/Contents/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 \"!../../../../../../../Applications/HBuilderX.app/Contents/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 \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=template&id=7ba8a2d3&\""],"sourceRoot":""}