scorpio 2 роки тому
батько
коміт
7114234863
1 змінених файлів з 5 додано та 0 видалено
  1. 5 0
      src/views/company/index.vue

+ 5 - 0
src/views/company/index.vue

@@ -52,6 +52,7 @@
             multiple
             accept='.doc,.docx,.pdf,.xls,.xlsx,.png,.jpg,.jpeg,.ppt,pptx'
             show-file-list
+            :headers="{'Authorization':`Basic ${clientId}`}"
             :on-success='uploadSuccess'
         >
           <el-icon class="el-icon--upload">
@@ -92,12 +93,15 @@ import baseButton from '@/components/base-button.vue'
 import basicCurd from '@/components/basic-curd/index.vue'
 import api from '@/api'
 import authorize from '@/views/home/component/authorize.vue'
+import { Base64 } from 'js-base64'
+import website from '@/config/website.js'
 
 export default {
   name: 'index',
   components: { BasicContainer, baseButton, basicCurd, authorize },
   data () {
     return {
+      clientId: '',
       authorShow: false,
       showImage: false,
       imgList: [],
@@ -145,6 +149,7 @@ export default {
     }
   },
   created () {
+    this.clientId = Base64.encode(`${website.clientId}:${website.clientSecret}`)
     this.list()
   },
   methods: {