From 89f32ff2545dbba93dc4538c61e8db0da0358d32 Mon Sep 17 00:00:00 2001 From: PQZ Date: Wed, 8 Jan 2025 16:25:30 +0800 Subject: [PATCH] 1 --- config.js | 2 +- utils/request.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 41d0b51..0af7126 100644 --- a/config.js +++ b/config.js @@ -11,7 +11,7 @@ module.exports = { // 应用名称 name: "lanan-jc", // 应用版本 - version: "2.2", + version: "2.6", // 应用logo logo: "/static/logo.png'", // 官方网站 diff --git a/utils/request.js b/utils/request.js index 1b915f0..e78e19a 100644 --- a/utils/request.js +++ b/utils/request.js @@ -57,7 +57,9 @@ const request = config => { toast(msg) reject(code) } - res.data.code = (res.data.code === 0 ? 200 : res.data.code) + if (res.data.code != undefined){ + res.data.code = (res.data.code === 0 ? 200 : res.data.code) + } if(res.data.data && res.data.data.records){ res.data.rows = res.data.data.records }