Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wzj-java
uni-app
提交
92211571
U
uni-app
项目概览
wzj-java
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
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,发现更多精彩内容 >>
提交
92211571
编写于
5月 09, 2019
作者:
M
mehaotian
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev'
上级
c862b320
08e7d544
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
185 addition
and
190 deletion
+185
-190
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+33
-35
packages/uni-mp-baidu/package.json
packages/uni-mp-baidu/package.json
+1
-1
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+33
-35
packages/uni-mp-toutiao/package.json
packages/uni-mp-toutiao/package.json
+1
-1
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+33
-29
packages/uni-mp-weixin/package.json
packages/uni-mp-weixin/package.json
+1
-1
src/core/helpers/index.js
src/core/helpers/index.js
+4
-2
src/platforms/h5/components/system-routes/choose-location/index.vue
...rms/h5/components/system-routes/choose-location/index.vue
+14
-14
src/platforms/h5/components/system-routes/open-location/index.vue
...forms/h5/components/system-routes/open-location/index.vue
+10
-10
src/platforms/h5/service/api/location.js
src/platforms/h5/service/api/location.js
+4
-4
src/platforms/h5/service/api/media/choose-video.js
src/platforms/h5/service/api/media/choose-video.js
+11
-6
src/platforms/h5/view/components/map/index.vue
src/platforms/h5/view/components/map/index.vue
+1
-1
src/platforms/mp-baidu/service/api/protocols.js
src/platforms/mp-baidu/service/api/protocols.js
+2
-10
src/platforms/mp-toutiao/service/api/protocols.js
src/platforms/mp-toutiao/service/api/protocols.js
+2
-10
src/platforms/mp-weixin/helpers/normalize-preview-image-args.js
...atforms/mp-weixin/helpers/normalize-preview-image-args.js
+0
-27
src/platforms/mp-weixin/helpers/normalize-preview-image.js
src/platforms/mp-weixin/helpers/normalize-preview-image.js
+33
-0
src/platforms/mp-weixin/service/api/protocols.js
src/platforms/mp-weixin/service/api/protocols.js
+2
-4
未找到文件。
packages/uni-mp-baidu/dist/index.js
浏览文件 @
92211571
...
@@ -144,7 +144,8 @@ function upx2px (number, newDeviceWidth) {
...
@@ -144,7 +144,8 @@ function upx2px (number, newDeviceWidth) {
return
number
<
0
?
-
result
:
result
return
number
<
0
?
-
result
:
result
}
}
function
normalize
(
fromArgs
)
{
var
previewImage
=
{
args
(
fromArgs
)
{
let
currentIndex
=
parseInt
(
fromArgs
.
current
);
let
currentIndex
=
parseInt
(
fromArgs
.
current
);
if
(
isNaN
(
currentIndex
))
{
if
(
isNaN
(
currentIndex
))
{
return
return
...
@@ -170,7 +171,12 @@ function normalize (fromArgs) {
...
@@ -170,7 +171,12 @@ function normalize (fromArgs) {
}
else
{
}
else
{
fromArgs
.
current
=
urls
[
0
];
fromArgs
.
current
=
urls
[
0
];
}
}
}
return
{
indicator
:
false
,
loop
:
false
}
}
};
// 不支持的 API 列表
// 不支持的 API 列表
const
todos
=
[
const
todos
=
[
...
@@ -232,15 +238,7 @@ const protocols = {
...
@@ -232,15 +238,7 @@ const protocols = {
method
:
false
method
:
false
}
}
},
},
previewImage
:
{
previewImage
,
args
(
fromArgs
)
{
normalize
(
fromArgs
);
return
{
indicator
:
false
,
loop
:
false
}
}
},
getRecorderManager
:
{
getRecorderManager
:
{
returnValue
(
fromRet
)
{
returnValue
(
fromRet
)
{
fromRet
.
onFrameRecorded
=
createTodoMethod
(
'
RecorderManager
'
,
'
onFrameRecorded
'
);
fromRet
.
onFrameRecorded
=
createTodoMethod
(
'
RecorderManager
'
,
'
onFrameRecorded
'
);
...
...
packages/uni-mp-baidu/package.json
浏览文件 @
92211571
{
{
"name"
:
"@dcloudio/uni-mp-baidu"
,
"name"
:
"@dcloudio/uni-mp-baidu"
,
"version"
:
"0.0.8
29
"
,
"version"
:
"0.0.8
30
"
,
"description"
:
"uni-app mp-baidu"
,
"description"
:
"uni-app mp-baidu"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
92211571
...
@@ -144,7 +144,8 @@ function upx2px (number, newDeviceWidth) {
...
@@ -144,7 +144,8 @@ function upx2px (number, newDeviceWidth) {
return
number
<
0
?
-
result
:
result
return
number
<
0
?
-
result
:
result
}
}
function
normalize
(
fromArgs
)
{
var
previewImage
=
{
args
(
fromArgs
)
{
let
currentIndex
=
parseInt
(
fromArgs
.
current
);
let
currentIndex
=
parseInt
(
fromArgs
.
current
);
if
(
isNaN
(
currentIndex
))
{
if
(
isNaN
(
currentIndex
))
{
return
return
...
@@ -170,7 +171,12 @@ function normalize (fromArgs) {
...
@@ -170,7 +171,12 @@ function normalize (fromArgs) {
}
else
{
}
else
{
fromArgs
.
current
=
urls
[
0
];
fromArgs
.
current
=
urls
[
0
];
}
}
}
return
{
indicator
:
false
,
loop
:
false
}
}
};
// 不支持的 API 列表
// 不支持的 API 列表
const
todos
=
[
const
todos
=
[
...
@@ -265,15 +271,7 @@ const protocols = {
...
@@ -265,15 +271,7 @@ const protocols = {
sizeType
:
false
sizeType
:
false
}
}
},
},
previewImage
:
{
previewImage
,
args
(
fromArgs
)
{
normalize
(
fromArgs
);
return
{
indicator
:
false
,
loop
:
false
}
}
},
connectSocket
:
{
connectSocket
:
{
args
:
{
args
:
{
method
:
false
method
:
false
...
...
packages/uni-mp-toutiao/package.json
浏览文件 @
92211571
{
{
"name"
:
"@dcloudio/uni-mp-toutiao"
,
"name"
:
"@dcloudio/uni-mp-toutiao"
,
"version"
:
"0.0.32
7
"
,
"version"
:
"0.0.32
8
"
,
"description"
:
"uni-app mp-toutiao"
,
"description"
:
"uni-app mp-toutiao"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
packages/uni-mp-weixin/dist/index.js
浏览文件 @
92211571
...
@@ -144,7 +144,8 @@ function upx2px (number, newDeviceWidth) {
...
@@ -144,7 +144,8 @@ function upx2px (number, newDeviceWidth) {
return
number
<
0
?
-
result
:
result
return
number
<
0
?
-
result
:
result
}
}
function
normalize
(
fromArgs
)
{
var
previewImage
=
{
args
(
fromArgs
)
{
let
currentIndex
=
parseInt
(
fromArgs
.
current
);
let
currentIndex
=
parseInt
(
fromArgs
.
current
);
if
(
isNaN
(
currentIndex
))
{
if
(
isNaN
(
currentIndex
))
{
return
return
...
@@ -170,12 +171,15 @@ function normalize (fromArgs) {
...
@@ -170,12 +171,15 @@ function normalize (fromArgs) {
}
else
{
}
else
{
fromArgs
.
current
=
urls
[
0
];
fromArgs
.
current
=
urls
[
0
];
}
}
}
return
{
indicator
:
false
,
loop
:
false
}
}
};
const
protocols
=
{
const
protocols
=
{
previewImage
:
{
previewImage
args
:
normalize
}
};
};
const
todos
=
[];
const
todos
=
[];
const
canIUses
=
[];
const
canIUses
=
[];
...
...
packages/uni-mp-weixin/package.json
浏览文件 @
92211571
{
{
"name"
:
"@dcloudio/uni-mp-weixin"
,
"name"
:
"@dcloudio/uni-mp-weixin"
,
"version"
:
"0.0.95
1
"
,
"version"
:
"0.0.95
2
"
,
"description"
:
"uni-app mp-weixin"
,
"description"
:
"uni-app mp-weixin"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
src/core/helpers/index.js
浏览文件 @
92211571
...
@@ -10,7 +10,9 @@ export function isPage (vm) {
...
@@ -10,7 +10,9 @@ export function isPage (vm) {
}
}
export
function
normalizeDataset
(
dataset
=
{})
{
export
function
normalizeDataset
(
dataset
=
{})
{
const
result
=
Object
.
assign
({},
dataset
)
// ios8.x,9.x Object.assign({},dataset) 始终返回 {}
// http://ask.dcloud.net.cn/question/70246
const
result
=
JSON
.
parse
(
JSON
.
stringify
(
dataset
))
if
(
__PLATFORM__
===
'
h5
'
)
{
if
(
__PLATFORM__
===
'
h5
'
)
{
const
keys
=
Object
.
keys
(
result
)
const
keys
=
Object
.
keys
(
result
)
const
len
=
keys
.
length
const
len
=
keys
.
length
...
...
src/platforms/h5/components/system-routes/choose-location/index.vue
浏览文件 @
92211571
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
var
key
=
'
WXTBZ-6WERU-ECCVS-BZJCK-LW5OJ-SIBOS
'
var
key
=
__uniConfig
.
qqMapKey
this
.
src
=
`https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=
${
key
}
&referer=uniapp`
this
.
src
=
`https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=
${
key
}
&referer=uniapp`
window
.
addEventListener
(
'
message
'
,
(
event
)
=>
{
window
.
addEventListener
(
'
message
'
,
(
event
)
=>
{
var
loc
=
event
.
data
var
loc
=
event
.
data
...
...
src/platforms/h5/components/system-routes/open-location/index.vue
浏览文件 @
92211571
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<
script
>
<
script
>
import
SystemHeader
from
'
../system-header
'
import
SystemHeader
from
'
../system-header
'
const
key
=
'
WXTBZ-6WERU-ECCVS-BZJCK-LW5OJ-SIBOS
'
const
key
=
__uniConfig
.
qqMapKey
const
referer
=
'
uniapp
'
const
referer
=
'
uniapp
'
const
poimarkerSrc
=
'
https://apis.map.qq.com/tools/poimarker
'
const
poimarkerSrc
=
'
https://apis.map.qq.com/tools/poimarker
'
...
...
src/platforms/h5/service/api/location.js
浏览文件 @
92211571
...
@@ -9,7 +9,7 @@ function wgs84ToGcj02 (coords, success, error) {
...
@@ -9,7 +9,7 @@ function wgs84ToGcj02 (coords, success, error) {
/**
/**
* uniapp 内置key
* uniapp 内置key
*/
*/
var
key
=
'
WXTBZ-6WERU-ECCVS-BZJCK-LW5OJ-SIBOS
'
var
key
=
__uniConfig
.
qqMapKey
var
url
=
`https://apis.map.qq.com/ws/coord/v1/translate?locations=
${
coords
.
latitude
}
,
${
coords
.
longitude
}
&type=1&key=
${
key
}
&output=jsonp`
var
url
=
`https://apis.map.qq.com/ws/coord/v1/translate?locations=
${
coords
.
latitude
}
,
${
coords
.
longitude
}
&type=1&key=
${
key
}
&output=jsonp`
getJSONP
(
url
,
{},
(
res
)
=>
{
getJSONP
(
url
,
{},
(
res
)
=>
{
if
(
'
locations
'
in
res
&&
res
.
locations
.
length
)
{
if
(
'
locations
'
in
res
&&
res
.
locations
.
length
)
{
...
@@ -18,7 +18,7 @@ function wgs84ToGcj02 (coords, success, error) {
...
@@ -18,7 +18,7 @@ function wgs84ToGcj02 (coords, success, error) {
latitude
:
res
.
locations
[
0
].
lat
latitude
:
res
.
locations
[
0
].
lat
})
})
}
else
{
}
else
{
error
()
error
(
res
)
}
}
},
error
)
},
error
)
}
}
...
@@ -48,9 +48,9 @@ export function getLocation ({
...
@@ -48,9 +48,9 @@ export function getLocation ({
if
(
type
===
'
WGS84
'
)
{
if
(
type
===
'
WGS84
'
)
{
callback
(
coords
)
callback
(
coords
)
}
else
{
}
else
{
wgs84ToGcj02
(
coords
,
callback
,
()
=>
{
wgs84ToGcj02
(
coords
,
callback
,
(
err
)
=>
{
invoke
(
callbackId
,
{
invoke
(
callbackId
,
{
errMsg
:
'
getLocation:fail
'
errMsg
:
'
getLocation:fail
'
+
JSON
.
stringify
(
err
)
})
})
})
})
}
}
...
...
src/platforms/h5/service/api/media/choose-video.js
浏览文件 @
92211571
...
@@ -54,13 +54,18 @@ export function chooseVideo ({
...
@@ -54,13 +54,18 @@ export function chooseVideo ({
}
}
const
video
=
document
.
createElement
(
'
video
'
)
const
video
=
document
.
createElement
(
'
video
'
)
video
.
addEventListener
(
'
loadedmetadata
'
,
function
()
{
if
(
video
.
onloadedmetadata
)
{
// 尝试获取视频的宽高信息
video
.
onloadedmetadata
=
function
()
{
callbackResult
.
duration
=
video
.
duration
||
0
callbackResult
.
duration
=
video
.
duration
||
0
callbackResult
.
width
=
video
.
videoWidth
||
0
callbackResult
.
width
=
video
.
videoWidth
||
0
callbackResult
.
height
=
video
.
videoHeight
||
0
callbackResult
.
height
=
video
.
videoHeight
||
0
invoke
(
callbackId
,
callbackResult
)
invoke
(
callbackId
,
callbackResult
)
})
}
video
.
src
=
filePath
video
.
src
=
filePath
}
else
{
invoke
(
callbackId
,
callbackResult
)
}
// TODO 用户取消选择时,触发 fail,目前尚未找到合适的方法。
// TODO 用户取消选择时,触发 fail,目前尚未找到合适的方法。
})
})
...
...
src/platforms/h5/view/components/map/index.vue
浏览文件 @
92211571
...
@@ -791,7 +791,7 @@ export default {
...
@@ -791,7 +791,7 @@ export default {
maps
=
window
.
qq
.
maps
maps
=
window
.
qq
.
maps
callback
()
callback
()
}
else
{
}
else
{
let
key
=
'
XVXBZ-NDMC4-JOGUS-XGIEE-QVHDZ-AMFV2
'
let
key
=
__uniConfig
.
qqMapKey
let
callbackName
=
'
_callback
'
+
Date
.
now
()
let
callbackName
=
'
_callback
'
+
Date
.
now
()
window
[
callbackName
]
=
function
()
{
window
[
callbackName
]
=
function
()
{
delete
window
[
callbackName
]
delete
window
[
callbackName
]
...
...
src/platforms/mp-baidu/service/api/protocols.js
浏览文件 @
92211571
import
normalizePreviewImageArgs
from
'
../../../mp-weixin/helpers/normalize-preview-image-args
'
import
previewImage
from
'
../../../mp-weixin/helpers/normalize-preview-image
'
// 不支持的 API 列表
// 不支持的 API 列表
const
todos
=
[
const
todos
=
[
'
hideKeyboard
'
,
'
hideKeyboard
'
,
...
@@ -59,15 +59,7 @@ const protocols = {
...
@@ -59,15 +59,7 @@ const protocols = {
method
:
false
method
:
false
}
}
},
},
previewImage
:
{
previewImage
,
args
(
fromArgs
)
{
normalizePreviewImageArgs
(
fromArgs
)
return
{
indicator
:
false
,
loop
:
false
}
}
},
getRecorderManager
:
{
getRecorderManager
:
{
returnValue
(
fromRet
)
{
returnValue
(
fromRet
)
{
fromRet
.
onFrameRecorded
=
createTodoMethod
(
'
RecorderManager
'
,
'
onFrameRecorded
'
)
fromRet
.
onFrameRecorded
=
createTodoMethod
(
'
RecorderManager
'
,
'
onFrameRecorded
'
)
...
...
src/platforms/mp-toutiao/service/api/protocols.js
浏览文件 @
92211571
import
normalizePreviewImageArgs
from
'
../../../mp-weixin/helpers/normalize-preview-image-args
'
import
previewImage
from
'
../../../mp-weixin/helpers/normalize-preview-image
'
// 不支持的 API 列表
// 不支持的 API 列表
const
todos
=
[
const
todos
=
[
...
@@ -93,15 +93,7 @@ const protocols = {
...
@@ -93,15 +93,7 @@ const protocols = {
sizeType
:
false
sizeType
:
false
}
}
},
},
previewImage
:
{
previewImage
,
args
(
fromArgs
)
{
normalizePreviewImageArgs
(
fromArgs
)
return
{
indicator
:
false
,
loop
:
false
}
}
},
connectSocket
:
{
connectSocket
:
{
args
:
{
args
:
{
method
:
false
method
:
false
...
...
src/platforms/mp-weixin/helpers/normalize-preview-image-args.js
已删除
100644 → 0
浏览文件 @
c862b320
export
default
function
normalize
(
fromArgs
)
{
let
currentIndex
=
parseInt
(
fromArgs
.
current
)
if
(
isNaN
(
currentIndex
))
{
return
}
const
urls
=
fromArgs
.
urls
if
(
!
Array
.
isArray
(
urls
))
{
return
}
const
len
=
urls
.
length
if
(
!
len
)
{
return
}
if
(
currentIndex
<
0
)
{
currentIndex
=
0
}
else
if
(
currentIndex
>=
len
)
{
currentIndex
=
len
-
1
}
if
(
currentIndex
>
0
)
{
fromArgs
.
current
=
urls
[
currentIndex
]
fromArgs
.
urls
=
urls
.
filter
(
(
item
,
index
)
=>
index
<
currentIndex
?
item
!==
urls
[
currentIndex
]
:
true
)
}
else
{
fromArgs
.
current
=
urls
[
0
]
}
}
src/platforms/mp-weixin/helpers/normalize-preview-image.js
0 → 100644
浏览文件 @
92211571
export
default
{
args
(
fromArgs
)
{
let
currentIndex
=
parseInt
(
fromArgs
.
current
)
if
(
isNaN
(
currentIndex
))
{
return
}
const
urls
=
fromArgs
.
urls
if
(
!
Array
.
isArray
(
urls
))
{
return
}
const
len
=
urls
.
length
if
(
!
len
)
{
return
}
if
(
currentIndex
<
0
)
{
currentIndex
=
0
}
else
if
(
currentIndex
>=
len
)
{
currentIndex
=
len
-
1
}
if
(
currentIndex
>
0
)
{
fromArgs
.
current
=
urls
[
currentIndex
]
fromArgs
.
urls
=
urls
.
filter
(
(
item
,
index
)
=>
index
<
currentIndex
?
item
!==
urls
[
currentIndex
]
:
true
)
}
else
{
fromArgs
.
current
=
urls
[
0
]
}
return
{
indicator
:
false
,
loop
:
false
}
}
}
src/platforms/mp-weixin/service/api/protocols.js
浏览文件 @
92211571
import
normalizePreviewImageArgs
from
'
../../helpers/normalize-preview-image-args
'
import
previewImage
from
'
../../helpers/normalize-preview-image
'
export
const
protocols
=
{
export
const
protocols
=
{
previewImage
:
{
previewImage
args
:
normalizePreviewImageArgs
}
}
}
export
const
todos
=
[]
export
const
todos
=
[]
export
const
canIUses
=
[]
export
const
canIUses
=
[]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录