提交 f115e148 编写于 作者: Q qiang

chore: build

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