forked from wangziqi/gongxue-base
feat: add taro h5 runtime deployment config
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import Taro from '@tarojs/taro';
|
||||
import { Button, Text, View } from '@tarojs/components';
|
||||
import { appEnv, assertFrontendSecretsAreAbsent } from '@/env';
|
||||
import { appEnv, assertFrontendSecretsAreAbsent, ensureRuntimeConfigLoaded } from '@/env';
|
||||
import { resolveTenant } from '@/services/api';
|
||||
import './index.css';
|
||||
|
||||
@@ -22,7 +22,8 @@ export default function BootstrapPage() {
|
||||
|
||||
useEffect(() => {
|
||||
assertFrontendSecretsAreAbsent();
|
||||
resolveTenant({ host: hostFromRuntime() })
|
||||
ensureRuntimeConfigLoaded()
|
||||
.then(() => resolveTenant({ host: hostFromRuntime() }))
|
||||
.then(() => {
|
||||
setStatus('租户解析完成');
|
||||
Taro.redirectTo({ url: landingPath() });
|
||||
|
||||
Reference in New Issue
Block a user