<template>
|
|
<view class="home">
|
|
|
|
<image src="/static/image/bg/X1.png"
|
|
class="page-bg"
|
|
mode="aspectFill"></image>
|
|
|
|
<view class="content_now">
|
|
|
|
<view class="title">
|
|
Genius Journey Club
|
|
</view>
|
|
<view class="title-desc">
|
|
欢迎您的到来
|
|
</view>
|
|
<view class="desc">
|
|
使用小程序请确认您已满18周岁
|
|
</view>
|
|
|
|
<view class="mian-btn"
|
|
:class="{active:isActive === '未满18岁'}"
|
|
@click="setActive('未满18岁')">{{ '未满18岁' }}</view>
|
|
|
|
<view class="mian-btn"
|
|
:class="{active:isActive === '已满18岁'}"
|
|
@click="setActive('已满18岁')">{{ '已满18岁' }}</view>
|
|
|
|
<view class="checkbox" @click="$refs.popup.openkeys()">
|
|
<uv-checkbox-group v-model="checkboxValue">
|
|
<view class="flex-center">
|
|
<uv-checkbox
|
|
size="40rpx"
|
|
icon-size="30rpx"
|
|
disabled
|
|
activeColor="#ecb864"
|
|
:name="1"></uv-checkbox>
|
|
<text>已同意</text>
|
|
<text @click="$refs.popup.open('privacyAgreement')">《隐私政策》</text>
|
|
</view>
|
|
</uv-checkbox-group>
|
|
</view>
|
|
|
|
<view class="uni-color-btn"
|
|
@click="next">
|
|
立即开启
|
|
</view>
|
|
<text class="second-color">{{ configObj.bg_title }}</text>
|
|
|
|
</view>
|
|
|
|
<configPopup ref="popup"
|
|
required
|
|
:keys="keys"
|
|
@success="checkboxValue = [1]"/>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapState } from 'vuex'
|
|
export default {
|
|
data() {
|
|
return {
|
|
isActive : null,
|
|
checkboxValue : [],
|
|
configObj : {},
|
|
keys : ['user_ys_one', 'user_ys_two', 'user_xy_three', 'user_xy_four'],
|
|
}
|
|
},
|
|
computed : {
|
|
},
|
|
onLoad() {
|
|
uni.$on('initConfig', data => {
|
|
this.configObj = data
|
|
})
|
|
},
|
|
onShow() {
|
|
},
|
|
methods: {
|
|
setActive(value){
|
|
this.isActive = value
|
|
},
|
|
next(){
|
|
if(!this.isActive){
|
|
uni.showToast({
|
|
title:'请选择',
|
|
icon: 'none'
|
|
})
|
|
return
|
|
}
|
|
if(!this.checkboxValue.length){
|
|
// uni.showToast({
|
|
// title:'请同意隐私政策',
|
|
// icon: 'none'
|
|
// })
|
|
this.$refs.popup.openkeys()
|
|
return
|
|
}
|
|
|
|
if(!uni.getStorageSync('token')){
|
|
this.$utils.toLogin()
|
|
return
|
|
}
|
|
|
|
this.$store.commit('getUserInfo', () => {
|
|
uni.navigateTo({
|
|
url: '/pages/index/index'
|
|
})
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.content_now{
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
position: fixed;
|
|
top: 55%;
|
|
transform: translate(0, -50%);
|
|
padding: 0 70rpx;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
--color2 : #000;
|
|
.title-desc{
|
|
font-size: 26rpx;
|
|
}
|
|
.desc{
|
|
font-size: 26rpx;
|
|
margin-top: 30rpx;
|
|
}
|
|
.mian-btn{
|
|
border-color: $uni-color-primary;
|
|
color: $uni-color-primary;
|
|
}
|
|
.active{
|
|
background-color: $uni-color-primary;
|
|
color: #fff;
|
|
}
|
|
.checkbox{
|
|
margin-top: 460rpx;
|
|
}
|
|
.uni-color-btn{
|
|
width: 80%;
|
|
}
|
|
.flex-center {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
font-size: 26rpx;
|
|
}
|
|
}
|
|
</style>
|