Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
02d25a01
Commit
02d25a01
authored
Jun 02, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
20a108df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
230 additions
and
174 deletions
+230
-174
userCenter.vue
src/components/StoreDesign/userCenter.vue
+230
-174
No files found.
src/components/StoreDesign/userCenter.vue
View file @
02d25a01
...
...
@@ -607,11 +607,13 @@
<div
class=
"LastMenu_Second"
>
{{item.MenuName}}
</div>
<div
class=
"LastMenu_Third"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top-start"
>
<el-button
circle
type=
"primary"
size=
"mini"
icon=
"el-icon-edit"
@
click=
"upDateMsg(item,4),comCheckIndex=index"
>
<el-button
circle
type=
"primary"
size=
"mini"
icon=
"el-icon-edit"
@
click=
"upDateMsg(item,4),comCheckIndex=index"
>
</el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top-start"
>
<el-button
circle
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"deleteItem(index,item)"
>
<el-button
circle
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"deleteItem(index,item)"
>
</el-button>
</el-tooltip>
</div>
...
...
@@ -622,7 +624,7 @@
</el-form>
</div>
<el-button
size=
"small"
type=
"primary"
@
click=
"SetMiniUserCenterConfig()"
>
保存
</el-button>
<el-button
size=
"small"
@
click=
"
resetInfo
()"
>
恢复默认
</el-button>
<el-button
size=
"small"
@
click=
"
RestoreDefault
()"
>
恢复默认
</el-button>
</div>
</div>
...
...
@@ -672,10 +674,10 @@
export
default
{
data
()
{
return
{
comCheckIndex
:
-
1
,
imgType
:
-
1
,
comCheckIndex
:
-
1
,
imgType
:
-
1
,
//图片选择弹窗
choicImg
:
false
,
choicImg
:
false
,
//是否显示链接弹窗
isShowLink
:
false
,
commonEditTitle
:
''
,
...
...
@@ -783,14 +785,14 @@
methods
:
{
//选择图片
SelectId
(
msg
)
{
if
(
this
.
imgType
==
1
)
{
this
.
postMsg
.
DefaultBgImg
=
this
.
getIconLink
(
msg
.
url
);
}
else
if
(
this
.
imgType
==
2
)
{
this
.
postMsg
.
MemberBgImg
=
this
.
getIconLink
(
msg
.
url
);
}
else
if
(
this
.
imgType
==
3
)
{
this
.
postMsg
.
VipBgImg
=
this
.
getIconLink
(
msg
.
url
);
}
else
if
(
this
.
imgType
==
4
)
{
this
.
modifyMsg
.
image
=
this
.
getIconLink
(
msg
.
url
);
if
(
this
.
imgType
==
1
)
{
this
.
postMsg
.
DefaultBgImg
=
this
.
getIconLink
(
msg
.
url
);
}
else
if
(
this
.
imgType
==
2
)
{
this
.
postMsg
.
MemberBgImg
=
this
.
getIconLink
(
msg
.
url
);
}
else
if
(
this
.
imgType
==
3
)
{
this
.
postMsg
.
VipBgImg
=
this
.
getIconLink
(
msg
.
url
);
}
else
if
(
this
.
imgType
==
4
)
{
this
.
modifyMsg
.
image
=
this
.
getIconLink
(
msg
.
url
);
}
this
.
choicImg
=
false
;
},
...
...
@@ -809,23 +811,23 @@
},
//修改确定
updateInfo
()
{
switch
(
this
.
EditIndex
)
{
switch
(
this
.
EditIndex
)
{
case
1
:
this
.
postMsg
.
FavoriteFootMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
FavoriteFootMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
break
;
this
.
postMsg
.
FavoriteFootMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
FavoriteFootMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
break
;
case
2
:
this
.
postMsg
.
OrderMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
OrderMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
this
.
postMsg
.
OrderMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
OrderMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
break
;
case
3
:
this
.
postMsg
.
AccountMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
AccountMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
this
.
postMsg
.
AccountMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
AccountMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
break
;
case
4
:
this
.
postMsg
.
SelfMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
SelfMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
break
;
this
.
postMsg
.
SelfMenuList
[
this
.
comCheckIndex
].
MenuName
=
this
.
modifyMsg
.
name
;
this
.
postMsg
.
SelfMenuList
[
this
.
comCheckIndex
].
MenuIcon
=
this
.
modifyMsg
.
image
;
break
;
}
this
.
isShowDialog
=
false
;
},
...
...
@@ -833,7 +835,7 @@
upDateMsg
(
item
,
index
)
{
this
.
isShowDialog
=
true
;
this
.
EditIndex
=
index
;
this
.
imgType
=
4
;
this
.
imgType
=
4
;
switch
(
index
)
{
case
1
:
this
.
commonEditTitle
=
'收藏栏编辑'
;
...
...
@@ -914,167 +916,25 @@
if
(
jsonData
.
FavoriteFootMenuList
)
{
this
.
postMsg
.
FavoriteFootMenuList
=
jsonData
.
FavoriteFootMenuList
;
}
else
{
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
==
1
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"我的收藏"
||
subItem
.
PageName
==
"我的足迹"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
item
.
PageTypeId
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
if
(
subItem
.
PageName
==
"我的收藏"
)
{
dObj
.
MenuIcon
=
this
.
defaultMsg
.
FavoriteIcon
;
}
if
(
subItem
.
PageName
==
"我的足迹"
)
{
dObj
.
MenuIcon
=
this
.
defaultMsg
.
FootIcon
;
}
this
.
postMsg
.
FavoriteFootMenuList
.
push
(
dObj
);
}
})
}
})
this
.
restoreFavoriteAndFoot
(
false
);
}
//订单栏
if
(
jsonData
.
OrderMenuList
)
{
this
.
postMsg
.
OrderMenuList
=
jsonData
.
OrderMenuList
;
}
else
{
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
==
3
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"待付款"
||
subItem
.
PageName
==
"待发货"
||
subItem
.
PageName
==
"待收货"
||
subItem
.
PageName
==
"待评价"
||
subItem
.
PageName
==
"售后"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
item
.
PageTypeId
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
switch
(
subItem
.
PageName
)
{
case
"待付款"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoPayIcon
;
break
;
case
"待发货"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoSendIcon
;
break
;
case
"待收货"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoReciveIcon
;
break
;
case
"待评价"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoPingJiaIcon
;
break
;
case
"售后"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderBeforeSalesIcon
;
break
;
}
this
.
postMsg
.
OrderMenuList
.
push
(
dObj
);
}
})
}
})
this
.
RestoreDefault
(
false
);
}
//账户栏
if
(
jsonData
.
AccountMenuList
)
{
this
.
postMsg
.
AccountMenuList
=
jsonData
.
AccountMenuList
;
}
else
{
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
==
2
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"积分明细"
||
subItem
.
PageName
==
"余额记录"
||
subItem
.
PageName
==
"我的优惠券"
||
subItem
.
PageName
==
"我的卡卷"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
item
.
PageTypeId
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
switch
(
subItem
.
PageName
)
{
case
"积分明细"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
IntegralIcon
;
break
;
case
"余额记录"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
BalanceIcon
;
break
;
case
"我的优惠券"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
CouponIcon
;
break
;
case
"我的卡卷"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
CardIcon
;
break
;
}
this
.
postMsg
.
AccountMenuList
.
push
(
dObj
);
}
})
}
})
this
.
restoreAccount
(
false
);
}
//其它菜单栏
if
(
jsonData
.
SelfMenuList
)
{
this
.
postMsg
.
SelfMenuList
=
jsonData
.
SelfMenuList
;
}
else
{
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
>
0
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"全部订单"
||
subItem
.
PageName
==
"我的订单"
||
subItem
.
PageName
==
"客服"
||
subItem
.
PageName
==
"分销中心"
||
subItem
.
PageName
==
"我的卡券"
||
subItem
.
PageName
==
"我的优惠券"
||
subItem
.
PageName
==
"领券中心"
||
subItem
.
PageName
==
"积分明细"
||
subItem
.
PageName
==
"商城管理"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
4
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
switch
(
subItem
.
PageName
)
{
case
"全部订单"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
AllOrderIcon
;
break
;
case
"我的订单"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
MyOrderIcon
;
break
;
case
"客服"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
CustomerServiceIcon
;
break
;
case
"分销中心"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_sharecenter
;
break
;
case
"我的卡券"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_usercard
;
break
;
case
"我的优惠券"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_usercoupons
;
break
;
case
"领券中心"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_coupons
;
break
;
case
"积分明细"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_score
;
break
;
case
"商城管理"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_setting
;
break
;
}
this
.
postMsg
.
SelfMenuList
.
push
(
dObj
);
}
})
}
})
this
.
restoreSelfMenu
(
false
);
}
}
else
{
this
.
Info
(
res
.
data
.
message
);
...
...
@@ -1115,8 +975,204 @@
that
.
postMsg
.
SelfMenuList
.
splice
(
index
,
1
);
});
},
resetInfo
()
{
//重置"收藏"和"足迹"
restoreFavoriteAndFoot
(
isclear
)
{
if
(
isclear
)
{
this
.
postMsg
.
FavoriteFootMenuList
=
[];
}
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
==
1
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"我的收藏"
||
subItem
.
PageName
==
"我的足迹"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
item
.
PageTypeId
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
if
(
subItem
.
PageName
==
"我的收藏"
)
{
dObj
.
MenuIcon
=
this
.
defaultMsg
.
FavoriteIcon
;
}
if
(
subItem
.
PageName
==
"我的足迹"
)
{
dObj
.
MenuIcon
=
this
.
defaultMsg
.
FootIcon
;
}
this
.
postMsg
.
FavoriteFootMenuList
.
push
(
dObj
);
}
})
}
})
},
//重置"订单栏"
restoreOrder
(
isclear
)
{
if
(
isclear
)
{
this
.
postMsg
.
OrderMenuList
=
[];
}
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
==
3
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"待付款"
||
subItem
.
PageName
==
"待发货"
||
subItem
.
PageName
==
"待收货"
||
subItem
.
PageName
==
"待评价"
||
subItem
.
PageName
==
"售后"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
item
.
PageTypeId
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
switch
(
subItem
.
PageName
)
{
case
"待付款"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoPayIcon
;
break
;
case
"待发货"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoSendIcon
;
break
;
case
"待收货"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoReciveIcon
;
break
;
case
"待评价"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderNoPingJiaIcon
;
break
;
case
"售后"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
OrderBeforeSalesIcon
;
break
;
}
this
.
postMsg
.
OrderMenuList
.
push
(
dObj
);
}
})
}
})
},
//重置"账号栏"
restoreAccount
(
isclear
)
{
if
(
isclear
)
{
this
.
postMsg
.
AccountMenuList
=
[];
}
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
==
2
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"积分明细"
||
subItem
.
PageName
==
"余额记录"
||
subItem
.
PageName
==
"我的优惠券"
||
subItem
.
PageName
==
"我的卡卷"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
item
.
PageTypeId
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
switch
(
subItem
.
PageName
)
{
case
"积分明细"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
IntegralIcon
;
break
;
case
"余额记录"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
BalanceIcon
;
break
;
case
"我的优惠券"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
CouponIcon
;
break
;
case
"我的卡卷"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
CardIcon
;
break
;
}
this
.
postMsg
.
AccountMenuList
.
push
(
dObj
);
}
})
}
})
},
//重置"自定义菜单栏"
restoreSelfMenu
(
isclear
)
{
if
(
isclear
)
{
this
.
postMsg
.
SelfMenuList
=
[];
}
this
.
userCenterMsg
.
MenuList
.
forEach
(
item
=>
{
if
(
item
.
PageTypeId
>
0
)
{
item
.
SubMenuList
.
forEach
(
subItem
=>
{
if
(
subItem
.
PageName
==
"全部订单"
||
subItem
.
PageName
==
"我的订单"
||
subItem
.
PageName
==
"客服"
||
subItem
.
PageName
==
"分销中心"
||
subItem
.
PageName
==
"我的卡券"
||
subItem
.
PageName
==
"我的优惠券"
||
subItem
.
PageName
==
"领券中心"
||
subItem
.
PageName
==
"积分明细"
||
subItem
.
PageName
==
"商城管理"
)
{
var
dObj
=
{
DetailId
:
0
,
MallBaseId
:
0
,
MenuType
:
4
,
MenuName
:
subItem
.
PageName
,
MenuIcon
:
""
,
MenuUrl
:
subItem
.
PageUrl
};
switch
(
subItem
.
PageName
)
{
case
"全部订单"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
AllOrderIcon
;
break
;
case
"我的订单"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
MyOrderIcon
;
break
;
case
"客服"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
CustomerServiceIcon
;
break
;
case
"分销中心"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_sharecenter
;
break
;
case
"我的卡券"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_usercard
;
break
;
case
"我的优惠券"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_usercoupons
;
break
;
case
"领券中心"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_coupons
;
break
;
case
"积分明细"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_score
;
break
;
case
"商城管理"
:
dObj
.
MenuIcon
=
this
.
defaultMsg
.
user_setting
;
break
;
}
this
.
postMsg
.
SelfMenuList
.
push
(
dObj
);
}
})
}
})
},
//重置基本信息
restoreBasic
()
{
this
.
postMsg
.
DefaultBgImg
=
this
.
defaultMsg
.
defaultImg
;
this
.
postMsg
.
MemberBgImg
=
this
.
defaultMsg
.
MemberBgImg
;
this
.
postMsg
.
VipBgImg
=
this
.
defaultMsg
.
VipBgImg
;
this
.
postMsg
.
HeadStyle
=
this
.
defaultMsg
.
HeadStyle
;
this
.
postMsg
.
IsShowFavorite
=
this
.
defaultMsg
.
IsShowFavorite
;
this
.
postMsg
.
IsShowOrderNav
=
this
.
defaultMsg
.
IsShowOrderNav
;
this
.
postMsg
.
IsShowAccountNav
=
this
.
defaultMsg
.
IsShowAccountNav
;
this
.
postMsg
.
IsShowMenuNav
=
this
.
defaultMsg
.
IsShowMenuNav
;
this
.
postMsg
.
MenuNavTitle
=
this
.
defaultMsg
.
MenuNavTitle
;
this
.
postMsg
.
MenuNavStyle
=
this
.
defaultMsg
.
MenuNavStyle
;
},
//恢复默认
RestoreDefault
()
{
let
that
=
this
;
that
.
Confirm
(
"是否要恢复默认?"
,
function
()
{
that
.
restoreFavoriteAndFoot
(
true
);
that
.
restoreOrder
(
true
);
that
.
restoreAccount
(
true
);
that
.
restoreSelfMenu
(
true
);
that
.
restoreBasic
();
that
.
apipost
(
"/api/Tenant/RemoveMiniUserCenterMenuByMallId"
,
{
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{}
else
{
that
.
Info
(
res
.
data
.
message
);
}
});
});
}
},
...
...
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