Commit 02d25a01 authored by 黄奎's avatar 黄奎

页面修改

parent 20a108df
...@@ -607,11 +607,13 @@ ...@@ -607,11 +607,13 @@
<div class="LastMenu_Second">{{item.MenuName}}</div> <div class="LastMenu_Second">{{item.MenuName}}</div>
<div class="LastMenu_Third"> <div class="LastMenu_Third">
<el-tooltip class="item" effect="dark" content="编辑" placement="top-start"> <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-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start"> <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-button>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -622,7 +624,7 @@ ...@@ -622,7 +624,7 @@
</el-form> </el-form>
</div> </div>
<el-button size="small" type="primary" @click="SetMiniUserCenterConfig()">保存</el-button> <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>
</div> </div>
...@@ -672,10 +674,10 @@ ...@@ -672,10 +674,10 @@
export default { export default {
data() { data() {
return { return {
comCheckIndex:-1, comCheckIndex: -1,
imgType:-1, imgType: -1,
//图片选择弹窗 //图片选择弹窗
choicImg:false, choicImg: false,
//是否显示链接弹窗 //是否显示链接弹窗
isShowLink: false, isShowLink: false,
commonEditTitle: '', commonEditTitle: '',
...@@ -783,14 +785,14 @@ ...@@ -783,14 +785,14 @@
methods: { methods: {
//选择图片 //选择图片
SelectId(msg) { SelectId(msg) {
if(this.imgType==1){ if (this.imgType == 1) {
this.postMsg.DefaultBgImg=this.getIconLink(msg.url); this.postMsg.DefaultBgImg = this.getIconLink(msg.url);
}else if(this.imgType==2){ } else if (this.imgType == 2) {
this.postMsg.MemberBgImg=this.getIconLink(msg.url); this.postMsg.MemberBgImg = this.getIconLink(msg.url);
}else if(this.imgType==3){ } else if (this.imgType == 3) {
this.postMsg.VipBgImg=this.getIconLink(msg.url); this.postMsg.VipBgImg = this.getIconLink(msg.url);
}else if(this.imgType==4){ } else if (this.imgType == 4) {
this.modifyMsg.image=this.getIconLink(msg.url); this.modifyMsg.image = this.getIconLink(msg.url);
} }
this.choicImg = false; this.choicImg = false;
}, },
...@@ -809,23 +811,23 @@ ...@@ -809,23 +811,23 @@
}, },
//修改确定 //修改确定
updateInfo() { updateInfo() {
switch(this.EditIndex){ switch (this.EditIndex) {
case 1: case 1:
this.postMsg.FavoriteFootMenuList[this.comCheckIndex].MenuName=this.modifyMsg.name; this.postMsg.FavoriteFootMenuList[this.comCheckIndex].MenuName = this.modifyMsg.name;
this.postMsg.FavoriteFootMenuList[this.comCheckIndex].MenuIcon=this.modifyMsg.image; this.postMsg.FavoriteFootMenuList[this.comCheckIndex].MenuIcon = this.modifyMsg.image;
break; break;
case 2: case 2:
this.postMsg.OrderMenuList[this.comCheckIndex].MenuName=this.modifyMsg.name; this.postMsg.OrderMenuList[this.comCheckIndex].MenuName = this.modifyMsg.name;
this.postMsg.OrderMenuList[this.comCheckIndex].MenuIcon=this.modifyMsg.image; this.postMsg.OrderMenuList[this.comCheckIndex].MenuIcon = this.modifyMsg.image;
break; break;
case 3: case 3:
this.postMsg.AccountMenuList[this.comCheckIndex].MenuName=this.modifyMsg.name; this.postMsg.AccountMenuList[this.comCheckIndex].MenuName = this.modifyMsg.name;
this.postMsg.AccountMenuList[this.comCheckIndex].MenuIcon=this.modifyMsg.image; this.postMsg.AccountMenuList[this.comCheckIndex].MenuIcon = this.modifyMsg.image;
break; break;
case 4: case 4:
this.postMsg.SelfMenuList[this.comCheckIndex].MenuName=this.modifyMsg.name; this.postMsg.SelfMenuList[this.comCheckIndex].MenuName = this.modifyMsg.name;
this.postMsg.SelfMenuList[this.comCheckIndex].MenuIcon=this.modifyMsg.image; this.postMsg.SelfMenuList[this.comCheckIndex].MenuIcon = this.modifyMsg.image;
break; break;
} }
this.isShowDialog = false; this.isShowDialog = false;
}, },
...@@ -833,7 +835,7 @@ ...@@ -833,7 +835,7 @@
upDateMsg(item, index) { upDateMsg(item, index) {
this.isShowDialog = true; this.isShowDialog = true;
this.EditIndex = index; this.EditIndex = index;
this.imgType=4; this.imgType = 4;
switch (index) { switch (index) {
case 1: case 1:
this.commonEditTitle = '收藏栏编辑'; this.commonEditTitle = '收藏栏编辑';
...@@ -914,167 +916,25 @@ ...@@ -914,167 +916,25 @@
if (jsonData.FavoriteFootMenuList) { if (jsonData.FavoriteFootMenuList) {
this.postMsg.FavoriteFootMenuList = jsonData.FavoriteFootMenuList; this.postMsg.FavoriteFootMenuList = jsonData.FavoriteFootMenuList;
} else { } else {
this.userCenterMsg.MenuList.forEach(item => { this.restoreFavoriteAndFoot(false);
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);
}
})
}
})
} }
//订单栏 //订单栏
if (jsonData.OrderMenuList) { if (jsonData.OrderMenuList) {
this.postMsg.OrderMenuList = jsonData.OrderMenuList; this.postMsg.OrderMenuList = jsonData.OrderMenuList;
} else { } else {
this.userCenterMsg.MenuList.forEach(item => { this.RestoreDefault(false);
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);
}
})
}
})
} }
//账户栏 //账户栏
if (jsonData.AccountMenuList) { if (jsonData.AccountMenuList) {
this.postMsg.AccountMenuList = jsonData.AccountMenuList; this.postMsg.AccountMenuList = jsonData.AccountMenuList;
} else { } else {
this.userCenterMsg.MenuList.forEach(item => { this.restoreAccount(false);
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);
}
})
}
})
} }
//其它菜单栏 //其它菜单栏
if (jsonData.SelfMenuList) { if (jsonData.SelfMenuList) {
this.postMsg.SelfMenuList = jsonData.SelfMenuList; this.postMsg.SelfMenuList = jsonData.SelfMenuList;
} else { } else {
this.userCenterMsg.MenuList.forEach(item => { this.restoreSelfMenu(false);
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);
}
})
}
})
} }
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
...@@ -1115,8 +975,204 @@ ...@@ -1115,8 +975,204 @@
that.postMsg.SelfMenuList.splice(index, 1); 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);
}
});
});
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment