Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
20岁爱吃必胜客
uni-app
提交
f9ad49cf
U
uni-app
项目概览
20岁爱吃必胜客
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
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
}
...
...
@@ -69,8 +144,8 @@ var serviceContext = (function () {
lastStatusBarStyle
=
statusBarStyle
;
plus
.
navigator
.
setStatusBarStyle
(
statusBarStyle
);
}
}
function
isTabBarPage
(
path
=
''
)
{
if
(
!
(
__uniConfig
.
tabBar
&&
Array
.
isArray
(
__uniConfig
.
tabBar
.
list
)))
{
return
false
...
...
@@ -94,6 +169,10 @@ var serviceContext = (function () {
}
}
return
false
}
function
base64ToArrayBuffer
(
data
)
{
return
base64Arraybuffer_2
(
data
)
}
function
callApiSync
(
api
,
args
,
name
,
alias
)
{
...
...
@@ -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
});
...
...
@@ -5863,26 +5867,27 @@ var serviceContext = (function () {
return
createDownloadTaskById
(
++
downloadTaskId
,
args
)
}
let
requestTaskId
=
0
;
const
requestTasks
=
{};
const
publishStateChange$1
=
res
=>
{
publish
(
'
onRequestTaskStateChange
'
,
res
);
delete
requestTasks
[
requestTaskId
];
};
function
createRequestTaskById
(
requestTaskId
,
{
url
,
data
,
header
,
method
=
'
GET
'
let
requestTaskId
=
0
;
const
requestTasks
=
{};
const
publishStateChange$1
=
res
=>
{
publish
(
'
onRequestTaskStateChange
'
,
res
);
delete
requestTasks
[
requestTaskId
];
};
function
createRequestTaskById
(
requestTaskId
,
{
url
,
data
,
header
,
method
=
'
GET
'
,
responseType
}
=
{})
{
const
stream
=
requireNativePlugin
(
'
stream
'
);
const
headers
=
{};
let
abortTimeout
;
let
aborted
;
let
hasContentType
=
false
;
let
aborted
;
let
hasContentType
=
false
;
for
(
const
name
in
header
)
{
if
(
!
hasContentType
&&
name
.
toLowerCase
()
===
'
content-type
'
)
{
hasContentType
=
true
;
...
...
@@ -5891,37 +5896,38 @@ var serviceContext = (function () {
headers
[
name
]
=
header
[
name
];
}
}
if
(
!
hasContentType
&&
method
===
'
POST
'
)
{
headers
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded; charset=UTF-8
'
;
}
headers
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded; charset=UTF-8
'
;
}
const
timeout
=
__uniConfig
.
networkTimeout
.
request
;
if
(
timeout
)
{
const
timeout
=
__uniConfig
.
networkTimeout
.
request
;
if
(
timeout
)
{
abortTimeout
=
setTimeout
(()
=>
{
aborted
=
true
;
publishStateChange$1
({
requestTaskId
,
state
:
'
fail
'
,
statusCode
:
0
,
errMsg
:
'
timeout
'
});
},
timeout
);
}
aborted
=
true
;
publishStateChange$1
({
requestTaskId
,
state
:
'
fail
'
,
statusCode
:
0
,
errMsg
:
'
timeout
'
});
},
timeout
);
}
const
options
=
{
method
,
url
:
url
.
trim
(),
// weex 官方文档有误,headers 类型实际 object,用 string 类型会无响应
headers
,
type
:
'
text
'
,
type
:
responseType
===
'
arraybuffer
'
?
'
base64
'
:
'
text
'
,
// weex 官方文档未说明实际支持 timeout,单位:ms
timeout
:
timeout
||
6
e5
};
if
(
method
!==
'
GET
'
)
{
options
.
body
=
data
;
}
try
{
}
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
});
...
...
@@ -5949,7 +5955,7 @@ var serviceContext = (function () {
errMsg
:
'
abort
'
});
}
});
});
requestTasks
[
requestTaskId
]
=
{
abort
()
{
aborted
=
true
;
...
...
@@ -5963,37 +5969,37 @@ var serviceContext = (function () {
errMsg
:
'
abort
'
});
}
};
}
catch
(
e
)
{
return
{
requestTaskId
,
errMsg
:
'
createRequestTask:fail
'
}
}
return
{
requestTaskId
,
errMsg
:
'
createRequestTask:ok
'
}
}
function
createRequestTask
(
args
)
{
return
createRequestTaskById
(
++
requestTaskId
,
args
)
}
function
operateRequestTask
({
requestTaskId
,
operationType
}
=
{})
{
const
requestTask
=
requestTasks
[
requestTaskId
];
if
(
requestTask
&&
operationType
===
'
abort
'
)
{
requestTask
.
abort
();
return
{
errMsg
:
'
operateRequestTask:ok
'
}
}
return
{
errMsg
:
'
operateRequestTask:fail
'
}
};
}
catch
(
e
)
{
return
{
requestTaskId
,
errMsg
:
'
createRequestTask:fail
'
}
}
return
{
requestTaskId
,
errMsg
:
'
createRequestTask:ok
'
}
}
function
createRequestTask
(
args
)
{
return
createRequestTaskById
(
++
requestTaskId
,
args
)
}
function
operateRequestTask
({
requestTaskId
,
operationType
}
=
{})
{
const
requestTask
=
requestTasks
[
requestTaskId
];
if
(
requestTask
&&
operationType
===
'
abort
'
)
{
requestTask
.
abort
();
return
{
errMsg
:
'
operateRequestTask:ok
'
}
}
return
{
errMsg
:
'
operateRequestTask:fail
'
}
}
let
socketTaskId
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录