@dcloudio/uni-mp-toutiao 3.0.0-alpha-3041320220527004 → 3.0.0-alpha-3041320220531001

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.
@@ -1,5 +1,6 @@
1
1
  import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
2
2
  import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
3
+ import { normalizeLocale, LOCALE_EN } from '@dcloudio/uni-i18n';
3
4
 
4
5
  const eventChannels = {};
5
6
  const eventChannelStack = [];
@@ -774,7 +775,7 @@ const getLocale = () => {
774
775
  if (app && app.$vm) {
775
776
  return app.$vm.$locale;
776
777
  }
777
- return tt.getSystemInfoSync().language || 'zh-Hans';
778
+ return normalizeLocale(tt.getSystemInfoSync().language) || LOCALE_EN;
778
779
  };
779
780
  const setLocale = (locale) => {
780
781
  const app = getApp();
@@ -902,7 +903,8 @@ function populateParameters(fromRes, toRes) {
902
903
  // deviceModel
903
904
  let deviceBrand = getDeviceBrand(brand, model, isQuickApp);
904
905
  // hostName
905
- let _hostName = hostName || "mp-toutiao".split('-')[1]; // mp-jd
906
+ const _platform = "mp-toutiao".split('-')[1];
907
+ let _hostName = hostName || _platform; // mp-jd
906
908
  {
907
909
  _hostName = fromRes.appName;
908
910
  }
@@ -1,6 +1,7 @@
1
1
  import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
2
2
  import { isArray, hasOwn, isFunction, extend, isPlainObject, isObject } from '@vue/shared';
3
3
  import { ref, nextTick, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
4
+ import { normalizeLocale, LOCALE_EN } from '@dcloudio/uni-i18n';
4
5
 
5
6
  const eventChannels = {};
6
7
  const eventChannelStack = [];
@@ -281,7 +282,7 @@ function initAppLifecycle(appOptions, vm) {
281
282
  }
282
283
  }
283
284
  function initLocale(appVm) {
284
- const locale = ref(tt.getSystemInfoSync().language || 'zh-Hans');
285
+ const locale = ref(normalizeLocale(tt.getSystemInfoSync().language) || LOCALE_EN);
285
286
  Object.defineProperty(appVm, '$locale', {
286
287
  get() {
287
288
  return locale.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-mp-toutiao",
3
- "version": "3.0.0-alpha-3041320220527004",
3
+ "version": "3.0.0-alpha-3041320220531001",
4
4
  "description": "uni-app mp-toutiao",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
24
24
  "dependencies": {
25
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3041320220527004",
26
- "@dcloudio/uni-mp-compiler": "3.0.0-alpha-3041320220527004",
27
- "@dcloudio/uni-mp-vite": "3.0.0-alpha-3041320220527004",
28
- "@dcloudio/uni-mp-vue": "3.0.0-alpha-3041320220527004",
29
- "@dcloudio/uni-shared": "3.0.0-alpha-3041320220527004",
25
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3041320220531001",
26
+ "@dcloudio/uni-mp-compiler": "3.0.0-alpha-3041320220531001",
27
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-3041320220531001",
28
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-3041320220531001",
29
+ "@dcloudio/uni-shared": "3.0.0-alpha-3041320220531001",
30
30
  "@vue/shared": "3.2.33",
31
31
  "@vue/compiler-core": "3.2.33"
32
32
  }