guhongwei 2 years ago
parent
commit
e54959cf4d
4 changed files with 34 additions and 15 deletions
  1. 2 2
      .env
  2. BIN
      src/assets/bj.jpg
  3. 30 10
      src/views/homeIndex.vue
  4. 2 3
      vue.config.js

+ 2 - 2
.env

@@ -1,3 +1,3 @@
 VUE_APP_AXIOS_BASE_URL = ''
-VUE_APP_ROUTER="projectweb"
-VUE_APP_HOST="http://broadcast.waityou24.cn"
+VUE_APP_ROUTER=""
+VUE_APP_HOST="http://www.freeskyghw.cn"

BIN
src/assets/bj.jpg


+ 30 - 10
src/views/homeIndex.vue

@@ -1,14 +1,20 @@
 <template>
   <div id="homeIndex">
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight"> test </el-col>
+      <el-col :span="24" class="main animate__animated animate__backInRight">
+        <el-col :span="24" class="one">
+          <el-col :span="24" class="one_1">个人网站</el-col>
+          <el-col :span="24" class="one_2">
+            <el-button type="primary" size="small" @click="toLogin()">用户登录</el-button>
+          </el-col>
+        </el-col>
+      </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('test');
 export default {
   name: 'homeIndex',
   props: {},
@@ -16,14 +22,10 @@ export default {
   data: function () {
     return {};
   },
-  created() {
-    this.search();
-  },
+  created() {},
   methods: {
-    ...mapActions(['query']),
-    async search() {
-      let res = await this.query();
-      console.log(res);
+    toLogin() {
+      window.open(`${process.env.VUE_APP_HOST}/padmin`);
     },
   },
   computed: {
@@ -42,4 +44,22 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.main {
+  width: 100vw;
+  height: 100vh;
+  background: url('~@a/bj.jpg');
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  .one {
+    text-align: center;
+    .one_1 {
+      font-size: 40px;
+      font-family: cursive;
+      font-weight: bold;
+      margin: 2vw 0;
+      color: #ffffff;
+    }
+  }
+}
+</style>

+ 2 - 3
vue.config.js

@@ -1,8 +1,7 @@
 const path = require('path');
 const common = path.resolve(__dirname, '../common');
 module.exports = {
-  publicPath: `/${process.env.VUE_APP_ROUTER}`,
-  outputDir: `${process.env.VUE_APP_ROUTER}`,
+  outputDir: `pweb`,
   productionSourceMap: false,
   configureWebpack: (config) => {
     Object.assign(config, {
@@ -23,7 +22,7 @@ module.exports = {
         target: 'http://broadcast.waityou24.cn',
       },
       '/projectadmin/api': {
-        target: 'http://127.0.0.1:10102', //http://192.168.1.144:16001
+        target: 'http://www.freeskyghw.cn', //http://127.0.0.1:10102  http://www.freeskyghw.cn
         changeOrigin: true,
         ws: false,
       },