| xqd
@@ -1,34 +1,30 @@
|
|
|
<template>
|
|
|
- <app-layout>
|
|
|
- <u-modal v-model="modal.show"
|
|
|
- title="提示"
|
|
|
- content="需要获取您的用户信息"
|
|
|
- cancel-color="#CCCCCC"
|
|
|
- confirm-color="#046E64"
|
|
|
- :async-close="true"
|
|
|
- :show-cancel-button="true"
|
|
|
- @cancel="handleRedirect"
|
|
|
- >
|
|
|
- <view slot="confirm-button">
|
|
|
- <button @click="handleLogin" class="btn main-center cross-center">确定</button>
|
|
|
+ <view class="login">
|
|
|
+ <view class="bg">
|
|
|
+ <u-image :src="bgSrc" width="100%" height="100%" mode="aspectFit"></u-image>
|
|
|
+ </view>
|
|
|
+ <u-popup v-model="modal.show" mode="bottom" :mask-close-able="false" border-radius="15">
|
|
|
+ <view class="popup-content">
|
|
|
+ <view class="title">需要获取您的用户信息</view>
|
|
|
+ <view class="btn-popup main-between">
|
|
|
+ <button @click="handleRedirect" class="cancel btn main-center cross-center">取消</button>
|
|
|
+ <button @click="handleLogin" class="btn main-center cross-center">确定</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </u-modal>
|
|
|
- </app-layout>
|
|
|
+ </u-popup>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import appLayout from "@/components/app-layout"
|
|
|
export default {
|
|
|
- components:{
|
|
|
- appLayout,
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
+ bgSrc: this.$site.root+"assets/images/formula/formula-cover.png",
|
|
|
redirect: '',
|
|
|
code: '',
|
|
|
modal: {
|
|
|
show: false
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
| xqd
@@ -67,6 +63,7 @@
|
|
|
});
|
|
|
},
|
|
|
handleLogin(){
|
|
|
+ console.log('-->data 获取用户信息')
|
|
|
let _this = this;
|
|
|
uni.getUserProfile({
|
|
|
desc: '获取用户信息',
|
| xqd
@@ -82,8 +79,10 @@
|
|
|
})
|
|
|
},
|
|
|
fail: err => {
|
|
|
- console.log('-->data',err)
|
|
|
_this.$u.toast('获取用户信息失败')
|
|
|
+ uni.reLaunch({
|
|
|
+ url: this.redirect
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
| xqd
@@ -114,14 +113,43 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .btn{
|
|
|
- background: #fff;
|
|
|
- color: $main-color;
|
|
|
- border-radius: 0;
|
|
|
- font-size: 28rpx;
|
|
|
- height: 100rpx;
|
|
|
- &:after{
|
|
|
- content: unset;
|
|
|
+ .login{
|
|
|
+ position: relative;
|
|
|
+ .bg{
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100vh;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .popup-content{
|
|
|
+ height: 450rpx;
|
|
|
+ position: relative;
|
|
|
+ .title{
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 42rpx;
|
|
|
+ }
|
|
|
+ .btn-popup{
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .btn{
|
|
|
+ background: $main-color;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 0;
|
|
|
+ font-size: 28rpx;
|
|
|
+ height: 100rpx;
|
|
|
+ flex: 1;
|
|
|
+ &.cancel{
|
|
|
+ background: #f5f5f5;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ &:after{
|
|
|
+ content: unset;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|