You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
714 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//api集合
let apiApp = {
login: '/api/mobile/user/applet-login',
userInfo: '/api/mobile/user/get-user-info',
hospital: '/api/mobile/hospital/hospital',
banner: '/api/mobile/other/banner'
}
// 此处第二个参数vm就是我们在页面使用的this你可以通过vm获取vuex等操作
const install = (Vue, vm) => {
//api方法
//
const login = (params = {}) => vm.$u.get(apiApp.login, params)
const getUserInfo = () => vm.$u.get(apiApp.userInfo)
const hospitalList = (params = {}) => vm.$u.get(apiApp.hospital, params)
const banner = (params = {}) => vm.$u.get(apiApp.banner, params)
// end
vm.$u.api = {
login,
getUserInfo,
hospitalList,
banner
};
}
export default {
install
}