udxcms 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -16980,50 +16980,40 @@ const axiosManuel = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
16980
16980
  __proto__: null,
16981
16981
  default: axios$2
16982
16982
  }, Symbol.toStringTag, { value: "Module" }));
16983
- const DEFAULT_CDNURL = "https://topnerds.org";
16983
+ const DEFAULT_CDNURL = "";
16984
16984
  let globalConfig = {
16985
16985
  cdnurl: DEFAULT_CDNURL
16986
16986
  };
16987
+ const trimTrailingSlash = (value17) => String(value17 || "").replace(/\/+$/, "");
16988
+ const getCDNURL = (fallback2 = DEFAULT_CDNURL) => {
16989
+ const configuredCDN = trimTrailingSlash(globalConfig.cdnurl);
16990
+ return configuredCDN && configuredCDN !== DEFAULT_CDNURL ? configuredCDN : trimTrailingSlash(fallback2);
16991
+ };
16987
16992
  function setConfig(config2) {
16988
16993
  if (config2 && config2.cdnurl) {
16989
- globalConfig.cdnurl = config2.cdnurl;
16994
+ globalConfig.cdnurl = trimTrailingSlash(config2.cdnurl);
16990
16995
  }
16991
16996
  }
16992
16997
  function getConfig() {
16993
16998
  return { ...globalConfig };
16994
16999
  }
16995
17000
  function getDefaultConfig(overrideConfig = {}) {
16996
- const cdnurl = overrideConfig.cdnurl || globalConfig.cdnurl;
16997
- const isProduction = overrideConfig.isProduction || false;
17001
+ const cdnurl = trimTrailingSlash(overrideConfig.cdnurl || globalConfig.cdnurl);
16998
17002
  return {
16999
- sitePath: isProduction ? "https://djgs8mufg9606.cloudfront.net/" : `${cdnurl}/`,
17000
- // site path
17001
- // sitePath: "https://djgs8mufg9606.cloudfront.net/",
17002
- themePath: isProduction ? "https://djgs8mufg9606.cloudfront.net/config/" : `${cdnurl}/config/`,
17003
+ get sitePath() {
17004
+ return `${getCDNURL(cdnurl)}/`;
17005
+ },
17006
+ get themePath() {
17007
+ return `${getCDNURL(cdnurl)}/config/`;
17008
+ },
17003
17009
  siteLogo: "site/logo",
17004
17010
  timeOut: 3e4,
17005
- loginText: "Session expired, please log in again.",
17006
17011
  getFeeType: "",
17007
17012
  noticeRefresh: 15 * 1e3,
17008
17013
  // refresh notice Refresh
17009
- siteLogo: "site/logo",
17010
- testSite: "rinkeby.powx.io",
17011
17014
  baseLanguage: "en_US",
17012
- mainNetWorkArr: [1, 3, 4, 5, 42],
17013
17015
  cmsAcademyMediaShow: true,
17014
17016
  notNeedLoginRoute: ["home", "trade", "market-home", "trade-home"],
17015
- // 静态资源URL配置 - 对于库项目,建议使用者提供这些资源的CDN地址
17016
- assets: {
17017
- // DAPP 相关
17018
- dappH5Bg: "",
17019
- dappPcBg: "",
17020
- defaultSiteIcon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIxMCIgZmlsbD0iI0NDQyIvPgo8L3N2Zz4=",
17021
- // 通用图标
17022
- walletconnect: "",
17023
- empty: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHRleHQgeD0iMTAwIiB5PSIxMDAiIGZvbnQtc2l6ZT0iMTYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM5OTk+5a6M5oiY5LqM5Y+W6K+G5Y+wPC90ZXh0Pgo8L3N2Zz4=",
17024
- notice: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8Y2lyY2xlIGN4PSIxMCIgY3k9IjEwIiByPSIxMCIgZmlsbD0iIzY2YyIvPgo8L3N2Zz4="
17025
- // 可以添加更多资源配置
17026
- },
17027
17017
  ...overrideConfig
17028
17018
  };
17029
17019
  }
@@ -204049,14 +204039,6 @@ const cmsDirectives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
204049
204039
  theme
204050
204040
  }, Symbol.toStringTag, { value: "Module" }));
204051
204041
  const Home = [
204052
- // {
204053
- // path: "/component",
204054
- // name: "baseComponent",
204055
- // component: () => import("../views/_component.vue"),
204056
- // meta: {
204057
- // notLogin: true,
204058
- // },
204059
- // },
204060
204042
  {
204061
204043
  path: "/cms/terms",
204062
204044
  name: "terms",
@@ -204065,14 +204047,6 @@ const Home = [
204065
204047
  notLogin: true
204066
204048
  }
204067
204049
  },
204068
- // {
204069
- // path: "/cms/announcement/:type?",
204070
- // name: "announcement",
204071
- // component: () => import("../views/customService/announcement.vue"),
204072
- // meta: {
204073
- // notLogin: true,
204074
- // },
204075
- // },
204076
204050
  {
204077
204051
  path: "/cms/vote",
204078
204052
  name: "vote",
@@ -204137,6 +204111,7 @@ const Home = [
204137
204111
  },
204138
204112
  {
204139
204113
  path: "/cms/academy",
204114
+ name: "cms-academy",
204140
204115
  redirect: "/academy"
204141
204116
  },
204142
204117
  {
@@ -204174,18 +204149,12 @@ const Home = [
204174
204149
  },
204175
204150
  {
204176
204151
  path: "/cms/dapps",
204152
+ name: "cms-dapps",
204177
204153
  redirect: "/dapps"
204178
204154
  },
204179
- // {
204180
- // path: "/cms/about",
204181
- // name: "about",
204182
- // component: () => import("../views/customService/about.vue"),
204183
- // meta: {
204184
- // notLogin: true,
204185
- // },
204186
- // },
204187
204155
  {
204188
204156
  path: "/cms/about",
204157
+ name: "cms-about",
204189
204158
  redirect: "/about"
204190
204159
  },
204191
204160
  {
@@ -204226,11 +204195,6 @@ const Home = [
204226
204195
  }
204227
204196
  ]
204228
204197
  },
204229
- // {
204230
- // path: "/help/:categoryCode/articles/:code",
204231
- // name: "helpDetail",
204232
- // component: () => import("../views/customService/help/helpDetail.vue"),
204233
- // },
204234
204198
  {
204235
204199
  path: "/wiki",
204236
204200
  name: "wiki",
@@ -10,8 +10,8 @@ declare const _default: ({
10
10
  children?: undefined;
11
11
  } | {
12
12
  path: string;
13
+ name: string;
13
14
  redirect: string;
14
- name?: undefined;
15
15
  component?: undefined;
16
16
  meta?: undefined;
17
17
  beforeEnter?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "udxcms",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "cms submodule",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",