feat(h5): unify WeChat OAuth under m.runxian.top path routing

Serve user/shop/partner H5 under /user/, /shop/, /partner/ on a single authorized domain; update nginx, SSL script, and router base paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-07 22:07:47 +08:00
parent e32ccebc80
commit eb961c3a74
19 changed files with 178 additions and 68 deletions
@@ -1,4 +1,5 @@
import { createContext, useCallback, useContext, useEffect, useState, type ReactNode } from 'react';
import { toAppPath } from '@dukang/weixin-sdk';
import { clearAuth, isLoggedIn, request } from '../lib/api';
export type PartnerAccount = {
@@ -43,7 +44,7 @@ export function PartnerSessionProvider({ children }: { children: ReactNode }) {
const logout = useCallback(() => {
clearAuth();
setAccount(null);
window.location.href = '/login';
window.location.href = toAppPath('/login');
}, []);
useEffect(() => {