| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <template>
- <view class="Body">
- <navbar ref="navbar" :config="config" backColor="#666"></navbar>
- <view class="top">
- <view class="title">
- 授权 <text>{{checkInfo.thirdApplicationName}}</text> 获取以下信息:
- </view>
- <view class="info">
- <!-- v-if="checkInfo.showBaseData" -->
- <view class="info-item">
- <view class="circle"></view>
- <view class="">获取你的账号信息(头像、昵称、手机号)</view>
- </view>
- <!-- v-if="checkInfo.showRealNameData" -->
- <view class="info-item">
- <view class="circle"></view>
- <view class="">使用身份信息(姓名、证件号码)办理业务</view>
- </view>
- <!-- v-if="checkInfo.showBusinessData" -->
- <view class="info-item">
- <view class="circle"></view>
- <view class="">提供企业信息(名称、社会信用统一代码)办理业务</view>
- </view>
- </view>
- </view>
- <view class="footer">
- <button class="agree-btn" @click="agree()">同意授权</button>
- <button class="close-btn" @click="close()">暂不授权</button>
- </view>
- </view>
- </template>
- <script>
- let app = getApp()
- export default {
- data() {
- return {
- config: {
- back: true, //false是tolbar页面 是则不写
- title: '服务授权',
- color: '#1a1a1a',
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, '#fff'],
- backTabPage: '/pages/home'
- },
- statusBarHeight: app.globalData.statusBarHeight,
- authInfo: {},
- checkInfo: {}
- }
- },
- onLoad(options) {
- console.log(uni.getStorageSync('authInfo'), 33333)
- this.authInfo = uni.getStorageSync('authInfo')
- this.checkInfo = uni.getStorageSync('checkInfo')
- },
- onUnload() {
- uni.removeStorageSync('authInfo')
- uni.removeStorageSync('checkInfo')
- },
- methods: {
- agree() {
- this.$yghttp.post('/auth/confirmAuth', this.authInfo).then(res => {
- console.log(res, 666666)
- if (res.code == 200) {
- uni.redirectTo({
- url: `/pages/web-view/Apps?path=${encodeURIComponent(res.data.redirect)}`
- });
- }
- })
- },
- close() {
- try {
- uni.removeStorageSync('authInfo')
- uni.removeStorageSync('checkInfo')
- } catch (err) {
- console.log('未缓存信息')
- }
- uni.switchTab({
- url: '/pages/home'
- })
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .Body {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background:url("/static/czd/service-authBg.png");
- background-size: 100% 100%;
- }
- .lgoin-nav {
- width: 100%;
- background-color: #fff;
- position: fixed;
- left: 0;
- right: 0;
- top: 0;
- z-index: 0;
- }
- .top {
- padding: 200rpx 60rpx;
- margin-bottom: 150rpx;
- .title {
- color: #191919;
- margin-bottom: 40rpx;
- font-size: 28rpx;
- text {
- margin: 0 10rpx;
- font-size: 42rpx;
- font-weight: bold;
- color: #191919;
- }
- }
- .info {
- .info-item {
- display: flex;
- // align-items: center;
- color: #191919;
- margin-bottom: 10rpx;
- .circle {
- width: 6rpx;
- margin-right: 10rpx;
- height: 6rpx;
- border-radius: 50%;
- background-color: #AAAAAA;
- margin-top: 16rpx;
- }
- }
- }
- }
- .footer {
- position: fixed;
- bottom: 300rpx;
- width: 100%;
- .agree-btn {
- width: 670rpx;
- height: 81rpx;
- background: linear-gradient(180deg, #29b1a1 0%, #2ba7bd 100%);
- border-radius: 40px;
- box-shadow: 0rpx 3rpx 10rpx 0rpx rgba(12, 41, 146, 0.26);
- color: #fff;
- line-height: 81rpx;
- font-size: 30rpx;
- margin: 0 auto 26rpx;
- }
- .close-btn {
- width: 670rpx;
- height: 81rpx;
- background: #ffffff;
- border: 2rpx solid #2aacb1;
- border-radius: 40rpx;
- line-height: 81rpx;
- font-size: 30rpx;
- margin:auto;
- }
- }
- </style>
|