new-mshop-view/pages/agent/invite/my_invite.vue

85 lines
1.3 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,//是否隐藏授权
}
},
onLoad(options) {
let _this = this;
// 判断:是否登录
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">
.main-content{
width: 100vw!important;
min-height: 100vh!important;
background: orange;
}
</style>