Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本项目如何处理前台登录问题 #4

Closed
weiweidong1993 opened this issue Nov 20, 2019 · 4 comments
Closed

本项目如何处理前台登录问题 #4

weiweidong1993 opened this issue Nov 20, 2019 · 4 comments

Comments

@weiweidong1993
Copy link

公司前台项目用的是大佬你的api-creator 后台用的是 vue-admin-element
image

最近在做登录这一块 然后调用接口的时候vue-admin-element用的是如下方式:

image

在这个方法里面套用 this.$api(...)直接报错了:this.$api is not a function

请问有什么好的处理方法吗?

@msidolphin
Copy link
Owner

@weiweidong1993 $api方法是挂载在Vue.prototype上的,你可以采用Vue.prototype.$api的方式调用

@fengjunzixian
Copy link

大佬,关于前台登录,api-creator有什么好的实现方案吗...

@msidolphin
Copy link
Owner

msidolphin commented Nov 20, 2019

@fengjunzixian 这个库只是一个封装了axios的http请求工具,前台登录的实现要视不同业务而定啊

@fengjunzixian
Copy link

恩恩,请继续保持更新,我和我的小伙伴一直默默支持你

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants