Fix ops admin back link and local /admin-api proxy.
Use SPA root for the return-to-ops nav and proxy /admin-api in Vite dev so super-admin API calls work locally. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,7 +16,7 @@ export function AdminLayout() {
|
|||||||
</header>
|
</header>
|
||||||
<nav className="nav">
|
<nav className="nav">
|
||||||
<NavLink
|
<NavLink
|
||||||
to="/ops"
|
to="/"
|
||||||
style={{ opacity: 0.6 }}
|
style={{ opacity: 0.6 }}
|
||||||
>
|
>
|
||||||
← 运营后台
|
← 运营后台
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
port: 3002,
|
port: 3002,
|
||||||
proxy: {
|
proxy: {
|
||||||
|
'/admin-api': adminProxy,
|
||||||
'/api': adminProxy,
|
'/api': adminProxy,
|
||||||
'/auth': authProxy,
|
'/auth': authProxy,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user