提交 3a556f65 authored 作者: 宋雄's avatar 宋雄

上传文件增加token

上级 9aff7ca9
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types" import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
import { getFileAccessHttpUrl } from '@/api/manage'; import { getFileAccessHttpUrl } from '@/api/manage';
const FILE_TYPE_ALL = "all" const FILE_TYPE_ALL = "all"
...@@ -169,10 +169,14 @@ ...@@ -169,10 +169,14 @@
} }
}, },
created(){ created(){
// const token = Vue.ls.get(ACCESS_TOKEN);
// //---------------------------- begin 图片左右换位置 -------------------------------------
// this.headers = {"X-Access-Token":token};
// this.containerId = 'container-ty-'+new Date().getTime();
const token = Vue.ls.get(ACCESS_TOKEN); const token = Vue.ls.get(ACCESS_TOKEN);
//---------------------------- begin 图片左右换位置 ------------------------------------- let tenantid = Vue.ls.get(TENANT_ID)
this.headers = {"X-Access-Token":token}; this.headers = {"X-Access-Token":token, "tenant-id": tenantid}
this.containerId = 'container-ty-'+new Date().getTime();
//---------------------------- end 图片左右换位置 ------------------------------------- //---------------------------- end 图片左右换位置 -------------------------------------
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论