2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 03:20:52 +08:00

修改bug新增功能及bug

This commit is contained in:
leiyilu 2022-07-03 12:45:09 +08:00
parent ed17e49676
commit de7b476d1f
21 changed files with 316 additions and 25 deletions

View File

@ -1,3 +1,11 @@
# 1.0.6
*兼容`体力模板2`可自定义css以及背景icon等
* 模板内容需要具体参考**/dailyNote/Template/temp**
* 推荐英文命名文件夹
*优化正则匹配不至于一直输出
*修复模板一无派遣的bug
*优化部分别名
# 1.0.5 # 1.0.5
* 新增了一个体力模板 * 新增了一个体力模板
* 设置功能新增模板切换`图鉴设置模板(0-2)` * 设置功能新增模板切换`图鉴设置模板(0-2)`

View File

@ -150,17 +150,10 @@ export async function Note(e, {
val.remained_mb2 = "今天" + Time_day + moment(remainedDate).format("hh:mm"); val.remained_mb2 = "今天" + Time_day + moment(remainedDate).format("hh:mm");
val.remained_time = ` ${val.remained_time}`; val.remained_time = ` ${val.remained_time}`;
} }
val.mb2_icon=val.avatar_side_icon val.mb2_icon = val.avatar_side_icon
} }
} }
for (var i = 0; i < 5-data.expeditions.length; i++) {
data.expeditions.push({
remained_time:0,
remained_mb2:0,
percentage:0,
mb2_icon:""
})
}
let remained_time = ""; let remained_time = "";
if (data.expeditions && data.expeditions.length >= 1) { if (data.expeditions && data.expeditions.length >= 1) {
@ -227,6 +220,27 @@ export async function Note(e, {
if (mb < 0) { if (mb < 0) {
mb = lodash.random(0, path_url.length - 1); mb = lodash.random(0, path_url.length - 1);
} }
if (mb == 1) {
for (var i = 0; i < 5 - data.expeditions.length; i++) {
data.expeditions.push({
remained_time: 0,
remained_mb2: 0,
percentage: 0,
mb2_icon: ""
})
}
}
var urlFile = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/Template/`);
var urlType = [];
for (let val of urlFile) {
if (val.includes(".")) continue;
urlType.push(val)
}
// console.log(urlType)
if (urlType.length > 0) {
urlType = urlType[lodash.random(0, urlType.length - 1)]
}
// console.log(urlType)
var image = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`); var image = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`);
var list_img = []; var list_img = [];
for (let val of image) { for (let val of image) {
@ -238,6 +252,7 @@ export async function Note(e, {
uid: uid, uid: uid,
coinTime_mb2Day, coinTime_mb2Day,
coinTime_mb2, coinTime_mb2,
urlType,
resinMaxTime_mb2Day, resinMaxTime_mb2Day,
resinMaxTime, resinMaxTime,
resinMaxTime_mb2, resinMaxTime_mb2,

View File

@ -40,7 +40,7 @@ let rule = {
describe: "查看插件的功能", describe: "查看插件的功能",
}, },
AtlasAlias: { AtlasAlias: {
reg: "#*(.*)$", reg: "^(#(.*)|.*图鉴)$",
describe: "角色、食物、怪物、武器信息图鉴", describe: "角色、食物、怪物、武器信息图鉴",
}, },
Note: { Note: {

View File

@ -1,5 +1,5 @@
{ {
"图鉴列表|图鉴|图鉴目录": ["#角色图鉴", "#武器图鉴", "#原魔图鉴", "#圣遗物图鉴", "#食物图鉴", "#秘境图鉴"], "图鉴列表|图鉴|图鉴目录": ["#角色图鉴", "#武器图鉴", "#原魔图鉴(怪物图鉴)", "#圣遗物图鉴", "#食物图鉴", "#秘境图鉴"],
"角色图鉴|人物图鉴|英雄图鉴": ["角色星级:", "#五星角色图鉴", "#四星角色图鉴", "角色地区:", "#蒙德角色图鉴", "#璃月角色图鉴", "#稻妻角色图鉴", "#至冬角色图鉴", "#未知地区角色图鉴", "角色图鉴|人物图鉴|英雄图鉴": ["角色星级:", "#五星角色图鉴", "#四星角色图鉴", "角色地区:", "#蒙德角色图鉴", "#璃月角色图鉴", "#稻妻角色图鉴", "#至冬角色图鉴", "#未知地区角色图鉴",
"角色元素:", "#风系角色图鉴", "#火系角色图鉴", "#水系角色图鉴", "#冰系角色图鉴", "#雷系角色图鉴", "#岩系角色图鉴", "#草系角色图鉴", "角色武器:", "#单手剑角色图鉴", "角色元素:", "#风系角色图鉴", "#火系角色图鉴", "#水系角色图鉴", "#冰系角色图鉴", "#雷系角色图鉴", "#岩系角色图鉴", "#草系角色图鉴", "角色武器:", "#单手剑角色图鉴",
"#双手剑角色图鉴", "#弓系角色图鉴", "#长柄武器角色图鉴", "#法器角色图鉴" "#双手剑角色图鉴", "#弓系角色图鉴", "#长柄武器角色图鉴", "#法器角色图鉴"
@ -152,7 +152,7 @@
"活动武器图鉴|免费武器图鉴|赠送武器图鉴": ["#落霞图鉴", "#证誓之明瞳图鉴", "#辰砂之纺锤图鉴", "#掠食者图鉴", "#衔珠海皇图鉴", "#降临之剑图鉴", "#腐殖之剑图鉴", "#风花之颂图鉴", "活动武器图鉴|免费武器图鉴|赠送武器图鉴": ["#落霞图鉴", "#证誓之明瞳图鉴", "#辰砂之纺锤图鉴", "#掠食者图鉴", "#衔珠海皇图鉴", "#降临之剑图鉴", "#腐殖之剑图鉴", "#风花之颂图鉴",
"#嘟嘟可故事集图鉴" "#嘟嘟可故事集图鉴"
], ],
"原魔图鉴|圆魔图鉴": ["#史莱姆图鉴", "#无相图鉴", "#飘浮灵图鉴", "#丘丘人图鉴", "#丘丘暴徒图鉴", "#丘丘王图鉴", "#萨满图鉴", "#深渊法师图鉴", "#深渊使徒图鉴", "#兽境猎犬图鉴", "原魔图鉴|圆魔图鉴|怪物图鉴": ["#史莱姆图鉴", "#无相图鉴", "#飘浮灵图鉴", "#丘丘人图鉴", "#丘丘暴徒图鉴", "#丘丘王图鉴", "#萨满图鉴", "#深渊法师图鉴", "#深渊使徒图鉴", "#兽境猎犬图鉴",
"#黯色空壳图鉴", "#愚人众图鉴", "#自律机关图鉴", "#盗宝团图鉴", "#野伏众图鉴", "#骗骗花图鉴", "#龙蜥图鉴", "#飞萤图鉴", "#boss图鉴", "#其他图鉴" "#黯色空壳图鉴", "#愚人众图鉴", "#自律机关图鉴", "#盗宝团图鉴", "#野伏众图鉴", "#骗骗花图鉴", "#龙蜥图鉴", "#飞萤图鉴", "#boss图鉴", "#其他图鉴"
], ],
"其他图鉴": ["#狂风之核图鉴", "#浮游水蕈兽图鉴"], "其他图鉴": ["#狂风之核图鉴", "#浮游水蕈兽图鉴"],
@ -185,7 +185,7 @@
"龙蜥图鉴": ["#幼岩龙蜥图鉴", "#岩龙蜥图鉴", "#古岩龙蜥图鉴", "#深海龙蜥原种图鉴", "#深海龙蜥啮冰图鉴", "#深海龙蜥吞雷图鉴", "#深海龙蜥之群图鉴"], "龙蜥图鉴": ["#幼岩龙蜥图鉴", "#岩龙蜥图鉴", "#古岩龙蜥图鉴", "#深海龙蜥原种图鉴", "#深海龙蜥啮冰图鉴", "#深海龙蜥吞雷图鉴", "#深海龙蜥之群图鉴"],
"萤虫图鉴|蚊子图鉴|飞萤图鉴": ["#雷萤图鉴", "#冰萤图鉴", "#水萤图鉴"], "萤虫图鉴|蚊子图鉴|飞萤图鉴": ["#雷萤图鉴", "#冰萤图鉴", "#水萤图鉴"],
"boss图鉴|BOSS图鉴|Boss图鉴|周本图鉴|世界boss图鉴": ["#无相图鉴", "#纯水精灵图鉴", "#雷音权限图鉴", "#黄金王兽图鉴", "#遗迹巨蛇图鉴", "#恒常机关阵列图鉴", "#魔偶剑鬼图鉴", "boss图鉴|BOSS图鉴|Boss图鉴|周本图鉴|世界boss图鉴": ["#无相图鉴", "#纯水精灵图鉴", "#雷音权限图鉴", "#黄金王兽图鉴", "#遗迹巨蛇图鉴", "#恒常机关阵列图鉴", "#魔偶剑鬼图鉴",
"#爆炎树图鉴", "#急冻树图鉴", "#古岩龙蜥图鉴", "#深海龙蜥群图鉴", "#裂空的魔龙图鉴", "#北风的王奔狼的领主图鉴", "#公子原魔图鉴", "#若陀龙王图鉴", "#女士图鉴", "#爆炎树图鉴", "#急冻树图鉴", "#古岩龙蜥图鉴", "#深海龙蜥群图鉴", "#裂空的魔龙图鉴", "#北风的奔狼的领主图鉴", "#公子原魔图鉴", "#若陀龙王图鉴", "#女士图鉴",
"#祸津御建鸣神命图鉴" "#祸津御建鸣神命图鉴"
], ],
"圣遗物图鉴|遗物图鉴": ["#五星圣遗物图鉴", "#四星圣遗物图鉴"], "圣遗物图鉴|遗物图鉴": ["#五星圣遗物图鉴", "#四星圣遗物图鉴"],

View File

@ -1,7 +1,7 @@
{ {
"公子": ["周本公子","愚人众公子", "公子周本", "原魔公子", "原魔达达利亚", "周本达达利亚", "达达利亚周本", "公子", "玩具销售员"], "公子": ["周本公子","愚人众公子", "公子周本", "原魔公子", "原魔达达利亚", "周本达达利亚", "达达利亚周本", "公子", "玩具销售员"],
"女士": ["女士", "周本女士", "女士周本", "愚人众女士", "火之魔女", "火魔女"], "女士": ["女士", "周本女士", "女士周本", "愚人众女士", "火之魔女", "火魔女"],
"北风的王狼奔狼的领主": ["奔狼的领主", "北风狼", "狼王", "周本狼王", "狼王周本", "二哈", "安德琉斯", "北风的狼王", "北风守护"], "北风的王狼奔狼的领主": ["北风的狼王奔狼的领主","奔狼的领主", "北风狼", "狼王", "周本狼王", "狼王周本", "二哈", "安德琉斯", "北风的狼王", "北风守护"],
"祸津御建鸣神命": ["原魔雷神", "原魔雷电将军", "周本雷电将军", "雷电将军周本", "周本雷神", "雷神周本", "御建所大人", "雷军", "原魔雷军"], "祸津御建鸣神命": ["原魔雷神", "原魔雷电将军", "周本雷电将军", "雷电将军周本", "周本雷神", "雷神周本", "御建所大人", "雷军", "原魔雷军"],
"若陀龙王": ["肥坨", "龙王", "若陀", "肥宅", "钟离坐骑","坨子哥", "坨坨"], "若陀龙王": ["肥坨", "龙王", "若陀", "肥宅", "钟离坐骑","坨子哥", "坨坨"],
"裂空的魔龙": ["风魔龙", "风龙", "特瓦林", "温迪坐骑"], "裂空的魔龙": ["风魔龙", "风龙", "特瓦林", "温迪坐骑"],

View File

@ -0,0 +1,268 @@
@font-face {
font-family: HYWenHei;
src: url(../../../../font/HYWenHei.ttf);
}
@font-face {
font-family: MiSans-Regular;
src: url(../../../../font/MiSans-Regular.ttf);
}
@font-face {
font-family: MiSans-Medium;
src: url(../../../../font/MiSans-Medium.ttf);
}
@font-face {
font-family: HYWenHei-HEW;
src: url(../../../../font/HYWenHei-HEW.ttf);
}
#container {
min-height: 627px;
height: auto;
width: 1137px;
background-color: rgba(0, 0, 0, 0.5);
}
.left_model {
width: calc(50% - 136px);
padding: 75px 0;
padding-left: 136px;
display: inline-block;
float: left;
}
.left_model img {
width: 40px;
height: 40px;
vertical-align: middle;
}
.div {
display: inline-block;
vertical-align: middle;
}
.left_model .div:nth-child(2) {
margin-left: 22px;
width: 190px;
}
.title {
font-size: 24px;
font-family: "MiSans-Regular";
color: #444444;
display: block;
text-align: left;
src: url("{{_res_path}}font/MiSans-Regular.ttf");
}
.bottom {
text-align: left;
color: #a9834f;
font-family: "MiSans-Regular";
}
.time {
border-radius: 15px;
background-color: #a9834f;
color: #fff;
text-align: center;
padding: 4px 10px;
margin: 0 6px;
font-family: "HYWenHei";
}
.kb {
height: 10px;
}
.list {
margin-bottom: 42px;
}
.list:last-child {
margin-bottom: 0;
}
.sumCount {
font-size: 30px;
font-family: "HYWenHei";
text-align: center;
color: #a9843f;
/* float: right; */
width: 170px;
/* margin-top: 10px; */
background-image: url(../icon/矩形.png);
}
.right_model {
display: inline-block;
width: calc(50% - 135px);
padding: 80px 58px 45px;
float: left;
}
.uId {
text-align: center;
background-image: url(../icon/圆角矩形.png);
text-align: center;
width: 364px;
height: 50px;
line-height: 50px;
color: #a9843f;
font-size: 24px;
font-family: 'HYWenHei';
}
.head_image {
margin-top: 45px;
}
.icon {
vertical-align: middle;
display: inline-block;
position: absolute;
margin-left: -5px;
top: -20px;
left: -5px;
}
.icon img {
width: 78px;
height: 78px;
}
.text {
vertical-align: middle;
display: inline-block;
width: calc(80px);
font-size: 16px;
text-align: center;
color: #a9843f;
position: absolute;
font-family: "MiSans-Medium";
top: 20%;
margin-left: 25px;
}
.li {
width: 44%;
display: inline-block;
position: relative;
margin-bottom: 42px;
}
.circleProgress_wrapper {
width: 64px;
height: 64px;
/* margin: 50px auto; */
position: relative;
display: inline-block;
/* border:1px solid #ddd; */
}
.wrapper {
width: 32px;
height: 64px;
position: absolute;
top: 0;
overflow: hidden;
}
.right {
right: 0;
/* border: solid 1px black; */
}
.left {
left: 0;
/* border: solid 1px red; */
}
.circleProgress {
width: 58px;
height: 58px;
border: 3px solid rgb(172, 172, 172);
position: absolute;
top: 0;
border-radius: 50%;
transform: rotate(-135deg);
}
.rightcircle {
border-top: 3px solid rgb(218, 252, 24);
border-right: 3px solid rgb(218, 252, 24);
right: 0;
animation: circleProgressLoad_right;
}
.leftcircle {
border-bottom: 3px solid rgb(218, 252, 24);
border-left: 3px solid rgb(218, 252, 24);
left: 0;
animation: circleProgressLoad_right 0.1ms linear 0ms normal forwards;
}
@keyframes circleProgressLoad_right {
0% {
-webkit-transform: rotate(-135deg);
}
50%,
100% {
-webkit-transform: rotate(45deg);
}
}
@keyframes circleProgressLoad_left {
0%,
50% {
-webkit-transform: rotate(-135deg);
}
100% {
-webkit-transform: rotate(45deg);
}
}
.bottom_time {
display: flex;
font-size: 20px;
color: #d9766c;
font-family: "HYWenHei";
text-align: center;
width: 200px;
}
.bottom_image {
width: 212px;
height: 163px;
display: inline-block;
}
.bottom_image img {
width: 100%;
height: 100%;
}
.jdt {
display: inline-flex;
}
.red {
color: #d9766c;
}
.user_null {
vertical-align: middle;
display: inline-block;
position: absolute;
margin-left: -5px;
top: -3px;
left: 7px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -3,20 +3,20 @@
<head> <head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="shortcut icon" href="#" /> <link rel="shortcut icon" href="#" />
<link rel="stylesheet" type="text/css" href="{{_res_path}}dailyNote/xiaoyao_Note.css?v=1.0" /> <link rel="stylesheet" type="text/css" href="{{_res_path}}dailyNote/Template/{{urlType}}/css/xiaoyao_Note.css?v=1.0" />
<style> <style>
</style> </style>
</head> </head>
<body> <body>
<div class="container" id="container" style=" background-image: url({{_res_path}}/dailyNote/icon/bg/{{imgs}});"> <div class="container" id="container" style=" background-image: url({{_res_path}}/dailyNote/Template/{{urlType}}/icon/背景.png);">
<div class="left_model"> <div class="left_model">
<div class="list"> <div class="list">
<div class="div"> <div class="div">
<img src="{{_res_path}}/dailyNote/icon/树脂.png" alt=""> <img src="{{_res_path}}/dailyNote/icon/树脂.png" alt="">
</div> </div>
<div class="div"> <div class="div">
<span class="title">原粹树脂</span> <span class="title light">原粹树脂</span>
<div class="kb"></div> <div class="kb"></div>
<span class="bottom">{{if resinMaxTime}} <span class="bottom">{{if resinMaxTime}}
{{resinMaxTime_mb2Day}}<span class="time">{{resinMaxTime_mb2}}</span>恢复 {{resinMaxTime_mb2Day}}<span class="time">{{resinMaxTime_mb2}}</span>恢复
@ -31,7 +31,7 @@
<img src="{{_res_path}}/dailyNote/icon/洞天宝钱.png" alt=""> <img src="{{_res_path}}/dailyNote/icon/洞天宝钱.png" alt="">
</div> </div>
<div class="div"> <div class="div">
<span class="title">洞天宝钱</span> <span class="title light">洞天宝钱</span>
<div class="kb"></div> <div class="kb"></div>
<span class="bottom"> <span class="bottom">
{{if coinTime}} {{if coinTime}}
@ -49,7 +49,7 @@
<img src="{{_res_path}}/dailyNote/icon/每日.png" alt=""> <img src="{{_res_path}}/dailyNote/icon/每日.png" alt="">
</div> </div>
<div class="div"> <div class="div">
<span class="title">每日委托</span> <span class="title light">每日委托</span>
<div class="kb"></div> <div class="kb"></div>
<span class="bottom">今日委托奖励{{if is_extra_task_reward_received==1}}已{{else}}未{{/if}}领取</span> <span class="bottom">今日委托奖励{{if is_extra_task_reward_received==1}}已{{else}}未{{/if}}领取</span>
</div> </div>
@ -62,7 +62,7 @@
<img src="{{_res_path}}/dailyNote/icon/周本.png" alt=""> <img src="{{_res_path}}/dailyNote/icon/周本.png" alt="">
</div> </div>
<div class="div"> <div class="div">
<span class="title">值得铭记的强敌</span> <span class="title light">值得铭记的强敌</span>
<div class="kb"></div> <div class="kb"></div>
<span class="bottom">本周剩余消耗减半次数</span> <span class="bottom">本周剩余消耗减半次数</span>
</div> </div>
@ -75,7 +75,7 @@
<img src="{{_res_path}}/dailyNote/icon/质变仪.png" alt=""> <img src="{{_res_path}}/dailyNote/icon/质变仪.png" alt="">
</div> </div>
<div class="div"> <div class="div">
<span class="title">参量质变仪</span> <span class="title light">参量质变仪</span>
<div class="kb"></div> <div class="kb"></div>
<span class="bottom"> <span class="bottom">
{{if transformer.obtained }} {{if transformer.obtained }}
@ -94,7 +94,7 @@
</div> </div>
</div> </div>
<div class="right_model"> <div class="right_model">
<div class="uId"> <div class="uId light">
UID:{{uid}} UID:{{uid}}
</div> </div>
<div class="head_image"> <div class="head_image">
@ -109,7 +109,7 @@
</div> </div>
</div> --> </div> -->
<div class="jdt"> <div class="jdt">
<img src="{{_res_path}}/dailyNote/speed/{{100-list.percentage}}.png"/> <img src="{{_res_path}}/dailyNote/Template/{{urlType}}/speed/{{100-list.percentage}}.png"/>
</div> </div>
<div class="icon {{list.mb2_icon==''?'user_null':''}}" > <div class="icon {{list.mb2_icon==''?'user_null':''}}" >
{{if list.mb2_icon==''}} {{if list.mb2_icon==''}}
@ -129,7 +129,7 @@
</div> </div>
<div class="bottom_list"> <div class="bottom_list">
<div class="bottom_time"> <div class="bottom_time light">
{{day_mb2}} {{day_mb2}}
</div> </div>
<!-- <div class="bottom_image"> <!-- <div class="bottom_image">