|
@@ -13,13 +13,21 @@ import useStore from "@/hooks/useRedux";
|
|
|
import RouteUtil from "@/utils/routeUtil";
|
|
|
import UserHelper from "@/helper/userHelper";
|
|
|
import Button from "@/component/button";
|
|
|
-import { parseQueryParams, isOuterLink } from "@/utils/toolsUtil";
|
|
|
+import {
|
|
|
+ parseQueryParams,
|
|
|
+ isOuterLink,
|
|
|
+ replaceQueryParam,
|
|
|
+} from "@/utils/toolsUtil";
|
|
|
import "./index.scss";
|
|
|
import LoginBox from "../components/LoginBox";
|
|
|
+import StorageUtil, { EStorage } from "@/utils/storageUtil";
|
|
|
+
|
|
|
interface IMineProps {}
|
|
|
|
|
|
// @ts-ignore
|
|
|
const Mine = (props: PropsWithChildren<IMineProps>) => {
|
|
|
+ const channelCode = StorageUtil.get(EStorage.channelCode) || "";
|
|
|
+
|
|
|
const appContext = useContext(AppContext);
|
|
|
// const { screenSize } = useContext(AppContext);
|
|
|
const { statusBarHeight } = appContext.systemInfo!;
|
|
@@ -56,9 +64,20 @@ const Mine = (props: PropsWithChildren<IMineProps>) => {
|
|
|
const loginFlowHandler = () => {
|
|
|
UserHelper.UpdateOpenId();
|
|
|
if (isOuterLink(indexInfoResult.data.link)) {
|
|
|
+ // 如果是外部链接,不用管
|
|
|
postJumpUrlResult();
|
|
|
} else {
|
|
|
- RouteUtil.toWebViewPage({ url: indexInfoResult.data.link });
|
|
|
+ const jumpUrl = channelCode
|
|
|
+ ? replaceQueryParam(
|
|
|
+ indexInfoResult.data.link,
|
|
|
+ "channelCode",
|
|
|
+ channelCode
|
|
|
+ )
|
|
|
+ : indexInfoResult.data.link;
|
|
|
+
|
|
|
+ RouteUtil.toWebViewPage({
|
|
|
+ url: jumpUrl,
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
|