89 lines
1.4 KiB
Vue
89 lines
1.4 KiB
Vue
<template>
|
|
<view class="main-content">
|
|
|
|
|
|
|
|
邀请下级入驻
|
|
|
|
|
|
<!--授权登录-->
|
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {mapGetters} from "vuex";
|
|
import authorize from '@/components/Authorize';
|
|
|
|
export default {
|
|
name: 'business',
|
|
components: {
|
|
authorize,
|
|
},
|
|
computed: {
|
|
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
|
},
|
|
data() {
|
|
return {
|
|
// 登录相关
|
|
isAuto: false, //没有授权的不会自动授权
|
|
isShowAuth: false,//是否隐藏授权
|
|
// 二维码
|
|
qrCode: '',
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
let _this = this;
|
|
if(options.scene){
|
|
console.log('转换前参数:',options.scene)
|
|
let scene = _this.$util.getUrlParams(decodeURIComponent(options.scene));
|
|
console.log("接收参数",scene)
|
|
|
|
|
|
}
|
|
// 判断:是否登录
|
|
if (!this.isLogin) {
|
|
// 未登录 授权登录
|
|
this.isAuto = true;
|
|
this.isShowAuth = true
|
|
}else{
|
|
// 已登录 获取信息
|
|
this.init();
|
|
}
|
|
},
|
|
methods: {
|
|
// 授权回调
|
|
onLoadFun() {
|
|
if(this.isLogin){
|
|
this.isShowAuth = false;
|
|
this.init();
|
|
}
|
|
},
|
|
// 授权关闭
|
|
authClose(e) {
|
|
this.isShowAuth = e
|
|
},
|
|
// 授权成功 初始化
|
|
init () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|