Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
6503a60d
Commit
6503a60d
authored
Jun 14, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置
parent
789b85ad
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
427 additions
and
49 deletions
+427
-49
index.html
public/appnew/index.html
+11
-1
public.css
public/appnew/src/assets/css/public.css
+73
-1
loading.gif
public/appnew/src/assets/images/loading.gif
+0
-0
nodata.png
public/appnew/src/assets/images/nodata.png
+0
-0
public.js
public/appnew/src/assets/js/public.js
+64
-16
achieveAgent.vue
public/appnew/src/components/achieveMain/achieveAgent.vue
+49
-0
achieveFork.vue
public/appnew/src/components/achieveMain/achieveFork.vue
+47
-18
achieveRegion.vue
public/appnew/src/components/achieveMain/achieveRegion.vue
+49
-0
entrance.vue
public/appnew/src/components/publicEg/entrance.vue
+1
-1
errorImg.vue
public/appnew/src/components/publicEg/errorImg.vue
+19
-10
paginationLoad.vue
public/appnew/src/components/publicEg/paginationLoad.vue
+100
-0
main.js
public/appnew/src/main.js
+2
-2
index.js
public/appnew/src/router/index.js
+12
-0
No files found.
public/appnew/index.html
View file @
6503a60d
...
...
@@ -4,7 +4,17 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<title>
同联商业
</title>
<script
type=
text/javascript
>
!
function
(
n
,
e
){
var
t
=
n
.
documentElement
,
i
=
"orientationchange"
in
window
?
"orientationchange"
:
"resize"
,
d
=
function
(){
var
n
=
t
.
clientWidth
;
n
&&
(
t
.
style
.
fontSize
=
n
/
750
*
100
+
"px"
)};
n
.
addEventListener
&&
(
e
.
addEventListener
(
i
,
d
,
!
1
),
n
.
addEventListener
(
"DOMContentLoaded"
,
d
,
!
1
))}(
document
,
window
);
</script>
<!--<script type=text/javascript>
! function(n, e) {
var t = n.documentElement,
i = "orientationchange" in window ? "orientationchange" : "resize",
d = function() {
var n = t.clientWidth;
n && (t.style.fontSize = n / 750 * 100 + "px")
};
n.addEventListener && (e.addEventListener(i, d, !1), n.addEventListener("DOMContentLoaded", d, !1))
}(document, window);
</script>-->
</head>
<body>
<div
id=
"app"
></div>
...
...
public/appnew/src/assets/css/public.css
View file @
6503a60d
@charset
"utf-8"
;
html
{
font-size
:
calc
(
100vw
/
7.5
+
0px
);
font-family
:
'PingFangSC-Regular'
;
}
body
{
font-size
:
.3rem
;
background-color
:
#
f0f0f0
;
background-color
:
#
F8F9FB
;
}
.oh
{
...
...
@@ -16,6 +21,13 @@ body {
float
:
right
!important
;
}
.por
{
position
:
relative
;
}
.poa
{
position
:
absolute
;
}
.tc
{
text-align
:
center
!important
;
...
...
@@ -43,3 +55,63 @@ body {
.flex
{
display
:
flex
;
}
.flex-center
{
display
:
flex
;
align-items
:
center
;
text-align
:
center
;
justify-content
:
center
;
}
.bsb
{
box-sizing
:
border-box
;
}
/*禁止点击元素*/
.no-click
{
pointer-events
:
none
;
/*微信浏览器里的图片自带点击放大效果,需要禁止掉。但这样也会禁止掉微信里的长按识别图中二维码功能*/
}
/*可点击的区域兼容*/
.pointer-click-item
{
/*点击元素的样式*/
cursor
:
pointer
;
-webkit-tap-highlight-color
:
transparent
;
/***加上cursor:pointer时touch的时候会出现蓝色区域,加上这条可以避免蓝色区域出现***/
}
/*加载中动画*/
.loading-gif-block
{
width
:
100%
;
position
:
fixed
;
top
:
7rem
;
background
:
url(../images/loading.gif)
no-repeat
center
0rem
/
1.2rem
1.2rem
;
/*background: url(../images/loading.gif) no-repeat center 0rem/1.1rem .68rem;*/
/*padding-top: 1.2rem;*/
padding-top
:
.68rem
;
font-size
:
.2rem
;
text-align
:
center
;
color
:
rgb
(
51
,
51
,
51
);
}
/*暂无数据*/
.no-data-block
{
/*background: white url(../images/nodata.png) no-repeat center 0.3rem/2.31rem 1.75rem;*/
background
:
white
url(../images/nodata.png)
no-repeat
center
3.12rem
/
4rem
4rem
;
/*padding-top: 2.35rem;*/
padding-top
:
7.12rem
;
font-size
:
.28rem
;
line-height
:
.5rem
;
text-align
:
center
;
color
:
#999
;
}
/*没有更多了*/
.no-more-block
{
text-align
:
center
;
font-size
:
.24rem
;
color
:
#666
;
line-height
:
.5rem
;
padding-bottom
:
.5rem
;
}
public/appnew/src/assets/images/loading.gif
0 → 100644
View file @
6503a60d
33.6 KB
public/appnew/src/assets/images/nodata.png
0 → 100644
View file @
6503a60d
31.3 KB
public/appnew/src/assets/js/public.js
View file @
6503a60d
...
...
@@ -8,24 +8,35 @@ import '@/assets/js/layer041002.js';
export
default
{
ServerHost
,
isAndroid
()
{
//判断是不是安卓设备
let
u
=
navigator
.
userAgent
;
return
(
~
u
.
indexOf
(
'Android'
)
||
~
u
.
indexOf
(
'Linux'
))
?
true
:
false
;
},
isIos
()
{
//判断是不是ios设备
return
~
navigator
.
userAgent
.
indexOf
(
'iPhone'
)
?
true
:
false
;
},
isWeixinBrowser
()
{
//判断是不是微信浏览器
return
~
navigator
.
userAgent
.
indexOf
(
'MicroMessenger'
)
?
true
:
false
;
},
isMobile
(
text
)
{
//验证手机号码格式是否正确
return
/^1
\d{10}
$/
.
test
(
text
)
?
true
:
false
;
},
backNowDate
()
{
let
a
=
new
Date
();
let
f
=
v
=>
(
v
<
10
?
(
'0'
+
v
)
:
(
''
+
v
));
return
a
.
getFullYear
()
+
'-'
+
f
(
a
.
getMonth
()
+
1
)
+
'-'
+
f
(
a
.
getDate
());
backNowDate
(
s
)
{
//返回当前日期,以2018-05-11的格式, a.toLocaleDateString();返回的是2018/5/11这样的格式
let
g
=
arguments
.
length
===
0
?
'-'
:
s
,
a
=
new
Date
(),
f
=
v
=>
(
v
<
10
?
(
'0'
+
v
)
:
(
''
+
v
));
return
a
.
getFullYear
()
+
g
+
f
(
a
.
getMonth
()
+
1
)
+
g
+
f
(
a
.
getDate
());
},
urlDeal
(
urlStr
,
httpStr
)
{
//处理
return
urlStr
.
replace
(
/
(
http|https
)
:
\/\/
/g
,
(
httpStr
?
(
httpStr
+
':'
)
:
location
.
protocol
)
+
'//'
);
},
hideTel
(
str
)
{
//隐藏手机号码中间四位,展示为*号
if
(
str
)
{
let
_arr
=
String
(
str
).
split
(
''
);
_arr
.
splice
(
3
,
4
,
'****'
);
...
...
@@ -34,32 +45,42 @@ export default {
return
str
;
}
},
transCn
(
num
)
{
let
e
=
String
(
num
).
split
(
''
),
a
=
[];
e
.
forEach
((
v
,
i
)
=>
{
a
[
i
]
=
[
'零'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'七'
,
'八'
,
'九'
][
e
[
i
]];
});
return
a
.
join
(
''
);
},
jineComma
(
s
,
n
)
{
if
(
s
){
if
(
n
===
0
){
//金额以32, 348, 000的形式显示
if
(
s
)
{
if
(
n
===
0
)
{
let
a
=
String
(
parseInt
(
s
)),
l
=
a
.
split
(
'.'
)[
0
].
split
(
''
).
reverse
(),
t
=
''
;
for
(
let
i
=
0
;
i
<
l
.
length
;
i
++
)
{
t
+=
l
[
i
]
+
((
i
+
1
)
%
3
==
0
&&
(
i
+
1
)
!=
l
.
length
?
','
:
''
);
};
return
t
.
split
(
''
).
reverse
().
join
(
''
).
replace
(
/
\,
/g
,
', '
);
}
else
{
for
(
let
i
=
0
;
i
<
l
.
length
;
i
++
)
{
t
+=
l
[
i
]
+
((
i
+
1
)
%
3
==
0
&&
(
i
+
1
)
!=
l
.
length
?
','
:
''
);
};
return
t
.
split
(
''
).
reverse
().
join
(
''
).
replace
(
/
\,
/g
,
', '
);
}
else
{
let
n
=
n
>
0
&&
n
<=
20
?
n
:
2
,
a
=
parseFloat
((
s
+
''
).
replace
(
/
[^\d\.
-
]
/g
,
''
)).
toFixed
(
n
)
+
''
,
l
=
a
.
split
(
'.'
)[
0
].
split
(
''
).
reverse
(),
r
=
a
.
split
(
'.'
)[
1
],
t
=
''
;
for
(
let
i
=
0
;
i
<
l
.
length
;
i
++
)
{
t
+=
l
[
i
]
+
((
i
+
1
)
%
3
==
0
&&
(
i
+
1
)
!=
l
.
length
?
','
:
''
);
};
return
(
t
.
split
(
''
).
reverse
().
join
(
''
)
+
'.'
+
r
).
replace
(
/
\,
/g
,
', '
);
for
(
let
i
=
0
;
i
<
l
.
length
;
i
++
)
{
t
+=
l
[
i
]
+
((
i
+
1
)
%
3
==
0
&&
(
i
+
1
)
!=
l
.
length
?
','
:
''
);
};
return
(
t
.
split
(
''
).
reverse
().
join
(
''
)
+
'.'
+
r
).
replace
(
/
\,
/g
,
', '
);
};
}
else
{
}
else
{
return
s
;
}
},
dealJineNum
(
num
)
{
//处理金额类的数字
if
(
isFinite
(
num
))
{
if
(
parseInt
(
num
)
==
num
||
num
.
toString
().
split
(
'.'
)[
1
].
length
<
4
)
{
return
num
;
...
...
@@ -70,6 +91,33 @@ export default {
return
0
;
};
},
duringRequest
(){
//请求发送状态判断
let
arr
=
[...
arguments
];
//arguments本身不是数组,是一个特殊的对象,后面的调用会使arguments发生变化,所以需要缓存起来
axios
.
interceptors
.
request
.
use
((
config
)
=>
{
arr
.
forEach
((
a
,
i
)
=>
{
if
(
~
config
.
url
.
indexOf
(
a
.
urlStr
)){
a
.
startAction
();
//执行请求开始的操作
};
});
return
config
;
},
(
error
)
=>
{
return
Promise
.
reject
(
error
);
});
//请求返回状态判断
axios
.
interceptors
.
response
.
use
((
res
)
=>
{
arr
.
forEach
((
a
,
i
)
=>
{
if
(
~
res
.
config
.
url
.
indexOf
(
a
.
urlStr
)){
a
.
endAction
();
//执行请求结束的操作
};
});
return
res
;
},
(
error
)
=>
{
return
Promise
.
reject
(
error
);
});
},
h5PageC
(
token
,
fn
){
let
_this
=
this
;
axios
({
...
...
public/appnew/src/components/achieveMain/achieveAgent.vue
0 → 100644
View file @
6503a60d
<
template
>
<div>
</div>
</
template
>
<
script
>
import
'@/assets/js/layer041002.js'
;
export
default
{
name
:
''
,
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({
message
:
'hello'
})
},
dataindex
:
{
type
:
[
Number
,
String
],
default
:
0
}
},
components
:
{
},
data
:
()
=>
({
}),
created
()
{
let
_this
=
this
;
},
mounted
()
{
let
_this
=
this
;
},
methods
:
{
},
computed
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
public/appnew/src/components/achieveMain/achieveFork.vue
View file @
6503a60d
...
...
@@ -21,12 +21,19 @@
<footer
class=
"oh achieve-footer"
>
<p
class=
"time-title tc"
>
统计时间:
{{
statisticsStartTime
+
'-'
+
statisticsEndTime
}}
</p>
<div
class=
"btn-area"
v-show=
"index
<2
"
>
<div
class=
"oh"
>
<
!--
<
div
class=
"oh"
>
<a
class=
"fl"
:href=
"linkAchieveYwy"
>
个人业绩
</a>
</div>
<div
class=
"oh"
v-if=
"userLevel!=10"
>
<a
v-if=
"userLevel==20"
:href=
"linkAchieveQy"
>
门店业绩
</a>
<a
v-else
:href=
"linkAchieveQy"
>
区域业绩
</a>
</div>
-->
<div
class=
"oh"
>
<a
class=
"fl"
href=
"javascript:;"
@
click=
"goPageAgent"
>
个人业绩
</a>
</div>
<div
class=
"oh"
v-if=
"userLevel!=10"
>
<a
v-if=
"userLevel==20"
href=
"javascript:;"
@
click=
"goPageRegion"
>
门店业绩
</a>
<a
v-else
href=
"javascript:;"
@
click=
"goPageRegion"
>
区域业绩
</a>
</div>
</div>
</footer>
...
...
@@ -103,8 +110,6 @@
_this
.
token
=
localStorage
.
getItem
(
'token'
);
_this
.
userid
=
localStorage
.
getItem
(
'userid'
);
_this
.
userLevel
=
localStorage
.
getItem
(
'userlevel'
);
_this
.
linkAchieveYwy
=
'/app_broker/achieve_ywy?ywyId='
+
_this
.
userid
;
_this
.
linkAchieveQy
=
'/app_broker/achieve_region?ywyId='
+
_this
.
userid
;
_this
.
ajaxUl
();
},
tabMain
(
index
)
{
...
...
@@ -129,21 +134,27 @@
})
.
then
(
function
(
response
)
{
if
(
response
.
data
.
code
==
200
)
{
_this
.
mainData
[
_index
].
isLoad
=
true
;
_this
.
statisticsStartTime
=
response
.
data
.
data
.
start_time
.
replace
(
/-/g
,
'.'
);
_this
.
statisticsEndTime
=
response
.
data
.
data
.
end_time
.
replace
(
/-/g
,
'.'
);
_this
.
mainData
[
_index
].
listData
=
response
.
data
.
data
.
list
.
slice
(
0
,
_this
.
mainData
[
_index
].
topLineNum
);
if
(
_index
<
2
){
//部门业绩(即区域业绩)时不需要这个
_this
.
mainData
[
_index
].
selfData
=
response
.
data
.
data
.
list
.
filter
(
function
(
item
,
index
,
array
)
{
if
(
_index
===
0
){
//人员排行
return
(
item
.
agent_id
===
item
.
is_my
);
}
else
if
(
_index
===
1
){
//门店排行
return
(
item
.
store_id
===
item
.
is_my
);
}
else
{};
})[
0
];
if
(
response
.
data
.
data
){
if
(
Array
.
isArray
(
response
.
data
.
data
)){
}
else
{
_this
.
mainData
[
_index
].
isLoad
=
true
;
_this
.
statisticsStartTime
=
response
.
data
.
data
.
start_time
.
replace
(
/-/g
,
'.'
);
_this
.
statisticsEndTime
=
response
.
data
.
data
.
end_time
.
replace
(
/-/g
,
'.'
);
_this
.
mainData
[
_index
].
listData
=
response
.
data
.
data
.
list
.
slice
(
0
,
_this
.
mainData
[
_index
].
topLineNum
);
if
(
_index
<
2
){
//部门业绩(即区域业绩)时不需要这个
_this
.
mainData
[
_index
].
selfData
=
response
.
data
.
data
.
list
.
filter
(
function
(
item
,
index
,
array
)
{
if
(
_index
===
0
){
//人员排行
return
(
item
.
agent_id
===
item
.
is_my
);
}
else
if
(
_index
===
1
){
//门店排行
return
(
item
.
store_id
===
item
.
is_my
);
}
else
{};
})[
0
];
};
};
};
}
else
{
layer
.
tipsX
(
response
.
data
.
msg
);
...
...
@@ -152,6 +163,24 @@
.
catch
(
function
(
error
)
{
layer
.
tipsX
(
error
);
});
},
goPageAgent
()
{
let
_this
=
this
;
_this
.
$router
.
push
({
path
:
'/achieveAgent'
,
query
:
{
'ywyId'
:
_this
.
userid
}
});
},
goPageRegion
()
{
let
_this
=
this
;
_this
.
$router
.
push
({
path
:
'/achieveRegion'
,
query
:
{
'ywyId'
:
_this
.
userid
}
});
}
}
}
...
...
public/appnew/src/components/achieveMain/achieveRegion.vue
0 → 100644
View file @
6503a60d
<
template
>
<div>
</div>
</
template
>
<
script
>
import
'@/assets/js/layer041002.js'
;
export
default
{
name
:
''
,
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({
message
:
'hello'
})
},
dataindex
:
{
type
:
[
Number
,
String
],
default
:
0
}
},
components
:
{
},
data
:
()
=>
({
}),
created
()
{
let
_this
=
this
;
},
mounted
()
{
let
_this
=
this
;
},
methods
:
{
},
computed
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
public/appnew/src/components/publicEg/entrance.vue
View file @
6503a60d
...
...
@@ -9,7 +9,7 @@
</
template
>
<
script
>
let
_token
=
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo
zLCJuYW1lIjoiXHU0ZThlXHU3NmZjXHU3NmZjIiwicGhvbmUiOiIxMzkxODkzNzc0MSIsImxldmVsIjoyMH0sInRpbWVTdGFtcF8iOjE1MjUzOTk0Nzl9.q3Eviv399NeN8PUEeLlPVCV4bxOtkqjDhVoejmBfHNc
'
;
let
_token
=
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo
1NzQyLCJuYW1lIjoiXHU0ZThlXHU3NmZjXHU3NmZjIiwicGhvbmUiOiIxMzkxODkzNzc0MSIsImxldmVsIjoyMH0sInRpbWVTdGFtcF8iOjE1Mjg5NDIzNTh9.-HlJUkvPCCrfhacC9WKcWEiNzUHhL0PujDGONcwPtA0
'
;
export
default
{
name
:
''
,
data
()
{
...
...
public/appnew/src/components/publicEg/errorImg.vue
View file @
6503a60d
<
template
>
<
img
v-if=
"imgtype"
:src=
"datasrc"
:onerror=
"onErrorImg"
/
>
<
div
v-else
class=
"img-error-div"
>
占位图
</div
>
<
div
v-if=
"imgtype==='div'"
class=
"img-error-div"
>
占位图
</div
>
<
img
v-else
:src=
"src"
:onerror=
"onErrorImg"
/
>
</
template
>
<
script
>
import
onErrorImg
from
'@/assets/images/ic_default_headpic.png'
;
import
onErrorImgAvatar
from
'@/assets/images/ic_default_headpic.png'
;
import
onErrorImgHouse
from
'@/assets/images/ic_default_headpic.png'
;
export
default
{
props
:
{
datasrc
:
{
...
...
@@ -17,18 +18,26 @@
}
},
data
()
{
let
_obj
=
{};
if
(
this
.
imgtype
===
'avatar'
){
_obj
[
'onErrorImg'
]
=
'this.src="'
+
onErrorImg
+
'"'
;
}
else
{
_obj
[
'onErrorImg'
]
=
'this.src="'
+
onErrorImg
+
'"'
;
let
_this
=
this
;
let
_bitmap
=
onErrorImgAvatar
;
if
(
_this
.
imgtype
===
'house'
){
_bitmap
=
onErrorImgHouse
;
};
return
_obj
;
return
{
'bitmap'
:
_bitmap
,
'src'
:
_this
.
datasrc
?
_this
.
datasrc
:
_bitmap
,
'onErrorImg'
:
'this.src="'
+
_bitmap
+
'"'
};
},
watch
:
{
datasrc
(
newValue
,
oldVal
)
{
this
.
src
=
newValue
?
newValue
:
this
.
bitmap
;
//当父组件传入的datasrc更新时,把src改为新值
}
}
}
</
script
>
<
style
scoped
>
<
style
>
.img-error-div
{
font-size
:
0
;
background-color
:
#e0e0e0
;
...
...
public/appnew/src/components/publicEg/paginationLoad.vue
0 → 100644
View file @
6503a60d
<
template
>
<div
class=
"loadmore"
ref=
"loadmore"
>
<div
class=
"loadmore__body"
>
<slot></slot>
</div>
<div
class=
"loadmore__footer"
>
<!--
<span
v-if=
"stop"
><i
class=
"tc-loading"
></i><span>
正在加载...
</span></span>
-->
<!--
<span
v-else-if=
"loading"
>
正在加载...
</span>
-->
<!--
<span
v-else
>
没有更多了
</span>
-->
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
/**
* 是否加载
*/
canload
:
{
type
:
Boolean
,
default
:
true
,
},
/**
* 滚动外部容器, 选择器字符串
*/
container
:
{
default
:
()
=>
(
global
),
},
/**
* 距离底部多远加载
*/
distance
:
{
type
:
Number
,
default
:
100
,
},
},
data
()
{
return
{
dom
:
null
,
// 外部容器dom
}
},
mounted
()
{
if
(
this
.
container
!==
global
)
{
this
.
dom
=
document
.
querySelector
(
this
.
container
)
}
else
{
this
.
dom
=
this
.
container
}
if
(
!
this
.
dom
)
{
return
}
this
.
dom
.
addEventListener
(
'scroll'
,
this
.
scroll
,
false
)
},
methods
:
{
/**
* 滚动钩子
*/
scroll
()
{
if
(
!
this
.
canload
)
{
return
}
const
viewHeight
=
global
.
innerHeight
let
parentNode
if
(
this
.
container
!==
global
)
{
parentNode
=
this
.
$el
}
else
{
parentNode
=
this
.
$el
.
parentNode
}
if
(
parentNode
)
{
const
rect
=
parentNode
.
getBoundingClientRect
()
if
((
rect
.
bottom
<=
viewHeight
+
this
.
distance
))
{
//DOM 更新循环结束之后执行
this
.
$nextTick
(()
=>
{
this
.
load
()
})
}
}
},
/**
* 加载一组数据的方法
*/
load
()
{
this
.
$emit
(
'load'
)
},
},
beforeDestroy
()
{
if
(
this
.
dom
)
{
this
.
dom
.
removeEventListener
(
'scroll'
,
this
.
scroll
,
false
)
}
},
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
public/appnew/src/main.js
View file @
6503a60d
...
...
@@ -12,7 +12,9 @@ import axios from 'axios'
import
qs
from
'qs'
import
VueAxios
from
'vue-axios'
//import VueAwesomeSwiper from 'vue-awesome-swiper';
//Vue.use(VueAwesomeSwiper);
import
common
from
'@/assets/js/public.js'
;
Vue
.
prototype
.
common
=
common
;
axios
.
defaults
.
timeout
=
20000
;
//设置请求最大时长,超时将取消
axios
.
defaults
.
baseURL
=
common
.
ServerHost
;
...
...
@@ -46,8 +48,6 @@ axios.interceptors.response.use((res) => {
//vue-axios是为了注册axios更加规范而引入的
//下面的use顺序不能写反
Vue
.
use
(
VueAxios
,
axios
);
//Vue.use(VueAwesomeSwiper);
Vue
.
prototype
.
common
=
common
;
//把common注册到Vue全局
Vue
.
config
.
productionTip
=
true
;
...
...
public/appnew/src/router/index.js
View file @
6503a60d
...
...
@@ -2,6 +2,8 @@ import Vue from 'vue'
import
Router
from
'vue-router'
import
entrance
from
'@/components/publicEg/entrance'
import
achieveFork
from
'@/components/achieveMain/achieveFork'
import
achieveAgent
from
'@/components/achieveMain/achieveAgent'
import
achieveRegion
from
'@/components/achieveMain/achieveRegion'
import
feeds
from
'@/components/feed/feeds'
import
reportDetails
from
'@/components/reportDetails/reportDetails'
import
announcementDetails
from
'@/components/announcementDetails/announcementDetails'
...
...
@@ -24,6 +26,16 @@ export default new Router({
name
:
'v-achieve-fork'
,
component
:
achieveFork
},
{
path
:
'/achieveAgent'
,
name
:
'v-achieve-agent'
,
component
:
achieveAgent
},
{
path
:
'/achieveRegion'
,
name
:
'v-achieve-region'
,
component
:
achieveRegion
},
{
path
:
'/feeds'
,
name
:
'v-feeds'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment