From 44b7c2420e511c3342b36da0f77dc130ab71faeb Mon Sep 17 00:00:00 2001 From: wlikett <2331964395@qq.com> Date: Fri, 8 Dec 2023 10:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/http/api/equip.ts | 6 +++--- src/http/index.ts | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/http/api/equip.ts b/src/http/api/equip.ts index ffad84d..47b5e97 100644 --- a/src/http/api/equip.ts +++ b/src/http/api/equip.ts @@ -2,17 +2,17 @@ import { post,get,put } from '../index' // 获取装备列表 export const getList = (params = {}) => { - return post('/dev/list',params) + return post('/zlpt-equip/dev/list',params) } //获取装备详情 export const getDetail = (id = '') => { - return get(`/dev/${id}`) + return get(`/zlpt-equip/dev/${id}`) } //获取 推荐装备列表 export const getHotList = (params) => { - return get('/dev/hotList',params) + return get('/zlpt-equip/dev/hotList',params) } export const equipCollect = (params = {}) => { diff --git a/src/http/index.ts b/src/http/index.ts index 002484e..479a697 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -37,7 +37,11 @@ service.interceptors.response.use( } else if (data.code == '403') { ElMessage.error('请重新登录') router.push('/login') - } else { + } else if( data.code == '401' ){ + ElMessage.error(data.msg) + router.push('/login') + } + else { return data } },