88 changed files with 25393 additions and 12589 deletions
@ -0,0 +1,7 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"Id": 1001, |
||||||
|
"Name": "最幸福桃谷", |
||||||
|
"Duration": 10 |
||||||
|
} |
||||||
|
] |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"Id": 1, |
||||||
|
"Order": 1, |
||||||
|
"Include": [ |
||||||
|
1001 |
||||||
|
], |
||||||
|
"OpenConditionType": 1, |
||||||
|
"ConditionParameter": 20, |
||||||
|
"Duration": 10, |
||||||
|
"OnState": true |
||||||
|
} |
||||||
|
] |
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,62 +1,146 @@ |
|||||||
[ |
[ |
||||||
{ |
{ |
||||||
"Id": 1, |
"Id": 1, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300001, |
"BuffId": 300001, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 2, |
"Id": 2, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300002, |
"BuffId": 300002, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 3, |
"Id": 3, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300003, |
"BuffId": 300003, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 4, |
"Id": 4, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300004, |
"BuffId": 300004, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 5, |
"Id": 5, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300005, |
"BuffId": 300005, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 6, |
"Id": 6, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300006, |
"BuffId": 300006, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 7, |
"Id": 7, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300007, |
"BuffId": 300007, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 8, |
"Id": 8, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300008, |
"BuffId": 300008, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 9, |
"Id": 9, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300009, |
"BuffId": 300009, |
||||||
"Weight": 1 |
"Weight": 100 |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 10, |
"Id": 10, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"BuffId": 300010, |
"BuffId": 300010, |
||||||
|
"Weight": 100 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 11, |
||||||
|
"GroupId": 1, |
||||||
|
"BuffId": 300011, |
||||||
|
"Weight": 50 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 12, |
||||||
|
"GroupId": 1, |
||||||
|
"BuffId": 300012, |
||||||
|
"Weight": 100 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 13, |
||||||
|
"GroupId": 1, |
||||||
|
"BuffId": 300013, |
||||||
|
"Weight": 15 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 14, |
||||||
|
"GroupId": 1, |
||||||
|
"BuffId": 300014, |
||||||
|
"Weight": 20 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 15, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300001, |
||||||
|
"Weight": 10 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 16, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300002, |
||||||
|
"Weight": 3 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 17, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300003, |
||||||
|
"Weight": 2 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 18, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300004, |
||||||
|
"Weight": 1 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 19, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300005, |
||||||
|
"Weight": 4 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 20, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300006, |
||||||
|
"Weight": 3 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 21, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300007, |
||||||
|
"Weight": 2 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 22, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300008, |
||||||
"Weight": 1 |
"Weight": 1 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 23, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300009, |
||||||
|
"Weight": 4 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 24, |
||||||
|
"GroupId": 2, |
||||||
|
"BuffId": 300010, |
||||||
|
"Weight": 2 |
||||||
} |
} |
||||||
] |
] |
||||||
@ -1,69 +1,129 @@ |
|||||||
[ |
[ |
||||||
{ |
{ |
||||||
"Id": 10011, |
"Id": 10011, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"Name": "小山道", |
"Name": "小山道", |
||||||
|
"DefaultUnlock": true, |
||||||
"Unlock1": 10012, |
"Unlock1": 10012, |
||||||
"Unlock2": 10013, |
"Unlock2": 10013, |
||||||
"Unlock3": 0, |
"Unlock3": 0, |
||||||
"MonsterGroup": [ |
"MonsterGroup": [ |
||||||
33001 |
1001101, |
||||||
|
1001102, |
||||||
|
1001103, |
||||||
|
1001104, |
||||||
|
1001105 |
||||||
], |
], |
||||||
"Integral": 0, |
"MonsterPoint": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5 |
||||||
|
], |
||||||
|
"IntegralFirst": 100, |
||||||
|
"IntegralRepeat": 50, |
||||||
"Icon": "", |
"Icon": "", |
||||||
|
"RecommendPower": 11451, |
||||||
"RegionID": 8001, |
"RegionID": 8001, |
||||||
"Intelligence": "" |
"Intelligence": "" |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 10012, |
"Id": 10012, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"Name": "试炼", |
"Name": "试炼", |
||||||
|
"DefaultUnlock": false, |
||||||
"Unlock1": 10013, |
"Unlock1": 10013, |
||||||
"Unlock2": 10014, |
"Unlock2": 10014, |
||||||
"Unlock3": 0, |
"Unlock3": 0, |
||||||
"MonsterGroup": [], |
"MonsterGroup": [ |
||||||
"Integral": 0, |
1001201, |
||||||
|
1001202 |
||||||
|
], |
||||||
|
"MonsterPoint": [ |
||||||
|
1, |
||||||
|
2 |
||||||
|
], |
||||||
|
"IntegralFirst": 140, |
||||||
|
"IntegralRepeat": 70, |
||||||
"Icon": "", |
"Icon": "", |
||||||
"RegionID": 8001, |
"RecommendPower": 11451, |
||||||
|
"RegionID": 8002, |
||||||
"Intelligence": "" |
"Intelligence": "" |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 10013, |
"Id": 10013, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"Name": "大榕树", |
"Name": "大榕树", |
||||||
|
"DefaultUnlock": false, |
||||||
"Unlock1": 10014, |
"Unlock1": 10014, |
||||||
"Unlock2": 10015, |
"Unlock2": 10015, |
||||||
"Unlock3": 0, |
"Unlock3": 0, |
||||||
"MonsterGroup": [], |
"MonsterGroup": [ |
||||||
"Integral": 0, |
1001301, |
||||||
|
1001301, |
||||||
|
1001301, |
||||||
|
1001301, |
||||||
|
1001301 |
||||||
|
], |
||||||
|
"MonsterPoint": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5 |
||||||
|
], |
||||||
|
"IntegralFirst": 180, |
||||||
|
"IntegralRepeat": 90, |
||||||
"Icon": "", |
"Icon": "", |
||||||
"RegionID": 8001, |
"RecommendPower": 11451, |
||||||
"Intelligence": "" |
"RegionID": 8003, |
||||||
|
"Intelligence": "·猩猩\n受到的近战伤害降低50%\n受到的远程伤害提高50%" |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 10014, |
"Id": 10014, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"Name": "试炼", |
"Name": "试炼", |
||||||
|
"DefaultUnlock": false, |
||||||
"Unlock1": 10013, |
"Unlock1": 10013, |
||||||
"Unlock2": 10015, |
"Unlock2": 10015, |
||||||
"Unlock3": 0, |
"Unlock3": 0, |
||||||
"MonsterGroup": [], |
"MonsterGroup": [ |
||||||
"Integral": 0, |
1001402, |
||||||
|
1001403, |
||||||
|
1001401 |
||||||
|
], |
||||||
|
"MonsterPoint": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3 |
||||||
|
], |
||||||
|
"IntegralFirst": 220, |
||||||
|
"IntegralRepeat": 110, |
||||||
"Icon": "", |
"Icon": "", |
||||||
"RegionID": 8001, |
"RecommendPower": 11451, |
||||||
"Intelligence": "" |
"RegionID": 8002, |
||||||
|
"Intelligence": "战斗开始25秒时,慕容婉会释放一次沐春风,恢复敌方全体5000点生命值" |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 10015, |
"Id": 10015, |
||||||
"GroupId": 1001, |
"GroupId": 1, |
||||||
"Name": "廖山", |
"Name": "廖山", |
||||||
|
"DefaultUnlock": false, |
||||||
"Unlock1": 10013, |
"Unlock1": 10013, |
||||||
"Unlock2": 10014, |
"Unlock2": 10014, |
||||||
"Unlock3": 0, |
"Unlock3": 0, |
||||||
"MonsterGroup": [], |
"MonsterGroup": [ |
||||||
"Integral": 0, |
1001501 |
||||||
|
], |
||||||
|
"MonsterPoint": [ |
||||||
|
1 |
||||||
|
], |
||||||
|
"IntegralFirst": 260, |
||||||
|
"IntegralRepeat": 130, |
||||||
"Icon": "", |
"Icon": "", |
||||||
"RegionID": 8001, |
"RecommendPower": 11451, |
||||||
"Intelligence": "" |
"RegionID": 8004, |
||||||
|
"Intelligence": "·穷奇\n技能-狮子吼:穷奇向前方发出一道声波,造成伤害;每25秒释放一次\n技能-光之吐息:穷奇高高跃起,发出一颗光球砸向地面,造成伤害,并使勇士免伤、防御降低20%;每180秒释放一次\n第一阶段(血量≥60%):\n闪避率较高,受到的暴击伤害提升50%\n第二阶段(60%≥血量≥20%):\n受到的远程伤害降低99%,受到的近战伤害增加50%,每90秒发动一次狂暴,攻击力提升,持续30秒\n第三阶段(血量≤20%):\n1-召唤4只狼,优先攻击远程单位\n2-每当召唤的狼被击杀时,穷奇的防御力降低25%,最多叠加4层;若4只狼均被击杀,穷奇会释放全屏秒杀技能\n3-受到的远程伤害提升100%" |
||||||
} |
} |
||||||
] |
] |
||||||
@ -1,8 +1,73 @@ |
|||||||
[ |
[ |
||||||
{ |
{ |
||||||
"Id": 33001, |
"Id": 1001101, |
||||||
|
"MonsterID": 31002, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001102, |
||||||
|
"MonsterID": 31002, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001103, |
||||||
|
"MonsterID": 31001, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001104, |
||||||
|
"MonsterID": 31001, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001105, |
||||||
|
"MonsterID": 31001, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001201, |
||||||
|
"MonsterID": 31003, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001202, |
||||||
|
"MonsterID": 31004, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001301, |
||||||
|
"MonsterID": 31005, |
||||||
|
"InitBuffList": [ |
||||||
|
310064 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001401, |
||||||
|
"MonsterID": 31006, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001402, |
||||||
|
"MonsterID": 31007, |
||||||
|
"InitBuffList": [] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001403, |
||||||
|
"MonsterID": 31008, |
||||||
|
"InitBuffList": [ |
||||||
|
1130 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 1001501, |
||||||
"MonsterID": 33001, |
"MonsterID": 33001, |
||||||
"StageGroup": 30001, |
"InitBuffList": [ |
||||||
"Weight": 0 |
330011, |
||||||
|
330012, |
||||||
|
330013, |
||||||
|
330016, |
||||||
|
330017, |
||||||
|
330018 |
||||||
|
] |
||||||
} |
} |
||||||
] |
] |
||||||
@ -0,0 +1,98 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"Id": 100, |
||||||
|
"Type": 1, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100108, |
||||||
|
"Number": 1, |
||||||
|
"Weight": 2 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 101, |
||||||
|
"Type": 1, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100109, |
||||||
|
"Number": 1, |
||||||
|
"Weight": 2 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 200, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100110, |
||||||
|
"Number": 2, |
||||||
|
"Weight": 1000 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 201, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100111, |
||||||
|
"Number": 17, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 202, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100112, |
||||||
|
"Number": 15, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 203, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100113, |
||||||
|
"Number": 10, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 204, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100114, |
||||||
|
"Number": 8, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 205, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100115, |
||||||
|
"Number": 8, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 206, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100116, |
||||||
|
"Number": 10, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 207, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100117, |
||||||
|
"Number": 10, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 208, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100118, |
||||||
|
"Number": 10, |
||||||
|
"Weight": 500 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 209, |
||||||
|
"Type": 2, |
||||||
|
"Period": 1, |
||||||
|
"RewardId": 100119, |
||||||
|
"Number": 15, |
||||||
|
"Weight": 500 |
||||||
|
} |
||||||
|
] |
||||||
@ -1,7 +1,7 @@ |
|||||||
[ |
[ |
||||||
{ |
{ |
||||||
"Id": 1, |
"Id": 1, |
||||||
"FertilizationTimes": 3, |
"FertilizationTimes": 6, |
||||||
"IrrigationTimes": 2, |
"IrrigationTimes": 2, |
||||||
"PrefabName": "ImmortalTree_1" |
"PrefabName": "ImmortalTree_1" |
||||||
} |
} |
||||||
|
|||||||
@ -0,0 +1,141 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"Id": 1, |
||||||
|
"Name": "小甲", |
||||||
|
"IsAttract": true, |
||||||
|
"Region": "森", |
||||||
|
"Icon": "Head_M_3001", |
||||||
|
"Description": "小甲住在森林深处,以打猎为生,最喜以野味待客,为人热情洒脱。", |
||||||
|
"FavoriteItem": "兽肉汤", |
||||||
|
"Mantra": "三分天命随它去,七分拼得黄金来!", |
||||||
|
"DialogueWithOptions": [ |
||||||
|
501, |
||||||
|
505 |
||||||
|
], |
||||||
|
"Dialogue2": [ |
||||||
|
521, |
||||||
|
522, |
||||||
|
523 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 2, |
||||||
|
"Name": "余村长", |
||||||
|
"IsAttract": false, |
||||||
|
"Region": "渔", |
||||||
|
"Icon": "Head_M_6001", |
||||||
|
"Description": "渔溪村村长,妖兽霍乱、村民流离失所的时候,也依然守护在渔溪村。", |
||||||
|
"FavoriteItem": "炭烤鱼干", |
||||||
|
"Mantra": "放心,有我在。", |
||||||
|
"DialogueWithOptions": [ |
||||||
|
511, |
||||||
|
515, |
||||||
|
520 |
||||||
|
], |
||||||
|
"Dialogue2": [ |
||||||
|
521, |
||||||
|
522, |
||||||
|
523 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 3, |
||||||
|
"Name": "丘师父", |
||||||
|
"IsAttract": false, |
||||||
|
"Region": "赤", |
||||||
|
"Icon": "Head_M_6002", |
||||||
|
"Description": "丘师父是一个严谨的人,生性不爱笑,淘气的村民们会在背后偷偷叫他老古板。喜欢在夜深人静时小酌一杯。", |
||||||
|
"FavoriteItem": "赤丘老窖", |
||||||
|
"Mantra": "凡事皆有度,过犹不及。", |
||||||
|
"DialogueWithOptions": [ |
||||||
|
508, |
||||||
|
509, |
||||||
|
516 |
||||||
|
], |
||||||
|
"Dialogue2": [ |
||||||
|
521, |
||||||
|
522, |
||||||
|
523 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 4, |
||||||
|
"Name": "宁管事", |
||||||
|
"IsAttract": false, |
||||||
|
"Region": "太", |
||||||
|
"Icon": "Head_F_5001", |
||||||
|
"Description": "宁管事出生在一个医药世家,除了管理太姥村事务以外,还常为村民看病抓药。", |
||||||
|
"FavoriteItem": "米饭;野菜汤", |
||||||
|
"Mantra": "多喝热水。", |
||||||
|
"DialogueWithOptions": [ |
||||||
|
512, |
||||||
|
513, |
||||||
|
518 |
||||||
|
], |
||||||
|
"Dialogue2": [ |
||||||
|
521, |
||||||
|
522, |
||||||
|
523 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 5, |
||||||
|
"Name": "朱里长", |
||||||
|
"IsAttract": false, |
||||||
|
"Region": "青", |
||||||
|
"Icon": "Head_F_6003", |
||||||
|
"Description": "青山镇事务繁多,朱里长每天都很忙碌。她最爱的食物是辣椒,这种让人鼻涕横流额头冒汗的食物能舒缓她的压力。", |
||||||
|
"FavoriteItem": "麻婆豆腐;酸菜鱼", |
||||||
|
"Mantra": "有事直说,我这儿忙着呢。", |
||||||
|
"DialogueWithOptions": [ |
||||||
|
503, |
||||||
|
504, |
||||||
|
517 |
||||||
|
], |
||||||
|
"Dialogue2": [ |
||||||
|
521, |
||||||
|
522, |
||||||
|
523 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 6, |
||||||
|
"Name": "陶渊明", |
||||||
|
"IsAttract": false, |
||||||
|
"Region": "陶", |
||||||
|
"Icon": "Head_T_1", |
||||||
|
"Description": "陶先生,行踪神秘,常常突然出现又突然消失,也许拥有特别的能力?嗯……让人无法捉摸。", |
||||||
|
"FavoriteItem": "酱烧地芝", |
||||||
|
"Mantra": "莫问来处,且随缘去。", |
||||||
|
"DialogueWithOptions": [ |
||||||
|
507, |
||||||
|
510, |
||||||
|
514, |
||||||
|
519 |
||||||
|
], |
||||||
|
"Dialogue2": [ |
||||||
|
521, |
||||||
|
522, |
||||||
|
523 |
||||||
|
] |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 7, |
||||||
|
"Name": "小乙", |
||||||
|
"IsAttract": true, |
||||||
|
"Region": "森", |
||||||
|
"Icon": "Head_F_3001", |
||||||
|
"Description": "性子像初春的太阳,最会宽慰人,大家都爱找她说心事。", |
||||||
|
"FavoriteItem": "鸡蛋羹", |
||||||
|
"Mantra": "你好,需要帮忙吗?", |
||||||
|
"DialogueWithOptions": [ |
||||||
|
502, |
||||||
|
506 |
||||||
|
], |
||||||
|
"Dialogue2": [ |
||||||
|
521, |
||||||
|
522, |
||||||
|
523 |
||||||
|
] |
||||||
|
} |
||||||
|
] |
||||||
@ -0,0 +1,38 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"Id": 1, |
||||||
|
"Name": "一秀", |
||||||
|
"Reward": 100120, |
||||||
|
"Number": 10 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 2, |
||||||
|
"Name": "二举", |
||||||
|
"Reward": 100121, |
||||||
|
"Number": 8 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 3, |
||||||
|
"Name": "三红", |
||||||
|
"Reward": 100122, |
||||||
|
"Number": 6 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 4, |
||||||
|
"Name": "四进", |
||||||
|
"Reward": 100123, |
||||||
|
"Number": 4 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 5, |
||||||
|
"Name": "对堂", |
||||||
|
"Reward": 100124, |
||||||
|
"Number": 2 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"Id": 6, |
||||||
|
"Name": "状元", |
||||||
|
"Reward": 100125, |
||||||
|
"Number": 1 |
||||||
|
} |
||||||
|
] |
||||||
File diff suppressed because it is too large
Load Diff
@ -1,121 +1,44 @@ |
|||||||
[ |
[ |
||||||
{ |
{ |
||||||
"Id": 1, |
"Id": 1, |
||||||
"SkinName": "榕树皮肤", |
"SkinName": "榕树·连理枝", |
||||||
"SkinPrefab": [ |
"SkinPrefab": "ResourceSkin_1", |
||||||
"ResourceSkin_1_1", |
"SkinPicture": "ResourceSkin__Picture_1", |
||||||
"ResourceSkin_1_2", |
"GetMethod": "外观礼包" |
||||||
"ResourceSkin_1_3", |
|
||||||
"ResourceSkin_1_4" |
|
||||||
], |
|
||||||
"Picture": [ |
|
||||||
"ResourceSkin_1_1", |
|
||||||
"ResourceSkin_1_2", |
|
||||||
"ResourceSkin_1_3", |
|
||||||
"ResourceSkin_1_4" |
|
||||||
], |
|
||||||
"GetMethod": "暂未开放" |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 2, |
"Id": 2, |
||||||
"SkinName": "桢楠皮肤", |
"SkinName": "桢楠·叠翠", |
||||||
"SkinPrefab": [ |
"SkinPrefab": "ResourceSkin_2", |
||||||
"ResourceSkin_2_1", |
"SkinPicture": "ResourceSkin__Picture_2", |
||||||
"ResourceSkin_2_2", |
"GetMethod": "外观礼包" |
||||||
"ResourceSkin_2_3", |
|
||||||
"ResourceSkin_2_4" |
|
||||||
], |
|
||||||
"Picture": [ |
|
||||||
"ResourceSkin_2_1", |
|
||||||
"ResourceSkin_2_2", |
|
||||||
"ResourceSkin_2_3", |
|
||||||
"ResourceSkin_2_4" |
|
||||||
], |
|
||||||
"GetMethod": "暂未开放" |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 3, |
"Id": 3, |
||||||
"SkinName": "桃树皮肤", |
"SkinName": "松树·伴山", |
||||||
"SkinPrefab": [ |
"SkinPrefab": "ResourceSkin_3", |
||||||
"ResourceSkin_3_1", |
"SkinPicture": "ResourceSkin__Picture_3", |
||||||
"ResourceSkin_3_2", |
"GetMethod": "外观礼包" |
||||||
"ResourceSkin_3_3", |
|
||||||
"ResourceSkin_3_4" |
|
||||||
], |
|
||||||
"Picture": [ |
|
||||||
"ResourceSkin_3_1", |
|
||||||
"ResourceSkin_3_2", |
|
||||||
"ResourceSkin_3_3", |
|
||||||
"ResourceSkin_3_4" |
|
||||||
], |
|
||||||
"GetMethod": "暂未开放" |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 4, |
"Id": 4, |
||||||
"SkinName": "松树皮肤", |
"SkinName": "桑树·盈满", |
||||||
"SkinPrefab": [ |
"SkinPrefab": "ResourceSkin_4", |
||||||
"ResourceSkin_4_1", |
"SkinPicture": "ResourceSkin__Picture_4", |
||||||
"ResourceSkin_4_2", |
"GetMethod": "外观礼包" |
||||||
"ResourceSkin_4_3", |
|
||||||
"ResourceSkin_4_4" |
|
||||||
], |
|
||||||
"Picture": [ |
|
||||||
"ResourceSkin_4_1", |
|
||||||
"ResourceSkin_4_2", |
|
||||||
"ResourceSkin_4_3", |
|
||||||
"ResourceSkin_4_4" |
|
||||||
], |
|
||||||
"GetMethod": "暂未开放" |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 5, |
"Id": 5, |
||||||
"SkinName": "桑树皮肤", |
"SkinName": "柳树·平湖影", |
||||||
"SkinPrefab": [ |
"SkinPrefab": "ResourceSkin_5", |
||||||
"ResourceSkin_5_1", |
"SkinPicture": "ResourceSkin__Picture_5", |
||||||
"ResourceSkin_5_2", |
"GetMethod": "外观礼包" |
||||||
"ResourceSkin_5_3", |
|
||||||
"ResourceSkin_5_4" |
|
||||||
], |
|
||||||
"Picture": [ |
|
||||||
"ResourceSkin_5_1", |
|
||||||
"ResourceSkin_5_2", |
|
||||||
"ResourceSkin_5_3", |
|
||||||
"ResourceSkin_5_4" |
|
||||||
], |
|
||||||
"GetMethod": "暂未开放" |
|
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"Id": 6, |
"Id": 6, |
||||||
"SkinName": "柳树皮肤", |
"SkinName": "梨树·月满梢", |
||||||
"SkinPrefab": [ |
"SkinPrefab": "ResourceSkin_6", |
||||||
"ResourceSkin_6_1", |
"SkinPicture": "ResourceSkin__Picture_6", |
||||||
"ResourceSkin_6_2", |
"GetMethod": "外观礼包" |
||||||
"ResourceSkin_6_3", |
|
||||||
"ResourceSkin_6_4" |
|
||||||
], |
|
||||||
"Picture": [ |
|
||||||
"ResourceSkin_6_1", |
|
||||||
"ResourceSkin_6_2", |
|
||||||
"ResourceSkin_6_3", |
|
||||||
"ResourceSkin_6_4" |
|
||||||
], |
|
||||||
"GetMethod": "暂未开放" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"Id": 7, |
|
||||||
"SkinName": "梨树皮肤", |
|
||||||
"SkinPrefab": [ |
|
||||||
"ResourceSkin_7_1", |
|
||||||
"ResourceSkin_7_2", |
|
||||||
"ResourceSkin_7_3", |
|
||||||
"ResourceSkin_7_4" |
|
||||||
], |
|
||||||
"Picture": [ |
|
||||||
"ResourceSkin_7_1", |
|
||||||
"ResourceSkin_7_2", |
|
||||||
"ResourceSkin_7_3", |
|
||||||
"ResourceSkin_7_4" |
|
||||||
], |
|
||||||
"GetMethod": "暂未开放" |
|
||||||
} |
} |
||||||
] |
] |
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,129 +1,140 @@ |
|||||||
<template> |
<template> |
||||||
<div> |
<div> |
||||||
<el-dialog :title="isNew?'新增服务器':'修改服务器'" v-model="isShowDialog" width="800px"> |
<el-dialog :title="isNew ? '新增服务器' : '修改服务器'" v-model="isShowDialog" width="800px"> |
||||||
<el-form label-width="120px" label-position="right"> |
<el-form label-width="120px" label-position="right"> |
||||||
<el-form-item label="后台充值地址" prop="backstageRechargeUrl"> |
<el-form-item label="后台充值地址" prop="backstageRechargeUrl"> |
||||||
<el-input v-model="queryParams.backstageRechargeUrl" placeholder="请输入服务器地址" size="large" |
<el-input v-model="queryParams.backstageRechargeUrl" placeholder="请输入服务器地址" size="large" style="width: 420px" /> |
||||||
style="width: 420px"/> |
</el-form-item> |
||||||
|
<el-form-item label="gm白名单地址" prop="gmWhiteListUrl"> |
||||||
|
<el-input v-model="queryParams.gmWhiteListUrl" placeholder="请输入服务器端口" size="large" style="width: 420px" /> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="身份认证地址" prop="identityCheckAddress"> |
||||||
|
<el-input v-model="queryParams.identityCheckAddress" placeholder="请输入服务器端口" size="large" style="width: 420px" /> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="身份认证地址" prop="identityCheckAddress"> |
||||||
|
<el-input v-model="queryParams.identityCheckAddress" placeholder="请输入服务器端口" size="large" style="width: 420px" /> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="后台统一地址" prop="sdkAddress"> |
||||||
|
<el-input v-model="queryParams.sdkAddress" placeholder="请输入服务器端口" size="large" style="width: 420px" /> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="获取唯一uid地址" prop="uniqueAddress"> |
||||||
|
<el-input v-model="queryParams.uniqueAddress" placeholder="请输入服务器端口" size="large" style="width: 420px" /> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="充值白名单Ip" prop="rechargeWhiteListIps"> |
||||||
|
<div v-for="(item, k) in queryParams.rechargeWhiteListIpList" class="flex-warp" :key="k"> |
||||||
|
<el-input v-model="queryParams.rechargeWhiteListIpList[k]" placeholder="请输入ip" style="width: 300px"> |
||||||
|
<template #append> |
||||||
|
<el-button @click="deleteIp(k)" ><el-icon><ele-Close /></el-icon></el-button> |
||||||
|
</template> |
||||||
|
</el-input> |
||||||
|
</div> |
||||||
|
<div class="flex-warp"> |
||||||
|
<el-button @click="onAddIp" size="default">添加</el-button> |
||||||
|
</div> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="活动数据库地址" prop="activityDbUrl"> |
||||||
|
<el-input v-model="queryParams.activityDbUrl" placeholder="请输入活动数据库地址" size="large" style="width: 420px" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="gm白名单地址" prop="gmWhiteListUrl"> |
<el-form-item label="活动数据库名" prop="activityDbName"> |
||||||
<el-input v-model="queryParams.gmWhiteListUrl" placeholder="请输入服务器端口" size="large" |
<el-input v-model="queryParams.activityDbName" placeholder="请输入活动数据库名" size="large" style="width: 420px" /> |
||||||
style="width: 420px"/> |
|
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="身份认证地址" prop="identityCheckAddress"> |
</el-form> |
||||||
<el-input v-model="queryParams.identityCheckAddress" placeholder="请输入服务器端口" size="large" |
|
||||||
style="width: 420px"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="身份认证地址" prop="identityCheckAddress"> |
|
||||||
<el-input v-model="queryParams.identityCheckAddress" placeholder="请输入服务器端口" size="large" |
|
||||||
style="width: 420px"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="后台统一地址" prop="sdkAddress"> |
|
||||||
<el-input v-model="queryParams.sdkAddress" placeholder="请输入服务器端口" size="large" style="width: 420px"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="获取唯一uid地址" prop="uniqueAddress"> |
|
||||||
<el-input v-model="queryParams.uniqueAddress" placeholder="请输入服务器端口" size="large" |
|
||||||
style="width: 420px"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="充值白名单Ip" prop="rechargeWhiteListIps"> |
|
||||||
<div v-for="(item,k) in queryParams.rechargeWhiteListIpList" class="flex-warp" :key="k" :v="item"> |
|
||||||
<el-input v-model="queryParams.rechargeWhiteListIpList[k]" placeholder="请输入ip" style="width: 300px"/> |
|
||||||
</div> |
|
||||||
<div class="flex-warp"> |
|
||||||
<el-button @click="onAddIp" size="default">添加</el-button> |
|
||||||
</div> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
|
|
||||||
<template #footer> |
<template #footer> |
||||||
<span class="dialog-footer"> |
<span class="dialog-footer"> |
||||||
<el-button @click="onCancel" size="default">取 消</el-button> |
<el-button @click="onCancel" size="default">取 消</el-button> |
||||||
<el-button size="default" type="primary" class="ml10" @click="addItem"> |
<el-button size="default" type="primary" class="ml10" @click="addItem"> |
||||||
<el-icon> |
<el-icon> |
||||||
<ele-EditPen/> |
<ele-EditPen /> |
||||||
</el-icon> |
</el-icon> |
||||||
<div v-if="isNew">新增</div> |
<div v-if="isNew">新增</div> |
||||||
<div v-else>修改</div> |
<div v-else>修改</div> |
||||||
</el-button> |
</el-button> |
||||||
</span> |
</span> |
||||||
</template> |
</template> |
||||||
</el-dialog> |
</el-dialog> |
||||||
</div> |
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script lang="ts"> |
<script lang="ts"> |
||||||
import {reactive, toRefs, defineComponent} from 'vue'; |
import { reactive, toRefs, defineComponent } from 'vue'; |
||||||
import {ElLoading} from "element-plus"; |
import { ElLoading } from 'element-plus'; |
||||||
import {gameAddServerGeneral} from "/@/api/game/serverConfig"; |
import { gameAddServerGeneral } from '/@/api/game/serverConfig'; |
||||||
import {allChannelList} from "/@/utils/game"; |
import { allChannelList } from '/@/utils/game'; |
||||||
|
|
||||||
interface TableDataState { |
interface TableDataState { |
||||||
isShowDialog: boolean, |
isShowDialog: boolean; |
||||||
isNew: boolean, |
isNew: boolean; |
||||||
queryParams: object; |
queryParams: object; |
||||||
channels: object[]; |
channels: object[]; |
||||||
} |
} |
||||||
|
|
||||||
export default defineComponent({ |
export default defineComponent({ |
||||||
name: 'gameServerGeneralEdit', |
name: 'gameServerGeneralEdit', |
||||||
setup(prop, {emit}) { |
setup(prop, { emit }) { |
||||||
const state = reactive<TableDataState>({ |
const state = reactive<TableDataState>({ |
||||||
isShowDialog: false, |
isShowDialog: false, |
||||||
isNew: false, |
isNew: false, |
||||||
queryParams: {}, |
queryParams: {}, |
||||||
channels: [], |
channels: [], |
||||||
}); |
}); |
||||||
// 打开弹窗 |
// 打开弹窗 |
||||||
const openDialog = (row: any | null) => { |
const openDialog = (row: any | null) => { |
||||||
state.isShowDialog = true; |
state.isShowDialog = true; |
||||||
state.isNew = !row; |
state.isNew = !row; |
||||||
state.queryParams = row || {}; |
state.queryParams = row || {}; |
||||||
if (state.queryParams.rechargeWhiteListIps.length > 0) { |
if (state.queryParams.rechargeWhiteListIps.length > 0) { |
||||||
state.queryParams.rechargeWhiteListIpList = JSON.parse(state.queryParams.rechargeWhiteListIps) |
state.queryParams.rechargeWhiteListIpList = JSON.parse(state.queryParams.rechargeWhiteListIps); |
||||||
} |
} |
||||||
console.log("openDialog: >>>>>>>>>>>", row) |
console.log('openDialog: >>>>>>>>>>>', row); |
||||||
allChannelList().then(res => { |
allChannelList().then((res) => { |
||||||
state.channels = res; |
state.channels = res; |
||||||
}) |
}); |
||||||
}; |
}; |
||||||
|
|
||||||
// 关闭弹窗 |
|
||||||
const closeDialog = () => { |
|
||||||
state.isShowDialog = false; |
|
||||||
}; |
|
||||||
// 取消 |
|
||||||
const onCancel = () => { |
|
||||||
closeDialog(); |
|
||||||
}; |
|
||||||
// 取消 |
|
||||||
const onAddIp = () => { |
|
||||||
state.queryParams.rechargeWhiteListIpList.push("") |
|
||||||
}; |
|
||||||
// 新增 |
|
||||||
const addItem = () => { |
|
||||||
const loading = ElLoading.service({ |
|
||||||
lock: true, |
|
||||||
text: 'Loading', |
|
||||||
background: 'rgba(0, 0, 0, 0.7)', |
|
||||||
}); |
|
||||||
state.queryParams.rechargeWhiteListIps = state.queryParams.rechargeWhiteListIpList |
|
||||||
gameAddServerGeneral(state.queryParams).then((res) => { |
|
||||||
console.log(res); |
|
||||||
}).finally(function () { |
|
||||||
loading.close(); |
|
||||||
emit('countList') |
|
||||||
closeDialog(); |
|
||||||
}); |
|
||||||
|
|
||||||
}; |
// 关闭弹窗 |
||||||
return { |
const closeDialog = () => { |
||||||
openDialog, |
state.isShowDialog = false; |
||||||
closeDialog, |
}; |
||||||
onCancel, |
// 取消 |
||||||
onAddIp, |
const onCancel = () => { |
||||||
addItem, |
closeDialog(); |
||||||
...toRefs(state), |
}; |
||||||
}; |
// 取消 |
||||||
}, |
const onAddIp = () => { |
||||||
|
state.queryParams.rechargeWhiteListIpList.push(''); |
||||||
|
}; |
||||||
|
// 取消 |
||||||
|
const deleteIp = (index) => { |
||||||
|
state.queryParams.rechargeWhiteListIpList.splice(index, 1); |
||||||
|
}; |
||||||
|
// 新增 |
||||||
|
const addItem = () => { |
||||||
|
const loading = ElLoading.service({ |
||||||
|
lock: true, |
||||||
|
text: 'Loading', |
||||||
|
background: 'rgba(0, 0, 0, 0.7)', |
||||||
|
}); |
||||||
|
state.queryParams.rechargeWhiteListIps = state.queryParams.rechargeWhiteListIpList; |
||||||
|
gameAddServerGeneral(state.queryParams) |
||||||
|
.then((res) => { |
||||||
|
console.log(res); |
||||||
|
}) |
||||||
|
.finally(function () { |
||||||
|
loading.close(); |
||||||
|
emit('countList'); |
||||||
|
closeDialog(); |
||||||
|
}); |
||||||
|
}; |
||||||
|
return { |
||||||
|
openDialog, |
||||||
|
closeDialog, |
||||||
|
onCancel, |
||||||
|
onAddIp, |
||||||
|
deleteIp, |
||||||
|
addItem, |
||||||
|
...toRefs(state), |
||||||
|
}; |
||||||
|
}, |
||||||
}); |
}); |
||||||
</script> |
</script> |
||||||
|
|||||||
@ -0,0 +1,722 @@ |
|||||||
|
<template> |
||||||
|
<div class="game-maintenance-container"> |
||||||
|
<el-card shadow="hover" header="新服公告"> |
||||||
|
<div class="game-order-search mb15"> |
||||||
|
<el-form label-width="70px" label-position="right"> |
||||||
|
<el-form-item label="渠道" prop="channel"> |
||||||
|
<el-select v-model="tableData.param.channels" multiple collapse-tags class="m-2" placeholder="选择渠道" clearable> |
||||||
|
<el-option v-for="item in channels" :key="item.value" :label="item.label" :value="item.value" /> |
||||||
|
</el-select> |
||||||
|
<el-form-item style="margin-left: 20px"> |
||||||
|
<el-button type="primary" @click="getAllChannel" style="margin-left: 20px">所有渠道</el-button> |
||||||
|
</el-form-item> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="发送时间" prop="time"> |
||||||
|
<el-radio-group v-model="tableData.param.send"> |
||||||
|
<el-radio :label="1">立即</el-radio> |
||||||
|
<el-radio :label="2">定时</el-radio> |
||||||
|
</el-radio-group> |
||||||
|
<el-form-item prop="now" v-if="tableData.param.send == 2" style="margin-left: 20px"> |
||||||
|
<el-date-picker |
||||||
|
type="datetime" |
||||||
|
v-model="tableData.param.sendTime" |
||||||
|
placeholder="发送时间" |
||||||
|
format="YYYY-MM-DD HH:mm:ss" |
||||||
|
value-format="x" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item style="margin-left: 20px"> |
||||||
|
<el-button type="primary" @click="noticeLog" style="margin-left: 20px">待发送公告</el-button> |
||||||
|
</el-form-item> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="公告模板" prop="model"> |
||||||
|
<el-select v-model="model" @change="useModel(1)" placeholder="请选择模板"> |
||||||
|
<el-option v-for="item in dbs" :key="item.id" :label="item.title" :value="item.id"></el-option> |
||||||
|
</el-select> |
||||||
|
<el-button type="primary" @click="makeModel(1)" style="margin-left: 20px">编辑模板</el-button> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-button size="small" @click="inputBig" style="margin-bottom: -15px"> |
||||||
|
<span style="font-weight: bold">B</span> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" @click="inputItalic" style="margin-bottom: -15px"> |
||||||
|
<span style="font-style: italic">I</span> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" @click="inputUnderline" style="margin-bottom: -15px"> |
||||||
|
<span style="text-decoration: underline">U</span> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" @click="inputLink" style="margin-bottom: -15px; padding: 0; padding-left: 5px"> |
||||||
|
<el-icon type="text"> |
||||||
|
<ele-Link /> |
||||||
|
</el-icon> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" class="color-picker font-color-picker" style="margin-bottom: -15px; padding: 0"> |
||||||
|
<el-color-picker size="default" v-model="color" @change="inputColor"></el-color-picker> |
||||||
|
</el-button> |
||||||
|
<el-form-item style="margin-bottom: -15px; margin-left: 20px"> |
||||||
|
<el-button type="primary" @click="showContent" style="margin-left: 20px">内容预览</el-button> |
||||||
|
</el-form-item> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="公告内容"> |
||||||
|
<el-input v-model="tableData.param.content" type="textarea" rows="16" @mouseup="inputSelect" @blur="inputSelect" clearable /> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="公告开关" prop="time"> |
||||||
|
<el-radio-group v-model="tableData.param.isShow"> |
||||||
|
<el-radio :label="0">关闭</el-radio> |
||||||
|
<el-radio :label="1">开启</el-radio> |
||||||
|
</el-radio-group> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-button size="large" type="primary" class="ml10" @click="noticeLogin"> 公告发送</el-button> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
</div> |
||||||
|
</el-card> |
||||||
|
|
||||||
|
<el-dialog v-model="listModelVisible" :before-close="handleClose" :close-on-click-modal="false" center> |
||||||
|
<div class="my-header"> |
||||||
|
<el-button type="" @click="saveModel(2)">保存</el-button> |
||||||
|
<el-button type="primary" @click="setModel(1)">添加</el-button> |
||||||
|
</div> |
||||||
|
<el-table :data="dbs" :inline="true" :cell-style="{ padding: '0' }"> |
||||||
|
<el-table-column> |
||||||
|
<template #default="scope"> |
||||||
|
<div class="flex-warp"> |
||||||
|
{{ scope.row.title }} |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column width="150"> |
||||||
|
<template #default="scope"> |
||||||
|
<el-button size="small" type="danger" @click="setModel(3, scope.row.id)" inline="true">删</el-button> |
||||||
|
<el-button size="small" type="primary" @click="setModel(2, scope.row.id)" inline="true">改</el-button> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
</el-table> |
||||||
|
</el-dialog> |
||||||
|
|
||||||
|
<el-dialog v-model="editModelVisible" :close-on-click-modal="false" center> |
||||||
|
<el-form label-width="90px"> |
||||||
|
<el-form-item label="模板名称" prop="title"> |
||||||
|
<el-input v-model="editModel.title" placeholder="请输入模板名称" /> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="模板内容" prop="content"> |
||||||
|
<el-input v-model="editModel.content" type="textarea" placeholder="请输入内容" rows="25" /> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
<template #footer> |
||||||
|
<div class="dialog-footer"> |
||||||
|
<el-button type="primary" @click="saveModel(1)"> 保存</el-button> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-dialog> |
||||||
|
|
||||||
|
<el-dialog v-model="listCronVisible" :close-on-click-modal="false" title="待发送公告列表" center> |
||||||
|
<el-table :data="tableData.crons" :inline="true" :cell-style="{ padding: '0' }" stripe> |
||||||
|
<el-table-column label="公告类型" width="100"> |
||||||
|
<template #default="scope"> |
||||||
|
<div class="flex-warp"> |
||||||
|
{{ noticeTypes.find((r) => r.Id == scope.row.noticeType).Name }} |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column label="公告内容" show-overflow-tooltip> |
||||||
|
<template #default="scope"> |
||||||
|
<div class="flex-warp"> |
||||||
|
<span @click="alertContent(scope.row.content)">{{ scope.row.content }}</span> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column label="待发送时间" width="200"> |
||||||
|
<template #default="scope"> |
||||||
|
<div class="flex-warp"> |
||||||
|
{{ getDate(scope.row.sendTime) }} |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<!-- <el-table-column label="区服">--> |
||||||
|
<!-- <template #default="scope">--> |
||||||
|
<!-- <div class="flex-warp">--> |
||||||
|
<!-- {{scope.row.channel}}--> |
||||||
|
<!-- </div>--> |
||||||
|
<!-- </template>--> |
||||||
|
<!-- </el-table-column>--> |
||||||
|
<el-table-column width="150"> |
||||||
|
<template #default="scope"> |
||||||
|
<el-button size="small" type="primary" @click="setCron(1, scope.row.id)" inline="true">修改</el-button> |
||||||
|
<el-button size="small" type="danger" @click="setCron(2, scope.row.id)" inline="true">删除</el-button> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
</el-table> |
||||||
|
</el-dialog> |
||||||
|
|
||||||
|
<el-dialog v-model="editCronVisible" :close-on-click-modal="false" center> |
||||||
|
<el-form label-width="90px"> |
||||||
|
<el-form-item label="发送时间" prop="time"> |
||||||
|
<el-radio-group v-model="cron.send"> |
||||||
|
<el-radio :label="1">立即</el-radio> |
||||||
|
<el-radio :label="2">定时</el-radio> |
||||||
|
</el-radio-group> |
||||||
|
<el-form-item prop="now" v-if="cron.send == 2" style="margin-left: 20px"> |
||||||
|
<el-date-picker type="datetime" v-model="cron.sendTime" placeholder="发送时间" format="YYYY-MM-DD HH:mm:ss" value-format="x" /> |
||||||
|
</el-form-item> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="公告模板" prop="model"> |
||||||
|
<el-select v-model="model" @change="useModel(2)" placeholder="请选择模板"> |
||||||
|
<el-option v-for="item in dbs" :key="item.id" :label="item.title" :value="item.id"></el-option> |
||||||
|
</el-select> |
||||||
|
<el-button type="primary" @click="makeModel(1)" style="margin-left: 20px">编辑模板</el-button> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-button size="small" @click="inputBig(2)" style="margin-bottom: -15px"> |
||||||
|
<span style="font-weight: bold">B</span> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" @click="inputItalic(2)" style="margin-bottom: -15px"> |
||||||
|
<span style="font-style: italic">I</span> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" @click="inputUnderline(2)" style="margin-bottom: -15px"> |
||||||
|
<span style="text-decoration: underline">U</span> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" @click="inputLink(2)" style="margin-bottom: -15px; padding: 0; padding-left: 5px"> |
||||||
|
<el-icon type="text"> |
||||||
|
<ele-Link /> |
||||||
|
</el-icon> |
||||||
|
</el-button> |
||||||
|
<el-button size="small" class="color-picker font-color-picker" style="margin-bottom: -15px; padding: 0"> |
||||||
|
<el-color-picker size="default" v-model="color" @change="inputColor(2)"></el-color-picker> |
||||||
|
</el-button> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="公告内容"> |
||||||
|
<el-input v-model="cron.content" type="textarea" rows="25" @mouseup="inputSelect" @blur="inputSelect" clearable /> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
<template #footer> |
||||||
|
<div class="dialog-footer"> |
||||||
|
<el-button type="primary" @click="saveCron"> 保存修改</el-button> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-dialog> |
||||||
|
|
||||||
|
<el-dialog v-model="contentVisible" :close-on-click-modal="false" center> |
||||||
|
<p v-html="tableData.content"></p> |
||||||
|
</el-dialog> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<script lang="ts"> |
||||||
|
import { toRefs, reactive, onMounted, defineComponent } from 'vue'; |
||||||
|
import { |
||||||
|
gameGetNotice, |
||||||
|
gameGMNoticeModelAdd, |
||||||
|
gameGMNoticeModelDel, |
||||||
|
gameGMNoticeModelGet, |
||||||
|
gameNotice, |
||||||
|
gameGMNoticeGetCron, |
||||||
|
gameNoticeDel, |
||||||
|
} from '/@/api/game/notice'; |
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus/es'; |
||||||
|
import { allChannelList } from '/@/utils/game'; |
||||||
|
import { contentReplace, zeroFill } from '/@/utils/utils'; |
||||||
|
import { Notice_Type } from '/@/api/common/consts'; |
||||||
|
|
||||||
|
interface Data { |
||||||
|
title: string; |
||||||
|
send: number; |
||||||
|
sendTime: number; |
||||||
|
channels: string[]; |
||||||
|
channel: string; |
||||||
|
content: string; |
||||||
|
noticeType: number; |
||||||
|
id: number; |
||||||
|
noticeId: number; |
||||||
|
isShow: number; |
||||||
|
} |
||||||
|
|
||||||
|
interface TableDataState { |
||||||
|
unselsected: string[]; |
||||||
|
colorPicker: boolean; |
||||||
|
color: string; |
||||||
|
selected: string; |
||||||
|
urlLink: string; |
||||||
|
dbs: Array<Data>; |
||||||
|
model: number; |
||||||
|
editModel: Data; |
||||||
|
tableData: { |
||||||
|
content: string; |
||||||
|
crons: Array<Data>; |
||||||
|
param: Data; |
||||||
|
}; |
||||||
|
editModelVisible: boolean; |
||||||
|
listModelVisible: boolean; |
||||||
|
listCronVisible: boolean; |
||||||
|
editCronVisible: boolean; |
||||||
|
contentVisible: boolean; |
||||||
|
cron: Data; |
||||||
|
channels: object; |
||||||
|
noticeTypes: object[]; |
||||||
|
} |
||||||
|
|
||||||
|
var noticeType = 6; |
||||||
|
|
||||||
|
export default defineComponent({ |
||||||
|
name: 'apiV1GameNoticeNewServer', |
||||||
|
setup() { |
||||||
|
// const {proxy} = getCurrentInstance() as any; |
||||||
|
const state = reactive<TableDataState>({ |
||||||
|
unselsected: ['', ''], |
||||||
|
colorPicker: false, |
||||||
|
editModelVisible: false, |
||||||
|
listModelVisible: false, |
||||||
|
listCronVisible: false, |
||||||
|
editCronVisible: false, |
||||||
|
contentVisible: false, |
||||||
|
cron: { |
||||||
|
title: '', |
||||||
|
send: 1, |
||||||
|
sendTime: Date.now(), |
||||||
|
content: '', |
||||||
|
noticeType: noticeType, |
||||||
|
channels: [], |
||||||
|
channel: '', |
||||||
|
id: 0, |
||||||
|
noticeId: 0, |
||||||
|
}, |
||||||
|
color: '#000000', |
||||||
|
selected: '替换显示内容', |
||||||
|
urlLink: '', |
||||||
|
tableData: { |
||||||
|
content: '', |
||||||
|
crons: [], |
||||||
|
param: { |
||||||
|
title: '', |
||||||
|
send: 1, |
||||||
|
sendTime: Date.now(), |
||||||
|
content: '', |
||||||
|
noticeType: noticeType, |
||||||
|
channels: [], |
||||||
|
channel: '', |
||||||
|
id: 0, |
||||||
|
noticeId: 0, |
||||||
|
isShow: 1, |
||||||
|
}, |
||||||
|
}, |
||||||
|
dbs: [], |
||||||
|
model: '', |
||||||
|
editModel: {}, |
||||||
|
channels: [], |
||||||
|
noticeTypes: Notice_Type, |
||||||
|
}); |
||||||
|
const noticeLogin = () => { |
||||||
|
if (state.tableData.param.send == 1) { |
||||||
|
state.tableData.param.sendTime = 0; |
||||||
|
} |
||||||
|
|
||||||
|
console.log('Notice: ', state.tableData.param); |
||||||
|
for (let i in state.tableData.param.channels) { |
||||||
|
sendNotice(state.tableData.param.channels[i]); |
||||||
|
} |
||||||
|
}; |
||||||
|
const sendNotice = (channel: string) => { |
||||||
|
let req = { |
||||||
|
title: state.tableData.param.title, |
||||||
|
send: state.tableData.param.send, |
||||||
|
sendTime: state.tableData.param.sendTime, |
||||||
|
content: state.tableData.param.content, |
||||||
|
noticeType: state.tableData.param.noticeType, |
||||||
|
channel: channel, |
||||||
|
id: state.tableData.param.id, |
||||||
|
noticeId: state.tableData.param.noticeId, |
||||||
|
isShow: state.tableData.param.isShow, |
||||||
|
}; |
||||||
|
gameNotice(req) |
||||||
|
.then(() => { |
||||||
|
ElMessage.success(state.channels.find((r) => r.value == channel).label + '发送成功'); |
||||||
|
}) |
||||||
|
.finally(() => { |
||||||
|
// state.loading = false; |
||||||
|
}); |
||||||
|
}; |
||||||
|
const saveCron = () => { |
||||||
|
if (state.cron.send == 1) { |
||||||
|
state.cron.sendTime = 0; |
||||||
|
} |
||||||
|
|
||||||
|
console.log('Notice: ', state.cron); |
||||||
|
gameNotice(state.cron) |
||||||
|
.then(() => { |
||||||
|
ElMessage.success('发送成功'); |
||||||
|
}) |
||||||
|
.finally(() => { |
||||||
|
// state.loading = false; |
||||||
|
}); |
||||||
|
}; |
||||||
|
const noticeLog = () => { |
||||||
|
gameGMNoticeGetCron({}) |
||||||
|
.then((res) => { |
||||||
|
console.log('Notice: ', res); |
||||||
|
state.tableData.crons = res.data.noticeLogs; |
||||||
|
state.listCronVisible = true; |
||||||
|
}) |
||||||
|
.finally(() => { |
||||||
|
// state.loading = false; |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
// 初始化表格数据 |
||||||
|
const initTableData = () => { |
||||||
|
getNotice(); |
||||||
|
}; |
||||||
|
|
||||||
|
const getNotice = () => { |
||||||
|
gameGetNotice(state.tableData.param).then((res: any) => { |
||||||
|
state.tableData.param.content = res.data.content; |
||||||
|
state.tableData.param.noticeId = res.data.id; |
||||||
|
}); |
||||||
|
}; |
||||||
|
// 页面加载时 |
||||||
|
onMounted(() => { |
||||||
|
allChannelList().then((res) => { |
||||||
|
state.channels = res; |
||||||
|
}); |
||||||
|
initTableData(); |
||||||
|
getModel(); |
||||||
|
|
||||||
|
console.log('onMounted', document.getElementsByClassName('w-e-droplist')); |
||||||
|
if (document.getElementsByClassName('w-e-droplist')[0]) { |
||||||
|
document.getElementsByClassName('w-e-droplist')[0].style['width'] = '260px'; |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
var getDate = (time: string) => { |
||||||
|
let date = new Date(time); |
||||||
|
return ( |
||||||
|
date.getFullYear() + |
||||||
|
'-' + |
||||||
|
zeroFill(date.getMonth() + 1) + |
||||||
|
'-' + |
||||||
|
zeroFill(date.getDate()) + |
||||||
|
' ' + |
||||||
|
zeroFill(date.getHours()) + |
||||||
|
':' + |
||||||
|
zeroFill(date.getMinutes()) + |
||||||
|
':' + |
||||||
|
zeroFill(date.getSeconds()) |
||||||
|
); |
||||||
|
}; |
||||||
|
var inputSelect = (res: any) => { |
||||||
|
console.log(res, res.target.selectionStart, res.target.selectionEnd); |
||||||
|
let selectionStart = res.target.selectionStart; |
||||||
|
let selectionEnd = res.target.selectionEnd; |
||||||
|
state.unselsected = [res.target.value.slice(0, selectionStart), res.target.value.slice(selectionEnd)]; |
||||||
|
if (selectionStart == selectionEnd) { |
||||||
|
// console.log("same"); |
||||||
|
state.selected = '替换显示内容'; |
||||||
|
return; |
||||||
|
} |
||||||
|
state.selected = res.target.value.slice(selectionStart, selectionEnd); |
||||||
|
console.log(state.selected); |
||||||
|
}; |
||||||
|
var changeContent = (type: number) => { |
||||||
|
switch (type) { |
||||||
|
case 2: |
||||||
|
state.cron.content = state.unselsected[0] + state.selected + state.unselsected[1]; |
||||||
|
break; |
||||||
|
default: |
||||||
|
state.tableData.param.content = state.unselsected[0] + state.selected + state.unselsected[1]; |
||||||
|
break; |
||||||
|
} |
||||||
|
}; |
||||||
|
var inputBig = (type: number) => { |
||||||
|
if (state.unselsected[1].indexOf('[/b]') == 0) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
if (state.selected.indexOf('[b]') > -1) { |
||||||
|
state.selected = state.selected.replace(/\[b]|\[\/b]/gi, ''); |
||||||
|
changeContent(type); |
||||||
|
return; |
||||||
|
} |
||||||
|
state.selected = '[b]' + state.selected + '[/b]'; |
||||||
|
changeContent(type); |
||||||
|
// console.log(state.unselsected, state.selected.indexOf("[b]"), state.selected, state.tableData.param.content); |
||||||
|
}; |
||||||
|
var inputItalic = (type: number) => { |
||||||
|
if (state.unselsected[1].indexOf('[/i]') == 0) { |
||||||
|
return; |
||||||
|
} |
||||||
|
if (state.selected.indexOf('[i]') > -1 || (state.unselsected[1].indexOf('[i]') == 0 && state.unselsected[1].indexOf('[/i]') > -1)) { |
||||||
|
state.selected = state.selected.replace(/\[i]|\[\/i]/gi, ''); |
||||||
|
changeContent(type); |
||||||
|
return; |
||||||
|
} |
||||||
|
state.selected = '[i]' + state.selected + '[/i]'; |
||||||
|
changeContent(type); |
||||||
|
// console.log(state.unselsected, state.selected, state.tableData.param.content); |
||||||
|
}; |
||||||
|
var inputUnderline = (type: number) => { |
||||||
|
if (state.unselsected[1].indexOf('[/u]') == 0) { |
||||||
|
return; |
||||||
|
} |
||||||
|
if (state.selected.indexOf('[u]') > -1) { |
||||||
|
state.selected = state.selected.replace(/\[u]|\[\/u]/gi, ''); |
||||||
|
changeContent(type); |
||||||
|
return; |
||||||
|
} |
||||||
|
state.selected = '[u]' + state.selected + '[/u]'; |
||||||
|
changeContent(type); |
||||||
|
// console.log(state.unselsected, state.selected, state.tableData.param.content); |
||||||
|
}; |
||||||
|
var inputLink = (type: number) => { |
||||||
|
if (state.selected.indexOf('[/url]') > -1) { |
||||||
|
state.selected = state.selected.replace(/\[url=.*?]|\[\/url]/gi, ''); |
||||||
|
changeContent(type); |
||||||
|
return; |
||||||
|
} |
||||||
|
ElMessageBox.prompt('请输入Url', '提示', { |
||||||
|
confirmButtonText: '确认', |
||||||
|
cancelButtonText: '取消', |
||||||
|
// inputPattern: |
||||||
|
// /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/, |
||||||
|
inputErrorMessage: 'Invalid http request', |
||||||
|
}).then(({ value }) => { |
||||||
|
state.urlLink = value; |
||||||
|
if (state.unselsected[1].indexOf('[/url]') == 0) { |
||||||
|
return; |
||||||
|
} |
||||||
|
state.selected = '[url=' + state.urlLink + ']' + state.selected + '[/url]'; |
||||||
|
changeContent(type); |
||||||
|
state.urlLink = ''; |
||||||
|
// console.log(state.unselsected, state.selected, state.tableData.param.content); |
||||||
|
}); |
||||||
|
}; |
||||||
|
var buttonColor = (type: number) => { |
||||||
|
// if(state.selected.indexOf("[/color]") > -1){ |
||||||
|
// state.selected = state.selected.replace(/\[color=#.+?]|\[\/color]/gi, ""); |
||||||
|
// changeContent(); |
||||||
|
// } |
||||||
|
}; |
||||||
|
var inputColor = (type: number) => { |
||||||
|
if (!state.color) { |
||||||
|
if (state.selected.indexOf('[/color]') > -1) { |
||||||
|
state.selected = state.selected.replace(/\[color=#.+?]|\[\/color]/gi, ''); |
||||||
|
changeContent(type); |
||||||
|
return; |
||||||
|
} |
||||||
|
return; |
||||||
|
} |
||||||
|
if (state.unselsected[1].indexOf('[/color]') == 0) { |
||||||
|
return; |
||||||
|
} |
||||||
|
if (state.selected.indexOf('[/color]') > -1) { |
||||||
|
state.selected = state.selected.replace(/\[color=#.+?]|\[\/color]/gi, ''); |
||||||
|
// changeContent(); |
||||||
|
// return; |
||||||
|
} |
||||||
|
state.selected = '[color=' + state.color + ']' + state.selected + '[/color]'; |
||||||
|
changeContent(type); |
||||||
|
// console.log(state.unselsected, state.selected, state.tableData.param.content); |
||||||
|
}; |
||||||
|
// 模板 |
||||||
|
const getModel = () => { |
||||||
|
gameGMNoticeModelGet({ noticeType: noticeType }).then((res) => { |
||||||
|
if (res.data.noticeModel) { |
||||||
|
state.dbs = res.data.noticeModel; |
||||||
|
} |
||||||
|
console.log(res, state.dbs); |
||||||
|
}); |
||||||
|
}; |
||||||
|
const useModel = (id: number) => { |
||||||
|
switch (id) { |
||||||
|
case 1: |
||||||
|
let model = state.dbs.find((r) => r.id == state.model); |
||||||
|
if (model) { |
||||||
|
state.tableData.param.content = model.content; |
||||||
|
} |
||||||
|
break; |
||||||
|
case 2: |
||||||
|
let model1 = state.dbs.find((r) => r.id == state.model); |
||||||
|
if (model1) { |
||||||
|
state.cron.content = model1.content; |
||||||
|
} |
||||||
|
break; |
||||||
|
} |
||||||
|
}; |
||||||
|
const makeModel = () => { |
||||||
|
state.listModelVisible = true; |
||||||
|
console.log(state); |
||||||
|
}; |
||||||
|
const setModel = (type: number, id: number) => { |
||||||
|
switch (type) { |
||||||
|
case 1: |
||||||
|
state.editModel = {}; |
||||||
|
state.editModelVisible = true; |
||||||
|
break; |
||||||
|
case 2: |
||||||
|
state.editModel = state.dbs.find((model) => model.id == id); |
||||||
|
if (!state.editModel) { |
||||||
|
return; |
||||||
|
} |
||||||
|
state.editModelVisible = true; |
||||||
|
break; |
||||||
|
case 3: |
||||||
|
gameGMNoticeModelDel({ |
||||||
|
id: id, |
||||||
|
}) |
||||||
|
.then(function () { |
||||||
|
getModel(); |
||||||
|
}) |
||||||
|
.finally(function () {}); |
||||||
|
break; |
||||||
|
} |
||||||
|
}; |
||||||
|
const saveModel = (type: number) => { |
||||||
|
console.log(type, state.editModel); |
||||||
|
switch (type) { |
||||||
|
case 1: |
||||||
|
gameGMNoticeModelAdd({ |
||||||
|
title: state.editModel.title, |
||||||
|
content: state.editModel.content, |
||||||
|
noticeType: noticeType, |
||||||
|
id: state.editModel.id, |
||||||
|
}) |
||||||
|
.then(function () { |
||||||
|
getModel(); |
||||||
|
}) |
||||||
|
.finally(function () { |
||||||
|
state.editModelVisible = false; |
||||||
|
}); |
||||||
|
break; |
||||||
|
case 2: |
||||||
|
state.listModelVisible = false; |
||||||
|
break; |
||||||
|
} |
||||||
|
}; |
||||||
|
const handleClose = (done: () => void) => { |
||||||
|
// ElMessageBox.confirm('确定退出编辑模板页面?').then(() => { |
||||||
|
done(); |
||||||
|
// }).catch(() => { |
||||||
|
// // catch error |
||||||
|
// }) |
||||||
|
}; |
||||||
|
const setCron = (type: number, id: number) => { |
||||||
|
switch (type) { |
||||||
|
case 1: // 修改 |
||||||
|
state.cron = state.tableData.crons.find((r) => r.id == id); |
||||||
|
console.log(state.cron); |
||||||
|
state.editCronVisible = true; |
||||||
|
break; |
||||||
|
case 2: // 删除 |
||||||
|
ElMessageBox.confirm('是否确认删除本条待发送公告?,点击确认后删除本条待发送公告。').then(() => { |
||||||
|
gameNoticeDel({ id: id }) |
||||||
|
.then(() => { |
||||||
|
ElMessage.success('删除成功'); |
||||||
|
noticeLog(); |
||||||
|
}) |
||||||
|
.finally(() => { |
||||||
|
// state.loading = false; |
||||||
|
}); |
||||||
|
}); |
||||||
|
break; |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
const alertContent = (val) => { |
||||||
|
console.log(`current page: ${val}`); |
||||||
|
ElMessageBox.alert(val, '', { confirmButtonText: 'OK' }); |
||||||
|
}; |
||||||
|
|
||||||
|
const showContent = () => { |
||||||
|
state.contentVisible = true; |
||||||
|
state.tableData.content = contentReplace(state.tableData.param.content); |
||||||
|
console.log(state.tableData.content); |
||||||
|
}; |
||||||
|
const getAllChannel = () => { |
||||||
|
state.tableData.param.channels = []; |
||||||
|
for (let i in state.channels) { |
||||||
|
if (state.channels[i].value == '') { |
||||||
|
continue; |
||||||
|
} |
||||||
|
state.tableData.param.channels.push(state.channels[i].value); |
||||||
|
} |
||||||
|
}; |
||||||
|
return { |
||||||
|
getAllChannel, |
||||||
|
showContent, |
||||||
|
getNotice, |
||||||
|
noticeLog, |
||||||
|
noticeLogin, |
||||||
|
inputSelect, |
||||||
|
inputBig, |
||||||
|
inputItalic, |
||||||
|
inputUnderline, |
||||||
|
inputLink, |
||||||
|
inputColor, |
||||||
|
buttonColor, |
||||||
|
getModel, |
||||||
|
useModel, |
||||||
|
makeModel, |
||||||
|
setModel, |
||||||
|
saveModel, |
||||||
|
handleClose, |
||||||
|
setCron, |
||||||
|
getDate, |
||||||
|
alertContent, |
||||||
|
saveCron, |
||||||
|
...toRefs(state), |
||||||
|
}; |
||||||
|
}, |
||||||
|
}); |
||||||
|
</script> |
||||||
|
<style scoped lang="scss" src="../../../theme/add.scss"></style> |
||||||
|
<style scoped lang="scss"> |
||||||
|
.my-header { |
||||||
|
display: flex; |
||||||
|
flex-direction: row; |
||||||
|
justify-content: space-between; |
||||||
|
gap: 16px; |
||||||
|
} |
||||||
|
|
||||||
|
.tree-border { |
||||||
|
margin-top: 5px; |
||||||
|
border: 1px solid #e5e6e7 !important; |
||||||
|
background: #fff none !important; |
||||||
|
border-radius: 4px; |
||||||
|
} |
||||||
|
|
||||||
|
.system-edit-post-container { |
||||||
|
.menu-data-tree { |
||||||
|
border: var(--el-input-border, var(--el-border-base)); |
||||||
|
border-radius: var(--el-input-border-radius, var(--el-border-radius-base)); |
||||||
|
padding: 5px; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.el-form-item { |
||||||
|
display: -moz-flex; |
||||||
|
vertical-align: middle; |
||||||
|
margin-right: 32px; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep .el-table .cell { |
||||||
|
height: 25px; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td { |
||||||
|
background: #ffffd5; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep .el-table .el-table--enable-row-hover .el-table__body tr:hover > td { |
||||||
|
background: inherit; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep(.el-form-item--large .el-form-item__content) { |
||||||
|
line-height: 20px; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep(.el-form-item__content) { |
||||||
|
line-height: 20px; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep .w-e-droplist { |
||||||
|
width: 260px !important; |
||||||
|
} |
||||||
|
</style> |
||||||
Loading…
Reference in new issue