How to use req method in storybook-root

Best JavaScript code snippet using storybook-root

data.js

Source:data.js Github

copy

Full Screen

1var data = {2 weapon_dates: [3 ["高塔孤王", "孤云寒林"],4 ["凛风奔狼", "雾海云间"],5 ["狮牙斗士", "漆黑陨铁"],6 ["高塔孤王", "孤云寒林"],7 ["凛风奔狼", "雾海云间"],8 ["狮牙斗士", "漆黑陨铁"],9 ],10 char_dates: [11 ["自由", "繁荣"],12 ["抗争", "勤劳"],13 ["诗文", "黄金"],14 ["自由", "繁荣"],15 ["抗争", "勤劳"],16 ["诗文", "黄金"],17 ],18 weapons: {19 高塔孤王: [20 {21 name: "风鹰剑",22 req: "高塔孤王",23 region: "蒙德",24 star: "5",25 req1: "号角",26 req2: "箭簇",27 type: "weapon",28 },29 {30 name: "西风剑",31 req: "高塔孤王",32 region: "蒙德",33 star: "4",34 req1: "号角",35 req2: "箭簇",36 type: "weapon",37 },38 {39 name: "钟剑",40 req: "高塔孤王",41 region: "蒙德",42 star: "4",43 req1: "号角",44 req2: "花蜜",45 type: "weapon",46 },47 {48 name: "宗室长剑",49 req: "高塔孤王",50 region: "蒙德",51 star: "4",52 req1: "号角",53 req2: "面具",54 type: "weapon",55 },56 {57 name: "雪葬的星银",58 req: "高塔孤王",59 region: "蒙德",60 star: "4",61 req1: "号角",62 req2: "史莱姆",63 type: "weapon",64 },65 {66 name: "绝弦",67 req: "高塔孤王",68 region: "蒙德",69 star: "4",70 req1: "号角",71 req2: "箭簇",72 type: "weapon",73 },74 {75 name: "苍翠猎弓",76 req: "高塔孤王",77 region: "蒙德",78 star: "4",79 req1: "号角",80 req2: "箭簇",81 type: "weapon",82 },83 {84 name: "宗室秘法录",85 req: "高塔孤王",86 region: "蒙德",87 star: "4",88 req1: "号角",89 req2: "徽记",90 type: "weapon",91 },92 {93 name: "西风秘典",94 req: "高塔孤王",95 region: "蒙德",96 star: "4",97 req1: "号角",98 req2: "绘卷",99 type: "weapon",100 },101 ],102 凛风奔狼: [103 {104 name: "天空之刃",105 req: "凛风奔狼",106 region: "蒙德",107 star: "5",108 req1: "地脉",109 req2: "史莱姆",110 type: "weapon",111 },112 {113 name: "天空之傲",114 req: "凛风奔狼",115 region: "蒙德",116 star: "5",117 req1: "地脉",118 req2: "史莱姆",119 type: "weapon",120 },121 {122 name: "天空之翼",123 req: "凛风奔狼",124 region: "蒙德",125 star: "5",126 req1: "地脉",127 req2: "箭簇",128 type: "weapon",129 },130 {131 name: "天空之卷",132 req: "凛风奔狼",133 region: "蒙德",134 star: "5",135 req1: "地脉",136 req2: "箭簇",137 type: "weapon",138 },139 {140 name: "黑剑",141 req: "凛风奔狼",142 region: "蒙德",143 star: "4",144 req1: "地脉",145 req2: "史莱姆",146 type: "weapon",147 },148 {149 name: "笛剑",150 req: "凛风奔狼",151 region: "蒙德",152 star: "4",153 req1: "地脉",154 req2: "史莱姆",155 type: "weapon",156 },157 {158 name: "降临之剑",159 req: "凛风奔狼",160 region: "蒙德",161 star: "4",162 req1: "地脉",163 req2: "鸦印",164 type: "weapon",165 },166 {167 name: "祭礼大剑",168 req: "凛风奔狼",169 region: "蒙德",170 star: "4",171 req1: "地脉",172 req2: "箭簇",173 type: "weapon",174 },175 {176 name: "祭礼弓",177 req: "凛风奔狼",178 region: "蒙德",179 star: "4",180 req1: "地脉",181 req2: "史莱姆",182 type: "weapon",183 },184 {185 name: "流浪乐章",186 req: "凛风奔狼",187 region: "蒙德",188 star: "4",189 req1: "地脉",190 req2: "面具",191 type: "weapon",192 },193 {194 name: "决斗之枪",195 req: "凛风奔狼",196 region: "蒙德",197 star: "4",198 req1: "地脉",199 req2: "花蜜",200 type: "weapon",201 },202 {203 name: "龙脊长枪",204 req: "凛风奔狼",205 region: "蒙德",206 star: "4",207 req1: "雾虚",208 req2: "徽记",209 type: "weapon",210 },211 ],212 狮牙斗士: [213 {214 name: "狼的末路",215 req: "狮牙斗士",216 region: "蒙德",217 star: "5",218 req1: "混沌",219 req2: "绘卷",220 type: "weapon",221 },222 {223 name: "天空之脊",224 req: "狮牙斗士",225 region: "蒙德",226 star: "5",227 req1: "混沌",228 req2: "绘卷",229 type: "weapon",230 },231 {232 name: "阿莫斯之弓",233 req: "狮牙斗士",234 region: "蒙德",235 star: "5",236 req1: "混沌",237 req2: "史莱姆",238 type: "weapon",239 },240 {241 name: "四风原典",242 req: "狮牙斗士",243 region: "蒙德",244 star: "5",245 req1: "混沌",246 req2: "史莱姆",247 type: "weapon",248 },249 {250 name: "祭礼剑",251 req: "狮牙斗士",252 region: "蒙德",253 star: "4",254 req1: "混沌",255 req2: "绘卷",256 type: "weapon",257 },258 {259 name: "宗室大剑",260 req: "狮牙斗士",261 region: "蒙德",262 star: "4",263 req1: "混沌",264 req2: "史莱姆",265 type: "weapon",266 },267 {268 name: "西风大剑",269 req: "狮牙斗士",270 region: "蒙德",271 star: "4",272 req1: "混沌",273 req2: "徽记",274 type: "weapon",275 },276 {277 name: "西风猎弓",278 req: "狮牙斗士",279 region: "蒙德",280 star: "4",281 req1: "混沌",282 req2: "花蜜",283 type: "weapon",284 },285 {286 name: "祭礼残章",287 req: "狮牙斗士",288 region: "蒙德",289 star: "4",290 req1: "混沌",291 req2: "鸦印",292 type: "weapon",293 },294 {295 name: "忍冬之果",296 req: "狮牙斗士",297 region: "蒙德",298 star: "4",299 req1: "混沌",300 req2: "花蜜",301 type: "weapon",302 },303 {304 name: "西风长枪",305 req: "狮牙斗士",306 region: "蒙德",307 star: "4",308 req1: "混沌",309 req2: "徽记",310 type: "weapon",311 },312 {313 name: "腐殖之剑",314 req: "狮牙斗士",315 region: "蒙德",316 star: "4",317 req1: "号角",318 req2: "徽记",319 type: "weapon",320 },321 ],322 漆黑陨铁: [323 {324 name: "尘世之锁",325 req: "漆黑陨铁",326 region: "璃月",327 star: "5",328 req1: "骨片",329 req2: "面具",330 type: "weapon",331 },332 {333 name: "贯虹之槊",334 req: "漆黑陨铁",335 region: "璃月",336 star: "5",337 req1: "骨片",338 req2: "鸦印",339 type: "weapon",340 },341 {342 name: "铁蜂刺",343 req: "漆黑陨铁",344 region: "璃月",345 star: "4",346 req1: "骨片",347 req2: "花蜜",348 type: "weapon",349 },350 {351 name: "试作古华",352 req: "漆黑陨铁",353 region: "璃月",354 star: "4",355 req1: "骨片",356 req2: "面具",357 type: "weapon",358 },359 {360 name: "螭骨剑",361 req: "漆黑陨铁",362 region: "璃月",363 star: "4",364 req1: "骨片",365 req2: "花蜜",366 type: "weapon",367 },368 {369 name: "钢轮弓",370 req: "漆黑陨铁",371 region: "璃月",372 star: "4",373 req1: "骨片",374 req2: "徽记",375 type: "weapon",376 },377 {378 name: "万国诸海图谱",379 req: "漆黑陨铁",380 region: "璃月",381 star: "4",382 req1: "骨片",383 req2: "史莱姆",384 type: "weapon",385 },386 {387 name: "试作星镰",388 req: "漆黑陨铁",389 region: "璃月",390 star: "4",391 req1: "骨片",392 req2: "面具",393 type: "weapon",394 },395 ],396 孤云寒林: [397 {398 name: "和璞鸢",399 req: "孤云寒林",400 region: "璃月",401 star: "5",402 req1: "祭刀",403 req2: "徽记",404 type: "weapon",405 },406 {407 name: "斫峰之刃",408 req: "孤云寒林",409 region: "璃月",410 star: "5",411 req1: "祭刀",412 req2: "面具",413 type: "weapon",414 },415 {416 name: "黑岩长剑",417 req: "孤云寒林",418 region: "璃月",419 star: "4",420 req1: "祭刀",421 req2: "箭簇",422 type: "weapon",423 },424 {425 name: "匣里龙吟",426 req: "孤云寒林",427 region: "璃月",428 star: "4",429 req1: "祭刀",430 req2: "鸦印",431 type: "weapon",432 },433 {434 name: "白影剑",435 req: "孤云寒林",436 region: "璃月",437 star: "4",438 req1: "祭刀",439 req2: "鸦印",440 type: "weapon",441 },442 {443 name: "弓藏",444 req: "孤云寒林",445 region: "璃月",446 star: "4",447 req1: "祭刀",448 req2: "面具",449 type: "weapon",450 },451 {452 name: "黑岩战弓",453 req: "孤云寒林",454 region: "璃月",455 star: "4",456 req1: "祭刀",457 req2: "花蜜",458 type: "weapon",459 },460 {461 name: "匣里日月",462 req: "孤云寒林",463 region: "璃月",464 star: "4",465 req1: "祭刀",466 req2: "花蜜",467 type: "weapon",468 },469 {470 name: "黑岩绯玉",471 req: "孤云寒林",472 region: "璃月",473 star: "4",474 req1: "祭刀",475 req2: "绘卷",476 type: "weapon",477 },478 {479 name: "流月针",480 req: "孤云寒林",481 region: "璃月",482 star: "4",483 req1: "祭刀",484 req2: "鸦印",485 type: "weapon",486 },487 ],488 雾海云间: [489 {490 name: "无工之剑",491 req: "雾海云间",492 region: "璃月",493 star: "5",494 req1: "雾虚",495 req2: "鸦印",496 type: "weapon",497 },498 {499 name: "试作斩岩",500 req: "雾海云间",501 region: "璃月",502 star: "4",503 req1: "雾虚",504 req2: "徽记",505 type: "weapon",506 },507 {508 name: "黑岩斩刀",509 req: "雾海云间",510 region: "璃月",511 star: "4",512 req1: "雾虚",513 req2: "徽记",514 type: "weapon",515 },516 {517 name: "雨裁",518 req: "雾海云间",519 region: "璃月",520 star: "4",521 req1: "雾虚",522 req2: "绘卷",523 type: "weapon",524 },525 {526 name: "宗室长弓",527 req: "雾海云间",528 region: "璃月",529 star: "4",530 req1: "雾虚",531 req2: "鸦印",532 type: "weapon",533 },534 {535 name: "试作澹月",536 req: "雾海云间",537 region: "璃月",538 star: "4",539 req1: "雾虚",540 req2: "鸦印",541 type: "weapon",542 },543 {544 name: "昭心",545 req: "雾海云间",546 region: "璃月",547 star: "4",548 req1: "雾虚",549 req2: "面具",550 type: "weapon",551 },552 {553 name: "试作金珀",554 req: "雾海云间",555 region: "璃月",556 star: "4",557 req1: "雾虚",558 req2: "箭簇",559 type: "weapon",560 },561 {562 name: "匣里灭辰",563 req: "雾海云间",564 region: "璃月",565 star: "4",566 req1: "雾虚",567 req2: "绘卷",568 type: "weapon",569 },570 {571 name: "黑岩刺枪",572 req: "雾海云间",573 region: "璃月",574 star: "4",575 req1: "雾虚",576 req2: "徽记",577 type: "weapon",578 },579 {580 name: "宗室猎枪",581 req: "雾海云间",582 region: "璃月",583 star: "4",584 req1: "雾虚",585 req2: "徽记",586 type: "weapon",587 },588 ],589 },590 chars: {591 繁荣: [592 {593 name: "七七",594 req: "繁荣",595 region: "璃月",596 star: "5",597 req1: "绘卷",598 req2: "北风之尾",599 type: "char",600 },601 {602 name: "刻晴",603 req: "繁荣",604 region: "璃月",605 star: "5",606 req1: "花蜜",607 req2: "北风之环",608 type: "char",609 },610 {611 name: "凝光",612 req: "繁荣",613 region: "璃月",614 star: "4",615 req1: "徽记",616 req2: "北风的魂匣",617 type: "char",618 },619 ],620 黄金: [621 {622 name: "钟离",623 req: "黄金",624 region: "璃月",625 star: "5",626 req1: "史莱姆",627 req2: "吞天之鲸·只角",628 type: "char",629 },630 {631 name: "辛焱",632 req: "黄金",633 region: "璃月",634 star: "4",635 req1: "鸦印",636 req2: "吞天之鲸·只角",637 type: "char",638 },639 {640 name: "北斗",641 req: "黄金",642 region: "璃月",643 star: "4",644 req1: "鸦印",645 req2: "东风的吐息",646 type: "char",647 },648 {649 name: "行秋",650 req: "黄金",651 region: "璃月",652 star: "4",653 req1: "面具",654 req2: "北风之尾",655 type: "char",656 },657 ],658 自由: [659 {660 name: "达达利亚",661 req: "自由",662 region: "蒙德",663 star: "5",664 req1: "徽记",665 req2: "魔王之刃·残片",666 type: "char",667 },668 {669 name: "可莉",670 req: "自由",671 region: "蒙德",672 star: "5",673 req1: "绘卷",674 req2: "北风之环",675 type: "char",676 },677 {678 name: "安柏",679 req: "自由",680 region: "蒙德",681 star: "4",682 req1: "箭簇",683 req2: "东风的吐息",684 type: "char",685 },686 {687 name: "砂糖",688 req: "自由",689 region: "蒙德",690 star: "4",691 req1: "花蜜",692 req2: "北风的魂匣",693 type: "char",694 },695 {696 name: "芭芭拉",697 req: "自由",698 region: "蒙德",699 star: "4",700 req1: "绘卷",701 req2: "北风之环",702 type: "char",703 },704 {705 name: "迪奥娜",706 req: "自由",707 region: "蒙德",708 star: "4",709 req1: "箭簇",710 req2: "魔王之刃·残片",711 type: "char",712 },713 ],714 诗文: [715 {716 name: "温迪",717 req: "诗文",718 region: "蒙德",719 star: "5",720 req1: "史莱姆",721 req2: "北风之尾",722 type: "char",723 },724 {725 name: "阿贝多",726 req: "诗文",727 region: "蒙德",728 star: "5",729 req1: "绘卷",730 req2: "吞天之鲸·只角",731 type: "char",732 },733 {734 name: "丽莎",735 req: "诗文",736 region: "蒙德",737 star: "4",738 req1: "史莱姆",739 req2: "东风之爪",740 type: "char",741 },742 {743 name: "凯亚",744 req: "诗文",745 region: "蒙德",746 star: "4",747 req1: "鸦印",748 req2: "北风的魂匣",749 type: "char",750 },751 {752 name: "菲谢尔",753 req: "诗文",754 region: "蒙德",755 star: "4",756 req1: "箭簇",757 req2: "北风的魂匣",758 type: "char",759 },760 ],761 抗争: [762 {763 name: "琴",764 req: "抗争",765 region: "蒙德",766 star: "5",767 req1: "面具",768 req2: "东风之翎",769 type: "char",770 },771 {772 name: "莫娜",773 req: "抗争",774 region: "蒙德",775 star: "5",776 req1: "花蜜",777 req2: "北风之环",778 type: "char",779 },780 {781 name: "迪卢克",782 req: "抗争",783 region: "蒙德",784 star: "5",785 req1: "徽记",786 req2: "东风之翎",787 type: "char",788 },789 {790 name: "班尼特",791 req: "抗争",792 region: "蒙德",793 star: "4",794 req1: "鸦印",795 req2: "东风之翎",796 type: "char",797 },798 {799 name: "诺艾尔",800 req: "抗争",801 region: "蒙德",802 star: "4",803 req1: "面具",804 req2: "东风之爪",805 type: "char",806 },807 {808 name: "雷泽",809 req: "抗争",810 region: "蒙德",811 star: "4",812 req1: "面具",813 req2: "东风之爪",814 type: "char",815 },816 ],817 勤劳: [818 {819 name: "重云",820 req: "勤劳",821 region: "璃月",822 star: "4",823 req1: "面具",824 req2: "东风的吐息",825 type: "char",826 },827 {828 name: "香菱",829 req: "勤劳",830 region: "璃月",831 star: "4",832 req1: "史莱姆",833 req2: "东风之爪",834 type: "char",835 },836 {837 name: "甘雨",838 req: "勤劳",839 region: "璃月",840 star: "5",841 req1: "面具",842 req2: "武炼之魂·孤影",843 type: "char",844 },845 ],846 },847 char_breakthrough_stats: {848 20: {849 attrib_req_level: 1,850 attrib_req_count: 1,851 champ_req_count: 0,852 world_req_count: 3,853 world_mon_req_level: 1,854 world_mon_req_count: 3,855 mora: 20000,856 },857 40: {858 attrib_req_level: 2,859 attrib_req_count: 3,860 champ_req_count: 2,861 world_req_count: 10,862 world_mon_req_level: 1,863 world_mon_req_count: 15,864 mora: 40000,865 },866 50: {867 attrib_req_level: 2,868 attrib_req_count: 6,869 champ_req_count: 4,870 world_req_count: 20,871 world_mon_req_level: 2,872 world_mon_req_count: 12,873 mora: 60000,874 },875 60: {876 attrib_req_level: 3,877 attrib_req_count: 3,878 champ_req_count: 8,879 world_req_count: 30,880 world_mon_req_level: 2,881 world_mon_req_count: 18,882 mora: 80000,883 },884 70: {885 attrib_req_level: 3,886 attrib_req_count: 6,887 champ_req_count: 12,888 world_req_count: 45,889 world_mon_req_level: 3,890 world_mon_req_count: 12,891 mora: 100000,892 },893 80: {894 attrib_req_level: 4,895 attrib_req_count: 6,896 champ_req_count: 20,897 world_req_count: 60,898 world_mon_req_level: 3,899 world_mon_req_count: 24,900 mora: 120000,901 },902 },903 char_level_stats: [904 0,905 1000,906 1325,907 1700,908 2150,909 2625,910 3150,911 3725,912 4350,913 5000,914 5700,915 6450,916 7225,917 8050,918 8925,919 9825,920 10750,921 11725,922 12725,923 13775,924 14875,925 16800,926 18000,927 19250,928 20550,929 21875,930 23250,931 24650,932 26100,933 27575,934 29100,935 30650,936 32250,937 33875,938 35550,939 37250,940 38975,941 40750,942 42575,943 44425,944 46300,945 50625,946 52700,947 54775,948 56900,949 59075,950 61275,951 63525,952 65800,953 68125,954 70475,955 76500,956 79050,957 81650,958 84275,959 86950,960 89650,961 92400,962 95175,963 98000,964 100875,965 108950,966 112050,967 115175,968 118325,969 121525,970 124775,971 128075,972 131400,973 134775,974 138175,975 148700,976 152375,977 156075,978 159825,979 163600,980 167425,981 171300,982 175225,983 179175,984 183175,985 216225,986 243025,987 273100,988 306800,989 344600,990 386950,991 434425,992 487625,993 547200,994 ],995 char_trait_name: {996 凝光: {997 normal_attack: "普通攻击·千金掷",998 elemental_skill: "璇玑屏",999 elemental_burst: "天权崩玉",1000 },1001 北斗: {1002 normal_attack: "普通攻击·征涛",1003 elemental_skill: "捉浪",1004 elemental_burst: "斫雷",1005 },1006 行秋: {1007 normal_attack: "普通攻击·古华剑法",1008 elemental_skill: "古华剑·画雨笼山",1009 elemental_burst: "古华剑·裁雨留虹",1010 },1011 辛焱: {1012 normal_attack: "普通攻击·炎舞",1013 elemental_skill: "热情拂扫",1014 elemental_burst: "叛逆刮弦",1015 },1016 重云: {1017 normal_attack: "普通攻击·灭邪四式",1018 elemental_skill: "重华叠霜·灵刃",1019 elemental_burst: "灵刃·云开星落",1020 },1021 香菱: {1022 normal_attack: "普通攻击·白案功夫",1023 elemental_skill: "锅巴出击",1024 elemental_burst: "旋火轮",1025 },1026 七七: {1027 normal_attack: "普通攻击·云来古剑法",1028 elemental_skill: "仙法·寒病鬼差",1029 elemental_burst: "仙法·救苦度厄",1030 },1031 刻晴: {1032 normal_attack: "普通攻击·云来剑法",1033 elemental_skill: "星斗归位",1034 elemental_burst: "天街巡游",1035 },1036 钟离: {1037 normal_attack: "普通攻击·岩雨",1038 elemental_skill: "元素战技·地心",1039 elemental_burst: "元素爆发·天星",1040 },1041 达达利亚: {1042 normal_attack: "普通攻击·断雨",1043 elemental_skill: "魔王武装·狂澜",1044 elemental_burst: "极恶技·尽灭闪",1045 },1046 丽莎: {1047 normal_attack: "普通攻击·指尖雷暴",1048 elemental_skill: "苍雷",1049 elemental_burst: "蔷薇的雷光",1050 },1051 凯亚: {1052 normal_attack: "普通攻击·仪典剑术",1053 elemental_skill: "霜袭",1054 elemental_burst: "凛冽轮舞",1055 },1056 安柏: {1057 normal_attack: "普通攻击·神射手",1058 elemental_skill: "爆弹玩偶",1059 elemental_burst: "箭雨",1060 },1061 班尼特: {1062 normal_attack: "普通攻击·好运剑",1063 elemental_skill: "热情过载",1064 elemental_burst: "美妙旅程",1065 },1066 砂糖: {1067 normal_attack: "普通攻击·简式风灵作成",1068 elemental_skill: "风灵作成·陆叁零捌",1069 elemental_burst: "禁·风灵作成·柒伍同构贰型",1070 },1071 芭芭拉: {1072 normal_attack: "普通攻击·水之浅唱",1073 elemental_skill: "演唱,开始♪",1074 elemental_burst: "闪耀奇迹♪",1075 },1076 菲谢尔: {1077 normal_attack: "普通攻击·罪灭之矢",1078 elemental_skill: "夜巡影翼",1079 elemental_burst: "至夜幻现",1080 },1081 诺艾尔: {1082 normal_attack: "普通攻击·西风剑术·女仆",1083 elemental_skill: "护心铠",1084 elemental_burst: "大扫除",1085 },1086 迪奥娜: {1087 normal_attack: "普通攻击·猎人射术",1088 elemental_skill: "猫爪冻冻",1089 elemental_burst: "最烈特调",1090 },1091 雷泽: {1092 normal_attack: "普通攻击·钢脊",1093 elemental_skill: "利爪与苍雷",1094 elemental_burst: "雷牙",1095 },1096 可莉: {1097 normal_attack: "普通攻击·砰砰",1098 elemental_skill: "蹦蹦炸弹",1099 elemental_burst: "轰轰火花",1100 },1101 温迪: {1102 normal_attack: "普通攻击·神代射术",1103 elemental_skill: "高天之歌",1104 elemental_burst: "风神之诗",1105 },1106 琴: {1107 normal_attack: "普通攻击·西风剑术",1108 elemental_skill: "风压剑",1109 elemental_burst: "蒲公英之风",1110 },1111 莫娜: {1112 normal_attack: "普通攻击·因果点破",1113 elemental_skill: "水中幻愿",1114 elemental_burst: "星命定轨",1115 },1116 迪卢克: {1117 normal_attack: "普通攻击·淬炼之剑",1118 elemental_skill: "逆焰之刃",1119 elemental_burst: "黎明",1120 },1121 阿贝多: {1122 normal_attack: "普通攻击·西风剑术·白",1123 elemental_skill: "创生法·拟造阳华",1124 elemental_burst: "诞生式·大地之潮",1125 },1126 },1127 char_reqs: {1128 凝光: {1129 star: "4",1130 element: "岩",1131 attrib_req: "坚牢黄玉",1132 champ_attrib_req: "玄岩之塔",1133 world_req: "琉璃百合",1134 world_mon_req: "徽记",1135 trait_req: "北风的魂匣",1136 trait_daily: "繁荣",1137 },1138 北斗: {1139 star: "4",1140 element: "雷",1141 attrib_req: "最胜紫晶",1142 champ_attrib_req: "雷光棱镜",1143 world_req: "夜泊石",1144 world_mon_req: "鸦印",1145 trait_req: "东风的吐息",1146 trait_daily: "黄金",1147 },1148 行秋: {1149 star: "4",1150 element: "水",1151 attrib_req: "涤净青金",1152 champ_attrib_req: "净水之心",1153 world_req: "霓裳花",1154 world_mon_req: "面具",1155 trait_req: "北风之尾",1156 trait_daily: "黄金",1157 },1158 辛焱: {1159 star: "4",1160 element: "火",1161 attrib_req: "燃愿玛瑙",1162 champ_attrib_req: "常燃火种",1163 world_req: "琉璃袋",1164 world_mon_req: "鸦印",1165 trait_req: "吞天之鲸·只角",1166 trait_daily: "黄金",1167 },1168 重云: {1169 star: "4",1170 element: "冰",1171 attrib_req: "哀叙冰玉",1172 champ_attrib_req: "极寒之核",1173 world_req: "石珀",1174 world_mon_req: "面具",1175 trait_req: "东风的吐息",1176 trait_daily: "勤劳",1177 },1178 香菱: {1179 star: "4",1180 element: "火",1181 attrib_req: "燃愿玛瑙",1182 champ_attrib_req: "常燃火种",1183 world_req: "绝云椒椒",1184 world_mon_req: "史莱姆",1185 trait_req: "东风之爪",1186 trait_daily: "勤劳",1187 },1188 七七: {1189 star: "5",1190 element: "冰",1191 attrib_req: "哀叙冰玉",1192 champ_attrib_req: "极寒之核",1193 world_req: "琉璃袋",1194 world_mon_req: "绘卷",1195 trait_req: "北风之尾",1196 trait_daily: "繁荣",1197 },1198 刻晴: {1199 star: "5",1200 element: "雷",1201 attrib_req: "最胜紫晶",1202 champ_attrib_req: "雷光棱镜",1203 world_req: "石珀",1204 world_mon_req: "花蜜",1205 trait_req: "北风之环",1206 trait_daily: "繁荣",1207 },1208 钟离: {1209 star: "5",1210 element: "岩",1211 attrib_req: "坚牢黄玉",1212 champ_attrib_req: "玄岩之塔",1213 world_req: "石珀",1214 world_mon_req: "史莱姆",1215 trait_req: "吞天之鲸·只角",1216 trait_daily: "黄金",1217 },1218 达达利亚: {1219 star: "5",1220 element: "水",1221 attrib_req: "涤净青金",1222 champ_attrib_req: "净水之心",1223 world_req: "星螺",1224 world_mon_req: "徽记",1225 trait_req: "魔王之刃·残片",1226 trait_daily: "自由",1227 },1228 丽莎: {1229 star: "4",1230 element: "雷",1231 attrib_req: "最胜紫晶",1232 champ_attrib_req: "雷光棱镜",1233 world_req: "落落莓",1234 world_mon_req: "史莱姆",1235 trait_req: "东风之爪",1236 trait_daily: "诗文",1237 },1238 凯亚: {1239 star: "4",1240 element: "冰",1241 attrib_req: "哀叙冰玉",1242 champ_attrib_req: "极寒之核",1243 world_req: "嘟嘟莲",1244 world_mon_req: "鸦印",1245 trait_req: "北风的魂匣",1246 trait_daily: "诗文",1247 },1248 安柏: {1249 star: "4",1250 element: "火",1251 attrib_req: "燃愿玛瑙",1252 champ_attrib_req: "常燃火种",1253 world_req: "小灯草",1254 world_mon_req: "箭簇",1255 trait_req: "东风的吐息",1256 trait_daily: "自由",1257 },1258 班尼特: {1259 star: "4",1260 element: "火",1261 attrib_req: "燃愿玛瑙",1262 champ_attrib_req: "常燃火种",1263 world_req: "风车菊",1264 world_mon_req: "鸦印",1265 trait_req: "东风之翎",1266 trait_daily: "抗争",1267 },1268 砂糖: {1269 star: "4",1270 element: "风",1271 attrib_req: "自在松石",1272 champ_attrib_req: "飓风之种",1273 world_req: "风车菊",1274 world_mon_req: "花蜜",1275 trait_req: "北风的魂匣",1276 trait_daily: "自由",1277 },1278 芭芭拉: {1279 star: "4",1280 element: "水",1281 attrib_req: "涤净青金",1282 champ_attrib_req: "净水之心",1283 world_req: "慕风蘑菇",1284 world_mon_req: "绘卷",1285 trait_req: "北风之环",1286 trait_daily: "自由",1287 },1288 菲谢尔: {1289 star: "4",1290 element: "雷",1291 attrib_req: "最胜紫晶",1292 champ_attrib_req: "雷光棱镜",1293 world_req: "小灯草",1294 world_mon_req: "箭簇",1295 trait_req: "北风的魂匣",1296 trait_daily: "诗文",1297 },1298 诺艾尔: {1299 star: "4",1300 element: "岩",1301 attrib_req: "坚牢黄玉",1302 champ_attrib_req: "玄岩之塔",1303 world_req: "落落莓",1304 world_mon_req: "面具",1305 trait_req: "东风之爪",1306 trait_daily: "抗争",1307 },1308 迪奥娜: {1309 star: "4",1310 element: "冰",1311 attrib_req: "哀叙冰玉",1312 champ_attrib_req: "极寒之核",1313 world_req: "嘟嘟莲",1314 world_mon_req: "箭簇",1315 trait_req: "魔王之刃·残片",1316 trait_daily: "自由",1317 },1318 雷泽: {1319 star: "4",1320 element: "雷",1321 attrib_req: "最胜紫晶",1322 champ_attrib_req: "雷光棱镜",1323 world_req: "钩钩果",1324 world_mon_req: "面具",1325 trait_req: "东风之爪",1326 trait_daily: "抗争",1327 },1328 可莉: {1329 star: "5",1330 element: "火",1331 attrib_req: "燃愿玛瑙",1332 champ_attrib_req: "常燃火种",1333 world_req: "慕风蘑菇",1334 world_mon_req: "绘卷",1335 trait_req: "北风之环",1336 trait_daily: "自由",1337 },1338 温迪: {1339 star: "5",1340 element: "风",1341 attrib_req: "自在松石",1342 champ_attrib_req: "飓风之种",1343 world_req: "塞西莉亚花",1344 world_mon_req: "史莱姆",1345 trait_req: "北风之尾",1346 trait_daily: "诗文",1347 },1348 琴: {1349 star: "5",1350 element: "风",1351 attrib_req: "自在松石",1352 champ_attrib_req: "飓风之种",1353 world_req: "蒲公英籽",1354 world_mon_req: "面具",1355 trait_req: "东风之翎",1356 trait_daily: "抗争",1357 },1358 莫娜: {1359 star: "5",1360 element: "水",1361 attrib_req: "涤净青金",1362 champ_attrib_req: "净水之心",1363 world_req: "慕风蘑菇",1364 world_mon_req: "花蜜",1365 trait_req: "北风之环",1366 trait_daily: "抗争",1367 },1368 迪卢克: {1369 star: "5",1370 element: "火",1371 attrib_req: "燃愿玛瑙",1372 champ_attrib_req: "常燃火种",1373 world_req: "小灯草",1374 world_mon_req: "徽记",1375 trait_req: "东风之翎",1376 trait_daily: "抗争",1377 },1378 阿贝多: {1379 star: "5",1380 element: "岩",1381 attrib_req: "坚牢黄玉",1382 champ_attrib_req: "玄岩之塔",1383 world_req: "塞西莉亚花",1384 world_mon_req: "面具",1385 trait_req: "东风之爪",1386 trait_daily: "诗文",1387 },1388 甘雨: {1389 star: "5",1390 element: "冰",1391 attrib_req: "哀叙冰玉",1392 champ_attrib_req: "极寒之核",1393 world_req: "清心",1394 world_mon_req: "花蜜",1395 trait_req: "武炼之魂·孤影",1396 trait_daily: "勤劳",1397 },1398 },1399 name_transform: {1400 坚牢黄玉1: "坚牢黄玉碎屑",1401 坚牢黄玉2: "坚牢黄玉断片",1402 坚牢黄玉3: "坚牢黄玉块",1403 坚牢黄玉4: "坚牢黄玉",1404 璀璨原钻1: "璀璨原钻碎屑",1405 璀璨原钻2: "璀璨原钻断片",1406 璀璨原钻3: "璀璨原钻块",1407 璀璨原钻4: "璀璨原钻",1408 燃愿玛瑙1: "燃愿玛瑙碎屑",1409 燃愿玛瑙2: "燃愿玛瑙断片",1410 燃愿玛瑙3: "燃愿玛瑙块",1411 燃愿玛瑙4: "燃愿玛瑙",1412 哀叙冰玉1: "哀叙冰玉碎屑",1413 哀叙冰玉2: "哀叙冰玉断片",1414 哀叙冰玉3: "哀叙冰玉块",1415 哀叙冰玉4: "哀叙冰玉",1416 涤净青金1: "涤净青金碎屑",1417 涤净青金2: "涤净青金断片",1418 涤净青金3: "涤净青金块",1419 涤净青金4: "涤净青金",1420 最胜紫晶1: "最胜紫晶碎屑",1421 最胜紫晶2: "最胜紫晶断片",1422 最胜紫晶3: "最胜紫晶块",1423 最胜紫晶4: "最胜紫晶",1424 自在松石1: "自在松石碎屑",1425 自在松石2: "自在松石断片",1426 自在松石3: "自在松石块",1427 自在松石4: "自在松石",1428 面具1: "破损的面具",1429 面具2: "污秽的面具",1430 面具3: "不祥的面具",1431 徽记1: "新兵的徽记",1432 徽记2: "士官的徽记",1433 徽记3: "尉官的徽记",1434 鸦印1: "寻宝鸦印",1435 鸦印2: "藏银鸦印",1436 鸦印3: "攫金鸦印",1437 史莱姆1: "史莱姆凝液",1438 史莱姆2: "史莱姆清",1439 史莱姆3: "史莱姆原浆",1440 绘卷1: "导能绘卷",1441 绘卷2: "封魔绘卷",1442 绘卷3: "禁咒绘卷",1443 花蜜1: "骗骗花蜜",1444 花蜜2: "微光花蜜",1445 花蜜3: "原素花蜜",1446 箭簇1: "牢固的箭簇",1447 箭簇2: "锐利的箭簇",1448 箭簇3: "历战的箭簇",1449 地脉1: "地脉的旧枝",1450 地脉2: "地脉的枯叶",1451 地脉3: "地脉的新芽",1452 骨片1: "脆弱的骨片",1453 骨片2: "结实的骨片",1454 骨片3: "石化的骨片",1455 号角1: "沉重号角",1456 号角2: "黑铜号角",1457 号角3: "黑晶号角",1458 混沌1: "混沌装置",1459 混沌2: "混沌回路",1460 混沌3: "混沌炉心",1461 祭刀1: "猎兵祭刀",1462 祭刀2: "特工祭刀",1463 祭刀3: "督察长祭刀",1464 雾虚1: "雾虚花粉",1465 雾虚2: "雾虚草囊",1466 雾虚3: "雾虚灯芯",1467 凛风奔狼1: "凛风奔狼的始龀",1468 凛风奔狼2: "凛风奔狼的裂齿",1469 凛风奔狼3: "凛风奔狼的断牙",1470 凛风奔狼4: "凛风奔狼的怀乡",1471 高塔孤王1: "高塔孤王的破瓦",1472 高塔孤王2: "高塔孤王的残垣",1473 高塔孤王3: "高塔孤王的断片",1474 高塔孤王4: "高塔孤王的碎梦",1475 孤云寒林1: "孤云寒林的光砂",1476 孤云寒林2: "孤云寒林的辉岩",1477 孤云寒林3: "孤云寒林的圣骸",1478 孤云寒林4: "孤云寒林的神体",1479 雾海云间1: "雾海云间的铅丹",1480 雾海云间2: "雾海云间的汞丹",1481 雾海云间3: "雾海云间的金丹",1482 雾海云间4: "雾海云间的转还",1483 狮牙斗士1: "狮牙斗士的枷锁",1484 狮牙斗士2: "狮牙斗士的铁链",1485 狮牙斗士3: "狮牙斗士的镣铐",1486 狮牙斗士4: "狮牙斗士的理想",1487 漆黑陨铁1: "漆黑陨铁的一粒",1488 漆黑陨铁2: "漆黑陨铁的一片",1489 漆黑陨铁3: "漆黑陨铁的一角",1490 漆黑陨铁4: "漆黑陨铁的一块",1491 自由1: "自由的教导",1492 自由2: "自由的指引",1493 自由3: "自由的哲学",1494 诗文1: "诗文的教导",1495 诗文2: "诗文的指引",1496 诗文3: "诗文的哲学",1497 抗争1: "抗争的教导",1498 抗争2: "抗争的指引",1499 抗争3: "抗争的哲学",1500 繁荣1: "繁荣的教导",1501 繁荣2: "繁荣的指引",1502 繁荣3: "繁荣的哲学",1503 勤劳1: "勤劳的教导",1504 勤劳2: "勤劳的指引",1505 勤劳3: "勤劳的哲学",1506 黄金1: "黄金的教导",1507 黄金2: "黄金的指引",1508 黄金3: "黄金的哲学",1509 },1510 item_rarity: {1511 坚牢黄玉碎屑: 2,1512 坚牢黄玉断片: 3,1513 坚牢黄玉块: 4,1514 坚牢黄玉: 5,1515 璀璨原钻碎屑: 2,1516 璀璨原钻断片: 3,1517 璀璨原钻块: 4,1518 璀璨原钻: 5,1519 燃愿玛瑙碎屑: 2,1520 燃愿玛瑙断片: 3,1521 燃愿玛瑙块: 4,1522 燃愿玛瑙: 5,1523 哀叙冰玉碎屑: 2,1524 哀叙冰玉断片: 3,1525 哀叙冰玉块: 4,1526 哀叙冰玉: 5,1527 涤净青金碎屑: 2,1528 涤净青金断片: 3,1529 涤净青金块: 4,1530 涤净青金: 5,1531 最胜紫晶碎屑: 2,1532 最胜紫晶断片: 3,1533 最胜紫晶块: 4,1534 最胜紫晶: 5,1535 自在松石碎屑: 2,1536 自在松石断片: 3,1537 自在松石块: 4,1538 自在松石: 5,1539 破损的面具: 1,1540 污秽的面具: 2,1541 不祥的面具: 3,1542 新兵的徽记: 1,1543 士官的徽记: 2,1544 尉官的徽记: 3,1545 寻宝鸦印: 1,1546 藏银鸦印: 2,1547 攫金鸦印: 3,1548 史莱姆凝液: 1,1549 史莱姆清: 2,1550 史莱姆原浆: 3,1551 导能绘卷: 1,1552 封魔绘卷: 2,1553 禁咒绘卷: 3,1554 骗骗花蜜: 1,1555 微光花蜜: 2,1556 原素花蜜: 3,1557 牢固的箭簇: 1,1558 锐利的箭簇: 2,1559 历战的箭簇: 3,1560 地脉的旧枝: 2,1561 地脉的枯叶: 3,1562 地脉的新芽: 4,1563 脆弱的骨片: 2,1564 结实的骨片: 3,1565 石化的骨片: 4,1566 沉重号角: 2,1567 黑铜号角: 3,1568 黑晶号角: 4,1569 混沌装置: 2,1570 混沌回路: 3,1571 混沌炉心: 4,1572 猎兵祭刀: 2,1573 特工祭刀: 3,1574 督察长祭刀: 4,1575 雾虚花粉: 2,1576 雾虚草囊: 3,1577 雾虚灯芯: 4,1578 东风之爪: 5,1579 东风之翎: 5,1580 东风的吐息: 5,1581 北风之尾: 5,1582 北风之环: 5,1583 北风的魂匣: 5,1584 "吞天之鲸·只角": 5,1585 "魔王之刃·残片": 5,1586 "武炼之魂·孤影": 5,1587 玄岩之塔: 4,1588 雷光棱镜: 4,1589 净水之心: 4,1590 常燃火种: 4,1591 极寒之核: 4,1592 飓风之种: 4,1593 嘟嘟莲: 1,1594 落落莓: 1,1595 塞西莉亚花: 1,1596 小灯草: 1,1597 慕风蘑菇: 1,1598 蒲公英籽: 1,1599 钩钩果: 1,1600 风车菊: 1,1601 夜泊石: 1,1602 绝云椒椒: 1,1603 霓裳花: 1,1604 琉璃百合: 1,1605 清心: 1,1606 星螺: 1,1607 琉璃袋: 1,1608 石珀: 1,1609 凛风奔狼的始龀: 2,1610 凛风奔狼的裂齿: 3,1611 凛风奔狼的断牙: 4,1612 凛风奔狼的怀乡: 5,1613 高塔孤王的破瓦: 2,1614 高塔孤王的残垣: 3,1615 高塔孤王的断片: 4,1616 高塔孤王的碎梦: 5,1617 孤云寒林的光砂: 2,1618 孤云寒林的辉岩: 3,1619 孤云寒林的圣骸: 4,1620 孤云寒林的神体: 5,1621 雾海云间的铅丹: 2,1622 雾海云间的汞丹: 3,1623 雾海云间的金丹: 4,1624 雾海云间的转还: 5,1625 狮牙斗士的枷锁: 2,1626 狮牙斗士的铁链: 3,1627 狮牙斗士的镣铐: 4,1628 狮牙斗士的理想: 5,1629 漆黑陨铁的一粒: 2,1630 漆黑陨铁的一片: 3,1631 漆黑陨铁的一角: 4,1632 漆黑陨铁的一块: 5,1633 自由的教导: 2,1634 自由的指引: 3,1635 自由的哲学: 4,1636 诗文的教导: 2,1637 诗文的指引: 3,1638 诗文的哲学: 4,1639 抗争的教导: 2,1640 抗争的指引: 3,1641 抗争的哲学: 4,1642 繁荣的教导: 2,1643 繁荣的指引: 3,1644 繁荣的哲学: 4,1645 勤劳的教导: 2,1646 勤劳的指引: 3,1647 勤劳的哲学: 4,1648 黄金的教导: 2,1649 黄金的指引: 3,1650 黄金的哲学: 4,1651 智识之冕: 5,1652 },1653 traits_leeling_stats: {1654 2: {1655 daily_req_level: 1,1656 daily_req_count: 3,1657 world_mon_req_level: 1,1658 world_mon_req_count: 6,1659 boss_req_count: 0,1660 crown_req_count: 0,1661 mora: 12500,1662 },1663 3: {1664 daily_req_level: 2,1665 daily_req_count: 2,1666 world_mon_req_level: 2,1667 world_mon_req_count: 3,1668 boss_req_count: 0,1669 crown_req_count: 0,1670 mora: 17500,1671 },1672 4: {1673 daily_req_level: 2,1674 daily_req_count: 4,1675 world_mon_req_level: 2,1676 world_mon_req_count: 4,1677 boss_req_count: 0,1678 crown_req_count: 0,1679 mora: 25000,1680 },1681 5: {1682 daily_req_level: 2,1683 daily_req_count: 6,1684 world_mon_req_level: 2,1685 world_mon_req_count: 6,1686 boss_req_count: 0,1687 crown_req_count: 0,1688 mora: 30000,1689 },1690 6: {1691 daily_req_level: 2,1692 daily_req_count: 9,1693 world_mon_req_level: 2,1694 world_mon_req_count: 9,1695 boss_req_count: 0,1696 crown_req_count: 0,1697 mora: 37500,1698 },1699 7: {1700 daily_req_level: 3,1701 daily_req_count: 4,1702 world_mon_req_level: 3,1703 world_mon_req_count: 4,1704 boss_req_count: 1,1705 crown_req_count: 0,1706 mora: 120000,1707 },1708 8: {1709 daily_req_level: 3,1710 daily_req_count: 6,1711 world_mon_req_level: 3,1712 world_mon_req_count: 6,1713 boss_req_count: 1,1714 crown_req_count: 0,1715 mora: 260000,1716 },1717 9: {1718 daily_req_level: 3,1719 daily_req_count: 12,1720 world_mon_req_level: 3,1721 world_mon_req_count: 9,1722 boss_req_count: 2,1723 crown_req_count: 0,1724 mora: 450000,1725 },1726 10: {1727 daily_req_level: 3,1728 daily_req_count: 16,1729 world_mon_req_level: 3,1730 world_mon_req_count: 16,1731 boss_req_count: 2,1732 crown_req_count: 1,1733 mora: 700000,1734 },1735 },1736 weapon_breakthrough_stats: {1737 4: {1738 20: {1739 daily_req_level: 1,1740 daily_req_count: 3,1741 champ_attrib_req_level: 1,1742 champ_attrib_req_count: 3,1743 world_mon_req_level: 1,1744 world_mon_req_count: 2,1745 mora: 5000,1746 },1747 40: {1748 daily_req_level: 2,1749 daily_req_count: 3,1750 champ_attrib_req_level: 1,1751 champ_attrib_req_count: 12,1752 world_mon_req_level: 1,1753 world_mon_req_count: 8,1754 mora: 15000,1755 },1756 50: {1757 daily_req_level: 2,1758 daily_req_count: 6,1759 champ_attrib_req_level: 2,1760 champ_attrib_req_count: 6,1761 world_mon_req_level: 2,1762 world_mon_req_count: 6,1763 mora: 20000,1764 },1765 60: {1766 daily_req_level: 3,1767 daily_req_count: 3,1768 champ_attrib_req_level: 2,1769 champ_attrib_req_count: 12,1770 world_mon_req_level: 2,1771 world_mon_req_count: 9,1772 mora: 30000,1773 },1774 70: {1775 daily_req_level: 3,1776 daily_req_count: 6,1777 champ_attrib_req_level: 3,1778 champ_attrib_req_count: 9,1779 world_mon_req_level: 3,1780 world_mon_req_count: 6,1781 mora: 35000,1782 },1783 80: {1784 daily_req_level: 4,1785 daily_req_count: 4,1786 champ_attrib_req_level: 3,1787 champ_attrib_req_count: 18,1788 world_mon_req_level: 3,1789 world_mon_req_count: 12,1790 mora: 45000,1791 },1792 },1793 5: {1794 20: {1795 daily_req_level: 1,1796 daily_req_count: 5,1797 champ_attrib_req_level: 1,1798 champ_attrib_req_count: 5,1799 world_mon_req_level: 1,1800 world_mon_req_count: 3,1801 mora: 10000,1802 },1803 40: {1804 daily_req_level: 2,1805 daily_req_count: 5,1806 champ_attrib_req_level: 1,1807 champ_attrib_req_count: 18,1808 world_mon_req_level: 1,1809 world_mon_req_count: 12,1810 mora: 20000,1811 },1812 50: {1813 daily_req_level: 2,1814 daily_req_count: 9,1815 champ_attrib_req_level: 2,1816 champ_attrib_req_count: 9,1817 world_mon_req_level: 2,1818 world_mon_req_count: 9,1819 mora: 30000,1820 },1821 60: {1822 daily_req_level: 3,1823 daily_req_count: 5,1824 champ_attrib_req_level: 2,1825 champ_attrib_req_count: 18,1826 world_mon_req_level: 2,1827 world_mon_req_count: 3,1828 mora: 45000,1829 },1830 70: {1831 daily_req_level: 3,1832 daily_req_count: 9,1833 champ_attrib_req_level: 3,1834 champ_attrib_req_count: 14,1835 world_mon_req_level: 3,1836 world_mon_req_count: 9,1837 mora: 55000,1838 },1839 80: {1840 daily_req_level: 4,1841 daily_req_count: 6,1842 champ_attrib_req_level: 3,1843 champ_attrib_req_count: 27,1844 world_mon_req_level: 3,1845 world_mon_req_count: 18,1846 mora: 65000,1847 },1848 },1849 },1850 weapon_level_stats: {1851 4: [1852 0,1853 400,1854 625,1855 900,1856 1200,1857 1550,1858 1950,1859 2350,1860 2800,1861 3300,1862 3800,1863 4350,1864 4925,1865 5525,1866 6150,1867 6800,1868 7500,1869 8200,1870 8950,1871 9725,1872 10500,1873 11900,1874 12775,1875 13700,1876 14650,1877 15625,1878 16625,1879 17650,1880 18700,1881 19775,1882 20900,1883 22025,1884 23200,1885 24375,1886 25600,1887 26825,1888 28100,1889 29400,1890 30725,1891 32075,1892 33425,1893 36575,1894 38075,1895 39600,1896 41150,1897 42725,1898 44325,1899 45950,1900 47600,1901 49300,1902 51000,1903 55375,1904 57225,1905 59100,1906 61025,1907 62950,1908 64925,1909 66900,1910 68925,1911 70975,1912 73050,1913 78900,1914 81125,1915 83400,1916 85700,1917 88025,1918 90375,1919 92750,1920 95150,1921 97575,1922 100050,1923 107675,1924 110325,1925 113000,1926 115700,1927 118425,1928 121200,1929 124000,1930 126825,1931 129675,1932 132575,1933 156475,1934 175875,1935 197600,1936 221975,1937 249300,1938 279950,1939 314250,1940 352700,1941 395775,1942 ],1943 5: [1944 0,1945 600,1946 950,1947 1350,1948 1800,1949 2325,1950 2925,1951 3525,1952 4200,1953 4950,1954 5700,1955 6525,1956 7400,1957 8300,1958 9225,1959 10200,1960 11250,1961 12300,1962 13425,1963 14600,1964 15750,1965 17850,1966 19175,1967 20550,1968 21975,1969 23450,1970 24950,1971 26475,1972 28050,1973 29675,1974 31350,1975 33050,1976 34800,1977 36575,1978 38400,1979 40250,1980 42150,1981 44100,1982 46100,1983 48125,1984 50150,1985 54875,1986 57125,1987 59400,1988 61725,1989 64100,1990 66500,1991 68925,1992 71400,1993 73950,1994 76500,1995 83075,1996 85850,1997 88650,1998 91550,1999 94425,2000 97400,2001 100350,2002 103400,2003 106475,2004 109575,2005 118350,2006 121700,2007 125100,2008 128550,2009 132050,2010 135575,2011 139125,2012 142725,2013 146375,2014 150075,2015 161525,2016 165500,2017 169500,2018 173550,2019 177650,2020 181800,2021 186000,2022 190250,2023 194525,2024 198875,2025 234725,2026 263825,2027 296400,2028 332975,2029 373950,2030 419925,2031 471375,2032 529050,2033 593675,2034 ],2035 },2036 weapon_reqs: {2037 风鹰剑: {2038 star: "5",2039 form: "单手剑",2040 daily_req: "高塔孤王",2041 champ_attrib_req: "号角",2042 world_mon_req: "箭簇",2043 },2044 天空之刃: {2045 star: "5",2046 form: "单手剑",2047 daily_req: "凛风奔狼",2048 champ_attrib_req: "地脉",2049 world_mon_req: "史莱姆",2050 },2051 斫峰之刃: {2052 star: "5",2053 form: "单手剑",2054 daily_req: "孤云寒林",2055 champ_attrib_req: "祭刀",2056 world_mon_req: "面具",2057 },2058 匣里龙吟: {2059 star: "4",2060 form: "单手剑",2061 daily_req: "孤云寒林",2062 champ_attrib_req: "祭刀",2063 world_mon_req: "鸦印",2064 },2065 西风剑: {2066 star: "4",2067 form: "单手剑",2068 daily_req: "高塔孤王",2069 champ_attrib_req: "号角",2070 world_mon_req: "箭簇",2071 },2072 笛剑: {2073 star: "4",2074 form: "单手剑",2075 daily_req: "凛风奔狼",2076 champ_attrib_req: "地脉",2077 world_mon_req: "史莱姆",2078 },2079 黑剑: {2080 star: "4",2081 form: "单手剑",2082 daily_req: "凛风奔狼",2083 champ_attrib_req: "地脉",2084 world_mon_req: "史莱姆",2085 },2086 祭礼剑: {2087 star: "4",2088 form: "单手剑",2089 daily_req: "狮牙斗士",2090 champ_attrib_req: "混沌",2091 world_mon_req: "绘卷",2092 },2093 铁蜂刺: {2094 star: "4",2095 form: "单手剑",2096 daily_req: "漆黑陨铁",2097 champ_attrib_req: "骨片",2098 world_mon_req: "花蜜",2099 },2100 试作斩岩: {2101 star: "4",2102 form: "单手剑",2103 daily_req: "雾海云间",2104 champ_attrib_req: "雾虚",2105 world_mon_req: "徽记",2106 },2107 宗室长剑: {2108 star: "4",2109 form: "单手剑",2110 daily_req: "高塔孤王",2111 champ_attrib_req: "号角",2112 world_mon_req: "面具",2113 },2114 黑岩长剑: {2115 star: "4",2116 form: "单手剑",2117 daily_req: "孤云寒林",2118 champ_attrib_req: "祭刀",2119 world_mon_req: "箭簇",2120 },2121 腐殖之剑: {2122 star: "4",2123 form: "单手剑",2124 daily_req: "狮牙斗士",2125 champ_attrib_req: "号角",2126 world_mon_req: "徽记",2127 },2128 四风原典: {2129 star: "5",2130 form: "法器",2131 daily_req: "狮牙斗士",2132 champ_attrib_req: "混沌",2133 world_mon_req: "史莱姆",2134 },2135 天空之卷: {2136 star: "5",2137 form: "法器",2138 daily_req: "凛风奔狼",2139 champ_attrib_req: "地脉",2140 world_mon_req: "箭簇",2141 },2142 尘世之锁: {2143 star: "5",2144 form: "法器",2145 daily_req: "漆黑陨铁",2146 champ_attrib_req: "骨片",2147 world_mon_req: "面具",2148 },2149 西风秘典: {2150 star: "4",2151 form: "法器",2152 daily_req: "高塔孤王",2153 champ_attrib_req: "号角",2154 world_mon_req: "绘卷",2155 },2156 匣里日月: {2157 star: "4",2158 form: "法器",2159 daily_req: "孤云寒林",2160 champ_attrib_req: "祭刀",2161 world_mon_req: "花蜜",2162 },2163 祭礼残章: {2164 star: "4",2165 form: "法器",2166 daily_req: "狮牙斗士",2167 champ_attrib_req: "混沌",2168 world_mon_req: "鸦印",2169 },2170 试作金珀: {2171 star: "4",2172 form: "法器",2173 daily_req: "雾海云间",2174 champ_attrib_req: "雾虚",2175 world_mon_req: "箭簇",2176 },2177 万国诸海图谱: {2178 star: "4",2179 form: "法器",2180 daily_req: "漆黑陨铁",2181 champ_attrib_req: "骨片",2182 world_mon_req: "史莱姆",2183 },2184 昭心: {2185 star: "4",2186 form: "法器",2187 daily_req: "雾海云间",2188 champ_attrib_req: "雾虚",2189 world_mon_req: "面具",2190 },2191 流浪乐章: {2192 star: "4",2193 form: "法器",2194 daily_req: "凛风奔狼",2195 champ_attrib_req: "地脉",2196 world_mon_req: "面具",2197 },2198 宗室秘法录: {2199 star: "4",2200 form: "法器",2201 daily_req: "高塔孤王",2202 champ_attrib_req: "号角",2203 world_mon_req: "徽记",2204 },2205 黑岩绯玉: {2206 star: "4",2207 form: "法器",2208 daily_req: "孤云寒林",2209 champ_attrib_req: "祭刀",2210 world_mon_req: "绘卷",2211 },2212 天空之翼: {2213 star: "5",2214 form: "弓",2215 daily_req: "凛风奔狼",2216 champ_attrib_req: "地脉",2217 world_mon_req: "箭簇",2218 },2219 阿莫斯之弓: {2220 star: "5",2221 form: "弓",2222 daily_req: "狮牙斗士",2223 champ_attrib_req: "混沌",2224 world_mon_req: "史莱姆",2225 },2226 绝弦: {2227 star: "4",2228 form: "弓",2229 daily_req: "高塔孤王",2230 champ_attrib_req: "号角",2231 world_mon_req: "箭簇",2232 },2233 苍翠猎弓: {2234 star: "4",2235 form: "弓",2236 daily_req: "高塔孤王",2237 champ_attrib_req: "号角",2238 world_mon_req: "箭簇",2239 },2240 祭礼弓: {2241 star: "4",2242 form: "弓",2243 daily_req: "凛风奔狼",2244 champ_attrib_req: "地脉",2245 world_mon_req: "史莱姆",2246 },2247 西风猎弓: {2248 star: "4",2249 form: "弓",2250 daily_req: "狮牙斗士",2251 champ_attrib_req: "混沌",2252 world_mon_req: "花蜜",2253 },2254 宗室长弓: {2255 star: "4",2256 form: "弓",2257 daily_req: "狮牙斗士",2258 champ_attrib_req: "混沌",2259 world_mon_req: "绘卷",2260 },2261 钢轮弓: {2262 star: "4",2263 form: "弓",2264 daily_req: "漆黑陨铁",2265 champ_attrib_req: "骨片",2266 world_mon_req: "徽记",2267 },2268 试作澹月: {2269 star: "4",2270 form: "弓",2271 daily_req: "雾海云间",2272 champ_attrib_req: "雾虚",2273 world_mon_req: "鸦印",2274 },2275 弓藏: {2276 star: "4",2277 form: "弓",2278 daily_req: "孤云寒林",2279 champ_attrib_req: "祭刀",2280 world_mon_req: "面具",2281 },2282 黑岩战弓: {2283 star: "4",2284 form: "弓",2285 daily_req: "孤云寒林",2286 champ_attrib_req: "祭刀",2287 world_mon_req: "花蜜",2288 },2289 狼的末路: {2290 star: "5",2291 form: "双手剑",2292 daily_req: "狮牙斗士",2293 champ_attrib_req: "混沌",2294 world_mon_req: "绘卷",2295 },2296 天空之傲: {2297 star: "5",2298 form: "双手剑",2299 daily_req: "凛风奔狼",2300 champ_attrib_req: "地脉",2301 world_mon_req: "史莱姆",2302 },2303 试作古华: {2304 star: "4",2305 form: "双手剑",2306 daily_req: "漆黑陨铁",2307 champ_attrib_req: "骨片",2308 world_mon_req: "面具",2309 },2310 宗室大剑: {2311 star: "4",2312 form: "双手剑",2313 daily_req: "狮牙斗士",2314 champ_attrib_req: "混沌",2315 world_mon_req: "史莱姆",2316 },2317 螭骨剑: {2318 star: "4",2319 form: "双手剑",2320 daily_req: "漆黑陨铁",2321 champ_attrib_req: "骨片",2322 world_mon_req: "花蜜",2323 },2324 白影剑: {2325 star: "4",2326 form: "双手剑",2327 daily_req: "孤云寒林",2328 champ_attrib_req: "祭刀",2329 world_mon_req: "鸦印",2330 },2331 西风大剑: {2332 star: "4",2333 form: "双手剑",2334 daily_req: "狮牙斗士",2335 champ_attrib_req: "混沌",2336 world_mon_req: "徽记",2337 },2338 雨裁: {2339 star: "4",2340 form: "双手剑",2341 daily_req: "雾海云间",2342 champ_attrib_req: "雾虚",2343 world_mon_req: "绘卷",2344 },2345 祭礼大剑: {2346 star: "4",2347 form: "双手剑",2348 daily_req: "凛风奔狼",2349 champ_attrib_req: "地脉",2350 world_mon_req: "箭簇",2351 },2352 钟剑: {2353 star: "4",2354 form: "双手剑",2355 daily_req: "高塔孤王",2356 champ_attrib_req: "号角",2357 world_mon_req: "花蜜",2358 },2359 黑岩斩刀: {2360 star: "4",2361 form: "双手剑",2362 daily_req: "雾海云间",2363 champ_attrib_req: "雾虚",2364 world_mon_req: "徽记",2365 },2366 无工之剑: {2367 star: "5",2368 form: "双手剑",2369 daily_req: "雾海云间",2370 champ_attrib_req: "雾虚",2371 world_mon_req: "鸦印",2372 },2373 和璞鸢: {2374 star: "5",2375 form: "长柄武器",2376 daily_req: "孤云寒林",2377 champ_attrib_req: "祭刀",2378 world_mon_req: "徽记",2379 },2380 天空之脊: {2381 star: "5",2382 form: "长柄武器",2383 daily_req: "狮牙斗士",2384 champ_attrib_req: "混沌",2385 world_mon_req: "绘卷",2386 },2387 流月针: {2388 star: "4",2389 form: "长柄武器",2390 daily_req: "孤云寒林",2391 champ_attrib_req: "祭刀",2392 world_mon_req: "鸦印",2393 },2394 试作星镰: {2395 star: "4",2396 form: "长柄武器",2397 daily_req: "漆黑陨铁",2398 champ_attrib_req: "骨片",2399 world_mon_req: "面具",2400 },2401 西风长枪: {2402 star: "4",2403 form: "长柄武器",2404 daily_req: "狮牙斗士",2405 champ_attrib_req: "混沌",2406 world_mon_req: "史莱姆",2407 },2408 匣里灭辰: {2409 star: "4",2410 form: "长柄武器",2411 daily_req: "雾海云间",2412 champ_attrib_req: "雾虚",2413 world_mon_req: "绘卷",2414 },2415 决斗之枪: {2416 star: "4",2417 form: "长柄武器",2418 daily_req: "凛风奔狼",2419 champ_attrib_req: "地脉",2420 world_mon_req: "花蜜",2421 },2422 黑岩刺枪: {2423 star: "4",2424 form: "长柄武器",2425 daily_req: "雾海云间",2426 champ_attrib_req: "雾虚",2427 world_mon_req: "徽记",2428 },2429 贯虹之槊: {2430 star: "5",2431 form: "长柄武器",2432 daily_req: "漆黑陨铁",2433 champ_attrib_req: "骨片",2434 world_mon_req: "鸦印",2435 },2436 雪葬的星银: {2437 star: "4",2438 form: "双手剑",2439 daily_req: "高塔孤王",2440 champ_attrib_req: "号角",2441 world_mon_req: "史莱姆",2442 },2443 龙脊长枪: {2444 star: "4",2445 form: "长柄武器",2446 daily_req: "凛风奔狼",2447 champ_attrib_req: "雾虚",2448 world_mon_req: "徽记",2449 },2450 忍冬之果: {2451 star: "4",2452 form: "法器",2453 daily_req: "狮牙斗士",2454 champ_attrib_req: "混沌",2455 world_mon_req: "花蜜",2456 },2457 },...

Full Screen

Full Screen

Common.js

Source:Common.js Github

copy

Full Screen

1function Posts(host) {2 this.host = host || "http://www.boostme.cn:80";3 this.host = "";4}5Posts.prototype = {6 server : function() {7 return this.host;8 },9 fetch_list : function(req_data_dict, callback_func) {10 var req_url = this.server() + "/posts/ajax_fetch_list";11 async_request(req_url, "get", req_data_dict, function(response) {12 callback_func(response);13 });14 },15 fetch_info : function(req_data_dict, callback_func) {16 var req_url = this.server() + "/posts/ajax_fetch_info";17 async_request(req_url, "get", req_data_dict, function(response) {18 callback_func(response);19 });20 },21 add : function(req_data_dict, callback_func) {22 var req_url = this.server() + "/posts/ajax_add";23 async_request(req_url, "post", req_data_dict, function(response) {24 callback_func(response);25 });26 },27 answer : function(req_data_dict, callback_func) {28 var req_url = this.server() + "/posts/ajax_answer";29 async_request(req_url, "post", req_data_dict, function(response) {30 callback_func(response);31 });32 },33 comment : function(req_data_dict, callback_func) {34 var req_url = this.server() + "/posts/ajax_comment";35 async_request(req_url, "post", req_data_dict, function(response) {36 callback_func(response);37 });38 },39 fetch_comment_list : function(req_data_dict, callback_func) {40 var req_url = this.server() + "/posts/ajax_fetch_comment_list";41 async_request(req_url, "get", req_data_dict, function(response) {42 callback_func(response);43 });44 },45}46Posts.prototype.constructor = Posts;47function Answer(host) {48 this.host = host || "http://www.boostme.cn:80";49 this.host = "";50}51Answer.prototype = {52 server : function() {53 return this.host;54 },55 fetch_list : function(req_data_dict, callback_func) {56 var req_url = this.server() + "/anwser/ajax_fetch_list";57 async_request(req_url, "get", req_data_dict, function(response) {58 callback_func(response);59 });60 },61 fetch_info : function(req_data_dict, callback_func) {62 var req_url = this.server() + "/answer/ajax_fetch_info";63 async_request(req_url, "get", req_data_dict, function(response) {64 callback_func(response);65 });66 },67 has_support : function(req_data_dict, callback_func) {68 var req_url = this.server() + "/answer/ajax_has_support";69 async_request(req_url, "get", req_data_dict, function(response) {70 callback_func(response);71 });72 },73 add_support : function(req_data_dict, callback_func) {74 var req_url = this.server() + "/answer/ajax_add_support";75 async_request(req_url, "post", req_data_dict, function(response) {76 callback_func(response);77 });78 },79 get_support : function(req_data_dict, callback_func) {80 var req_url = this.server() + "/answer/ajax_get_support";81 async_request(req_url, "get", req_data_dict, function(response) {82 callback_func(response);83 });84 }85}86Answer.prototype.constructor = Answer;87function Service(host) {88 this.host = host || "http://www.boostme.cn:80";89 this.host = "";90}91Service.prototype = {92 server : function() {93 return this.host;94 },95 fetch_list : function(req_data_dict, callback_func) {96 var req_url = this.server() + "/Service/ajax_fetch_list";97 async_request(req_url, "get", req_data_dict, function(response) {98 callback_func(response);99 });100 },101 fetch_info : function(req_data_dict, callback_func) {102 var req_url = this.server() + "/Service/ajax_fetch_info";103 async_request(req_url, "get", req_data_dict, function(response) {104 callback_func(response);105 });106 },107 fetch_category : function(req_data_dict, callback_func) {108 var req_url = this.server() + "/Service/ajax_fetch_category";109 async_request(req_url, "get", req_data_dict, function(response) {110 callback_func(response);111 });112 },113 fetch_comment : function(req_data_dict, callback_func) {114 var req_url = this.server() + "/Service/ajax_fetch_comment";115 async_request(req_url, "get", req_data_dict, function(response) {116 callback_func(response);117 });118 },119 fetch_user_comment : function(req_data_dict, callback_func) {120 var req_url = this.server() + "/Service/ajax_fetch_user_comment";121 async_request(req_url, "get", req_data_dict, function(response) {122 callback_func(response);123 });124 },125 add_comment : function(req_data_dict, callback_func) {126 var req_url = this.server() + "/Service/ajax_add_comment";127 async_request(req_url, "post", req_data_dict, function(response) {128 callback_func(response);129 });130 },131 add_service : function(req_data_dict, callback_func) {132 var req_url = this.server() + "/Service/ajax_add";133 async_request(req_url, "post", req_data_dict, function(response) {134 callback_func(response);135 });136 },137 close_service : function(req_data_dict, callback_func) {138 var req_url = this.server() + "/Service/ajax_close";139 async_request(req_url, "post", req_data_dict, function(response) {140 callback_func(response);141 });142 }143}144Service.prototype.constructor = Service;145function Material(host) {146 this.host = host || "http://www.boostme.cn:80";147 this.host = "";148}149Material.prototype = {150 server : function() {151 return this.host;152 },153 fetch_list : function(req_data_dict, callback_func) {154 var req_url = this.server() + "/material/ajax_fetch_list";155 async_request(req_url, "get", req_data_dict, function(response) {156 callback_func(response);157 });158 },159 fetch_info : function(req_data_dict, callback_func) {160 var req_url = this.server() + "/material/ajax_fetch_info";161 async_request(req_url, "get", req_data_dict, function(response) {162 callback_func(response);163 });164 },165 fetch_category : function(req_data_dict, callback_func) {166 var req_url = this.server() + "/material/ajax_fetch_category";167 async_request(req_url, "get", req_data_dict, function(response) {168 callback_func(response);169 });170 },171 search : function(req_data_dict, callback_func) {172 var req_url = this.server() + "/material/ajax_search";173 async_request(req_url, "get", req_data_dict, function(response) {174 callback_func(response);175 });176 },177 fetch_comment : function(req_data_dict, callback_func) {178 var req_url = this.server() + "/material/ajax_fetch_comment";179 async_request(req_url, "get", req_data_dict, function(response) {180 callback_func(response);181 });182 },183 fetch_user_comment : function(req_data_dict, callback_func) {184 var req_url = this.server() + "/material/ajax_fetch_user_comment";185 async_request(req_url, "get", req_data_dict, function(response) {186 callback_func(response);187 });188 },189 add_comment : function(req_data_dict, callback_func) {190 var req_url = this.server() + "/material/ajax_add_comment";191 async_request(req_url, "post", req_data_dict, function(response) {192 callback_func(response);193 });194 },195 add : function(req_data_dict, callback_func) {196 var req_url = this.server() + "/material/ajax_add";197 async_request(req_url, "post", req_data_dict, function(response) {198 callback_func(response);199 });200 },201 edit : function(req_data_dict, callback_func) {202 var req_url = this.server() + "/material/ajax_edit";203 async_request(req_url, "post", req_data_dict, function(response) {204 callback_func(response);205 });206 }207}208Material.prototype.constructor = Service;209function Trade(host) {210 this.host = host || "http://www.boostme.cn:80";211 this.host = "";212}213Trade.prototype = {214 server : function() {215 return this.host;216 },217 fetch_list : function(req_data_dict, callback_func) {218 var req_url = this.server() + "/trade/ajax_fetch_list";219 async_request(req_url, "get", req_data_dict, function(response) {220 callback_func(response);221 });222 },223 add_item : function(req_data_dict, callback_func) {224 var req_url = this.server() + "/Trade/ajax_add_item";225 async_request(req_url, "post", req_data_dict, function(response) {226 callback_func(response);227 });228 },229 remove_item : function(req_data_dict, callback_func) {230 var req_url = this.server() + "/Trade/ajax_remove_item";231 async_request(req_url, "post", req_data_dict, function(response) {232 callback_func(response);233 });234 },235 fetch_tradeno : function(req_data_dict, callback_func) {236 var req_url = this.server() + "/trade/ajax_fetch_tradeno";237 async_request(req_url, "get", req_data_dict, function(response) {238 callback_func(response);239 });240 },241 update_quantity : function(req_data_dict, callback_func) {242 var req_url = this.server() + "/Trade/ajax_update_quantity";243 async_request(req_url, "get", req_data_dict, function(response) {244 callback_func(response);245 });246 }247}248Trade.prototype.constructor = Trade;249function Alipay(host) {250 this.host = host || "http://www.boostme.cn:80";251 this.host = "";252}253Alipay.prototype = {254 server : function() {255 return this.host;256 },257 transfer : function(req_data_dict, callback_func) {258 var req_url = this.server() + "/Alipay/ajax_transfer";259 async_request(req_url, "get", req_data_dict, function(response) {260 callback_func(response);261 });262 },263}264Alipay.prototype.constructor = Alipay;265function EBank(host) {266 this.host = host || "http://www.boostme.cn:80";267 this.host = "";268}269EBank.prototype = {270 server : function() {271 return this.host;272 },273 alipay_transfer : function(req_data_dict, callback_func) {274 var req_url = this.server() + "/ebank/ajax_alipay_transfer";275 async_request(req_url, "get", req_data_dict, function(response) {276 callback_func(response);277 });278 },279 fetch_account : function(req_data_dict, callback_func) {280 var req_url = this.server() + "/ebank/ajax_fetch_account";281 async_request(req_url, "get", req_data_dict, function(response) {282 callback_func(response);283 });284 },285 fetch_withdraw : function(req_data_dict, callback_func) {286 var req_url = this.server() + "/ebank/ajax_fetch_withdraw";287 async_request(req_url, "get", req_data_dict, function(response) {288 callback_func(response);289 });290 },291 withdraw : function(req_data_dict, callback_func) {292 var req_url = this.server() + "/ebank/ajax_withdraw";293 async_request(req_url, "post", req_data_dict, function(response) {294 callback_func(response);295 });296 }297}298EBank.prototype.constructor = EBank;299function User(host) {300 this.host = host || "http://www.boostme.cn:80";301 this.host = "";302}303User.prototype = {304 server : function() {305 return this.host;306 },307 login : function(req_data_dict, callback_func) {308 var req_url = this.server() + "/User/ajax_login";309 async_request(req_url, "post", req_data_dict, function(response) {310 callback_func(response);311 });312 },313 register : function(req_data_dict, callback_func) {314 var req_url = this.server() + "/User/ajax_register";315 async_request(req_url, "post", req_data_dict, function(response) {316 callback_func(response);317 });318 },319 check_username : function(req_data_dict, callback_func) {320 var req_url = this.server() + "/user/ajax_username";321 async_request(req_url, "get", req_data_dict, function(response) {322 callback_func(response);323 });324 },325 check_email : function(req_data_dict, callback_func) {326 var req_url = this.server() + "/user/ajax_email";327 async_request(req_url, "get", req_data_dict, function(response) {328 callback_func(response);329 });330 },331 check_code : function(req_data_dict, callback_func) {332 var req_url = this.server() + "/user/ajax_check_code";333 async_request(req_url, "get", req_data_dict, function(response) {334 callback_func(response);335 });336 },337 add_easy_access : function(req_data_dict, callback_func) {338 var req_url = this.server() + "/user/ajax_add_easy_access";339 async_request(req_url, "post", req_data_dict, function(response) {340 callback_func(response);341 });342 },343 remove_easy_access : function(req_data_dict, callback_func) {344 var req_url = this.server() + "/user/ajax_remove_easy_access";345 async_request(req_url, "post", req_data_dict, function(response) {346 callback_func(response);347 });348 },349 fetch_easy_access : function(req_data_dict, callback_func) {350 var req_url = this.server() + "/user/ajax_fetch_easy_access";351 async_request(req_url, "get", req_data_dict, function(response) {352 callback_func(response);353 });354 },355 update_passwd : function(req_data_dict, callback_func) {356 var req_url = this.server() + "/user/ajax_uppass";357 async_request(req_url, "post", req_data_dict, function(response) {358 callback_func(response);359 });360 },361 update_profile : function(req_data_dict, callback_func) {362 var req_url = this.server() + "/User/ajax_update_profile";363 async_request(req_url, "post", req_data_dict, function(response) {364 callback_func(response);365 });366 },367 update_resume : function(req_data_dict, callback_func) {368 var req_url = this.server() + "/user/ajax_update_resume";369 async_request(req_url, "post", req_data_dict, function(response) {370 callback_func(response);371 });372 },373 fetch_edu : function(req_data_dict, callback_func) {374 var req_url = this.server() + "/User/ajax_fetch_edu";375 async_request(req_url, "get", req_data_dict, function(response) {376 callback_func(response);377 });378 }379}380User.prototype.constructor = User;381function Message(host) {382 this.host = host || "http://www.boostme.cn:80";383 this.host = "";384}385Message.prototype = {386 server : function() {387 return this.host;388 },389 fetch_system : function(req_data_dict, callback_func) {390 var req_url = this.server() + "/Message/ajax_fetch_system";391 async_request(req_url, "get", req_data_dict, function(response) {392 callback_func(response);393 });394 },395 fetch_personal : function(req_data_dict, callback_func) {396 var req_url = this.server() + "/Message/ajax_fetch_personal";397 async_request(req_url, "get", req_data_dict, function(response) {398 callback_func(response);399 });400 },401 userlist : function(req_data_dict, callback_func) {402 var req_url = this.server() + "/Message/ajax_userlist";403 async_request(req_url, "get", req_data_dict, function(response) {404 callback_func(response);405 });406 },407 usernum : function(req_data_dict, callback_func) {408 var req_url = this.server() + "/Message/ajax_usernum";409 async_request(req_url, "get", req_data_dict, function(response) {410 callback_func(response);411 });412 },413 read_msg : function(req_data_dict, callback_func) {414 var req_url = this.server() + "/Message/ajax_read_msg";415 async_request(req_url, "get", req_data_dict, function(response) {416 callback_func(response);417 });418 },419 send : function(req_data_dict, callback_func) {420 var req_url = this.server() + "/Message/ajax_send";421 async_request(req_url, "post", req_data_dict, function(response) {422 callback_func(response);423 });424 },425 remove : function(req_data_dict, callback_func) {426 var req_url = this.server() + "/Message/ajax_remove";427 async_request(req_url, "post", req_data_dict, function(response) {428 callback_func(response);429 });430 },431 remove_dialog : function(req_data_dict, callback_func) {432 var req_url = this.server() + "/Message/ajax_remove_dialog";433 async_request(req_url, "post", req_data_dict, function(response) {434 callback_func(response);435 });436 }437}438Message.prototype.constructor = Message;439function Main(host) {440 this.host = host || "http://www.boostme.cn:80";441 this.host = "";442}443Main.prototype = {444 server : function() {445 return this.host;446 },447 image_size : function(req_data_dict, callback_func) {448 var req_url = this.server() + "/main/ajax_image_size";449 async_request(req_url, "get", req_data_dict, function(response) {450 callback_func(response);451 });452 },453}...

Full Screen

Full Screen

----ajaxRequest.js

Source:----ajaxRequest.js Github

copy

Full Screen

1// ===================================================================2// Author: Matt Kruse <matt@ajaxtoolbox.com>3// WWW: http://www.AjaxToolbox.com/4//5// NOTICE: You may use this code for any purpose, commercial or6// private, without any further permission from the author. You may7// remove this notice from your final code if you wish, however it is8// appreciated by the author if at least my web site address is kept.9//10// You may *NOT* re-distribute this code in any way except through its11// use. That means, you can include it in your product, or your web12// site, or any other form where the code is actually being used. You13// may not put the plain javascript up on your site for download or14// include it in your javascript libraries for download. 15// If you wish to share this code with others, please just point them16// to the URL instead.17// Please DO NOT link directly to my .js files from your site. Copy18// the files to your server and use them there. Thank you.19// ===================================================================2021function AjaxRequest(){var req =new Object();22req.timeout =null;23req.generateUniqueUrl =false;24req.url =window.location.href;25req.method ="GET";26req.async =true;27req.username =null;28req.password =null;29req.parameters =new Object();30req.requestIndex =AjaxRequest.numAjaxRequests++;31req.responseReceived =false;32req.groupName =null;33req.queryString ="";34req.responseText =null;35req.responseXML =null;36req.status =null;37req.statusText =null;38req.aborted =false;39req.xmlHttpRequest =null;40req.onTimeout=null;41req.onLoading=null;42req.onLoaded=null;43req.onInteractive=null;44req.onComplete=null;45req.onSuccess=null;46req.onError=null;47req.onGroupBegin=null;48req.onGroupEnd=null;49req.xmlHttpRequest =AjaxRequest.getXmlHttpRequest();50if(req.xmlHttpRequest==null){return null;}req.xmlHttpRequest.onreadystatechange =51function(){if(req==null || req.xmlHttpRequest==null){return;}if(req.xmlHttpRequest.readyState==1){req.onLoadingInternal(req);}if(req.xmlHttpRequest.readyState==2){req.onLoadedInternal(req);}if(req.xmlHttpRequest.readyState==3){req.onInteractiveInternal(req);}if(req.xmlHttpRequest.readyState==4){req.onCompleteInternal(req);}};52req.onLoadingInternalHandled=false;53req.onLoadedInternalHandled=false;54req.onInteractiveInternalHandled=false;55req.onCompleteInternalHandled=false;56req.onLoadingInternal=57function(){if(req.onLoadingInternalHandled){return;}AjaxRequest.numActiveAjaxRequests++;58if(AjaxRequest.numActiveAjaxRequests==1 && typeof(window['AjaxRequestBegin'])=="function"){AjaxRequestBegin();}if(req.groupName!=null){if(typeof(AjaxRequest.numActiveAjaxGroupRequests[req.groupName])=="undefined"){AjaxRequest.numActiveAjaxGroupRequests[req.groupName] =0;}AjaxRequest.numActiveAjaxGroupRequests[req.groupName]++;59if(AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==1 && typeof(req.onGroupBegin)=="function"){req.onGroupBegin(req.groupName);}}if(typeof(req.onLoading)=="function"){req.onLoading(req);}req.onLoadingInternalHandled=true;};60req.onLoadedInternal=61function(){if(req.onLoadedInternalHandled){return;}if(typeof(req.onLoaded)=="function"){req.onLoaded(req);}req.onLoadedInternalHandled=true;};62req.onInteractiveInternal=63function(){if(req.onInteractiveInternalHandled){return;}if(typeof(req.onInteractive)=="function"){req.onInteractive(req);}req.onInteractiveInternalHandled=true;};64req.onCompleteInternal=65function(){if(req.onCompleteInternalHandled || req.aborted){return;}req.onCompleteInternalHandled=true;66AjaxRequest.numActiveAjaxRequests--;67if(AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function"){AjaxRequestEnd(req.groupName);}if(req.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;68if(AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function"){req.onGroupEnd(req.groupName);}}req.responseReceived =true;69req.status =req.xmlHttpRequest.status;70req.statusText =req.xmlHttpRequest.statusText;71req.responseText =req.xmlHttpRequest.responseText;72req.responseXML =req.xmlHttpRequest.responseXML;73if(typeof(req.onComplete)=="function"){req.onComplete(req);}if(req.xmlHttpRequest.status==200 && typeof(req.onSuccess)=="function"){req.onSuccess(req);}else if(typeof(req.onError)=="function"){req.onError(req);}delete req.xmlHttpRequest['onreadystatechange'];74req.xmlHttpRequest =null;};75req.onTimeoutInternal=76function(){if(req!=null && req.xmlHttpRequest!=null && !req.onCompleteInternalHandled){req.aborted =true;77req.xmlHttpRequest.abort();78AjaxRequest.numActiveAjaxRequests--;79if(AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function"){AjaxRequestEnd(req.groupName);}if(req.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;80if(AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function"){req.onGroupEnd(req.groupName);}}if(typeof(req.onTimeout)=="function"){req.onTimeout(req);}delete req.xmlHttpRequest['onreadystatechange'];81req.xmlHttpRequest =null;}};82req.process =83function(){if(req.xmlHttpRequest!=null){if(req.generateUniqueUrl && req.method=="GET"){req.parameters["AjaxRequestUniqueId"] =new Date().getTime() + "" + req.requestIndex;}var content =null;84for(var i in req.parameters){if(req.queryString.length>0){req.queryString +="&";}req.queryString +=encodeURIComponent(i) + "=" + encodeURIComponent(req.parameters[i]);}if(req.method=="GET"){if(req.queryString.length>0){req.url +=((req.url.indexOf("?")>-1)?"&":"?") + req.queryString;}}req.xmlHttpRequest.open(req.method,req.url,req.async,req.username,req.password);85if(req.method=="POST"){if(typeof(req.xmlHttpRequest.setRequestHeader)!="undefined"){req.xmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');}content =req.queryString;}if(req.timeout>0){setTimeout(req.onTimeoutInternal,req.timeout);}req.xmlHttpRequest.send(content);}};86req.handleArguments =87function(args){for(var i in args){if(typeof(req[i])=="undefined"){req.parameters[i] =args[i];}else{req[i] =args[i];}}};88req.getAllResponseHeaders =89function(){if(req.xmlHttpRequest!=null){if(req.responseReceived){return req.xmlHttpRequest.getAllResponseHeaders();}alert("Cannot getAllResponseHeaders because a response has not yet been received");}};90req.getResponseHeader =91function(headerName){if(req.xmlHttpRequest!=null){if(req.responseReceived){return req.xmlHttpRequest.getResponseHeader(headerName);}alert("Cannot getResponseHeader because a response has not yet been received");}};92return req;}AjaxRequest.getXmlHttpRequest =function(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(window.ActiveXObject){/*@cc_on @*/93/*@if(@_jscript_version >=5)94try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(E){return null;}}@end @*/}else{return null;}};95AjaxRequest.isActive =function(){return(AjaxRequest.numActiveAjaxRequests>0);};96AjaxRequest.get =function(args){AjaxRequest.doRequest("GET",args);};97AjaxRequest.post =function(args){AjaxRequest.doRequest("POST",args);};98AjaxRequest.doRequest =function(method,args){if(typeof(args)!="undefined" && args!=null){var myRequest =new AjaxRequest();99myRequest.method =method;100myRequest.handleArguments(args);101myRequest.process();}};102AjaxRequest.submit =function(theform, args){var myRequest =new AjaxRequest();103if(myRequest==null){return false;}var serializedForm =AjaxRequest.serializeForm(theform);104myRequest.method =theform.method.toUpperCase();105myRequest.url =theform.action;106myRequest.handleArguments(args);107myRequest.queryString =serializedForm;108myRequest.process();109return true;};110AjaxRequest.serializeForm =function(theform){var els =theform.elements;111var len =els.length;112var queryString ="";113this.addField =114function(name,value){if(queryString.length>0){queryString +="&";}queryString +=encodeURIComponent(name) + "=" + encodeURIComponent(value);};115for(var i=0;i<len;i++){var el =els[i];116if(!el.disabled){switch(el.type){case 'text': case 'password': case 'hidden': case 'textarea':117this.addField(el.name,el.value);118break;119case 'select-one':120if(el.selectedIndex>=0){this.addField(el.name,el.options[el.selectedIndex].value);}break;121case 'select-multiple':122for(var j=0;j<el.options.length;j++){if(el.options[j].selected){this.addField(el.name,el.options[j].value);}}break;123case 'checkbox': case 'radio':124if(el.checked){this.addField(el.name,el.value);}break;}}}return queryString;};125AjaxRequest.numActiveAjaxRequests =0;126AjaxRequest.numActiveAjaxGroupRequests =new Object(); ...

Full Screen

Full Screen

prophylaxie.contoller.js

Source:prophylaxie.contoller.js Github

copy

Full Screen

1const Prophylaxie = require('../models/prophylaxie.model');2// Create and Save a new Prophylaxie3exports.create = (req, res) => {4 // Create a Prophylaxie5 const prophylaxie = new Prophylaxie({6 id:req.body.id,7 patientId:req.body.patientId,8 datesvaccinS1:req.body.datesvaccinS1,9 datesvaccinS2: req.body.datesvaccinS2, 10 datesvaccinS3: req.body.datesvaccinS3, 11 datesvaccinS4: req.body.datesvaccinS4, 12 datesvaccinS5: req.body.datesvaccinS5, 13 datesvaccinS6: req.body.datesvaccinS6, 14 pneumocoquevaccS1: req.body.pneumocoquevaccS1,15 pneumocoquevaccS2: req.body.pneumocoquevaccS2,16 pneumocoquevaccS3: req.body.pneumocoquevaccS3,17 pneumocoquevaccS4: req.body.pneumocoquevaccS4,18 pneumocoquevaccS5: req.body.pneumocoquevaccS5,19 pneumocoquevaccS6: req.body.pneumocoquevaccS6,20 meningocoquevaccS1:req.body.meningocoquevaccS1,21 meningocoquevaccS2:req.body.meningocoquevaccS2,22 meningocoquevaccS3:req.body.meningocoquevaccS3,23 meningocoquevaccS4:req.body.meningocoquevaccS4,24 meningocoquevaccS5:req.body.meningocoquevaccS5,25 meningocoquevaccS6:req.body.meningocoquevaccS6,26 hoemophilusvacc:req.body.hoemophilusvacc,27 hoemophilusvaccS1:req.body.hoemophilusvaccS1,28 hoemophilusvaccS2:req.body.hoemophilusvaccS2,29 hoemophilusvaccS3:req.body.hoemophilusvaccS3,30 hoemophilusvaccS4:req.body.hoemophilusvaccS4,31 hoemophilusvaccS5:req.body.hoemophilusvaccS5,32 hoemophilusvaccS6:req.body.hoemophilusvaccS6,33 hepatiteS1:req.body.hepatiteS1,34 hepatiteS2:req.body.hepatiteS2,35 hepatiteS3:req.body.hepatiteS3,36 hepatiteS4:req.body.hepatiteS4,37 hepatiteS5:req.body.hepatiteS5,38 hepatiteS6:req.body.hepatiteS6,39 autresvaccS1:req.body.autresvaccS1,40 autresvaccS2:req.body.autresvaccS2,41 autresvaccS3:req.body.autresvaccS3,42 autresvaccS4:req.body.autresvaccS4,43 autresvaccS5:req.body.autresvaccS5,44 autresvaccS6:req.body.autresvaccS6,45 antibioprophytaxie:req.body.antibioprophytaxie,46 date1antibioptophy:req.body.date1antibioptophy,47 date2antibioptophy:req.body.date2antibioptophy,48 date3antibioptophy:req.body.date3antibioptophy,49 date4antibioptophy:req.body.date4antibioptophy,50 date5antibioptophy:req.body.date5antibioptophy,51 date6antibioptophy:req.body.date6antibioptophy,52 splnectomieDate:req.body.splnectomieDate,53 splnectomieChirugie:req.body.splnectomieChirugie,54 observations:req.body.observations55 });56 // Save prophylaxie in the database57 prophylaxie.save()58 .then(data => {59 res.send(data);60 }).catch(err => {61 res.status(500).send({62 message: err.message || "Some error occurred while creating the prophylaxie."63 });64 });65};66// Retrieve and return all prophylaxies from the database.67exports.findAll = (req, res) => {68 Prophylaxie.find()69 .then(prophylaxies => {70 res.send(prophylaxies);71 }).catch(err => {72 res.status(500).send({73 message: err.message || "Some error occurred while retrieving prophylaxies."74 });75 });76};77// Find a single prophylaxie with a noteId78exports.findOne = (req, res) => {79 Prophylaxie.findOne({patientId: req.params.patientId})80 .then(prophylaxie => {81 if(!prophylaxie) {82 return res.status(404).send({83 message: "prophylaxie not found with id " + req.params.patientId84 }); 85 }86 res.send(prophylaxie);87 }).catch(err => {88 if(err.kind === 'ObjectId') {89 return res.status(404).send({90 message: "prophylaxie not found with id " + req.params.patientId91 }); 92 }93 return res.status(500).send({94 message: "Error retrieving prophylaxie with id " + req.params.patientId95 });96 });97};98// Update a prophylaxie identified by the patientId in the request99exports.update = (req, res) => {100 // Validate Request101 if(!req.body.datesvaccinS1) {102 return res.status(400).send({103 message: "prophylaxie nom can not be empty"104 });105 }106 // Find prophylaxie and update it with the request body107 Prophylaxie.findByIdAndUpdate(req.params.patientId, {108 datesvaccinS1:req.body.datesvaccinS1,109 datesvaccinS2: req.body.datesvaccinS2, 110 datesvaccinS3: req.body.datesvaccinS3, 111 datesvaccinS4: req.body.datesvaccinS4, 112 datesvaccinS5: req.body.datesvaccinS5, 113 datesvaccinS6: req.body.datesvaccinS6, 114 pneumocoquevaccS1: req.body.pneumocoquevaccS1,115 pneumocoquevaccS2: req.body.pneumocoquevaccS2,116 pneumocoquevaccS3: req.body.pneumocoquevaccS3,117 pneumocoquevaccS4: req.body.pneumocoquevaccS4,118 pneumocoquevaccS5: req.body.pneumocoquevaccS5,119 pneumocoquevaccS6: req.body.pneumocoquevaccS6,120 meningocoquevaccS1:req.body.meningocoquevaccS1,121 meningocoquevaccS2:req.body.meningocoquevaccS2,122 meningocoquevaccS3:req.body.meningocoquevaccS3,123 meningocoquevaccS4:req.body.meningocoquevaccS4,124 meningocoquevaccS5:req.body.meningocoquevaccS5,125 meningocoquevaccS6:req.body.meningocoquevaccS6,126 hoemophilusvacc:req.body.hoemophilusvacc,127 hoemophilusvaccS1:req.body.hoemophilusvaccS1,128 hoemophilusvaccS2:req.body.hoemophilusvaccS2,129 hoemophilusvaccS3:req.body.hoemophilusvaccS3,130 hoemophilusvaccS4:req.body.hoemophilusvaccS4,131 hoemophilusvaccS5:req.body.hoemophilusvaccS5,132 hoemophilusvaccS6:req.body.hoemophilusvaccS6,133 hepatiteS1:req.body.hepatiteS1,134 hepatiteS2:req.body.hepatiteS2,135 hepatiteS3:req.body.hepatiteS3,136 hepatiteS4:req.body.hepatiteS4,137 hepatiteS5:req.body.hepatiteS5,138 hepatiteS6:req.body.hepatiteS6,139 autresvaccS1:req.body.autresvaccS1,140 autresvaccS2:req.body.autresvaccS2,141 autresvaccS3:req.body.autresvaccS3,142 autresvaccS4:req.body.autresvaccS4,143 autresvaccS5:req.body.autresvaccS5,144 autresvaccS6:req.body.autresvaccS6,145 antibioprophytaxie:req.body.antibioprophytaxie,146 date1antibioptophy:req.body.date1antibioptophy,147 date2antibioptophy:req.body.date2antibioptophy,148 date3antibioptophy:req.body.date3antibioptophy,149 date4antibioptophy:req.body.date4antibioptophy,150 date5antibioptophy:req.body.date5antibioptophy,151 date6antibioptophy:req.body.date6antibioptophy,152 splnectomieDate:req.body.splnectomieDate,153 splnectomieChirugie:req.body.splnectomieChirugie,154 observations:req.body.observations155 }, {new: true})156 .then(prophylaxie => {157 if(!prophylaxie) {158 return res.status(404).send({159 message: "prophylaxie not found with id " + req.params.patientId160 });161 }162 res.send(prophylaxie);163 }).catch(err => {164 if(err.kind === 'ObjectId') {165 return res.status(404).send({166 message: "prophylaxie not found with id " + req.params.patientId167 }); 168 }169 return res.status(500).send({170 message: "Error updating prophylaxie with id " + req.params.patientId171 });172 });173};174// Delete a prophylaxie with the specified patientId in the request175exports.delete = (req, res) => {176 Prophylaxie.findByIdAndRemove(req.params.patientId)177 .then(prophylaxie => {178 if(!prophylaxie) {179 return res.status(404).send({180 message: "prophylaxie not found with id " + req.params.patientId181 });182 }183 res.send({message: "prophylaxie deleted successfully!"});184 }).catch(err => {185 if(err.kind === 'ObjectId' || err.name === 'NotFound') {186 return res.status(404).send({187 message: "prophylaxie not found with id " + req.params.patientId188 }); 189 }190 return res.status(500).send({191 message: "Could not delete prophylaxie with id " + req.params.patientId192 });193 });...

Full Screen

Full Screen

server.js

Source:server.js Github

copy

Full Screen

1import * as essentials from "./essentials.js"2import * as constants from "./constants.js"3const DEBUG = true;//process.cwd().includes("test");4const PORT_HTTPS = DEBUG? 3002 : 443;5const PORT_HTTP = DEBUG? 3000 : 80;6const API_PATH = "";7var httpServer, httpsServer;8console.log("Launching in debug setting: " + DEBUG);9var db = new (require('./minidb.js'))(constants.DB_PATH);10db.open();11httpsServer = https.createServer(httpsOptions, app);12httpsServer.listen(PORT_HTTPS, function(err) {13 if (err) return;14 console.log('HTTPS started, Server\'s UID is now ' + process.getuid());15});16if (DEBUG) {17 httpServer = http.createServer(app);18 httpServer.listen(PORT_HTTP, function(err) {19 if (err) return;20 console.log('HTTP started, Server\'s UID is now ' + process.getuid());21 });22} else {23 http.createServer(function (req, res) {24 res.writeHead(301, { "Location": "https://" + req.headers['host'] + req.url });25 26 }).listen(PORT_HTTP, function(err) {27 if (err) return;28 console.log('HTTP->HTTPS started, Server\'s UID is now ' + process.getuid());29 });30}31/*app.use(bodyParser.json({32 verify: function(req, res, buf, encoding) {33 // sha1 content34 var hash = crypto.createHash('sha1');35 hash.update(buf);36 req.hasha = hash.digest('hex');37 console.log("hash", req.hasha);38 // get rawBody 39 req.rawBody = buf.toString();40 console.log("rawBody", req.rawBody);41 }42}));*/43app.use(44 bodyParser.urlencoded({45 extended: true46 })47)48app.use('/', express.static(__dirname + '/public'));49function end_request(req, res, value) {50 if (typeof value === "string") res.write(value);51 else if (typeof value === "number") res.sendStatus(value);52 res.end();53 console.log(req.connection.remoteAddress + ": " + req.originalUrl.split("?")[0] + " ended with \"" + value + "\"");54}55app.get(API_PATH+'/create-license', function(req, res) {56 let req_ip = req.connection.remoteAddress;57 let req_code = req.query.code;58 let req_auth = req.query.auth;59 if (typeof req_code !== 'string' || !(/^[a-zA-Z0-9]+$/.test(req_code)) || req_code.length != constants.LENGTH_CODE || typeof req_auth !== 'string' || !(/^[a-zA-Z0-9]+$/.test(req_auth))) {60 end_request(req, res, constants.RES_BAD_SYNTAX);61 return;62 } else if (!valid_password(req)) {63 end_request(req, res, constants.RES_FORBIDDEN);64 return;65 }66 if (db.get(req_code)) {67 end_request(req, res, constants.RES_ALREADY_EXISTS);68 return;69 }70 db.set(req_code, {'users': {}, 'max_count': 1000});71 end_request(req, res, 201);72 73});74app.get(API_PATH+'/revoke-license', function(req, res) {75 let req_ip = req.connection.remoteAddress;76 let req_code = req.query.code;77 let req_auth = req.query.auth;78 if (typeof req_code !== 'string' || !(/^[a-zA-Z0-9]+$/.test(req_code)) || req_code.length != constants.LENGTH_CODE || typeof req_auth !== 'string' || !(/^[a-zA-Z0-9]+$/.test(req_auth))) {79 end_request(req, res, constants.RES_BAD_SYNTAX);80 return;81 } else if (!valid_password(req)) {82 end_request(req, res, constants.RES_FORBIDDEN);83 return;84 }85 if (!db.get(req_code)) {86 end_request(req, res, constants.RES_NOT_FOUND);87 return;88 }89 db.remove(req_code);90 end_request(req, res, 200);91 92});93function get_license(req, res) {94 console.log("Called get-license");95 let req_ip = req.connection.remoteAddress;96 let req_code = req.query.code;97 let req_imei = req.query.imei;98 let req_time = Date.now(); //unix time99 // additions for compatibility with legacy100 if (req.originalUrl.split("/").length == 4) {101 req_code = req.originalUrl.split("/")[2];102 req_imei = req.body.activation.device_uid;103 }104 if (typeof req_code !== 'string' || !(/^[a-zA-Z0-9]+$/.test(req_code)) || req_code.length != constants.LENGTH_CODE || typeof req_imei !== 'string' || !(/^[a-zA-Z0-9]+$/.test(req_imei))) {105 end_request(req, res, constants.RES_BAD_SYNTAX);106 return;107 }108 if (!db.get(req_code)) {109 end_request(req, res, constants.RES_FORBIDDEN);110 return;111 }112 let users = db.get(req_code+".users");113 let user = users[req_imei];114 if (!user) {115 if (Object.keys(users).length >= db.get(req_code+".max_count")) {116 end_request(req, res, constants.RES_TOO_MANY);117 return;118 }119 user = {last_login: 0, last_ip: ""};120 }121 user.last_login = req_time;122 user.last_ip = req_ip;123 end_request(req, res, generate_login_response(req_code, req_imei));124 db.set(req_code+".users."+req_imei, user);125}126app.get(API_PATH+'/get-license', function(req, res) {127 get_license(req, res);128});129app.post("/customers/*", function(req, res) {130 get_license(req, res);131});132app.put("/customers/*", function(req, res) {133 get_license(req, res);134});135app.get("*", function(req, res){136 end_request(req, res, constants.RES_NOT_FOUND);137});138process.on("uncaughtException", function (err) {139 console.log("Caught a fatal error:");140 console.log(err);141 console.log("Dumping memory...");142 heapdump.writeSnapshot(constants.LOGS_PATH+"/heap_"+Date.now()+".dump");143 db.close();...

Full Screen

Full Screen

rotas.js

Source:rotas.js Github

copy

Full Screen

1function executaracao(url,req, res){ 2 var sformulario = url.replace('/','') 3 if (req.method == 'POST') {4 console.log(req.body) 5 res.json(url)6 } else if (req.method == 'GET') { 7 res.render(sformulario); 8 }9} 10function roteamento(app) {11app12.get('/articles', (req, res) => { 13 executaracao(req.url,req,res) 14 })15 .post('/articles', (req, res) => { 16 executaracao(req.url,req,res) 17 })18 .delete('/articles', (req, res) => { 19 executaracao(req.url,req,res) 20 })21 .put('/articles', (req, res) => { 22 executaracao(req.url,req,res) 23 }).get('/categories', (req, res) => { 24 executaracao(req.url,req,res) 25 })26 .post('/categories', (req, res) => { 27 executaracao(req.url,req,res) 28 })29 .delete('/categories', (req, res) => { 30 executaracao(req.url,req,res) 31 })32 .put('/categories', (req, res) => { 33 executaracao(req.url,req,res) 34 }).get('/configuracaos', (req, res) => { 35 executaracao(req.url,req,res) 36 })37 .post('/configuracaos', (req, res) => { 38 executaracao(req.url,req,res) 39 })40 .delete('/configuracaos', (req, res) => { 41 executaracao(req.url,req,res) 42 })43 .put('/configuracaos', (req, res) => { 44 executaracao(req.url,req,res) 45 }).get('/moedas', (req, res) => { 46 executaracao(req.url,req,res) 47 })48 .post('/moedas', (req, res) => { 49 executaracao(req.url,req,res) 50 })51 .delete('/moedas', (req, res) => { 52 executaracao(req.url,req,res) 53 })54 .put('/moedas', (req, res) => { 55 executaracao(req.url,req,res) 56 }).get('/new_table', (req, res) => { 57 executaracao(req.url,req,res) 58 })59 .post('/new_table', (req, res) => { 60 executaracao(req.url,req,res) 61 })62 .delete('/new_table', (req, res) => { 63 executaracao(req.url,req,res) 64 })65 .put('/new_table', (req, res) => { 66 executaracao(req.url,req,res) 67 }).get('/users', (req, res) => { 68 executaracao(req.url,req,res) 69 })70 .post('/users', (req, res) => { 71 executaracao(req.url,req,res) 72 })73 .delete('/users', (req, res) => { 74 executaracao(req.url,req,res) 75 })76 .put('/users', (req, res) => { 77 executaracao(req.url,req,res) 78 })} ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { req } = require('storybook-root');2const res = {};3req({}, res);4const { res } = require('storybook-root');5const req = {};6res(req, {});7const { req, res } = require('storybook-root');8req({}, {});9res({}, {});

Full Screen

Using AI Code Generation

copy

Full Screen

1const story = await storybookRoot.getStory('storyId');2const req = story.request;3const story = await storybookRoot.getStory('storyId');4const req = story.request;5const story = await storybookRoot.getStory('storyId');6const req = story.request;7const story = await storybookRoot.getStory('storyId');8const req = story.request;9const story = await storybookRoot.getStory('storyId');10const req = story.request;11const story = await storybookRoot.getStory('storyId');12const req = story.request;13const story = await storybookRoot.getStory('storyId');14const req = story.request;15const story = await storybookRoot.getStory('storyId');16const req = story.request;17const story = await storybookRoot.getStory('storyId');18const req = story.request;19const story = await storybookRoot.getStory('storyId');20const req = story.request;21const story = await storybookRoot.getStory('storyId');22const req = story.request;23const story = await storybookRoot.getStory('storyId');24const req = story.request;

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run storybook-root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful