Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
64e5f687
U
uni-app
项目概览
DCloud
/
uni-app
29 天 前同步成功
通知
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,发现更多精彩内容 >>
提交
64e5f687
编写于
3月 27, 2020
作者:
fxy060608
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/dcloudio/uni-app
into dev-mp-welink
上级
cb1435d6
c08b746d
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
32 addition
and
35 deletion
+32
-35
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
+5
-5
packages/vue-cli-plugin-uni/lib/options.js
packages/vue-cli-plugin-uni/lib/options.js
+9
-7
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
+1
-1
src/core/service/api/context/create-map-context.js
src/core/service/api/context/create-map-context.js
+1
-5
src/platforms/app-plus/service/api/ad/rewarded-video-ad.js
src/platforms/app-plus/service/api/ad/rewarded-video-ad.js
+4
-10
src/platforms/app-plus/view/components/map/index.vue
src/platforms/app-plus/view/components/map/index.vue
+5
-2
src/platforms/app-plus/view/components/video/index.vue
src/platforms/app-plus/view/components/video/index.vue
+2
-2
src/platforms/h5/view/components/map/index.vue
src/platforms/h5/view/components/map/index.vue
+5
-3
未找到文件。
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
浏览文件 @
64e5f687
...
...
@@ -100,7 +100,7 @@ const plugins = [
new
WebpackAppPlusNVuePlugin
()
]
const
excludeModuleReg
=
/node_modules
(?!(\/
|
\\)
.*
(
weex
)
.*
)
/
//
const excludeModuleReg = /node_modules(?!(\/|\\).*(weex).*)/
const
rules
=
[{
test
:
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
pages.json
'
),
...
...
@@ -122,10 +122,10 @@ const rules = [{
}
},
jsPreprocessorLoader
]
,
exclude
(
modulePath
)
{
return
excludeModuleReg
.
test
(
modulePath
)
&&
modulePath
.
indexOf
(
'
@dcloudio
'
)
===
-
1
}
]
// exclude (modulePath) { // nvue js均提供babel,否则还得提供transpileDependencies配置
//
return excludeModuleReg.test(modulePath) && modulePath.indexOf('@dcloudio') === -1
//
}
},
{
test
:
[
/
\.
nvue
(\?[^
?
]
+
)?
$/
,
/
\.
vue
(\?[^
?
]
+
)?
$/
],
...
...
packages/vue-cli-plugin-uni/lib/options.js
浏览文件 @
64e5f687
...
...
@@ -5,6 +5,14 @@ const {
sassLoaderVersion
}
=
require
(
'
@dcloudio/uni-cli-shared/lib/scss
'
)
const
isWin
=
/^win/
.
test
(
process
.
platform
)
function
genTranspileDepRegex
(
depPath
)
{
return
new
RegExp
(
isWin
?
depPath
.
replace
(
/
\\
/g
,
'
\\\\
'
)
// double escape for windows style path
:
depPath
)
}
module
.
exports
=
function
initOptions
(
options
)
{
const
{
getPlatformScss
,
...
...
@@ -16,17 +24,11 @@ module.exports = function initOptions (options) {
}
// 增加 src/node_modules 解析
options
.
transpileDependencies
.
push
(
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
node_modules
'
))
options
.
transpileDependencies
.
push
(
genTranspileDepRegex
(
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
node_modules
'
)
))
options
.
transpileDependencies
.
push
(
'
@dcloudio/uni-
'
+
process
.
env
.
UNI_PLATFORM
)
options
.
transpileDependencies
.
push
(
'
@dcloudio/uni-stat
'
)
// mp runtime
options
.
transpileDependencies
.
push
(
'
@dcloudio/uni-mp-weixin/dist/mp.js
'
)
// wxs
options
.
transpileDependencies
.
push
(
'
@dcloudio/uni-mp-weixin/dist/wxs.js
'
)
if
(
process
.
env
.
UNI_PLATFORM
===
'
app-plus
'
)
{
options
.
transpileDependencies
.
push
(
'
format-log.js
'
)
}
if
(
process
.
env
.
UNI_PLATFORM
===
'
h5
'
)
{
// h5 dev 用到了这两个,需要 babel
options
.
transpileDependencies
.
push
(
'
ansi-regex
'
)
...
...
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
浏览文件 @
64e5f687
此差异已折叠。
点击以展开。
src/core/service/api/context/create-map-context.js
浏览文件 @
64e5f687
...
...
@@ -18,17 +18,13 @@ UniServiceJSBridge.subscribe('onMapMethodCallback', ({
callback
.
invoke
(
callbackId
,
data
)
})
const
methods
=
[
'
getCenterLocation
'
,
'
getScale
'
,
'
getRegion
'
,
'
includePoints
'
,
'
translateMarker
'
]
const
methods
=
[
'
getCenterLocation
'
,
'
moveToLocation
'
,
'
getScale
'
,
'
getRegion
'
,
'
includePoints
'
,
'
translateMarker
'
]
export
class
MapContext
{
constructor
(
id
,
pageVm
)
{
this
.
id
=
id
this
.
pageVm
=
pageVm
}
moveToLocation
()
{
operateMapPlayer
(
this
.
id
,
this
.
pageVm
,
'
moveToLocation
'
)
}
}
MapContext
.
prototype
.
$getAppMap
=
function
()
{
...
...
src/platforms/app-plus/service/api/ad/rewarded-video-ad.js
浏览文件 @
64e5f687
...
...
@@ -8,11 +8,7 @@ const eventNames = [
const
ERROR_CODE_LIST
=
[
-
5001
,
-
5002
,
-
5003
,
-
5004
,
-
5005
,
-
5006
]
class
RewardedVideoAd
{
constructor
(
adpid
)
{
this
.
_options
=
{
adpid
:
adpid
}
constructor
(
options
=
{})
{
const
_callbacks
=
this
.
_callbacks
=
{}
eventNames
.
forEach
(
item
=>
{
_callbacks
[
item
]
=
[]
...
...
@@ -26,7 +22,7 @@ class RewardedVideoAd {
this
.
_adError
=
''
this
.
_loadPromiseResolve
=
null
this
.
_loadPromiseReject
=
null
const
rewardAd
=
this
.
_rewardAd
=
plus
.
ad
.
createRewardedVideoAd
(
this
.
_
options
)
const
rewardAd
=
this
.
_rewardAd
=
plus
.
ad
.
createRewardedVideoAd
(
options
)
rewardAd
.
onLoad
((
e
)
=>
{
this
.
_isLoad
=
true
this
.
_dispatchEvent
(
'
load
'
,
{})
...
...
@@ -85,8 +81,6 @@ class RewardedVideoAd {
}
}
export
function
createRewardedVideoAd
({
adpid
=
''
}
=
{})
{
return
new
RewardedVideoAd
(
adpid
)
export
function
createRewardedVideoAd
(
options
)
{
return
new
RewardedVideoAd
(
options
)
}
src/platforms/app-plus/view/components/map/index.vue
浏览文件 @
64e5f687
...
...
@@ -229,8 +229,11 @@ export default {
}
this
.
map
&&
this
[
type
](
data
)
},
moveToLocation
(
data
)
{
this
.
map
.
setCenter
(
new
plus
.
maps
.
Point
(
this
.
longitude
,
this
.
latitude
))
moveToLocation
({
callbackId
,
longitude
,
latitude
})
{
this
.
map
.
setCenter
(
new
plus
.
maps
.
Point
(
longitude
||
this
.
longitude
,
latitude
||
this
.
latitude
))
this
.
_publishHandler
(
callbackId
,
{
errMsg
:
'
moveToLocation:ok
'
})
},
getCenterLocation
({
callbackId
})
{
const
center
=
this
.
map
.
getCenter
()
...
...
src/platforms/app-plus/view/components/video/index.vue
浏览文件 @
64e5f687
...
...
@@ -178,8 +178,8 @@ export default {
}
})
events
.
forEach
(
key
=>
{
video
.
addEventListener
(
key
,
(
data
=
{}
)
=>
{
this
.
$trigger
(
key
,
{},
data
)
video
.
addEventListener
(
key
,
(
e
)
=>
{
this
.
$trigger
(
key
,
{},
{
...
e
.
detail
}
)
})
})
},
...
...
src/platforms/h5/view/components/map/index.vue
浏览文件 @
64e5f687
...
...
@@ -348,10 +348,12 @@ export default {
})
})
break
case
'
moveToLocation
'
:
var
locationPosition
=
this
.
_locationPosition
case
'
moveToLocation
'
:
const
{
latitude
,
longitude
}
=
data
var
locationPosition
=
(
latitude
&&
longitude
)
?
new
maps
.
LatLng
(
latitude
,
longitude
)
:
this
.
_locationPosition
if
(
locationPosition
)
{
this
.
_map
.
setCenter
(
locationPosition
)
this
.
_map
.
setCenter
(
locationPosition
)
callback
({})
}
break
case
'
translateMarker
'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录