Commit 6f71b59f by 胡锦波

1. init 添加获取companytoken的办法

parent 6cb5f2d6
......@@ -223,7 +223,7 @@ export default abstract class BaseService {
protected async buildAppToken2Config(config?: AxiosRequestConfig) {
config = this.buildRequestConfig(config);
if (config.headers) {
config.headers[this.authKey] = await TokenManager.getAppToken(this.onceAppId || this.getEnterpriseToken4RegisterId());
config.headers[this.authKey] = await TokenManager.getCompanyToken(this.onceAppId || this.getEnterpriseToken4RegisterId());
}
this.onceAppId = 0;
return this.checkContentType(config);
......
File mode changed
File mode changed
<template>
<div>AddressBook</div>
<div>
AddressBook
<button @click="test">asdfasdf</button>
</div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { TokenManager } from "@/api/token";
import EnterpriseHost from "@/views/service/enterprise-host";
@Component({ components: {} })
export default class AddressBook extends Vue {}
export default class AddressBook extends Vue {
private test() {
const comid = EnterpriseHost.getPoid();
TokenManager.getCompanyToken(comid);
}
}
</script>
<style lang="less" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment