Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
e61d3e9d
U
uni-app
项目概览
DCloud
/
uni-app
4 个月 前同步成功
通知
726
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e61d3e9d
编写于
8月 06, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(app): androidPrivacy.json
上级
e34d4827
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
44 addition
and
37 deletion
+44
-37
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+29
-32
packages/uni-app-plus/lib/uni.config.js
packages/uni-app-plus/lib/uni.config.js
+1
-1
packages/uni-mp-weixin/lib/uni.config.js
packages/uni-mp-weixin/lib/uni.config.js
+1
-1
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
+11
-1
packages/vue-cli-plugin-uni/lib/mp/index.js
packages/vue-cli-plugin-uni/lib/mp/index.js
+1
-1
packages/webpack-uni-mp-loader/lib/plugin/index-new.js
packages/webpack-uni-mp-loader/lib/plugin/index-new.js
+1
-1
未找到文件。
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
e61d3e9d
...
...
@@ -13,7 +13,8 @@ var serviceContext = (function () {
'base64ToArrayBuffer',
'arrayBufferToBase64',
'addInterceptor',
'removeInterceptor'
'removeInterceptor',
'interceptors'
];
const network = [
...
...
@@ -693,7 +694,7 @@ var serviceContext = (function () {
}
if (res === false) {
return {
then () {}
then () {
}
}
}
}
...
...
@@ -773,10 +774,14 @@ var serviceContext = (function () {
if (!isPromise(res)) {
return res
}
return res.then(res => {
return res[1]
}).catch(res => {
return res[0]
return new Promise((resolve, reject) => {
res.then(res => {
if (res[0]) {
reject(res[0]);
} else {
resolve(res[1]);
}
});
})
}
};
...
...
@@ -1313,14 +1318,6 @@ var serviceContext = (function () {
this.watchers.splice(index, 1);
};
}
mergeLocaleMessage(locale, message) {
if (this.messages[locale]) {
Object.assign(this.messages[locale], message);
}
else {
this.messages[locale] = message;
}
}
t(key, locale, values) {
let message = this.message;
if (typeof locale === 'string') {
...
...
@@ -1403,9 +1400,6 @@ var serviceContext = (function () {
t(key, values) {
return t(key, values);
},
getLocale() {
return i18n.getLocale();
},
setLocale(newLocale) {
return i18n.setLocale(newLocale);
},
...
...
@@ -6806,11 +6800,11 @@ var serviceContext = (function () {
const errorCallback = warpPlusErrorCallback(callbackId, 'chooseVideo', 'cancel');
function successCallback (tempFilePath = '') {
const
dst
= `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(tempFilePath)}`;
const
filename
= `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(tempFilePath)}`;
const compressVideo = compressed ? new Promise((resolve) => {
plus.zip.compressVideo({
src: tempFilePath,
dst
filename
}, ({ tempFilePath }) => {
resolve(tempFilePath);
}, () => {
...
...
@@ -6908,11 +6902,11 @@ var serviceContext = (function () {
}
function compressVideo$1 (options, callbackId) {
const
dst
= `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(options.src)}`;
const
filename
= `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(options.src)}`;
const successCallback = warpPlusSuccessCallback(callbackId, 'compressVideo');
const errorCallback = warpPlusErrorCallback(callbackId, 'compressVideo');
plus.zip.compressVideo(Object.assign({}, options, {
dst
filename
}), successCallback, errorCallback);
}
...
...
@@ -7536,7 +7530,7 @@ var serviceContext = (function () {
}
if (files && files.length) {
files.forEach(file => {
uploader.addFile(getRealPath$1(file.uri), {
uploader.addFile(getRealPath$1(file.uri
|| file.filePath
), {
key: file.name || 'file'
});
});
...
...
@@ -20967,6 +20961,9 @@ var serviceContext = (function () {
}
const evalJSCode =
`typeof UniViewJSBridge !== 'undefined' && UniViewJSBridge.subscribeHandler("${eventType}",${args},__PAGE_ID__)`;
if (process.env.NODE_ENV !== 'production') {
console.log(`UNIAPP[publishHandler]:[${+new Date()}]`, 'length', evalJSCode.length);
}
pageIds.forEach(id => {
const webview = plus.webview.getWebviewById(String(id));
webview && webview.evalJS(evalJSCode.replace('__PAGE_ID__', id));
...
...
packages/uni-app-plus/lib/uni.config.js
浏览文件 @
e61d3e9d
...
...
@@ -27,7 +27,7 @@ module.exports = {
subPackages
:
true
},
copyWebpackOptions
(
platformOptions
,
vueOptions
)
{
const
copyOptions
=
[]
const
copyOptions
=
[
'
androidPrivacy.json
'
]
const
componentsCopyOption
=
getComponentsCopyOption
()
if
(
componentsCopyOption
)
{
copyOptions
.
push
(
componentsCopyOption
)
...
...
packages/uni-mp-weixin/lib/uni.config.js
浏览文件 @
e61d3e9d
...
...
@@ -29,7 +29,7 @@ module.exports = {
'
ext.json
'
,
'
custom-tab-bar
'
,
'
plugin.json
'
,
'
functional-pages
'
,
'
functional-pages
'
]
const
workers
=
platformOptions
.
workers
workers
&&
copyOptions
.
push
(
workers
)
...
...
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
浏览文件 @
e61d3e9d
...
...
@@ -209,6 +209,15 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
from
:
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
static
'
),
to
:
'
static
'
}]
const
androidPrivacyPath
=
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
androidPrivacy.json
'
)
if
(
fs
.
existsSync
(
androidPrivacyPath
))
{
array
.
push
({
from
:
androidPrivacyPath
,
to
:
'
androidPrivacy.json
'
})
}
const
hybridHtmlPath
=
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
hybrid/html
'
)
if
(
fs
.
existsSync
(
hybridHtmlPath
))
{
array
.
push
({
...
...
@@ -216,6 +225,7 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
to
:
'
hybrid/html
'
})
}
if
(
process
.
env
.
UNI_USING_NVUE_COMPILER
)
{
array
.
push
({
from
:
path
.
resolve
(
getTemplatePath
(),
'
common
'
),
...
...
packages/vue-cli-plugin-uni/lib/mp/index.js
浏览文件 @
e61d3e9d
...
...
@@ -172,7 +172,7 @@ module.exports = {
if
(
process
.
env
.
UNI_MP_PLUGIN
)
{
// 小程序插件入口使用
// packages\webpack-uni-mp-loader\lib\plugin\index-new.js -> addMPPluginRequire
beforeCode
+=
`wx.__webpack_require_
${
process
.
env
.
UNI_MP_PLUGIN
.
replace
(
/-/g
,
'
_
'
)}
__ = __webpack_require__;`
beforeCode
+=
`wx.__webpack_require_
${
process
.
env
.
UNI_MP_PLUGIN
.
replace
(
/-/g
,
'
_
'
)}
__ = __webpack_require__;`
const
UNI_MP_PLUGIN_MAIN
=
process
.
env
.
UNI_MP_PLUGIN_MAIN
if
(
UNI_MP_PLUGIN_MAIN
)
{
...
...
packages/webpack-uni-mp-loader/lib/plugin/index-new.js
浏览文件 @
e61d3e9d
...
...
@@ -80,7 +80,7 @@ function addMPPluginRequire (compilation) {
const
newlineIndex
=
compilation
.
assets
[
name
].
source
().
lastIndexOf
(
'
\n
'
)
const
source
=
compilation
.
assets
[
name
].
source
().
substring
(
0
,
newlineIndex
)
+
`\nmodule.exports = wx.__webpack_require_
${
process
.
env
.
UNI_MP_PLUGIN
.
replace
(
/-/g
,
'
_
'
)}
__('
${
uniModuleId
}
');\n`
+
`\nmodule.exports = wx.__webpack_require_
${
process
.
env
.
UNI_MP_PLUGIN
.
replace
(
/-/g
,
'
_
'
)}
__('
${
uniModuleId
}
');\n`
+
compilation
.
assets
[
name
].
source
().
substring
(
newlineIndex
+
1
)
compilation
.
assets
[
name
]
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录