ss
jiangping
2025-07-07 9e1e058b057fc6ef0a9baf636f230c21f1282797
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<template>
  <div class="main_home">
    <div class="home_header">
      <div class="mb10 fs17">下午好,{{ userInfo.realname }}</div>
      <div class="fs13">
        今天是 {{ nowDate }} {{ nowWeek }},欢迎访问豆米跳跳官网后台管理平台
      </div>
 
      <div class="content">
        <el-button class="btn" :loading="loading[0]"  type="primary" @click="staticPage(0)">首页静态化</el-button>
        <el-button class="btn" :loading="loading[6]"  type="primary"  @click="staticPage(6)">Alot物联静态化</el-button>
        <el-button class="btn" :loading="loading[5]"  type="primary" @click="staticPage(5)">最新动态静态化</el-button>
        <el-button class="btn" :loading="loading[3]"  type="primary" @click="staticPage(3)">关于我们静态化</el-button>
        <el-button class="btn" :loading="loading[4]"  type="primary" @click="staticPage(4)">渠道合作静态化</el-button>
      </div>
      <div class="content">
        <el-button class="btn" :loading="loading[7]"   type="primary" @click="staticPage(7)">最新动态详情静态化</el-button>
        <el-button class="btn" :loading="loading[9]"  type="primary" @click="staticPage(9)">客户案例详情作静态化</el-button>
      </div>
      <div class="content">
        <el-button class="btn" :loading="loading[1]"  type="primary" @click="staticPage(1)">智慧系统静态化</el-button>
      </div>
      <div class="content">
        <el-button class="btn" :loading="loading[8]"  type="primary" @click="staticPage(8)">解决方案静态化</el-button>
      </div>
    </div>
  </div>
</template>
 
<script>
import dayjs from 'dayjs'
import { weeks } from '@/utils/config'
import { create as createPage } from '@/api/business/static'
export default {
  components: {
  },
  data () {
    return {
      loading:[false,false,false,false,false,false,false,false,false,false]
    }
  },
  computed: {
    userInfo () {
      return this.$store.state.userInfo
    }
  },
  created () {
  },
  mounted () {
    this.updateDate()
    // this.initData()
  },
  methods: {
    staticPage (index) {
      this.loading[index] = true
      createPage({ pageIndex: index }).then(res => {
        this.$message.success('操作成功')
      }).catch(e => {
        this.$tip.apiFailed(e)
      }).finally(() => {
        this.loading[index] = false
      })
    },
    updateDate () {
      this.nowDate = dayjs().format('YYYY年M月D日')
      this.nowWeek = weeks[new Date().getDay()]
    }
  }
}
</script>
 
<style lang="scss" scoped>
 
div {
  box-sizing: border-box;
}
 
.home_title {
  font-weight: 600;
  font-size: 16px;
  color: #222222;
  line-height: 22px;
}
.content {
  display: flex;
  margin-top: 30px;
  width: 100%;
  .btn{
    width: 18%;
    height: 60px;
    margin: 10px;
    font-size: 20px;
  }
}
 
.main_home {
  background: #f4f7fc;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 92px 20px 20px;
  .home_header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    padding: 20px;
    color: #fff;
    background: linear-gradient(180deg, #076ae5 0%, rgba(32, 127, 247, 0) 100%);
  }
}
</style>