<template>
    <div class="homeMain_max Guide_1_16_1">
        <header class="homeMain_heade">
            <div class="homeMain_right_content">
                <div class="homeMain_user">
					<div class="homeMain_user_icon" @click="openAccount">
						<img :src="userDetail.avatar" alt="">
					</div>
					<div class="homeMain_user_detail">
						<div class="homeMain_user_icon" @click="openAccount">
							<img :src="userDetail.avatar" alt="">
						</div>
						<div v-if="userDetail.systemUser == 3" class="username">{{$t('Header.hello')}}@{{ $t('isTest.userName') }}</div>
						<div v-else class="username">{{$t('Header.hello')}}@{{ userDetail.userName }}</div>
						<div class="homeMain_user_detail_attention">
							<div class="attention_item">
							<!-- 点击事件就用下面的div -->
							<!-- <div class="attention_item attention_item_active"> -->
								<div>{{ userDetail?.followeeCount }}</div>
								<span>{{$t('account.Follow')}}</span>
							</div>
							<div class="attention_item">
								<div>{{ userDetail?.followerCount }}</div>
								<span>{{$t('account.Fans')}}</span>
							</div>
							<!-- <div class="attention_item">
								<div>22</div>
								<span>作品数</span>
							</div> -->
						</div>
						<div class="homeMain_subscribe">
							<div>
								<span class="font">Status</span>
								<span v-if="userDetail.timeData.isExpiration" class="stateSucsess font">Valid <i class="fi fi-ss-check-circle"></i></span>
								<span v-else class="stateError font">Expire <i class="fi fi-ss-check-circle"></i></span>
								<span class="time">{{ userDetail.timeData.text }}</span>
							</div>
							<!-- <div>
								<span class="font">Cancel Renewal <i class="fi fi-rr-arrow-small-right"></i></span>
							</div> -->
						</div>
						<div class="homeMain_select">
							<div class="select_item_box" @click.stop="isLanguage = !isLanguage">
								<div class="select_item">
									<span class="icon iconfont icon-yuyan"></span>
									<span class="select_item_des">{{$t('Header.language')}}</span>
									<span class="icon iconfont icon-xiala" :class="{'active': isLanguage}"></span>
								</div>
								<ul class="select_list" :class="{'active': isLanguage}" @click.stop="">
									<li class="select_item" v-for="item in language"  @click="setLocale(item.value)">
										<span class="select_item_des">{{ item.name }}</span>
									</li>
								</ul>
							</div>
							<div class="select_item" @click="orderForm()">
								
								<i class="fi fi-rs-notebook"></i>
								<span class="select_item_des">{{$t('Header.ViewOrders')}}</span>
							</div>
							<router-link class="select_item" v-if="userDetail.systemList.indexOf(3) >= 0"  :to="`/administrator`">
								<span class="icon iconfont icon-yonghu"></span>
								<span class="select_item_des">Administrator</span>
							</router-link>
							<router-link class="select_item" :to="`/Affiliate`" v-if="userDetail.systemList.indexOf(2) >= 0">
								<span class="icon iconfont icon-yonghu"></span>
								<span class="select_item_des">Affiliate</span>
							</router-link>
							<div class="select_item" @click="getTutorial()">
								<span class="fi fi-rr-book-user"></span>
								<span class="select_item_des">{{$t('Header.Tutorial')}}</span>
							</div>
							<div class="select_item_long"></div>
							<div class="select_item" @click="logout()">
								<span class="icon iconfont icon-tuichu"></span>
								<span class="select_item_des">{{$t('Header.logOff')}}</span>
							</div>
						</div>
						
					</div>
				</div>
				<div
					class="trialApproval button_second credits hideChecked"
                >
					{{$t('Header.Credits')}}:&nbsp;
					<span :title="credits">
						<!-- <div>{{ String(credits.value[credits.value.legnth-1]) }}</div> -->
						<div class="credits_item" v-for="item in String(credits)" :style="{'transform': 'translateY('+item*-100+'%)'}">
							<div v-for="numItem in 10">{{ numItem-1 }}</div>
						</div>
					</span>
					<i @click="getCredits" class="fi fi-br-refresh" :class="[activeCredits?'active':'']"></i>
					<!-- <i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i> -->
					<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
                </div>
				<div v-if="userDetail.systemUser == 0 || userDetail.systemUser == 3" class="gallery_btn" style="margin-left: 3rem;" @click="subscribe">{{$t('Header.SubscribeNow')}}</div>
				<div v-else style="width: 30rem;"></div>
            </div>
			<navRouter :routerList="navRouterList"></navRouter>
			<div class="homeMain_right">
				<div class="trialApproval credits message">
					<div class="message_iconItem">
						<a-badge :count="messageNum">
							<i class="fi fi-rr-envelope" @click="openMessage"></i>
						</a-badge>
					</div>
					<div class="message_iconItem">
						<a-badge :count="messageType?.newPosted">
							<!-- <i class="fi fi-rr-envelope" @click="openMessage"></i> -->
							<i class="fi fi-rr-bell" @click.stop="openNewPosted"></i>
						</a-badge>
							<div class="message_iconItem_value select_block" v-show="isNewPosted" style="width: 40rem">
							<newPosted ref="newPosted"></newPosted>
							</div>
					</div>
				</div>

				<!-- <Habit></Habit> -->
			</div>
			
			<payOrder ref="payOrder"></payOrder>
			<UpgradePlan ref="UpgradePlan"></UpgradePlan>
			<TaskPage ref="TaskPage"></TaskPage>
        </header>
		<div class="homeMain_content_body">
			<!-- <router-view v-slot="{ Component }" @setTask = "setTask">
				<keep-alive>
					<component :key="$route.name" :is="Component"  v-if="$route.meta.keepAlive"/>
				</keep-alive>
				<component :key="$route.name" :is="Component"  v-if="!$route.meta.keepAlive"/>
			</router-view>  -->
			<router-view v-if="!getLangIsShowMark" @setTask="setTask" :getLangIsShowMark="getLangIsShowMark">
			</router-view>
		</div>
		<div class="mark_loading" v-show="getLangIsShowMark">
			<a-spin size="large" />
		</div>
		<RobotAssist v-if="!getLangIsShowMark"></RobotAssist>
		<scaleVideo ref="scaleVideo"></scaleVideo>
		<!-- 进行续订 -->
		<renew ref="renew"></renew>
		<!-- 绑定邮箱 -->
		<bindEmail ref="bindEmail"></bindEmail>
    </div>
