liyangzheng преди 2 години
родител
ревизия
d92fb6ad82
променени са 6 файла, в които са добавени 93 реда и са изтрити 1 реда
  1. 2 0
      public/config.js
  2. 42 0
      src/components/bulletBox/index.vue
  3. 13 0
      src/utils/auth.js
  4. 1 0
      src/utils/request.js
  5. 29 0
      src/views/dashboard/components/QuickFind.vue
  6. 6 1
      src/views/dashboard/index.vue

+ 2 - 0
public/config.js

@@ -0,0 +1,2 @@
+// 后台服务接口地址
+STATIC_CONFIG.proxyUrl = 'http://8.142.173.95:10086'

+ 42 - 0
src/components/bulletBox/index.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="bullet_box" :style="{width:windowWidth,height:windowHeight}">
+
+  </div>
+</template>
+
+<script>
+export default {
+    // 接收传过来的宽高
+  props: {
+    windowWidth: {
+      type: String,
+      default: "",
+    },
+    windowHeight: {
+      type: String,
+      default: "",
+    },
+  },
+
+  data() {
+    return {};
+  },
+
+  mounted() {},
+
+  methods: {},
+};
+</script>
+
+<style lang="scss" scoped>
+.bullet_box {
+    position: absolute;
+    top: 10px;
+    left: 10px;
+  box-shadow: 1px 1px 3px 2px #299bff !important;
+  background-color: #fff;
+  border-radius: 5px;
+  padding: 2rem;
+  padding-top: 0;
+}
+</style>

+ 13 - 0
src/utils/auth.js

@@ -0,0 +1,13 @@
+const TokenKey = 'temp-token'
+
+export function getToken () {
+  return localStorage.getItem(TokenKey)
+}
+
+export function setToken (token) {
+  return localStorage.setItem(TokenKey, token)
+}
+
+export function removeToken () {
+  return localStorage.removeItem(TokenKey)
+}

+ 1 - 0
src/utils/request.js

@@ -12,6 +12,7 @@ const service = axios.create({
 service.interceptors.request.use(
   config => {
     // }
+    config.headers['Authorization'] = 'Bearer ' + getToken()
     return config
   },
   error => {

+ 29 - 0
src/views/dashboard/components/QuickFind.vue

@@ -0,0 +1,29 @@
+<template>
+    <div>
+        
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'ScdProjectQuickFind',
+
+    data() {
+        return {
+            
+        };
+    },
+
+    mounted() {
+        
+    },
+
+    methods: {
+        
+    },
+};
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 6 - 1
src/views/dashboard/index.vue

@@ -1,5 +1,6 @@
 <template>
     <div>
+<<<<<<< HEAD
         home
         <!-- <button @click="detailsModal = true">测试打开模态框</button> -->
         <!-- 详细信息 -->
@@ -37,12 +38,16 @@
                 </span> -->
             </el-dialog>
         </div>
+=======
+        <BulletBox :windowWidth="'150rem'" :windowHeight="'72rem'"></BulletBox>
+>>>>>>> 4c60367544f81037f455ba94b83a8e7cd6623afb
     </div>
 </template>
 
 <script>
+import BulletBox from "@/components/bulletBox/index.vue"
 export default {
-    name: 'ScdProjectIndex',
+    components:{BulletBox},
 
     data() {
         return {