sysIndex.html 2.54 KB
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="public/js/lib/element-ui/index.css">
  <link rel="stylesheet" href="public/css/common.css">
  <link rel="stylesheet" href="public/css/common/mainIndex.css">
  <title>主页</title>
</head>
<body>
  <div id="app">
    <div class="main-index main-container"
      v-loading.fullscreen.lock="fullscreenLoading"
      :element-loading-background="loadingBackground">
      <div class="main-wrapper">
        <h1 class="main-logo login-logo">
          <img src="public/img/logo-login.png" alt="logo">
        </h1>
        <div class="main-slogan">
          <h2>
            <span>为数据管理赋权</span><span>数据应用赋能</span><span>数据资产赋值</span>
          </h2>
          <p>规范编辑  智能管理  关联应用  共享开放</p>
        </div>
        <div class="main-index-content">
          <ul class="clearfix">
            <li v-for="item in menuIndexList" :key="item.id" class="pull-left">
              <a :href="item.path">
                <i class="iconfont" :class="item.icon"></i>
                <span v-text="item.name"></span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  <script src="public/js/lib/jquery.min.js"></script>
  <script src="public/js/lib/vue.min.js"></script>
  <script src="public/js/lib/element-ui/index.js"></script>
  <script src="public/js/util/index.js"></script>
  <script>
    var app = new Vue({
      el: '#app',
      data: function() {
        return {
          menuIndexList: [],
          fullscreenLoading: false,
          loadingBackground: 'rgba(0, 0, 0, 0.5)',
        }
      },
      created: function() {
        this.init()
      },
      methods: {
        init: function() {
          this.getMenu()
        },
        getMenu: function() {
          var self = this
          this.fullscreenLoading = true
          api({
            url: '/system/module/moduleList',
            type: 'get',
            successFuc: function (res) {
              self.menuIndexList = res.data
              self.fullscreenLoading = false
            },
            failFuc: function (res) {
              self.fullscreenLoading = false
              alert('获取失败')
            },
            errorFuc: function (res) {
              self.fullscreenLoading = false
              alert('获取失败')
            }
          })
        }
      }
    })
  </script>
</body>
</html>