fix: 订单类型请求去掉 phone,区分 JWT 401 与业务错误
kfhqptddlx 只带 JWT;响应拦截器仅在 token 失效时清登录态。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 || []
|
||||
// 默认选中全部(空字符串)
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user