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

fix:修正多模板报错问题

This commit is contained in:
Ctrlcvs 2022-10-31 15:58:43 +08:00
parent ffd380ec52
commit 46a0f290e7

View File

@ -233,8 +233,13 @@ export async function Note(e, {
} }
let img_path = `./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`; let img_path = `./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`;
if (tempData[e.user_id] && tempData[e.user_id].type > -1) { if (tempData[e.user_id] && tempData[e.user_id].type > -1) {
mb = tempData[e.user_id].type; // mb = tempData[e.user_id].type;
objFile = tempData[e.user_id].temp; objFile = tempData[e.user_id].temp[lodash.random(0, tempData[e.user_id].temp.length - 1)];
if (objFile.includes(".")) { //对于模板类型处理
mb = 0;
} else {
mb = 1
}
} }
if (mb == 1) { if (mb == 1) {
for (var i = 0; i < 5 - data.expeditions.length; i++) { for (var i = 0; i < 5 - data.expeditions.length; i++) {