提交 f115e148 编写于 作者: Q qiang

chore: build

上级 f52b7959
......@@ -13374,11 +13374,15 @@ function weexGetSystemInfoSync() {
}
const getDeviceInfo = defineSyncApi('getDeviceInfo', () => {
weexGetSystemInfoSync();
const { deviceBrand, deviceModel, osName, osVersion } = systemInfo;
const { deviceBrand, deviceModel, osName, osVersion, deviceOrientation, deviceType, } = systemInfo;
const brand = deviceBrand.toLowerCase();
return {
deviceBrand: brand,
deviceModel,
devicePixelRatio: plus.screen.scale,
deviceId: deviceId$1(),
deviceOrientation,
deviceType,
brand,
model: deviceModel,
system: `${osName === 'ios' ? 'iOS' : 'Android'} ${osVersion}`,
......@@ -13417,15 +13421,12 @@ const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
const appBaseInfo = getAppBaseInfo();
_initSystemInfo = true;
const { osName, osLanguage, osVersion } = systemInfo;
const { pixelRatio } = windowInfo;
const osLanguageSplit = osLanguage.split('-');
const osLanguageSplitLast = osLanguageSplit[osLanguageSplit.length - 1];
let _osLanguage = `${osLanguageSplit[0]}${osLanguageSplitLast ? '-' + osLanguageSplitLast : ''}`;
let extraData = {
errMsg: 'getSystemInfo:ok',
fontSizeSetting: appBaseInfo.hostFontSizeSetting,
devicePixelRatio: pixelRatio,
deviceId: deviceId$1(),
uniCompileVersion: __uniConfig.compilerVersion,
uniRuntimeVersion: __uniConfig.compilerVersion,
osLanguage: _osLanguage,
......@@ -13434,7 +13435,7 @@ const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
extraData.romName = osName;
extraData.romVersion = osVersion;
}
const _systemInfo = extend(windowInfo, systemInfo, deviceInfo, appBaseInfo, extraData);
const _systemInfo = extend(systemInfo, windowInfo, deviceInfo, appBaseInfo, extraData);
delete _systemInfo.screenTop;
delete _systemInfo.enableDebug;
delete _systemInfo.theme;
......
......@@ -71,6 +71,9 @@ function initUniCloudEnv() {
}
spaces.forEach((s) => uniCloudSpaces.push(s));
process.env.UNI_CLOUD_PROVIDER = JSON.stringify(uniCloudSpaces.map((space) => {
if (space.provider === 'tcb') {
space.provider = 'tencent';
}
if (space.clientSecret) {
return {
provider: space.provider || 'aliyun',
......
......@@ -10021,6 +10021,20 @@ const getStorageInfoSync = /* @__PURE__ */ defineSyncApi("getStorageInfoSync", (
const getStorageInfo = /* @__PURE__ */ defineAsyncApi("getStorageInfo", (_, { resolve }) => {
resolve(getStorageInfoSync());
});
const UUID_KEY = "__DC_STAT_UUID";
const storage = window.localStorage || window.sessionStorage || {};
let deviceId;
function deviceId$1() {
deviceId = deviceId || storage[UUID_KEY];
if (!deviceId) {
deviceId = Date.now() + "" + Math.floor(Math.random() * 1e7);
try {
storage[UUID_KEY] = deviceId;
} catch (error) {
}
}
return deviceId;
}
let browserInfo;
function initBrowserInfo() {
{
......@@ -10029,10 +10043,23 @@ function initBrowserInfo() {
}
const getDeviceInfo = /* @__PURE__ */ defineSyncApi("getDeviceInfo", () => {
initBrowserInfo();
const { deviceBrand, deviceModel, brand, model, platform, system } = browserInfo;
const {
deviceBrand,
deviceModel,
brand,
model,
platform,
system,
deviceOrientation,
deviceType
} = browserInfo;
return {
deviceBrand,
deviceModel,
devicePixelRatio: window.devicePixelRatio,
deviceId: deviceId$1(),
deviceOrientation,
deviceType,
brand,
model,
system,
......
......@@ -16417,7 +16417,7 @@ function getBrowserInfo() {
osversion += ` x${framework[1]}`;
}
} else if (isMac) {
osname = "Mac";
osname = "macOS";
const _osversion = osversionFind && osversionFind.match(/Mac OS X (.+)/) || "";
if (osversion) {
osversion = _osversion[1].replace(/_/g, ".");
......@@ -16532,10 +16532,23 @@ function initBrowserInfo() {
}
const getDeviceInfo = /* @__PURE__ */ defineSyncApi("getDeviceInfo", () => {
initBrowserInfo();
const { deviceBrand, deviceModel, brand, model, platform, system } = browserInfo;
const {
deviceBrand,
deviceModel,
brand,
model,
platform,
system,
deviceOrientation,
deviceType
} = browserInfo;
return {
deviceBrand,
deviceModel,
devicePixelRatio: window.devicePixelRatio,
deviceId: deviceId$1(),
deviceOrientation,
deviceType,
brand,
model,
system,
......@@ -16573,24 +16586,11 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const deviceInfo = getDeviceInfo();
const appBaseInfo = getAppBaseInfo();
_initBrowserInfo = true;
const {
ua: ua2,
deviceType,
browserName,
browseVersion,
osname,
osversion,
deviceOrientation
} = browserInfo;
const { pixelRatio: pixelRatio2 } = windowInfo;
const { ua: ua2, browserName, browseVersion, osname, osversion } = browserInfo;
const systemInfo = extend(windowInfo, deviceInfo, appBaseInfo, {
ua: ua2,
deviceType,
browserName,
browseVersion,
deviceId: deviceId$1(),
devicePixelRatio: pixelRatio2,
deviceOrientation,
uniPlatform: "web",
uniCompileVersion: __uniConfig.compilerVersion,
uniRuntimeVersion: __uniConfig.compilerVersion,
......
......@@ -961,7 +961,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
......@@ -954,7 +954,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
......@@ -960,7 +960,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
......@@ -948,7 +948,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
......@@ -958,7 +958,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
......@@ -948,7 +948,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
......@@ -929,7 +929,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
......@@ -116,6 +116,7 @@ const customElements = [
'page-meta',
'navigation-bar',
'match-media',
'ad-custom',
];
const compilerOptions = {
nodeTransforms: [uniCliShared.transformRef, uniCliShared.transformComponentLink, transformAd],
......
......@@ -957,7 +957,7 @@ function populateParameters(fromRes, toRes) {
osVersion,
hostTheme: theme,
hostVersion,
hostLanguage: language.split('_', '-'),
hostLanguage: language.replace('_', '-'),
hostName: _hostName,
hostSDKVersion: _SDKVersion,
hostFontSizeSetting: fontSizeSetting,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册