提交 96df1ee4 编写于 作者: W weixin_44463441

Auto Commit

上级 2f1b0697
......@@ -8,6 +8,24 @@ class RepEs {
this.index_url = config.index_url
this.index_name = config.index_name
this.token = process.env?.INSCODE_API_KEY??'default'
this.loadToken()
}
loadToken () {
axios.get('/token.json', {
headers: {
'Accept': 'application/json'
}
}).then(res => {
debugger
const token = res?.data??''
if (token) {
this.token = token.trim()
console.info('get token from env [' + this.token + ']')
}
})
}
query (keyword) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册