</template>
<script >
import { defineComponent, createVNode, ref,toRefs, reactive, computed, onMounted, nextTick } from "vue";
import { isEmail } from "@/tool/util";
import { setCookie, getCookie, WriteCookie,clonAllCookie } from "@/tool/cookie";
import payOrder from "@/component/Pay/payOrder.vue";
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
import renew from "@/component/HomePage/renew.vue";
// import Habit from "@/component/Detail/habit.vue";
import TaskPage from "@/component/HomePage/TaskPage.vue";
import UpgradePlan from "@/component/HomePage/UpgradePlan.vue";
import { Https } from "@/tool/https";
import { Modal, message } from "ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
import scaleVideo from "@/component/HomePage/scaleVideo.vue";
import newPosted from "@/component/HomePage/newPosted.vue";
import navRouter from "@/component/modules/navRouter.vue";
import bindEmail from "@/component/HomePage/bindEmail.vue";
import { useStore } from "vuex";
import { setLang } from "@/tool/guide";
import  showViewVideo from "@/tool/mount";
import { useI18n } from "vue-i18n";
import { gsap, TweenMax,TweenLite } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
import MyWs from "@/tool/webSocket";
import MyEvent from "@/tool/myEvents";
export default defineComponent({
    components: {
        VerificationCodeInput,
		renew,
		// Habit,
		RobotAssist,
		scaleVideo,
		newPosted,
		UpgradePlan,
		payOrder,
		TaskPage,
		navRouter,
		bindEmail,
    },
	setup(){
        const store = useStore();
		const {t} = useI18n()
		const {locale} = useI18n()
		let userDetail= computed(()=>{
			return store.state.UserHabit.userDetail
		})
		let isMurmur = ref()
		let credits = computed(()=>{
			return store.state.UserHabit.credits.value
		})
		
		let activeCredits = ref(false)
		let getLangIsShowMark = ref(true)
		let navRouterList = ref([])
		let messageNum = computed(()=>{
			return store.state.UserHabit.messageSystem.messageNum
		})
		let messageType = computed(()=>{
			return store.state.UserHabit.messageSystem.messageType
		})
		let stateList = reactive({
			isNewPosted:false,
			isLanguage:false,
		})
		let isNewPosted = ref(false)
		let isLanguage = ref(false)

		let newPosted = ref(null)

		let getUnreadCount = ()=>{
			Https.axiosGet(Https.httpUrls.getUnreadCount).then((rv)=>{
				if(rv){
					store.commit('setMessageSystem',[rv])
				}
			})
		}
		MyWs.close()
		// MyWs.linkWs("wss://"+MyWs.messageUrl,'message')
		MyWs.linkWs("wss://"+MyWs.messageUrl,'message')
		let getWsMessage = (data)=>{
			let userInfo = ['followeeCount','followerCount']
			let obj = {}
			let isObj = false
			data.forEach(element => {
				const keys = Object.keys(element)[0]
				if(userInfo.indexOf(keys) > 0){
					obj[keys] = element[keys]
					isObj = true
				}
			});
			if(isObj)store.commit('upUserDetail',obj)

			store.commit('setMessageSystem',data)
		}
		MyEvent.add('getMessage',getWsMessage)
		// setTimeout(() => {
		// 	MyWs.sendMessage('aaaa')
		// }, 3000);
		// MyWs.ws.onmessage = (data)=>{
		// 	console.log(JSON.parse(data.data),232);
		// }

		let openNewPosted = ()=>{
			stateList.isNewPosted = !stateList.isNewPosted
			newPosted.value.init()
			document.addEventListener(
                "click",
                closeShowOperateContent,
                false
            );
		}
		 //点击下拉图标出现操作
		let changeLanguage=() =>{
			stateList.isLanguage = !stateList.isLanguage;
            document.addEventListener(
                "click",
                closeShowOperateContent,
                false
            );
		}

        //关闭下拉图标
        let closeShowOperateContent=() =>{
			stateList.isLanguage = false
			stateList.isNewPosted = false
            document.removeEventListener("click", closeShowOperateContent);
        }
		let renew = ref(null)
		const subscribe = ()=>{
			renew.value.init()
		}
		onMounted(()=>{
			getUnreadCount()
			navRouterList.value = [
				{
					routerName:['homePage'],
					router:'/home/homePage',
					name:t('Header.HOME')
				},{
					routerName:['library'],
					router:'/home/library',
					name:t('Header.LIBRARY')
				},{
					routerName:['history'],
					router:'/home/history',
					name:t('Header.HISTORY')
				},{
					routerName:['works'],
					router:'/home/works',
					name:t('Header.WORKS')
				},{
					routerName:['events','eventsDetail'],
					router:'/home/events',
					name:t('Header.EVENTS')
				},
			]
		})
		return {
			store,
			userDetail,
			t,
			locale,
			isMurmur,
			credits,
			activeCredits,
			getLangIsShowMark,
			navRouterList,
			messageNum,
			messageType,
			...toRefs(stateList),
			newPosted,
			openNewPosted,
			changeLanguage,
			closeShowOperateContent,
			renew,
			subscribe,
		}
	},
    data() {
        return {
            email: "",
            emailCode: ["", "", "", "", "", ""], //邮箱验证码
            time: 60, //60秒倒计时
            timer: 0,
            timerOperate: null,
            numTime: 30,
            timerSec: null,
            modalWarning: null,

			language:[
				{name:'English',value:'ENGLISH'},
				{name:'中文',value:'CHINESE_SIMPLIFIED'},
				// {name:'한국인',value:'KOREAN'},
				// {name:'にほんご',value:'JAPANESE'},
				// {name:'Русский',value:'RUSSIAN'},
				// {name:'Français',value:'FRENCH'},
				// {name:'แบบไทย',value:'THAI'},
				// {name:'Tiếng Việt',value:'VIETNAMESE'},
				// {name:'Italiano',value:'ITALIAN'},       
			],
        };
    },
	directives:{
		moveOpenDetal:{
			mounted (el,binding) {
			},
		}
	},
    async mounted() {
		await new Promise((resolve, reject) => {
			this.store.dispatch('getLangType').then(()=>{
				this.getLangIsShowMark = false
				resolve()
			}).catch(()=>{
				this.getLangIsShowMark = false
				reject()
			})
		})

        let isMurmur = getCookie('isMurmur')//获取是否是试用用户
        this.isMurmur =JSON.parse(isMurmur)
        if (this.userDetail.userId && this.userDetail.userId > -1) {
            this.accountIsLogin();
        } else {
            this.$router.replace("/");
        }
		if(!this.isMurmur){
			this.operateClick();
			document.addEventListener("click", this.operateClick);
		}
		this.getCredits()
		this.getLang('')
		//语言适配
		

		let tl1 = gsap.timeline({ paused: true });
		let heradeRight = document.querySelector('.homeMain_max .homeMain_right_content')
		let userDetailMax = document.querySelector('.homeMain_max .homeMain_user')
		let userDetailIcon = document.querySelector('.homeMain_max .homeMain_user_icon')
		let userDetail = document.querySelector('.homeMain_max .homeMain_user_detail')
		// let anmiation = TweenMax.to(userDetailMax,1, {'margin-top':'30px',opacity:1})
		// anmiation.stop()
		let state
		tl1
		.to(userDetail,.3, {opacity:1,display:'flex'})
		// .to(userDetailIcon,.3, {'left':'16rem',y:'25%',x:'-50%',scale:1.5,opacity:1},'-=.3')
		let overTime
		let outTime
		userDetailMax.addEventListener('mouseenter',(event)=>{
			if(state && !outTime)return
			clearTimeout(overTime)
			clearTimeout(outTime)
			overTime = setTimeout(() => {
				state = true
				this.isLanguage = false
				tl1.play()
			}, 500);
		})
		heradeRight.addEventListener('mouseleave',(event)=>{
			if(overTime){
				clearTimeout(overTime)
			}
			if(!state)return
			clearTimeout(outTime)
			outTime = setTimeout(() => {
				state = false
				tl1.reverse()
			}, 500);
		})
		let orderId = sessionStorage.getItem('orderId');//进入首页后是否打开订单列表查询到订单
		if(orderId){
			let payOrder = this.$refs.payOrder
			payOrder.init(orderId)
		}
    },
    methods: {
		setTask(data){
			this.openTask(data)
		},
       
        turnToPage(name) {
            let noRefresh = name === "home" ? true : false;
            this.$router.push({ name: name, params: { noRefresh: noRefresh } });
        },
		UpgradePlan(){//购买积分
			let UpgradePlan = this.$refs.UpgradePlan
			UpgradePlan.init()
		},
		Assignment(){//任务
			// let num = 123+this.credits
			// this.store.commit('setCredits',num)
		},
		getCredits(){//刷新当前积分
			if(!this.activeCredits){
				this.activeCredits = true
				this.store.dispatch('getCredits').then((rv)=>{
					setTimeout(()=>{
						this.activeCredits = false
					},300)
				})
			}else{
				this.activeCredits = false
			}
			
			
		},
       

    

		//查看订单
		orderForm(){
			let payOrder = this.$refs.payOrder
			payOrder.init()
		},
		//教程
		getTutorial(){
			let url = 'https://code-create.com.hk/wp-content/uploads/2025/02/aida_3.0-Manual-2_5-CN.pdf'
			if(this.locale == 'ENGLISH'){
				url = 'https://code-create.com.hk/wp-content/uploads/2025/02/aida_3.0-Manual-2_5-EN.pdf'
				showViewVideo({url:'https://code-create.com.hk/wp-content/uploads/2025/02/AiDA-demo-video_2_5_EN.mp4'})
			}else{
				showViewVideo({url:'https://code-create.com.hk/wp-content/uploads/2025/02/AiDA-demo-video_2_5_CN.mp4'})
			}
			//打开视频
			const a = document.createElement('a');
			a.href = url;
			a.target = '_blank';
			a.download = 'aida_3.0-Manual.pptx'; // 下载的文件名
			document.body.appendChild(a);
			a.click();
		},
        //登出
        async logout() {
            let data = {
                userId: this.userDetail.userId,
            };
			// console.log(getCookie("token"));
			if(this.userDetail.systemUser == 3){
				await Https.axiosGet(Https.httpUrls.trialUserLogout,).then((rv) => {
					Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
						this.$router.replace("/");
						// WriteCookie("token");
					});
				})
			}else{
				await Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
					// WriteCookie("token");
				});
				this.$router.replace("/");
			}
			this.store.commit('createDetail')
			store.commit('createProbject')

			// WriteCookie("token");
			clonAllCookie()
			// window.location.reload()
            
        },
        //判断是否登录
        accountIsLogin() {
            let data = {
                userId: this.userDetail.userId,
            };
            Https.axiosPost(Https.httpUrls.accountIsLogin, data).then((rv) => {
                if (!rv) {
                    this.$router.replace("/");
                }
            });
        },

        //点击重置判断是否长时间五操作
        operateClick() {
            if (this.timer) {
                clearTimeout(this.timer);
            }
            let _this = this;
            let timeNum = 1000 * 60 * 120;
            this.timer = setTimeout(() => {
                this.modalWarning = Modal.warning({
                    title: () =>
						this.t('Header.jsContent3',{numTime:_this.numTime}),
                    icon: createVNode(ExclamationCircleOutlined),
                    okText: "Ok",
					centered:true,
                    onOk() {
                        _this.numTime = 30;
                        clearInterval(_this.timerSec);
                    },
                });
                _this.numCounter();
            }, timeNum);
        },

        numCounter() {
            this.timerSec = setInterval(() => {
                if (this.numTime > 0) {
                    this.numTime = this.numTime - 1;
                } else {
                    clearTimeout(this.timer);
                    clearInterval(this.timerSec);
                    this.logout();
                    this.modalWarning.destroy();
                }
            }, 1000);
        },
		//获取当前语言
		getLang(v){
			let data
			Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
                (rv) => {
                    if (rv) {
						this.locale = rv
						setLang(rv)
                    }
                }
            );
		},
		setLang(v){
			
			Https.axiosGet(Https.httpUrls.changeUserLanguage,{params:{language:v}}).then((rv) => {
				if (rv) {
					if (rv) {
                        let token = rv;
                        setCookie("token", token);
						this.getLang('')
						// if(this.$router.currentRoute._value.path == '/home'){
						// 	this.$router.push("/home")
						// }else{
						// 	this.$router.push("/home")
						// }
						this.store.commit('clearAllData')
						// window.location.reload()
						window.location.href = '/home';
                    }
				}
			})
		},
		
		setLocale(v){
			this.setLang(v)
		},
		openTask(data){
			let taskPage = this.$refs.TaskPage
			taskPage.init(data)
		},
		openAccount(){
			this.$router.push("/home/account")
		},
		openMessage(){
			this.$router.push("/home/account/accountMessage")
		},
    },
});
</script>

