1.商品风格切换图片圆角优化

sws 2024-08-27
v1.0.0
sws 2024-08-27 18:24:07 +08:00
parent 3fef91a6a7
commit 869d01cd9b
3 changed files with 4 additions and 3 deletions

View File

@ -326,8 +326,8 @@ export const tabs_style = (color: string, style: string | number | boolean | und
*/
export const online_url = async () => {
if (import.meta.env.VITE_APP_BASE_API == '/dev-api') {
let temp_value = await import('../../temp.d');
return temp_value.default.temp_attachment_host + '/static/app/tabbar/';
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/';
} else {
return (await get_cookie('temp_attachment_host')) + '/static/app/tabbar/';
}

View File

@ -9,13 +9,14 @@ const service = axios.create({
timeout: 50000,
headers: { 'Content-Type': 'application/json;charset=utf-8' },
});
/** @ts-ignore */
// 请求拦截器
service.interceptors.request.use(
async (config: InternalAxiosRequestConfig) => {
// 如果是本地则使用静态tonken如果是线上则使用cookie的token
const cookie = get_cookie('admin_info');
if (import.meta.env.VITE_APP_BASE_API == '/dev-api') {
let temp_data = await import('../../temp.d');
let temp_data = await import(import.meta.env.VITE_APP_BASE_API == '/dev-api' ? '../../temp.d' : '../../temp_pro.d');
config.url = config.url + '?token=' + temp_data.default.temp_token;
} else {
if (cookie) {

0
temp_pro.d.ts vendored Normal file
View File