fix: 修改文件名大小写
This commit is contained in:
@@ -1,5 +1,21 @@
|
||||
const fs = require("fs");
|
||||
const ringType = 6;
|
||||
const YBvoucher = {
|
||||
'380': '100',
|
||||
'388': '200',
|
||||
'389': '500',
|
||||
'390': '1000',
|
||||
'391': '2000',
|
||||
'392': '5000',
|
||||
'393': '10000',
|
||||
'394': '1',
|
||||
'395': '5',
|
||||
'396': '10',
|
||||
'397': '15',
|
||||
'398': '30',
|
||||
'399': '50',
|
||||
'400': '80'
|
||||
}
|
||||
const tpls = {
|
||||
SpecialRing: {
|
||||
key: "SpecialRing",
|
||||
@@ -61,11 +77,48 @@ const tpls = {
|
||||
}`,
|
||||
}[ringType],
|
||||
},
|
||||
ItemMergeConfig: {
|
||||
key: "ItemMergeConfig",
|
||||
desc: "ID1,ID2,代金券ID,元宝数",
|
||||
values: [7201, 7202,Object.keys(YBvoucher),Object.values(YBvoucher)],
|
||||
interval: [2, 2],
|
||||
num: Object.keys(YBvoucher).length,
|
||||
template: `
|
||||
"S1": {
|
||||
"circle": 0,
|
||||
"compose": { "id": 4, "type": 4, "count": S4 },
|
||||
"index": 7,
|
||||
"buttontxt10": "合成10次",
|
||||
"mergebutton10": 1,
|
||||
"text": "兑换",
|
||||
"clicklimit": 1,
|
||||
"Eid": S1,
|
||||
"second_index": 1,
|
||||
"table": [{ "id": S3, "type": 0, "count": 1 }],
|
||||
"openserverday": 1,
|
||||
"level": 1
|
||||
},
|
||||
"S2": {
|
||||
"circle": 0,
|
||||
"compose": { "id": 4, "type": 4, "count": S400 },
|
||||
"index": 7,
|
||||
"buttontxt10": "合成10次",
|
||||
"mergebutton10": 1,
|
||||
"text": "兑换",
|
||||
"clicklimit": 1,
|
||||
"Eid": S2,
|
||||
"second_index": 1,
|
||||
"table": [{ "id": S3, "type": 0, "count": 100 }],
|
||||
"openserverday": 1,
|
||||
"level": 1
|
||||
}
|
||||
`,
|
||||
},
|
||||
};
|
||||
|
||||
const scope = [
|
||||
// "UpstarConfig",
|
||||
"SpecialRing",
|
||||
"ItemMergeConfig",
|
||||
].filter(Boolean);
|
||||
const start = () => {
|
||||
const configs = scope.map((key) => {
|
||||
@@ -77,7 +130,9 @@ const start = () => {
|
||||
let str = template;
|
||||
values.forEach((v, i) => {
|
||||
const reg = new RegExp(`S${i + 1}`, "g");
|
||||
str = str.replace(reg, v + index * interval[i]);
|
||||
if (Array.isArray(v)) {
|
||||
str = str.replace(reg, v[i]);
|
||||
} else str = str.replace(reg, v + index * interval[i]);
|
||||
});
|
||||
return str;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user