1.代码优化

sws 2024-09-03
v1.0.0
sws 2024-09-03 11:00:15 +08:00
parent 090960f095
commit f0ce30037f
2 changed files with 5 additions and 5 deletions

View File

@ -328,14 +328,14 @@ export const tabs_style = (color: string, style: string | number | boolean | und
* VITE_APP_BASE_API'/dev-api'
* cookie
* URL
*
* @param directory {string} -
* @returns {Promise<string>} PromiseURL
*/
export const online_url = async () => {
export const online_url = async (directory: string) => {
if (import.meta.env.VITE_APP_BASE_API == '/dev-api') {
let temp_data = await import(import.meta.env.VITE_APP_BASE_API == '/dev-api' ? '../../temp.d' : '../../temp_pro.d');
return temp_data.default.temp_attachment_host + '/static/app/tabbar/';
return temp_data.default.temp_attachment_host + directory;
} else {
return get_cookie('attachment_host') + '/static/app/tabbar/';
return get_cookie('attachment_host') + directory;
}
};

View File

@ -1,7 +1,7 @@
import defaultCommon from './index';
import { online_url } from '@/utils';
const new_url = await online_url();
const new_url = await online_url('/static/app/tabbar/');
interface DefaultFooterNav {
content: {
nav_style: string;