Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
Project
Project
Details
Activity
Releases
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
华国豪
Athena
Commits
062c8d56
Commit
062c8d56
authored
Apr 24, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新版本优惠券
parent
5c742623
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
452 additions
and
30 deletions
+452
-30
App.vue
src/App.vue
+1
-1
MemberCenter.css
src/assets/css/newPersonalCenter/block/MemberCenter.css
+48
-2
MyCoupon.css
src/assets/css/newPersonalCenter/block/MyCoupon.css
+170
-0
newHead.css
src/assets/mall/newHead.css
+1
-0
newHead.vue
src/components/global/newHead.vue
+7
-6
MemberCenter.vue
src/components/newPersonalCenter/block/MemberCenter.vue
+11
-9
MyCoupon.vue
src/components/newPersonalCenter/block/MyCoupon.vue
+197
-0
newPersonalCenter.vue
src/components/newPersonalCenter/newPersonalCenter.vue
+15
-11
main.js
src/main.js
+2
-1
No files found.
src/App.vue
View file @
062c8d56
...
...
@@ -59,7 +59,7 @@ export default {
<
style
>
@import
'./assets/global/font.css'
;
@import
'//at.alicdn.com/t/font_863923_
adaetrmddt6
.css'
;
@import
'//at.alicdn.com/t/font_863923_
efb26gusuoj
.css'
;
@import
'./assets/global/global.css'
;
body
,
html
{
padding
:
0px
;
...
...
src/assets/css/newPersonalCenter/block/MemberCenter.css
View file @
062c8d56
...
...
@@ -209,11 +209,57 @@
padding
:
0
65px
;
height
:
70px
;
line-height
:
70px
;
display
:
flex
;
}
.level
.level_bottom
._icon_list
._item
{
height
:
64px
;
width
:
64px
;
border-radius
:
50%
;
text-align
:
center
;
background-color
:
#E9C398
;
position
:
relative
;
margin-right
:
10px
;
z-index
:
1
;
overflow
:
hidden
;
}
.level
.level_bottom
._icon_list
i
{
font-size
:
50
px
;
font-size
:
46
px
;
color
:
#F8B04B
;
padding-right
:
25px
;
display
:
inline-block
;
height
:
60px
;
width
:
60px
;
border-radius
:
50%
;
background-color
:
white
;
z-index
:
3
;
position
:
absolute
;
left
:
2px
;
top
:
2px
;
}
.level
.level_bottom
._icon_list
._item
:hover
._raduis
{
width
:
64px
;
}
.level
.level_bottom
._icon_list
._item
:hover
._raduis
{
width
:
64px
;
}
.level
.level_bottom
._icon_list
._raduis
{
position
:
absolute
;
width
:
0px
;
height
:
32px
;
background-color
:
#d58933
;
border-radius
:
0
0
64px
64px
;
margin-right
:
10px
;
display
:
inline-block
;
bottom
:
0
;
left
:
0
;
z-index
:
2
;
transition
:
all
ease-in
.5s
;
}
.level
.level_bottom
._icon_list
._raduis._raduis2
{
right
:
-10px
;
top
:
0
;
left
:
inherit
;
border-radius
:
64px
64px
0
0
;
transition
:
all
.5s
ease-out
.5s
;
}
/* 等级权益 */
.level_equity
{
...
...
src/assets/css/newPersonalCenter/block/MyCoupon.css
0 → 100644
View file @
062c8d56
.MyCoupon
{
background-color
:
#F5F5F5
;
}
.MyCoupon
.menu_list
ul
{
height
:
40px
;
line-height
:
40px
;
border-bottom
:
1px
solid
#F2DADA
;
}
.MyCoupon
.menu_list
ul
li
{
float
:
left
;
width
:
137px
;
text-align
:
center
;
}
.MyCoupon
.menu_list
ul
li
.__cp
i
{
padding-left
:
25px
;
}
.MyCoupon
.menu_list
ul
li
span
.__cp
{
font-size
:
14px
;
}
.MyCoupon
.menu_list
ul
li
span
.__cp._active
{
color
:
#E73828
}
.MyCoupon
._table_box
{
margin-top
:
20px
;
}
.MyCoupon
._content_item
{
display
:
flex
;
flex-wrap
:
wrap
;
min-height
:
572px
;
}
.MyCoupon
._content_item
._item
{
width
:
220px
;
position
:
relative
;
transition
:
all
linear
.5s
;
overflow
:
hidden
;
margin
:
5px
4px
;
}
.MyCoupon
._content_item
._item
:hover
{
box-shadow
:
0px
1px
13px
0px
rgb
(
189
,
189
,
189
);
}
.MyCoupon
._content_item
._top
{
background-color
:
#F1BC69
;
}
.MyCoupon
._content_item
._top
._time
{
color
:
#A7711C
;
}
.MyCoupon
._content_item
._top._blue
{
background-color
:
#8794E2
;
}
.MyCoupon
._content_item
._top._blue
._time
{
color
:
#4C58A4
;
}
.MyCoupon
._content_item
div
._top._gray
{
background-color
:
#C3C3C3
!important
;
}
.MyCoupon
._content_item
div
._top._gray
._overdue
,
.MyCoupon
._content_item
div
._top._gray
._info_bottom
{
display
:
none
}
.MyCoupon
._content_item
div
._top._gray
._info_sale
{
color
:
#FFFFFF
!important
;
}
.MyCoupon
._content_item
div
._top._gray
._time
{
color
:
#777777
!important
;
}
.MyCoupon
._top_raduis
{
display
:
flex
;
justify-content
:
space-between
;
}
.MyCoupon
._top_raduis
span
{
display
:
inline-block
;
width
:
8px
;
height
:
8px
;
margin
:
3px
;
border-radius
:
50%
;
background-color
:
white
;
margin-top
:
-4px
;
}
.MyCoupon
._item
._top
._overdue
{
background-color
:
#E9F026
;
color
:
#666666
;
padding
:
4px
6px
;
position
:
absolute
;
left
:
0
;
top
:
0
;
font-size
:
12px
;
}
.MyCoupon
._item
._top
._info_details
{
padding
:
15px
10px
;
}
.MyCoupon
._item
._top
._info_details
._info_sale
{
font-size
:
30px
;
color
:
white
;
}
.MyCoupon
._item
._top
._info_details
._info_sale
span
{
font-size
:
20px
;
color
:
white
;
}
.MyCoupon
._item
._top
._info_details
._info_full
{
color
:
#FFFFFF
;
font-size
:
12px
;
padding
:
5px
0
;
}
.MyCoupon
._item
._top
._info_details
._info_time
{
font-size
:
12px
;
}
.MyCoupon
._item
._top
._info_details
._info_bottom
{
padding
:
1px
5px
;
color
:
#A7711C
;
font-size
:
12px
;
position
:
absolute
;
border
:
1px
solid
#A7711C
;
border-radius
:
4px
;
right
:
13px
;
top
:
24px
;
cursor
:
pointer
;
}
.MyCoupon
._item
._bottom
{
padding
:
15px
10px
;
background-color
:
#F9F9F9
;
}
.MyCoupon
._item
._bottom
p
{
font-size
:
12px
;
color
:
#333333
;
font-weight
:
bold
;
margin-bottom
:
13px
;
}
.MyCoupon
._item
._bottom
p
._bottom_info
{
color
:
#666666
;
font-weight
:
300
;
}
.MyCoupon
._item
._bottom
p
._margin_bt0
{
margin-bottom
:
0
!important
;
}
.MyCoupon
p
._info_coupon_name
{
font-size
:
18px
!important
;
max-width
:
140px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
color
:
white
;
}
/* 分页样式 */
.MyCoupon
._pagination
{
height
:
45px
;
background-color
:
#EBEBEB
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
}
.MyCoupon
.el-pagination
.btn-next
,
.MyCoupon
.el-pagination
.btn-prev
{
width
:
40px
!important
;
height
:
20px
!important
;
border
:
1px
solid
rgba
(
238
,
68
,
84
,
1
);
border-radius
:
10px
;
color
:
#f56c6c
;
}
.MyCoupon
.el-pagination
{
display
:
flex
;
align-items
:
center
;
}
.MyCoupon
.el-pager
li
{
background
:
transparent
;
font-weight
:
initial
;
}
.MyCoupon
.el-pager
li
:hover
{
color
:
#f56c6c
;
}
.MyCoupon
.el-pager
li
.active
{
color
:
#f56c6c
;
}
\ No newline at end of file
src/assets/mall/newHead.css
View file @
062c8d56
...
...
@@ -165,6 +165,7 @@ ul,li{list-style: none;}
}
.new_header_nav_three
ul
._t_nav_box
li
div
span
.__splice
{
float
:
right
;
color
:
rgba
(
203
,
39
,
54
,
1
);
}
.new_header_nav_three
ul
._t_nav_box
li
div
.icon-xia
{
padding-left
:
2px
;
...
...
src/components/global/newHead.vue
View file @
062c8d56
...
...
@@ -43,9 +43,10 @@
<span
class=
"__cp"
>
个人中心
<i
class=
"iconfont icon-xia"
></i></span>
</span>
<el-dropdown-menu
class=
"changelanguage"
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"goUrl('newPersonalCenter')"
>
个人中心
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
""
>
会员中心
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
""
>
个人信息
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"goUrl('newPersonalCenter', '1')"
>
个人中心
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"goUrl('newPersonalCenter', '2')"
>
会员中心
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"goUrl('newPersonalCenter', '8-1')"
>
订单中心
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"goUrl('newPersonalCenter', '3-1')"
>
个人信息
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
""
>
我的积分
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
""
>
我的优惠券
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
""
>
我的奖品
</el-dropdown-item>
...
...
@@ -320,10 +321,10 @@ export default {
this
.
Error
(
'请输入搜索关键词'
)
}
},
goUrl
(
path
){
// 个人中心、订单跳转方法
goUrl
(
path
,
key
){
// 个人中心、订单跳转方法
localStorage
.
removeItem
(
'navActive'
)
this
.
$router
.
push
({
name
:
path
});
this
.
navActive
=
''
this
.
$router
.
push
({
name
:
path
,
query
:{
key
:
key
}
});
this
.
MsgBus
.
$emit
(
'newPersonalCenter'
,
key
)
},
goLoginUrl
(
path
,
t
){
// 登录退出
this
.
$store
.
commit
(
'changeLogin'
,
0
);
...
...
src/components/newPersonalCenter/block/MemberCenter.vue
View file @
062c8d56
...
...
@@ -65,7 +65,7 @@
<p>
(1)
</p>
</li>
<li>
<div
class=
"_raduis
no_color
"
>
<div
class=
"_raduis"
>
<i
class=
"number"
>
2
</i>
<span
class=
"_dot _dot_m _dot_m_t"
></span>
<span
class=
"_dot _dot_l"
></span>
...
...
@@ -144,11 +144,13 @@
<p>
我的会员特权:
</p>
<el-carousel
indicator-position=
"none"
arrow=
"always"
:autoplay=
"false"
height=
"70px"
>
<el-carousel-item
v-for=
"(item, index) in iconList"
:key=
"index"
>
<p
class=
"_icon_list"
>
<template
v-for=
"son in item.list"
>
<div
class=
"_icon_list"
>
<div
class=
"_item"
v-for=
"son in item.list"
>
<span
class=
"_raduis _raduis2"
></span>
<i
:class=
"['iconfont', son]"
></i>
</
template
>
</p>
<span
class=
"_raduis"
></span>
</div>
</div>
</el-carousel-item>
</el-carousel>
</el-row>
...
...
@@ -347,16 +349,16 @@ export default {
userInfo
:
{},
iconList
:
[
{
list
:
[
'icon-
jifen'
,
'icon-jifen'
,
'icon-jifen
'
]
list
:
[
'icon-
zhekouquan'
,
'icon-yuding'
,
'icon-qiandao
'
]
},
{
list
:
[
'icon-
jifen'
,
'icon-jifen'
,
'icon-jifen
'
]
list
:
[
'icon-
zhekouquan'
,
'icon-yuding'
,
'icon-qiandao
'
]
},
{
list
:
[
'icon-
jifen'
,
'icon-jifen'
,
'icon-jifen
'
]
list
:
[
'icon-
zhekouquan'
,
'icon-yuding'
,
'icon-qiandao
'
]
},
{
list
:
[
'icon-
jifen'
,
'icon-jifen'
,
'icon-jifen
'
]
list
:
[
'icon-
zhekouquan'
,
'icon-yuding'
,
'icon-qiandao
'
]
},
],
}
...
...
src/components/newPersonalCenter/block/MyCoupon.vue
0 → 100644
View file @
062c8d56
<
style
>
@import
"../../../assets/css/newPersonalCenter/block/MyCoupon.css"
;
</
style
>
<
template
>
<el-row
class=
"MyCoupon"
>
<!-- 优惠券 -->
<el-row
class=
"menu_list"
>
<ul
class=
"clearfix"
>
<li>
<el-dropdown
trigger=
"click"
placement=
"bottom-start"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"__cp"
>
{{
dropdownText
}}
<i
class=
"iconfont el-icon-arrow-down"
></i>
</span>
</span>
<el-dropdown-menu
class=
"changelanguage"
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"dropdownText = '通用', msg.couponsUseScope = 1, getList(), resetPageIndex()"
>
通用
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"dropdownText = '跟团游', msg.couponsUseScope = 2, getList(), resetPageIndex()"
>
跟团游
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"dropdownText = '当地游'"
>
当地游
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"dropdownText = '定制游'"
>
定制游
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"dropdownText = '签证', msg.couponsUseScope = 3, getList(), resetPageIndex()"
>
签证
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"dropdownText = '机票', msg.couponsUseScope = 4, getList(), resetPageIndex()"
>
机票
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"dropdownText = '酒店'"
>
酒店
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
<li>
<span
class=
"__cp"
:class=
"
{_active: typeActive === 1 }" @click="typeActive = 1, msg.couponsType = 0, msg.couponEffectStatus = 1, getList(), resetPageIndex()">全部优惠券
</span>
</li>
<li>
<span
class=
"__cp"
:class=
"
{_active: typeActive === 2 }" @click="typeActive = 2, msg.couponsType = 2, msg.couponEffectStatus = 1, getList(), resetPageIndex()">折扣券
</span>
</li>
<li>
<span
class=
"__cp"
:class=
"
{_active: typeActive === 3 }" @click="typeActive = 3, msg.couponsType = 1, msg.couponEffectStatus = 1, getList(), resetPageIndex()">抵扣券
</span>
</li>
<li>
<span
class=
"__cp"
:class=
"
{_active: typeActive === 4 }" @click="typeActive = 4, msg.couponEffectStatus = 3, getList(), resetPageIndex()">已过期
</span>
</li>
</ul>
</el-row>
<el-row
class=
"_table_box"
v-loading=
"dataLoading"
>
<div
v-if=
"dataList.length>0"
class=
"_content_item"
>
<div
class=
"_item"
v-for=
"(item, index) in dataList"
>
<div
class=
"_top"
:class=
"
{'_blue':item.couponsType===1,'_gray':item.couponEffectStatus===3,}"
>
<div
class=
"_top_raduis"
>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div
class=
"_overdue"
v-if=
"item.warning"
>
即将过期
</div>
<div
class=
"_info_details"
>
<p
class=
"_info_coupon_name"
:title=
"item.couponsName"
>
{{
item
.
couponsName
}}
</p>
<p
class=
"_info_sale"
v-if=
"item.couponsType !== 1"
>
{{
item
.
denomination
}}
<span>
折
</span>
</p>
<p
class=
"_info_sale"
v-else
>
<span>
¥
</span>
{{
item
.
denomination
}}
</p>
<p
class=
"_info_full"
>
满
{{
item
.
useCondition
}}
可用
</p>
<p
class=
"_info_time _time"
>
有效时间:
{{
item
.
effectDate
|
YMD
}}
-
{{
item
.
expirationDate
|
YMD
}}
</p>
<p
class=
"_info_bottom"
@
click=
"goUrl('heel',true)"
>
去使用
</p>
</div>
</div>
<div
class=
"_bottom"
>
<p
class=
"_bottom_tit"
>
可用线路及系列
</p>
<p
class=
"_bottom_info"
>
{{
item
.
lineName
===
''
?
'不限'
:
item
.
lineName
}}
-
{{
item
.
lineTeamName
===
''
?
'不限'
:
item
.
lineTeamName
}}
</p>
<p
class=
"_bottom_tit"
>
优惠券来源
</p>
<p
class=
"_bottom_info _margin_bt0"
>
{{
item
.
accessType
===
1
?
'抽奖活动'
:
'其他'
}}
</p>
</div>
</div>
</div>
<div
class=
"empty-data"
v-else
>
<i
class=
"iconfont icon-kong"
></i>
很抱歉,你想要的信息我们真的找不到了
</div>
<!-- 分页 -->
<el-row
class=
"_pagination"
v-if=
"totalCount > 1 && dataList.length>0"
>
<el-pagination
:current-page
.
sync=
"currentPage"
:page-size=
"msg.pageSize"
layout=
"total, prev, pager, next"
:total=
"Count"
@
current-change=
'handleCurrentChange'
>
</el-pagination>
</el-row>
</el-row>
</el-row>
</
template
>
<
script
>
export
default
{
components
:
{},
data
()
{
return
{
dropdownText
:
"通用"
,
typeActive
:
1
,
totalCount
:
1
,
pageSize
:
1
,
msg
:
{
pageIndex
:
1
,
pageSize
:
8
,
useState
:
1
,
lineId
:
0
,
lineteamId
:
0
,
couponsName
:
""
,
couponsType
:
""
,
couponStatus
:
1
,
couponEffectStatus
:
1
,
couponsUseScope
:
1
},
dataList
:
[],
dataLoading
:
false
,
currentPage
:
1
,
Count
:
1
,
};
},
computed
:
{},
created
()
{},
mounted
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
// 获取数据
this
.
dataLoading
=
true
;
this
.
msg
.
orderType
=
this
.
active
;
this
.
apiJavaPost
(
"/api/b2b/user/getUserCouponAllotList"
,
this
.
msg
,
res
=>
{
console
.
log
(
res
);
let
nowTime
=
this
.
getNowDate
();
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
.
pageData
;
data
.
forEach
((
x
,
i
)
=>
{
let
cha
=
this
.
DateDiff
(
nowTime
,
x
.
expirationDate
);
if
(
cha
<
3
)
{
x
.
warning
=
true
;
}
else
{
x
.
warning
=
false
;
}
});
this
.
dataList
=
data
;
this
.
totalCount
=
res
.
data
.
data
.
pageCount
;
this
.
Count
=
res
.
data
.
data
.
count
;
this
.
$forceUpdate
()
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
this
.
dataLoading
=
false
;
},
null
);
},
goUrl
(
path
,
bl
){
// console.log("path",path)
if
(
path
==
'heel'
){
sessionStorage
.
setItem
(
"defaultKey"
,
'2-1'
);
this
.
$emit
(
'forword'
,
'2-1'
)
}
sessionStorage
.
setItem
(
"Homepage"
,
bl
);
this
.
$store
.
commit
(
'HomePage'
,
bl
)
this
.
$router
.
push
({
name
:
path
});
},
resetPageIndex
()
{
//查询初始化页码
this
.
msg
.
pageIndex
=
1
;
},
handleCurrentChange
(
val
)
{
// 翻页
this
.
msg
.
pageIndex
=
parseInt
(
val
);
this
.
getList
();
}
}
};
</
script
>
\ No newline at end of file
src/components/newPersonalCenter/newPersonalCenter.vue
View file @
062c8d56
<
style
>
.new_personal_center
{
padding-top
:
25px
;
background-color
:
#F5F5F5
;
}
.w1180
{
width
:
1180px
!important
;
...
...
@@ -78,14 +79,10 @@
<el-menu-item
index=
"4-1"
@
click=
"clickMenu('4-1')"
>
选项1
</el-menu-item>
<el-menu-item
index=
"4-2"
@
click=
"clickMenu('4-2')"
>
选项2
</el-menu-item>
</el-submenu>
<el-submenu
index=
"5"
>
<
template
slot=
"title"
>
<i
class=
"iconfont icon-youhuiquanicon"
></i>
<span>
我的优惠券
</span>
</
template
>
<el-menu-item
index=
"5-1"
@
click=
"clickMenu('5-1')"
>
选项1
</el-menu-item>
<el-menu-item
index=
"5-2"
@
click=
"clickMenu('5-2')"
>
选项2
</el-menu-item>
</el-submenu>
<el-menu-item
index=
"5"
@
click=
"clickMenu('5')"
>
<i
class=
"iconfont icon-youhuiquanicon"
></i>
<span>
我的优惠券
</span>
</el-menu-item>
<el-menu-item
index=
"6"
@
click=
"clickMenu('6')"
>
<i
class=
"iconfont icon-youhuiquanicon"
></i>
<span
slot=
"title"
>
我的奖品
</span>
...
...
@@ -106,6 +103,8 @@
<Information
v-else-if=
"active.indexOf('3-') !== -1"
:data=
"active"
/>
<!-- 订单中心 -->
<OrderCenter
v-else-if=
"active.indexOf('8-') !== -1"
:data=
"active"
/>
<!-- 优惠券 -->
<MyCoupon
v-else-if=
"active === '5'"
:data=
"active"
/>
</el-col>
</el-row>
</div>
...
...
@@ -117,12 +116,14 @@ import HomePage from '@/components/newPersonalCenter/block/HomePage'
import
Information
from
'@/components/newPersonalCenter/block/Information'
import
MemberCenter
from
'@/components/newPersonalCenter/block/MemberCenter'
import
OrderCenter
from
'@/components/newPersonalCenter/block/OrderCenter'
import
MyCoupon
from
'@/components/newPersonalCenter/block/MyCoupon'
export
default
{
components
:
{
HomePage
,
Information
,
MemberCenter
,
OrderCenter
OrderCenter
,
MyCoupon
},
data
()
{
return
{
...
...
@@ -139,13 +140,16 @@ export default {
clickMenu
:
function
(
key
)
{
this
.
active
=
key
console
.
log
(
key
)
},
setActive
:
function
(){
this
.
active
=
this
.
$route
.
query
.
key
?
this
.
$route
.
query
.
key
:
'1'
;
}
},
mounted
()
{
this
.
active
=
this
.
$route
.
query
.
key
?
this
.
$route
.
query
.
key
:
'1'
;
},
created
()
{
this
.
MsgBus
.
$on
(
'newPersonalCenter'
,
this
.
setActive
)
}
}
</
script
>
src/main.js
View file @
062c8d56
...
...
@@ -15,7 +15,7 @@ import commonUtils from './assets/utils/commonUtils'
import
languageUtils
from
'./assets/utils/languageUtils'
//引入语言转换帮助类
import
moment
from
'moment'
import
co
from
'co'
import
MsgBus
from
'./plugins/event-bus'
// 使用Vue.use()方法就会调用工具方法中的install方法
Vue
.
use
(
htmlToPdf
)
Vue
.
use
(
VueLazyload
)
...
...
@@ -32,6 +32,7 @@ Vue.use(plug)
Vue
.
http
=
Vue
.
prototype
.
$http
=
axios
Vue
.
commonUtils
=
Vue
.
prototype
.
$commonUtils
=
commonUtils
Vue
.
languageUtils
=
Vue
.
prototype
.
$languageUtils
=
languageUtils
Vue
.
prototype
.
MsgBus
=
MsgBus
Vue
.
prototype
.
$echarts
=
echarts
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// console.log("from",from.path)
...
...
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