<style lang="less" scoped>
.homeMain_max{
	position: relative;
	display: flex;
	height: 100vh;
	flex-direction: column;
	.homeMain_content_body{
		flex: 1;
		height: calc(100vh - 7rem);
		overflow: hidden;
	}
}
.homeMain_heade {
	flex-shrink: 0;
    display: flex;
	// padding: 0 30px;
	padding: 2rem 6rem;
    width: 100%;
    height: auto;
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid #e1e1e1;
    position: relative;
    align-items: center;
	z-index: 9;
	background-color: #fff;
	padding-right: 1rem;
	.homeMain_right{
		// width: 33%;
		width: auto;
		display: flex;
		justify-content: flex-end;
		align-items: center;
		margin-left: auto;
		.message{
			display: flex;
			width: 6rem;
			justify-content: space-between;
			margin: 0 2rem;
			// padding: 1rem;
			i{
				margin-left: 0rem;
				border-left: none;
				padding-left: 0rem;
				height: auto;
				font-size: 2rem;
				width: 3rem;
				cursor: pointer;
			}
			span{
				overflow: initial;
				align-items: center;
				width: auto;
				margin: auto;
				height: auto;
			}
			.message_iconItem{
				position: relative;
				display: flex;
				.message_iconItem_value{
					padding: 1rem;
					left: 50%;
					transform: translateX(-50%);
					top: 4rem;
				}
			}
		}
	}
    .homeMain_logo {
        width: 14.4rem;
        height: 3.2rem;
        margin: 2.1rem 2.8rem 0 ;
		// position: absolute;
		line-height: 2rem;
		margin-top: 0;
    }

    

    .homeMain_right_content {
        // position: absolute;
        top: 0;
        // right: 3.2rem;
		left: 0;
        display: flex;
		// width: 36%;
		margin-right: 7rem;
		width: auto;
		height: 100%;
		align-items: center;
        .homeMain_icon {
            font-size: 3.6rem;
            position: relative;
            top: 0.3rem;
        }
		.homeMain_user{
			.homeMain_user_icon{
				height: 6rem;
				width: 6rem;
				position: relative;
				transform-origin: top;
				overflow: hidden;
				z-index: 2;
				left: 0;
				border-radius: 50%;
				cursor: pointer;
				background: #fff;
				img{
					width: 100%;
					height: 100%;
					object-fit: contain;
				}
				// transition: all .3s;
			}
			.homeMain_user_detail{
				position: absolute;
				top: calc(100% + .5rem);
				background: #fff;
				width: 32rem;
				height: auto;
				opacity: 0;
				display: none;
				// box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
				text-align: center;
				flex-direction: column;
				align-items: center;
				padding: 1.2rem 2rem;
				border: 2px solid #000;
				border-radius: 2rem;
				.username,.homeMain_user_detail_attention,.homeMain_subscribe{
					margin-bottom: 2rem;
				}
				.homeMain_user_icon{
					position: relative;
				}
				.homeMain_subscribe{
					padding: 2rem;
					background: #f3f3f6;
					border-radius: 1.4rem;
					cursor: pointer;
					width: 100%;
					> div{
						display: flex;
						margin-bottom: 2rem;
					}
					> div:last-child{
					    margin-bottom: 0;
					}
					.font{
						font-size: 1.6rem;
						font-weight: 600;
						margin-right: 1rem;
					}
					.stateSucsess{
						color: #3ab45c;
					}
					.stateError{
						color: #b43a3a;
					}
					.time{
						font-size: 1.4rem;
						font-weight: 400;
						margin-left: auto;
					}
				}
				.homeMain_select{
					width: 100%;
					.select_item {
						padding: 0 1rem;
						border-radius: .8rem;
						line-height: 4rem;
						color: #4d4d4d;
						display: flex;
						align-items: center;
						cursor: pointer;
						user-select: none;
						width: 100%;
						flex-wrap: wrap;
						&:hover {
							background: #f3f3f6;
						}

						.iconfont ,.fi-rr-book-user {
							// font-size: 1.4rem;
						}

						.select_item_des {
							font-size: 1.6rem;
							margin-left: 1rem;
							font-weight: 500;
						}
					}
					.select_item_long{
						border-bottom: 1px solid #eceaea;
						margin: 2rem 0;
					}
					.icon-xiala{
						margin-left: auto;
						&.active{
							transform: rotate(180deg);
						}
					}
					.select_list{
						height: 0;
						overflow: hidden;
						transition: all .3s;
						width: 100%;
						margin: 0;
						> li{
							padding-left: 2.5rem;
						}
						&.active{
							height: auto;
						}
					}
				}
				.homeMain_user_detail_attention{
					width: 100%;
					display: flex;
					justify-content: space-between;
					padding-left: 3.5rem;
					padding-right: 3.5rem;
					.attention_item{
						display: flex;
						flex-direction: column;
						align-items: center;
					}
					.attention_item_active{
						cursor: pointer;
					}
					.attention_item_active:hover{
						color: #39215b;
						span{
							color: #39215b;
						}
					}
					div{
						font-size: 1.6rem;
						font-weight: 600;
					}
					span{
						font-size: 1.4rem;
						color: #949eae;
					}
				}
			}
			
		}
		.username {
			font-size: 1.8rem;
			color: #1a1a1a;
			margin: 0 0.8rem;
			font-weight: 900;
			span{
				margin: .7rem;
			}
		}
		.credits{
			font-size: 1.8rem;
			color: #1a1a1a;
			font-weight: 900;
			width: auto;
			padding: 0 1rem;
			cursor: auto;
			display: flex;
			line-height: 6rem;
			height: 6rem;
			box-sizing: content-box;
			border-radius: 4rem;
			span{
				width: 5rem;
				display: inline-block;
				overflow: hidden;
				display: flex;
				margin-right: .9rem;
				.credits_item{
					transition: .3s all;
					// height: 4rem;
					height: 100%;
					// height: 3.2rem;
					div{
						height: 100%;
						display: flex;
						align-items: center;
						justify-content: center;
					}
				}
			}
			i{
				height: 100%;
				display: inline-block;
				border-left: .1rem solid ;
				padding-left: .9rem;
				margin-left: .9rem;
				font-size: 1.8rem;
				cursor: pointer;
			}
			
			.fi-br-refresh{
				margin-left: 0;
				border-left: none;
				padding-left: 0;
				&.active{
					transition: all .3s;
					transform: rotate(360deg);
				}
			}
		}
		.trialApproval{
			margin-left: 2rem;
		}
    }
    
}
.select_block {
	z-index: 1050;
	position: absolute;
	left: 15.5rem;
	top: 6rem;
	width: 13.5rem;
	background: #ffffff;
	box-shadow: 0px 0.4rem 0.4rem 0px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	border: 1px solid #000000;
	height: auto;
	// &.select_list{
	// 	top: 56%;
	// 	left: 100%;
	// 	// transform: translateX(5%);
	// }
	.homeMain_select{
		width: 100%;
		.select_item {
			height: 4.1rem;
			color: #4d4d4d;
			display: flex;
			align-items: center;
			cursor: pointer;
			user-select: none;
			width: 100%;
			&:hover {
				background: #f7f7f7;
			}

			.iconfont ,.fi-rr-book-user {
				// font-size: 1.4rem;
			}

			.select_item_des {
				font-size: 1.6rem;
				margin-left: 1rem;
				font-weight: 500;
			}
		}
	}
	
}
.modal_component {
    .skip_content {
        width: 6rem;
        height: 3rem;
        line-height: 2.8rem;
        border: 0.1rem solid #343579;
        font-size: 1.4rem;
        color: #343579;
        position: absolute;
        top: 1.8rem;
        right: 1.8rem;
        cursor: pointer;
    }

    .bind_email_content {
        padding: 4.8rem 9.2rem 6rem;

        .bind_email_tip {
            font-size: 1.8rem;
            color: #a5b0c2;
            line-height: 1.9rem;
            text-align: center;
        }
        .bind_email {
            margin-top: 2rem;
            font-size: 2.2rem;
            font-weight: 400;
            color: #030303;
            text-align: center;
        }

        .bind_email_form_content {
            .bind_email_form_title {
                font-size: 2.2rem;
                font-weight: bold;
                color: #030303;
                line-height: 2.4rem;
            }

            .bind_email_form_input {
                width: 100%;
                height: 4.6rem;
                margin-top: 1rem;
                border: 0.1rem solid #b4bed7;
                padding-left: 2.1rem;
                line-height: 4.6rem;
                font-size: 1.8rem;
                box-sizing: border-box;

                &::placeholder {
                    color: #a5b0c2;
                }
            }
        }

        .bind_email_submit_button {
            height: 4.6rem;
            line-height: 4.6rem;
            background: #343579;
            font-size: 1.6rem;
            font-weight: 500;
            color: #ffffff;
            width: 12.8rem;
            text-align: center;
            cursor: pointer;
            margin: 3rem auto 0;
        }

        .icon--shangyibu {
            font-size: 2.5rem;
            font-weight: bold;
            color: #030303;
        }

        .email_last_step_content {
            margin-left: 1rem;
            font-size: 2.2rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: #030303;
        }

        .tip_content {
            font-size: 1.3rem;
            font-weight: bold;
            color: #343579;
            cursor: pointer;
        }

        .email_last_step_des {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 2.5rem;
            margin-bottom: 1.5rem;

            .sent_email_content {
                font-size: 1.8rem;
                font-weight: bold;
                color: #a5b0c2;
            }
        }
    }
}
</style>
