fix: 订单类型请求去掉 phone,区分 JWT 401 与业务错误

kfhqptddlx 只带 JWT;响应拦截器仅在 token 失效时清登录态。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-06 19:35:24 +08:00
parent 75173553a1
commit d3dc775bd3
4 changed files with 16 additions and 11 deletions

View File

@@ -282,8 +282,7 @@ const fetchClubs = async () => {
// ---------- 2. 获取订单类型 ----------
const fetchOrderTypes = async () => {
try {
const username = localStorage.getItem('username')
const res = await request.post('/yonghu/kfhqptddlx', { phone: username })
const res = await request.post('/yonghu/kfhqptddlx', {}, { skipErrorToast: true })
if (res.code === 0) {
orderTypes.value = res.data || []
// 默认选中全部(空字符串)

View File

@@ -203,9 +203,7 @@ const getFullImageUrl = (relativeUrl) => {
// 订单类型接口(未改动)
const fetchOrderTypes = async () => {
try {
const res = await request.post('/yonghu/kfhqptddlx', {
phone: localStorage.getItem('username')
})
const res = await request.post('/yonghu/kfhqptddlx', {}, { skipErrorToast: true })
if (res.code === 0) {
orderTypes.value = res.data || []
if (!currentType.value) currentType.value = ''

View File

@@ -207,9 +207,7 @@ const getFullImageUrl = (relativeUrl) => {
// 获取订单类型(未改动,仍用 phone
const fetchOrderTypes = async () => {
try {
const res = await request.post('/yonghu/kfhqptddlx', {
phone: localStorage.getItem('username')
})
const res = await request.post('/yonghu/kfhqptddlx', {}, { skipErrorToast: true })
if (res.code === 0) {
orderTypes.value = res.data || []
if (!currentType.value) currentType.value = ''