@freelog/tools-lib 0.1.147 → 0.1.148

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.
@@ -2815,6 +2815,19 @@ function promiseSleep(ms) {
2815
2815
  }, ms);
2816
2816
  });
2817
2817
  }
2818
+ /**
2819
+ * 获取用户头像URL
2820
+ * @param userID
2821
+ */
2822
+
2823
+ function getAvatarUrl(userID) {
2824
+ if (userID === void 0) {
2825
+ userID = 0;
2826
+ }
2827
+
2828
+ // return `${completeUrlByDomain('image')}/headImage/${userID || getUserIDByCookies()}?t=${Date.now()}`;
2829
+ return "https://image.freelog.com/headImage/" + (userID || getUserIDByCookies()) + "?t=" + Date.now();
2830
+ }
2818
2831
 
2819
2832
  var Tool = {
2820
2833
  __proto__: null,
@@ -2822,7 +2835,8 @@ var Tool = {
2822
2835
  generateRandomCode: generateRandomCode,
2823
2836
  getUserIDByCookies: getUserIDByCookies,
2824
2837
  transformServerAPIContractState: transformServerAPIContractState,
2825
- promiseSleep: promiseSleep
2838
+ promiseSleep: promiseSleep,
2839
+ getAvatarUrl: getAvatarUrl
2826
2840
  };
2827
2841
 
2828
2842
  function getFilesSha1Info(_x, _x2) {
@@ -3253,7 +3267,7 @@ var I18nNext = /*#__PURE__*/function () {
3253
3267
  }();
3254
3268
 
3255
3269
  _proto.t = function t(key, options) {
3256
- return i18next.t(key, options);
3270
+ return i18next.t(key.trim(), options);
3257
3271
  };
3258
3272
 
3259
3273
  _proto.changeLanguage = function changeLanguage(lng) {