提交 b36870f2 编写于 作者: Q qiang

chore: build

上级 8d410008
......@@ -14108,6 +14108,14 @@ const getAppAuthorizeSetting = defineSyncApi(API_GET_APP_AUTHORIZE_SETTING, () =
appAuthorizeSetting = JSON.parse(appAuthorizeSetting);
}
catch (error) { }
for (const key in appAuthorizeSetting) {
if (Object.hasOwnProperty.call(appAuthorizeSetting, key)) {
const value = appAuthorizeSetting[key];
// @ts-ignore
if (value === 'undefined')
appAuthorizeSetting[key] = undefined;
}
}
return appAuthorizeSetting;
});
......
......@@ -9,7 +9,6 @@ const shared_1 = require("@vue/shared");
const uni_shared_1 = require("@dcloudio/uni-shared");
const uni_cli_shared_1 = require("@dcloudio/uni-cli-shared");
const validateFunction_1 = require("./validateFunction");
process.env.UNI_CLOUD_PROVIDER = JSON.stringify([]);
const uniCloudSpaces = [];
const initUniCloudEnvOnce = (0, uni_shared_1.once)(initUniCloudEnv);
initUniCloudEnvOnce();
......@@ -94,6 +93,17 @@ function checkUniModules() {
}
function initUniCloudEnv() {
checkUniModules();
if (process.env.UNI_CLOUD_PROVIDER) {
const spaces = JSON.parse(process.env.UNI_CLOUD_PROVIDER);
if (!(0, shared_1.isArray)(spaces)) {
return;
}
if (spaces.length) {
uniCloudSpaces.push(...spaces);
return;
}
}
process.env.UNI_CLOUD_PROVIDER = JSON.stringify([]);
if (!process.env.UNI_CLOUD_SPACES) {
return;
}
......
......@@ -1226,6 +1226,9 @@ const navigateBackMiniProgram = {
const showShareMenu = {
name: 'openShare',
};
const login = {
name: 'getLoginCode',
};
const getAccountInfoSync = {
name: 'getEnvInfoSync',
returnValue(fromRes, toRes) {
......@@ -1249,6 +1252,7 @@ var protocols = /*#__PURE__*/Object.freeze({
navigateToMiniProgram: navigateToMiniProgram,
navigateBackMiniProgram: navigateBackMiniProgram,
showShareMenu: showShareMenu,
login: login,
getAccountInfoSync: getAccountInfoSync,
redirectTo: redirectTo,
navigateTo: navigateTo,
......
......@@ -1162,6 +1162,19 @@ const getWindowInfo = {
},
};
const getAppAuthorizeSetting = {
returnValue: function (fromRes, toRes) {
const { locationReducedAccuracy } = fromRes;
toRes.locationAccuracy = 'unsupported';
if (locationReducedAccuracy === true) {
toRes.locationAccuracy = 'reduced';
}
else if (locationReducedAccuracy === false) {
toRes.locationAccuracy = 'full';
}
},
};
const mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
const getProvider = initGetProvider({
......@@ -1206,7 +1219,8 @@ var protocols = /*#__PURE__*/Object.freeze({
showActionSheet: showActionSheet,
getDeviceInfo: getDeviceInfo,
getAppBaseInfo: getAppBaseInfo,
getWindowInfo: getWindowInfo
getWindowInfo: getWindowInfo,
getAppAuthorizeSetting: getAppAuthorizeSetting
});
var index = initUni(shims, protocols);
......
......@@ -446,10 +446,10 @@ const uni_cloud_config = () => {
const get_space = (config) => {
const uniCloudConfig = uni_cloud_config();
const { spaceId, provider, clientSecret } = uniCloudConfig;
const space_type = ['tcb', 'aliyun'];
const space_type = ['tcb', 'tencent', 'aliyun'];
const is_provider = space_type.indexOf(provider) !== -1;
const is_aliyun = provider === 'aliyun' && spaceId && clientSecret;
const is_tcb = provider === 'tcb' && spaceId;
const is_tcb = (provider === 'tcb' || provider === 'tencent') && spaceId;
if (is_provider && (is_aliyun || is_tcb)) {
return uniCloudConfig
......
......@@ -444,10 +444,10 @@ const uni_cloud_config = () => {
const get_space = (config) => {
const uniCloudConfig = uni_cloud_config();
const { spaceId, provider, clientSecret } = uniCloudConfig;
const space_type = ['tcb', 'aliyun'];
const space_type = ['tcb', 'tencent', 'aliyun'];
const is_provider = space_type.indexOf(provider) !== -1;
const is_aliyun = provider === 'aliyun' && spaceId && clientSecret;
const is_tcb = provider === 'tcb' && spaceId;
const is_tcb = (provider === 'tcb' || provider === 'tencent') && spaceId;
if (is_provider && (is_aliyun || is_tcb)) {
return uniCloudConfig
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册