Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
193a8e06
U
uni-app
项目概览
DCloud
/
uni-app
4 个月 前同步成功
通知
729
Star
38706
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,发现更多精彩内容 >>
提交
193a8e06
编写于
9月 04, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/dcloudio/uni-app
into alpha
上级
235db508
0e278acb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
101 addition
and
92 deletion
+101
-92
packages/uni-stat/dist/index.js
packages/uni-stat/dist/index.js
+38
-36
packages/uni-stat/src/stat.js
packages/uni-stat/src/stat.js
+39
-37
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
+9
-5
packages/webpack-uni-mp-loader/lib/plugin/index-new.js
packages/webpack-uni-mp-loader/lib/plugin/index-new.js
+15
-14
未找到文件。
packages/uni-stat/dist/index.js
浏览文件 @
193a8e06
...
...
@@ -629,39 +629,39 @@ class Util {
this
.
imageRequest
(
optionsData
);
return
}
if
(
getPlatformName
()
===
'
n
'
&&
this
.
statData
.
p
===
'
a
'
)
{
setTimeout
(()
=>
{
this
.
_sendRequest
(
optionsData
);
},
200
);
return
}
if
(
getPlatformName
()
===
'
n
'
&&
this
.
statData
.
p
===
'
a
'
)
{
setTimeout
(()
=>
{
this
.
_sendRequest
(
optionsData
);
},
200
);
return
}
this
.
_sendRequest
(
optionsData
);
}
_sendRequest
(
optionsData
)
{
uni
.
request
({
url
:
STAT_URL
,
method
:
'
POST
'
,
// header: {
// 'content-type': 'application/json' // 默认值
// },
data
:
optionsData
,
success
:
()
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail
:
(
e
)
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if
(
++
this
.
_retry
<
3
)
{
setTimeout
(()
=>
{
this
.
request
(
data
);
},
1000
);
}
}
});
}
_sendRequest
(
optionsData
)
{
uni
.
request
({
url
:
STAT_URL
,
method
:
'
POST
'
,
// header: {
// 'content-type': 'application/json' // 默认值
// },
data
:
optionsData
,
success
:
()
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail
:
(
e
)
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if
(
++
this
.
_retry
<
3
)
{
setTimeout
(()
=>
{
this
.
request
(
data
);
},
1000
);
}
}
});
}
/**
* h5 请求
...
...
@@ -775,15 +775,17 @@ class Stat extends Util {
show
(
self
)
{
this
.
self
=
self
;
if
(
!
getPageTypes
(
self
))
{
this
.
_pageShow
(
self
);
}
else
{
this
.
_applicationShow
(
self
);
}
}
ready
(
self
)
{
this
.
self
=
self
;
if
(
getPageTypes
(
self
))
{
this
.
_pageShow
(
self
);
}
//
this.self = self;
//
if (getPageTypes(self)) {
//
this._pageShow(self);
//
}
}
hide
(
self
)
{
this
.
self
=
self
;
...
...
packages/uni-stat/src/stat.js
浏览文件 @
193a8e06
...
...
@@ -364,39 +364,39 @@ class Util {
this
.
imageRequest
(
optionsData
)
return
}
if
(
getPlatformName
()
===
'
n
'
&&
this
.
statData
.
p
===
'
a
'
)
{
setTimeout
(()
=>
{
this
.
_sendRequest
(
optionsData
);
},
200
)
return
}
if
(
getPlatformName
()
===
'
n
'
&&
this
.
statData
.
p
===
'
a
'
)
{
setTimeout
(()
=>
{
this
.
_sendRequest
(
optionsData
);
},
200
)
return
}
this
.
_sendRequest
(
optionsData
)
}
_sendRequest
(
optionsData
)
{
uni
.
request
({
url
:
STAT_URL
,
method
:
'
POST
'
,
// header: {
// 'content-type': 'application/json' // 默认值
// },
data
:
optionsData
,
success
:
()
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail
:
(
e
)
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if
(
++
this
.
_retry
<
3
)
{
setTimeout
(()
=>
{
this
.
request
(
data
);
},
1000
);
}
}
});
}
_sendRequest
(
optionsData
)
{
uni
.
request
({
url
:
STAT_URL
,
method
:
'
POST
'
,
// header: {
// 'content-type': 'application/json' // 默认值
// },
data
:
optionsData
,
success
:
()
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request success');
// }
},
fail
:
(
e
)
=>
{
// if (process.env.NODE_ENV === 'development') {
// console.log('stat request fail', e);
// }
if
(
++
this
.
_retry
<
3
)
{
setTimeout
(()
=>
{
this
.
request
(
data
);
},
1000
);
}
}
});
}
/**
* h5 请求
...
...
@@ -509,16 +509,18 @@ class Stat extends Util {
show
(
self
)
{
this
.
self
=
self
;
if
(
!
getPageTypes
(
self
))
{
if
(
getPageTypes
(
self
))
{
this
.
_pageShow
(
self
);
}
else
{
this
.
_applicationShow
(
self
);
}
}
ready
(
self
)
{
this
.
self
=
self
;
if
(
getPageTypes
(
self
))
{
this
.
_pageShow
(
self
);
}
//
this.self = self;
//
if (getPageTypes(self)) {
//
this._pageShow(self);
//
}
}
hide
(
self
)
{
this
.
self
=
self
;
...
...
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
浏览文件 @
193a8e06
...
...
@@ -12,6 +12,7 @@ const {
const
WebpackAppPlusNVuePlugin
=
require
(
'
../packages/webpack-app-plus-nvue-plugin
'
)
const
WebpackErrorsPlugin
=
require
(
'
@dcloudio/vue-cli-plugin-uni/packages/webpack-errors-plugin
'
)
const
WebpackUniMPPlugin
=
require
(
'
@dcloudio/webpack-uni-mp-loader/lib/plugin/index-new
'
)
const
onErrors
=
require
(
'
@dcloudio/vue-cli-plugin-uni/util/on-errors
'
)
...
...
@@ -91,9 +92,9 @@ const rules = [{
}
},
jsPreprocessorLoader
],
exclude
(
modulePath
)
{
return
excludeModuleReg
.
test
(
modulePath
)
&&
modulePath
.
indexOf
(
'
@dcloudio
'
)
===
-
1
],
exclude
(
modulePath
)
{
return
excludeModuleReg
.
test
(
modulePath
)
&&
modulePath
.
indexOf
(
'
@dcloudio
'
)
===
-
1
}
},
{
...
...
@@ -146,6 +147,7 @@ if (process.env.UNI_USING_NVUE_COMPILER) {
})
}
if
(
process
.
env
.
UNI_USING_NATIVE
)
{
plugins
.
push
(
new
WebpackUniMPPlugin
())
plugins
.
push
(
new
CopyWebpackPlugin
([{
from
:
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
static
'
),
to
:
'
static
'
...
...
@@ -170,13 +172,15 @@ if (process.env.UNI_USING_NATIVE) {
}]))
}
module
.
exports
=
function
(
entry
)
{
module
.
exports
=
function
()
{
return
{
target
:
'
node
'
,
// 激活 vue-loader 的 isServer 逻辑
mode
:
process
.
env
.
NODE_ENV
,
devtool
:
process
.
env
.
NODE_ENV
===
'
development
'
?
'
inline-source-map
'
:
false
,
watch
:
process
.
env
.
NODE_ENV
===
'
development
'
,
entry
,
entry
()
{
return
process
.
UNI_NVUE_ENTRY
},
externals
:
{
'
vue
'
:
'
Vue
'
},
...
...
packages/webpack-uni-mp-loader/lib/plugin/index-new.js
浏览文件 @
193a8e06
...
...
@@ -67,25 +67,26 @@ function addSubPackagesRequire (compilation) {
class
WebpackUniMPPlugin
{
apply
(
compiler
)
{
compiler
.
hooks
.
emit
.
tapPromise
(
'
webpack-uni-mp-emit
'
,
compilation
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
addSubPackagesRequire
(
compilation
)
if
(
!
process
.
env
.
UNI_USING_NATIVE
)
{
compiler
.
hooks
.
emit
.
tapPromise
(
'
webpack-uni-mp-emit
'
,
compilation
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
addSubPackagesRequire
(
compilation
)
generateJson
(
compilation
)
generateJson
(
compilation
)
// app.js,app.wxss
generateApp
(
compilation
)
.
forEach
(({
file
,
source
})
=>
emitFile
(
file
,
source
,
compilation
))
// app.js,app.wxss
generateApp
(
compilation
)
.
forEach
(({
file
,
source
})
=>
emitFile
(
file
,
source
,
compilation
))
generateComponent
(
compilation
)
generateComponent
(
compilation
)
resolve
()
resolve
()
})
})
})
}
compiler
.
hooks
.
invalid
.
tap
(
'
webpack-uni-mp-invalid
'
,
(
fileName
,
changeTime
)
=>
{
if
(
fileName
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录