first commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
//拼接接口路径
|
||||
const getEnvUrl = (path: string) => {
|
||||
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL;
|
||||
return `${API_BASE_URL}${path}`;
|
||||
};
|
||||
|
||||
用例:
|
||||
<img :src="getEnvUrl(module.thumb)" :alt="module.title" />
|
||||
|
||||
|
||||
const url = getEnvUrl('/platform/moduleCenter/modules');
|
||||
Reference in New Issue
Block a user