<template>
  <div id="container">
    <!--    banner模块-->
    <banner></banner>
    <!--    未登录 登录窗口模块-->
    <div class="login_card" v-if="!is_login">
      <!--      登录窗口-->
      <login_container v-if="status == 'login'" @changeStatus="change_status"
                       @to_scan="change_status"></login_container>
      <!--      扫码窗口-->
      <scan_container v-if="status == 'scan'" @changeStatus='change_status'></scan_container>
      <!--      注册窗口-->
      <regist_container v-if="status == 'regist'" @changeStatus='change_status'></regist_container>

    </div>
    <!--    登陆后 的个人首页-->
    <div class="personal_card" v-if="is_login">
      <personal_container></personal_container>
      <device_container></device_container>
    </div>
    <div class="service">
      <div class="head">
        <div>
          <div class="line"></div>
          <div class="title">功能服务</div>
        </div>
      </div>
      <div class="content">
        <img src="https://img.shuimuai.com/chongzhizhongxin.png" @click="to_recharge"></img>
        <img src="https://img.shuimuai.com/shebeiguanli.png"></img>
        <img src="https://img.shuimuai.com/chongzhizhongxin.png"></img>
        <img src="https://img.shuimuai.com/shebeiguanli.png"></img>
      </div>
    </div>
  </div>
</template>

<script>
import banner from '@/components/banner'
import login_container from '@/components/index/login'
import scan_container from '@/components/index/scan'
import regist_container from '@/components/index/regist'
import personal_container from "@/components/index/personal";
import device_container from "@/components/device/device";


export default {
  name: "index_container",
  components: {
    banner, login_container, scan_container, regist_container, personal_container, device_container
  },
  data() {
    return {
      // 三种状态 扫码scan 注册regist 登录login
      status: "regist",
      is_login: true
    }
  },
  methods: {
    get_init_data() {
    },
    //切换到扫码
    change_status($status) {
      this.status = $status
    },
    //跳转充值中心
    to_recharge(){

    }
  },
  mounted() {
  }
}
</script>

<style scoped>
@import "index.css";
</style>
