Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
shijian
8 years ago
Commit
2cbb3288c730c7f0e4ba6f559335dcd031c83e52
1 parent
3c3947a7
save
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
9 deletions
package.json
postcss.config.js
public/build/webpack.base.config.js
public/js/global.js
package.json
View file @
2cbb328
...
...
@@ -21,6 +21,7 @@
},
"license"
:
"MIT"
,
"dependencies"
:
{
"babel-polyfill"
:
"^6.23.0"
,
"babel-runtime"
:
"^6.11.6"
,
"bluebird"
:
"^3.4.2"
,
"body-parser"
:
"^1.15.2"
,
...
...
@@ -45,6 +46,7 @@
"vue-template-compiler"
:
"^2.3.3"
,
"winston"
:
"^2.2.0"
,
"winston-daily-rotate-file"
:
"^1.3.0"
,
"yoho-jquery"
:
"^2.2.4"
,
"yoho-md5"
:
"^2.0.0"
,
"yoho-node-lib"
:
"0.2.17"
},
...
...
postcss.config.js
View file @
2cbb328
...
...
@@ -32,8 +32,9 @@ module.exports = {
parser
:
scss
,
plugins
:
{
'postcss-import'
:
{
path
:
[
path
.
join
(
__dirname
,
'./public/scss'
)
],
path
:
[],
resolve
(
id
)
{
console
.
log
(
id
);
let
name
=
path
.
basename
(
id
);
if
(
!
/^_/
.
test
(
name
))
{
...
...
@@ -44,7 +45,6 @@ module.exports = {
},
'postcss-assets'
:
assets
,
'postcss-sprites'
:
sprites
,
precss
:
{},
'postcss-pxtorem'
:
{
rootValue
:
40
,
unitPrecision
:
5
,
// 保留5位小数字
...
...
@@ -56,4 +56,4 @@ module.exports = {
browsers
:
[
'> 1%'
,
'android >=4'
,
'ios >=8'
]
}
}
};
};
\ No newline at end of file
...
...
public/build/webpack.base.config.js
View file @
2cbb328
...
...
@@ -51,12 +51,9 @@ module.exports = {
loader
:
'vue-loader'
,
options
:
{
loaders
:
{
s
css
:
ExtractTextPlugin
.
extract
({
css
:
ExtractTextPlugin
.
extract
({
use
:
[
// {
// loader: 'css-loader',
// options: { url: false, root: '../img/' }
// },
{
loader
:
'css-loader'
,
options
:
{
url
:
false
,
root
:
'../img/'
}
},
{
loader
:
'postcss-loader'
}
],
fallback
:
'vue-style-loader'
...
...
@@ -74,7 +71,7 @@ module.exports = {
use
:
ExtractTextPlugin
.
extract
({
fallback
:
'vue-style-loader'
,
use
:
[
//
{ loader: 'css-loader', options: { url: false, root: '../img/' } },
{
loader
:
'css-loader'
,
options
:
{
url
:
false
,
root
:
'../img/'
}
},
'postcss-loader'
]
})
...
...
public/js/global.js
0 → 100644
View file @
2cbb328
/**
* 全局引用js
* @author: feng.chen<feng.chen@yoho.cn>
* @date: 2017/03/15
*/
const
$
=
require
(
'yoho-jquery'
);
const
cookie
=
require
(
'yoho-cookie'
);
const
yoho
=
require
(
'yoho'
);
// 初始化
// 注册ajaxError处理服务端401状态
$
(
document
).
ajaxError
((
event
,
xhr
)
=>
{
if
(
xhr
.
status
===
401
)
{
cookie
.
remove
(
'_UID'
);
cookie
.
remove
(
'_TOKEN'
);
if
(
yoho
.
isApp
)
{
yoho
.
goLogin
(
window
.
location
.
href
);
}
else
{
window
.
location
.
href
=
`
/
signin
.
html
?
refer
=
$
{
encodeURIComponent
(
window
.
location
.
href
)}
`
;
}
}
});
...
...
Please
register
or
login
to post a comment