| | |
| | | // |
| | | public static final String WEB_URL = ApplicationUtil.getProperty("web_url"); |
| | | |
| | | /** |
| | | * H5/PC 哈希路由注册页邀请链接,避免 web_url 尾斜杠与路径拼接出现双斜杠。 |
| | | */ |
| | | public static String normalizeWebUrl(String url) { |
| | | if (url == null) { |
| | | return ""; |
| | | } |
| | | String s = url.trim(); |
| | | while (s.endsWith("/")) { |
| | | s = s.substring(0, s.length() - 1); |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | public static String buildRegisterInviteLink(String userCode) { |
| | | String base = normalizeWebUrl(WEB_URL); |
| | | String code = userCode == null ? "" : String.valueOf(userCode).trim(); |
| | | return base + "/#/register?usercode=" + code; |
| | | } |
| | | |
| | | public static final String IMAGES_DIR = ApplicationUtil.getProperty("images.dir"); |
| | | |
| | | public static final String IMAGES_HTTP = ApplicationUtil.getProperty("images_http"); |