优化menu代码

This commit is contained in:
wangsongsole 2022-09-28 15:58:49 +08:00
parent f9c4b9f3a8
commit 88f6d5d509
1 changed files with 202 additions and 133 deletions

View File

@ -1,141 +1,210 @@
const menu={
const menu = {
//兑换码状态
exchangeStatus(params) {
switch(params){
case 0:return '未开始';break;
case 1:return '进行中';break;
case -1:return '暂停';break;
case 2:return '已结束';break;
case 5:return '已作废';break;
switch (params) {
case 0:
return "未开始"
case 1:
return "进行中"
case -1:
return "暂停"
case 2:
return "已结束"
case 5:
return "已作废"
}
},
exchangeStatusBg(params) {
switch(params){
case 0:return '#BFBFBF';break;
case 1:return '#3575C7';break;
case -1:return '#F6C041';break;
case 2:return '#43A65D';break;
case 5:return '#DC4F40';break;
exchangeStatusBg(params) {
switch (params) {
case 0:
return "#BFBFBF"
case 1:
return "#3575C7"
case -1:
return "#F6C041"
case 2:
return "#43A65D"
case 5:
return "#DC4F40"
}
},
//订单状态
orderStatus(params) {
switch(params){
case 0:return '待支付';break;
case 1:return '充值中';break;
case 2:return '已完成';break;
case 3:return '充值失败';break;
}
},
orderStatusBg(params) {
switch(params){
case 0:return '#BFBFBF';break;
case 1:return '#3575C7';break;
case 2:return '#43A65D';break;
case 3:return '#DC4F40';break;
}
},
//计划任务状态
planStatus(params) {
switch(params){
case 0:return '创建中';break;
case 2:return '审核中';break;
case 3:return '待生效';break;
case 4:return '进行中';break;
case 5:return '暂停中';break;
case 6:return '已完结';break;
case 7:return '未通过';break;
}
},
planStatusBg(params) {
switch(params){
case 0:return '#BFBFBF';break;
case 2:return '#ffaa00';break;
case 3:return '#3575C7';break;
case 4:return '#55ff7f';break;
case 5:return '#55aaff';break;
case 6:return '#e64c00';break;
case 7:return '#b6bcb8';break;
}
},
//计划任务状态
keyStatus(params) {
switch(params){
case 1:return '待使用';break;
case 2:return '已使用';break;
case 3:return '已失效';break;
case 4:return '已作废';break;
case 5:return '使用锁定中';break;
}
},
keyStatusBg(params) {
switch(params){
case 1:return '#BFBFBF';break;
case 2:return '#43A65D';break;
case 3:return '#ffaa00';break;
case 4:return '#e64c00';break;
case 5:return '#3575C7'; break;
}
},
//落地页
pageStatus(params) {
switch(params){
case 1:return 'H5';break;
case 2:return '微信';break;
case 4:return '支付宝';break;
}
},
pageStatusBg(params) {
switch(params){
case 1:return '#ffaa00';break;
case 2:return '#55ff7f';break;
case 4:return '#55aaff';break;
}
},
//落地页
pageTypeStatus(params) {
switch(params){
case 3:return '兑换码';break;
case 1:return '白名单';break;
case 2:return '立减金';break;
case 4:return '优惠券';break;
case 8:return '优惠券白名单';break;
}
},
pageTypeStatusBg(params) {
switch(params){
case 1:return '#ffaa00';break;
case 2:return '#e64c00';break;
case 3:return '#55aaff';break;
case 4:return '#79AF83';break;
case 8:return '#F2A505';break;
}
},
keysStatus(params) {
switch(params){
case 1:return '创建中';break;
case 2:return '审核中';break;
case 4:return '进行中';break;
case 5:return '已暂停';break;
case 6:return '已完结';break;
case 7:return '已作废';break;
case 8:return '审批驳回';break;
}
},
keysStatusBg(params) {
switch(params){
case 1:return '#ffaa00';break;
case 2:return '#55ff7f';break;
case 5:return '#e64c00';break;
case 4:return '#55aaff';break;
case 6:return '#555500';break;
case 7:return '#3575C7';break;
case 8:return '#e64c00';break;
}
}
orderStatus(params) {
switch (params) {
case 0:
return "待支付"
case 1:
return "充值中"
case 2:
return "已完成"
case 3:
return "充值失败"
}
},
orderStatusBg(params) {
switch (params) {
case 0:
return "#BFBFBF"
case 1:
return "#3575C7"
case 2:
return "#43A65D"
case 3:
return "#DC4F40"
}
},
//计划任务状态
planStatus(params) {
switch (params) {
case 0:
return "创建中"
case 2:
return "审核中"
case 3:
return "待生效"
case 4:
return "进行中"
case 5:
return "暂停中"
case 6:
return "已完结"
case 7:
return "未通过"
}
},
planStatusBg(params) {
switch (params) {
case 0:
return "#BFBFBF"
case 2:
return "#ffaa00"
case 3:
return "#3575C7"
case 4:
return "#55ff7f"
case 5:
return "#55aaff"
case 6:
return "#e64c00"
case 7:
return "#b6bcb8"
}
},
//计划任务状态
keyStatus(params) {
switch (params) {
case 1:
return "待使用"
case 2:
return "已使用"
case 3:
return "已失效"
case 4:
return "已作废"
case 5:
return "使用锁定中"
}
},
keyStatusBg(params) {
switch (params) {
case 1:
return "#BFBFBF"
case 2:
return "#43A65D"
case 3:
return "#ffaa00"
case 4:
return "#e64c00"
case 5:
return "#3575C7"
}
},
//落地页
pageStatus(params) {
switch (params) {
case 1:
return "H5"
case 2:
return "微信"
case 4:
return "支付宝"
}
},
pageStatusBg(params) {
switch (params) {
case 1:
return "#ffaa00"
case 2:
return "#55ff7f"
case 4:
return "#55aaff"
}
},
//落地页
pageTypeStatus(params) {
switch (params) {
case 3:
return "兑换码"
case 1:
return "白名单"
case 2:
return "立减金"
case 4:
return "优惠券"
case 8:
return "优惠券白名单"
}
},
pageTypeStatusBg(params) {
switch (params) {
case 1:
return "#ffaa00"
case 2:
return "#e64c00"
case 3:
return "#55aaff"
case 4:
return "#79AF83"
case 8:
return "#F2A505"
}
},
keysStatus(params) {
switch (params) {
case 1:
return "创建中"
case 2:
return "审核中"
case 4:
return "进行中"
case 5:
return "已暂停"
case 6:
return "已完结"
case 7:
return "已作废"
case 8:
return "审批驳回"
}
},
keysStatusBg(params) {
switch (params) {
case 1:
return "#ffaa00"
case 2:
return "#55ff7f"
case 5:
return "#e64c00"
case 4:
return "#55aaff"
case 6:
return "#555500"
case 7:
return "#3575C7"
case 8:
return "#e64c00"
}
}
}
export default menu;
export default menu