Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
f9ad49cf
U
uni-app
项目概览
DCloud
/
uni-app
27 天 前同步成功
通知
702
Star
38704
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,发现更多精彩内容 >>
提交
f9ad49cf
编写于
8月 20, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build uni-app-plus-nvue
上级
e5f05663
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
158 addition
and
152 deletion
+158
-152
packages/uni-app-plus-nvue/dist/index.js
packages/uni-app-plus-nvue/dist/index.js
+158
-152
未找到文件。
packages/uni-app-plus-nvue/dist/index.js
浏览文件 @
f9ad49cf
...
...
@@ -26,6 +26,81 @@ var serviceContext = (function () {
return
callHook
(
vm
,
hook
,
params
)
}
function
createCommonjsModule
(
fn
,
module
)
{
return
module
=
{
exports
:
{}
},
fn
(
module
,
module
.
exports
),
module
.
exports
;
}
var
base64Arraybuffer
=
createCommonjsModule
(
function
(
module
,
exports
)
{
/*
* base64-arraybuffer
* https://github.com/niklasvh/base64-arraybuffer
*
* Copyright (c) 2012 Niklas von Hertzen
* Licensed under the MIT license.
*/
(
function
(){
var
chars
=
"
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
"
;
// Use a lookup table to find the index.
var
lookup
=
new
Uint8Array
(
256
);
for
(
var
i
=
0
;
i
<
chars
.
length
;
i
++
)
{
lookup
[
chars
.
charCodeAt
(
i
)]
=
i
;
}
exports
.
encode
=
function
(
arraybuffer
)
{
var
bytes
=
new
Uint8Array
(
arraybuffer
),
i
,
len
=
bytes
.
length
,
base64
=
""
;
for
(
i
=
0
;
i
<
len
;
i
+=
3
)
{
base64
+=
chars
[
bytes
[
i
]
>>
2
];
base64
+=
chars
[((
bytes
[
i
]
&
3
)
<<
4
)
|
(
bytes
[
i
+
1
]
>>
4
)];
base64
+=
chars
[((
bytes
[
i
+
1
]
&
15
)
<<
2
)
|
(
bytes
[
i
+
2
]
>>
6
)];
base64
+=
chars
[
bytes
[
i
+
2
]
&
63
];
}
if
((
len
%
3
)
===
2
)
{
base64
=
base64
.
substring
(
0
,
base64
.
length
-
1
)
+
"
=
"
;
}
else
if
(
len
%
3
===
1
)
{
base64
=
base64
.
substring
(
0
,
base64
.
length
-
2
)
+
"
==
"
;
}
return
base64
;
};
exports
.
decode
=
function
(
base64
)
{
var
bufferLength
=
base64
.
length
*
0.75
,
len
=
base64
.
length
,
i
,
p
=
0
,
encoded1
,
encoded2
,
encoded3
,
encoded4
;
if
(
base64
[
base64
.
length
-
1
]
===
"
=
"
)
{
bufferLength
--
;
if
(
base64
[
base64
.
length
-
2
]
===
"
=
"
)
{
bufferLength
--
;
}
}
var
arraybuffer
=
new
ArrayBuffer
(
bufferLength
),
bytes
=
new
Uint8Array
(
arraybuffer
);
for
(
i
=
0
;
i
<
len
;
i
+=
4
)
{
encoded1
=
lookup
[
base64
.
charCodeAt
(
i
)];
encoded2
=
lookup
[
base64
.
charCodeAt
(
i
+
1
)];
encoded3
=
lookup
[
base64
.
charCodeAt
(
i
+
2
)];
encoded4
=
lookup
[
base64
.
charCodeAt
(
i
+
3
)];
bytes
[
p
++
]
=
(
encoded1
<<
2
)
|
(
encoded2
>>
4
);
bytes
[
p
++
]
=
((
encoded2
&
15
)
<<
4
)
|
(
encoded3
>>
2
);
bytes
[
p
++
]
=
((
encoded3
&
3
)
<<
6
)
|
(
encoded4
&
63
);
}
return
arraybuffer
;
};
})();
});
var
base64Arraybuffer_1
=
base64Arraybuffer
.
encode
;
var
base64Arraybuffer_2
=
base64Arraybuffer
.
decode
;
function
pack
(
args
)
{
return
args
}
...
...
@@ -96,6 +171,10 @@ var serviceContext = (function () {
return
false
}
function
base64ToArrayBuffer
(
data
)
{
return
base64Arraybuffer_2
(
data
)
}
function
callApiSync
(
api
,
args
,
name
,
alias
)
{
const
ret
=
api
(
args
);
if
(
ret
&&
ret
.
errMsg
)
{
...
...
@@ -1896,7 +1975,7 @@ var serviceContext = (function () {
}
}
const
base64ToArrayBuffer
=
[{
const
base64ToArrayBuffer
$1
=
[{
name
:
'
base64
'
,
type
:
String
,
required
:
true
...
...
@@ -1909,7 +1988,7 @@ var serviceContext = (function () {
}];
var
require_context_module_0_0
=
/*#__PURE__*/
Object
.
freeze
({
base64ToArrayBuffer
:
base64ToArrayBuffer
,
base64ToArrayBuffer
:
base64ToArrayBuffer
$1
,
arrayBufferToBase64
:
arrayBufferToBase64
});
...
...
@@ -2456,11 +2535,11 @@ var serviceContext = (function () {
CONNECT
:
'
CONNECT
'
};
const
dataType
=
{
JSON
:
'
JSON
'
JSON
:
'
json
'
};
const
responseType
=
{
TEXT
:
'
TEXT
'
,
ARRAYBUFFER
:
'
ARRAYBUFFER
'
TEXT
:
'
text
'
,
ARRAYBUFFER
:
'
arraybuffer
'
};
const
encode
=
encodeURIComponent
;
...
...
@@ -2526,13 +2605,13 @@ var serviceContext = (function () {
dataType
:
{
type
:
String
,
validator
(
value
,
params
)
{
params
.
dataType
=
(
value
||
dataType
.
JSON
).
to
Upp
erCase
();
params
.
dataType
=
(
value
||
dataType
.
JSON
).
to
Low
erCase
();
}
},
responseType
:
{
type
:
String
,
validator
(
value
,
params
)
{
value
=
(
value
||
''
).
to
Upp
erCase
();
value
=
(
value
||
''
).
to
Low
erCase
();
params
.
responseType
=
Object
.
values
(
responseType
).
indexOf
(
value
)
<
0
?
responseType
.
TEXT
:
value
;
}
}
...
...
@@ -3585,82 +3664,7 @@ var serviceContext = (function () {
}
}
function
createCommonjsModule
(
fn
,
module
)
{
return
module
=
{
exports
:
{}
},
fn
(
module
,
module
.
exports
),
module
.
exports
;
}
var
base64Arraybuffer
=
createCommonjsModule
(
function
(
module
,
exports
)
{
/*
* base64-arraybuffer
* https://github.com/niklasvh/base64-arraybuffer
*
* Copyright (c) 2012 Niklas von Hertzen
* Licensed under the MIT license.
*/
(
function
(){
var
chars
=
"
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
"
;
// Use a lookup table to find the index.
var
lookup
=
new
Uint8Array
(
256
);
for
(
var
i
=
0
;
i
<
chars
.
length
;
i
++
)
{
lookup
[
chars
.
charCodeAt
(
i
)]
=
i
;
}
exports
.
encode
=
function
(
arraybuffer
)
{
var
bytes
=
new
Uint8Array
(
arraybuffer
),
i
,
len
=
bytes
.
length
,
base64
=
""
;
for
(
i
=
0
;
i
<
len
;
i
+=
3
)
{
base64
+=
chars
[
bytes
[
i
]
>>
2
];
base64
+=
chars
[((
bytes
[
i
]
&
3
)
<<
4
)
|
(
bytes
[
i
+
1
]
>>
4
)];
base64
+=
chars
[((
bytes
[
i
+
1
]
&
15
)
<<
2
)
|
(
bytes
[
i
+
2
]
>>
6
)];
base64
+=
chars
[
bytes
[
i
+
2
]
&
63
];
}
if
((
len
%
3
)
===
2
)
{
base64
=
base64
.
substring
(
0
,
base64
.
length
-
1
)
+
"
=
"
;
}
else
if
(
len
%
3
===
1
)
{
base64
=
base64
.
substring
(
0
,
base64
.
length
-
2
)
+
"
==
"
;
}
return
base64
;
};
exports
.
decode
=
function
(
base64
)
{
var
bufferLength
=
base64
.
length
*
0.75
,
len
=
base64
.
length
,
i
,
p
=
0
,
encoded1
,
encoded2
,
encoded3
,
encoded4
;
if
(
base64
[
base64
.
length
-
1
]
===
"
=
"
)
{
bufferLength
--
;
if
(
base64
[
base64
.
length
-
2
]
===
"
=
"
)
{
bufferLength
--
;
}
}
var
arraybuffer
=
new
ArrayBuffer
(
bufferLength
),
bytes
=
new
Uint8Array
(
arraybuffer
);
for
(
i
=
0
;
i
<
len
;
i
+=
4
)
{
encoded1
=
lookup
[
base64
.
charCodeAt
(
i
)];
encoded2
=
lookup
[
base64
.
charCodeAt
(
i
+
1
)];
encoded3
=
lookup
[
base64
.
charCodeAt
(
i
+
2
)];
encoded4
=
lookup
[
base64
.
charCodeAt
(
i
+
3
)];
bytes
[
p
++
]
=
(
encoded1
<<
2
)
|
(
encoded2
>>
4
);
bytes
[
p
++
]
=
((
encoded2
&
15
)
<<
4
)
|
(
encoded3
>>
2
);
bytes
[
p
++
]
=
((
encoded3
&
3
)
<<
6
)
|
(
encoded4
&
63
);
}
return
arraybuffer
;
};
})();
});
var
base64Arraybuffer_1
=
base64Arraybuffer
.
encode
;
var
base64Arraybuffer_2
=
base64Arraybuffer
.
decode
;
function
base64ToArrayBuffer$1
(
str
)
{
function
base64ToArrayBuffer$2
(
str
)
{
return
base64Arraybuffer_2
(
str
)
}
...
...
@@ -3669,7 +3673,7 @@ var serviceContext = (function () {
}
var
require_context_module_1_0
=
/*#__PURE__*/
Object
.
freeze
({
base64ToArrayBuffer
:
base64ToArrayBuffer$
1
,
base64ToArrayBuffer
:
base64ToArrayBuffer$
2
,
arrayBufferToBase64
:
arrayBufferToBase64$1
});
...
...
@@ -5875,7 +5879,8 @@ var serviceContext = (function () {
url
,
data
,
header
,
method
=
'
GET
'
method
=
'
GET
'
,
responseType
}
=
{})
{
const
stream
=
requireNativePlugin
(
'
stream
'
);
const
headers
=
{};
...
...
@@ -5913,7 +5918,7 @@ var serviceContext = (function () {
url
:
url
.
trim
(),
// weex 官方文档有误,headers 类型实际 object,用 string 类型会无响应
headers
,
type
:
'
text
'
,
type
:
responseType
===
'
arraybuffer
'
?
'
base64
'
:
'
text
'
,
// weex 官方文档未说明实际支持 timeout,单位:ms
timeout
:
timeout
||
6
e5
};
...
...
@@ -5922,6 +5927,7 @@ var serviceContext = (function () {
}
try
{
stream
.
fetch
(
options
,
({
ok
,
status
,
data
,
headers
...
...
@@ -5937,7 +5943,7 @@ var serviceContext = (function () {
publishStateChange$1
({
requestTaskId
,
state
:
'
success
'
,
data
,
data
:
ok
&&
responseType
===
'
arraybuffer
'
?
base64ToArrayBuffer
(
data
)
:
data
,
statusCode
,
header
:
headers
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录