1 line
8.7 KiB
JSON
1 line
8.7 KiB
JSON
{"ast":null,"code":"// 处理文件数据\n// let loadList = []\n// const modulesFiles = require.context(\"./\", true, /\\.mp3$/)\n// modulesFiles.keys().forEach((v) => {\n// const path = v.replace(/^\\.\\/(.*)/, \"$1\")\n// const name = path.replace(/\\.\\w+$/, \"\").replaceAll(/\\//gi, \"_\")\n// loadList = [...loadList, { [name]: path }]\n// })\nimport store from \"@/store\";\nconst sound = [\"cn/0_point.mp3\", \"cn/1_point.mp3\", \"cn/2_point.mp3\", \"cn/3_point.mp3\", \"cn/4_point.mp3\", \"cn/5_point.mp3\", \"cn/6_point.mp3\", \"cn/7_point.mp3\", \"cn/8_point.mp3\", \"cn/9_point.mp3\", \"cn/10_point.mp3\", \"cn/11_point.mp3\", \"cn/12_point.mp3\", \"cn/13_point.mp3\", \"cn/14_point.mp3\", \"cn/15_point.mp3\", \"cn/16_point.mp3\", \"cn/17_point.mp3\", \"cn/18_point.mp3\", \"cn/19_point.mp3\", \"cn/20_point.mp3\", \"cn/21_point.mp3\", \"cn/22_point.mp3\", \"cn/23_point.mp3\", \"cn/24_point.mp3\", \"cn/25_point.mp3\", \"cn/26_point.mp3\", \"cn/27_point.mp3\", \"cn/28_point.mp3\", \"cn/29_point.mp3\", \"cn/30_point.mp3\", \"cn/31_point.mp3\", \"cn/32_point.mp3\", \"cn/33_point.mp3\", \"cn/34_point.mp3\", \"cn/35_point.mp3\", \"cn/36_point.mp3\", \"cn/start_betting.mp3\", \"cn/stop_betting.mp3\", \"cn/check.mp3\", \"cn/time.mp3\", \"cn/alert.wav\", \"cn/push.mp3\", \"cn/show_card.mp3\", \"cn/last_10_seconds.mp3\", \"cn/baccarat/b_draw.mp3\", \"cn/baccarat/b_pair.mp3\", \"cn/baccarat/b_win.mp3\", \"cn/baccarat/banker.mp3\", \"cn/baccarat/p_draw.mp3\", \"cn/baccarat/p_pair.mp3\", \"cn/baccarat/p_win.mp3\", \"cn/baccarat/player.mp3\", \"cn/baccarat/tie.mp3\", \"cn/baccarat/w_p1.mp3\", \"cn/baccarat/w_p2.mp3\", \"cn/baccarat/w_p3.mp3\", \"cn/baccarat/w_p5.mp3\", \"cn/baccarat/w_p6.mp3\", \"cn/baccarat/w_p7.mp3\", \"cn/lh/dragon.mp3\", \"cn/lh/dragon_win.mp3\", \"cn/lh/tie.mp3\", \"cn/lh/tiger.mp3\", \"cn/lh/tiger_win.mp3\", \"cn/lh/w_p1.mp3\", \"cn/lh/w_p2.mp3\", \"cn/lh/w_p3.mp3\", \"cn/lh/w_p5.mp3\", \"cn/lh/w_p6.mp3\", \"cn/lh/w_p7.mp3\", \"cn/nn/banker.mp3\", \"cn/nn/bull_1.mp3\", \"cn/nn/bull_2.mp3\", \"cn/nn/bull_3.mp3\", \"cn/nn/bull_4.mp3\", \"cn/nn/bull_5.mp3\", \"cn/nn/bull_6.mp3\", \"cn/nn/bull_7.mp3\", \"cn/nn/bull_8.mp3\", \"cn/nn/bull_9.mp3\", \"cn/nn/bull_bull.mp3\", \"cn/nn/five_pictur_bull.mp3\", \"cn/nn/no_bull.mp3\", \"cn/nn/player_1.mp3\", \"cn/nn/player_2.mp3\", \"cn/nn/player_3.mp3\", \"cn/nn/w_p1.mp3\", \"cn/nn/w_p2.mp3\", \"cn/nn/w_p3.mp3\", \"cn/nn/w_p5.mp3\", \"cn/nn/w_p6.mp3\", \"cn/nn/w_p7.mp3\", \"cn/tc/any_triple.mp3\", \"cn/tc/banker.mp3\", \"cn/tc/banker_stop.mp3\", \"cn/tc/bull_1.mp3\", \"cn/tc/bull_2.mp3\", \"cn/tc/bull_3.mp3\", \"cn/tc/bull_4.mp3\", \"cn/tc/bull_5.mp3\", \"cn/tc/bull_6.mp3\", \"cn/tc/bull_7.mp3\", \"cn/tc/bull_8.mp3\", \"cn/tc/bull_9.mp3\", \"cn/tc/bull_bull.mp3\", \"cn/tc/player_1.mp3\", \"cn/tc/player_2.mp3\", \"cn/tc/player_3.mp3\", \"cn/tc/royal_flush.mp3\", \"cn/tc/start_banker.mp3\", \"cn/tc/straight_flush.mp3\", \"cn/tc/banker_success.mp3\", \"cn/tc/w_p1.mp3\", \"cn/tc/w_p2.mp3\", \"cn/tc/w_p3.mp3\", \"cn/tc/w_p5.mp3\", \"cn/tc/w_p6.mp3\", \"cn/tc/w_p7.mp3\", \"cn/toning/1_w_3_r.mp3\", \"cn/toning/2_w_2_r.mp3\", \"cn/toning/3_w_1_r.mp3\", \"cn/toning/4_red.mp3\", \"cn/toning/4_white.mp3\", \"cn/toning/big.mp3\", \"cn/toning/even.mp3\", \"cn/toning/odd.mp3\", \"cn/toning/small.mp3\", \"cn/toning/w_p1.mp3\", \"cn/toning/w_p2.mp3\", \"cn/toning/w_p3.mp3\", \"cn/toning/w_p5.mp3\", \"cn/toning/w_p6.mp3\", \"cn/toning/w_p7.mp3\", \"cn/dice/any_triple.mp3\", \"cn/dice/num_1.mp3\", \"cn/dice/num_2.mp3\", \"cn/dice/num_3.mp3\", \"cn/dice/num_4.mp3\", \"cn/dice/num_5.mp3\", \"cn/dice/num_6.mp3\", \"cn/dice/big.mp3\", \"cn/dice/even.mp3\", \"cn/dice/odd.mp3\", \"cn/dice/small.mp3\", \"cn/dice/w_p1.mp3\", \"cn/dice/w_p2.mp3\", \"cn/dice/w_p3.mp3\", \"cn/dice/w_p5.mp3\", \"cn/dice/w_p6.mp3\", \"cn/dice/w_p7.mp3\", \"cn/lp/black.mp3\", \"cn/lp/high.mp3\", \"cn/lp/low.mp3\", \"cn/lp/red.mp3\", \"cn/lp/w_p1.mp3\", \"cn/lp/w_p2.mp3\", \"cn/lp/w_p3.mp3\", \"cn/lp/w_p5.mp3\", \"cn/lp/w_p6.mp3\", \"cn/lp/w_p7.mp3\", \"en/0_point.mp3\", \"en/1_point.mp3\", \"en/2_point.mp3\", \"en/3_point.mp3\", \"en/4_point.mp3\", \"en/5_point.mp3\", \"en/6_point.mp3\", \"en/7_point.mp3\", \"en/8_point.mp3\", \"en/9_point.mp3\", \"en/10_point.mp3\", \"en/11_point.mp3\", \"en/12_point.mp3\", \"en/13_point.mp3\", \"en/14_point.mp3\", \"en/15_point.mp3\", \"en/16_point.mp3\", \"en/17_point.mp3\", \"en/18_point.mp3\", \"en/19_point.mp3\", \"en/20_point.mp3\", \"en/21_point.mp3\", \"en/22_point.mp3\", \"en/23_point.mp3\", \"en/24_point.mp3\", \"en/25_point.mp3\", \"en/26_point.mp3\", \"en/27_point.mp3\", \"en/28_point.mp3\", \"en/29_point.mp3\", \"en/30_point.mp3\", \"en/31_point.mp3\", \"en/32_point.mp3\", \"en/33_point.mp3\", \"en/34_point.mp3\", \"en/35_point.mp3\", \"en/36_point.mp3\", \"en/start_betting.mp3\", \"en/stop_betting.mp3\", \"en/check.mp3\", \"en/time.mp3\", \"en/alert.wav\", \"en/push.mp3\", \"en/show_card.mp3\", \"en/last_10_seconds.mp3\", \"en/baccarat/b_draw.mp3\", \"en/baccarat/b_pair.mp3\", \"en/baccarat/b_win.mp3\", \"en/baccarat/banker.mp3\", \"en/baccarat/p_draw.mp3\", \"en/baccarat/p_pair.mp3\", \"en/baccarat/p_win.mp3\", \"en/baccarat/player.mp3\", \"en/baccarat/tie.mp3\", \"en/baccarat/w_p1.mp3\", \"en/baccarat/w_p2.mp3\", \"en/baccarat/w_p3.mp3\", \"en/baccarat/w_p5.mp3\", \"en/baccarat/w_p6.mp3\", \"en/baccarat/w_p7.mp3\", \"en/lh/dragon.mp3\", \"en/lh/dragon_win.mp3\", \"en/lh/tie.mp3\", \"en/lh/tiger.mp3\", \"en/lh/tiger_win.mp3\", \"en/lh/w_p1.mp3\", \"en/lh/w_p2.mp3\", \"en/lh/w_p3.mp3\", \"en/lh/w_p5.mp3\", \"en/lh/w_p6.mp3\", \"en/lh/w_p7.mp3\", \"en/nn/banker.mp3\", \"en/nn/bull_1.mp3\", \"en/nn/bull_2.mp3\", \"en/nn/bull_3.mp3\", \"en/nn/bull_4.mp3\", \"en/nn/bull_5.mp3\", \"en/nn/bull_6.mp3\", \"en/nn/bull_7.mp3\", \"en/nn/bull_8.mp3\", \"en/nn/bull_9.mp3\", \"en/nn/bull_bull.mp3\", \"en/nn/five_pictur_bull.mp3\", \"en/nn/no_bull.mp3\", \"en/nn/player_1.mp3\", \"en/nn/player_2.mp3\", \"en/nn/player_3.mp3\", \"en/nn/w_p1.mp3\", \"en/nn/w_p2.mp3\", \"en/nn/w_p3.mp3\", \"en/nn/w_p5.mp3\", \"en/nn/w_p6.mp3\", \"en/nn/w_p7.mp3\", \"en/tc/any_triple.mp3\", \"en/tc/banker.mp3\", \"en/tc/banker_stop.mp3\", \"en/tc/bull_1.mp3\", \"en/tc/bull_2.mp3\", \"en/tc/bull_3.mp3\", \"en/tc/bull_4.mp3\", \"en/tc/bull_5.mp3\", \"en/tc/bull_6.mp3\", \"en/tc/bull_7.mp3\", \"en/tc/bull_8.mp3\", \"en/tc/bull_9.mp3\", \"en/tc/bull_bull.mp3\", \"en/tc/player_1.mp3\", \"en/tc/player_2.mp3\", \"en/tc/player_3.mp3\", \"en/tc/royal_flush.mp3\", \"en/tc/start_banker.mp3\", \"en/tc/straight_flush.mp3\", \"en/tc/banker_success.mp3\", \"en/tc/w_p1.mp3\", \"en/tc/w_p2.mp3\", \"en/tc/w_p3.mp3\", \"en/tc/w_p5.mp3\", \"en/tc/w_p6.mp3\", \"en/tc/w_p7.mp3\", \"en/toning/1_w_3_r.mp3\", \"en/toning/2_w_2_r.mp3\", \"en/toning/3_w_1_r.mp3\", \"en/toning/4_red.mp3\", \"en/toning/4_white.mp3\", \"en/toning/big.mp3\", \"en/toning/even.mp3\", \"en/toning/odd.mp3\", \"en/toning/small.mp3\", \"en/toning/w_p1.mp3\", \"en/toning/w_p2.mp3\", \"en/toning/w_p3.mp3\", \"en/toning/w_p5.mp3\", \"en/toning/w_p6.mp3\", \"en/toning/w_p7.mp3\", \"en/dice/any_triple.mp3\", \"en/dice/num_1.mp3\", \"en/dice/num_2.mp3\", \"en/dice/num_3.mp3\", \"en/dice/num_4.mp3\", \"en/dice/num_5.mp3\", \"en/dice/num_6.mp3\", \"en/dice/big.mp3\", \"en/dice/even.mp3\", \"en/dice/odd.mp3\", \"en/dice/small.mp3\", \"en/dice/w_p1.mp3\", \"en/dice/w_p2.mp3\", \"en/dice/w_p3.mp3\", \"en/dice/w_p5.mp3\", \"en/dice/w_p6.mp3\", \"en/dice/w_p7.mp3\", \"en/lp/black.mp3\", \"en/lp/high.mp3\", \"en/lp/low.mp3\", \"en/lp/red.mp3\", \"en/lp/w_p1.mp3\", \"en/lp/w_p2.mp3\", \"en/lp/w_p3.mp3\", \"en/lp/w_p5.mp3\", \"en/lp/w_p6.mp3\", \"en/lp/w_p7.mp3\"];\n// const dev = \"./static/sound\"\n// const proxy = \"/v8api/sound\"\n// const pro = \"https://static.v8api.net\"\nlet times = null;\nconst promiseSoundUrl = () => {\n const soundUrl = store.state.config.soundUrl;\n if (soundUrl) {\n clearTimeout(times);\n init(soundUrl);\n } else {\n times = setTimeout(() => {\n promiseSoundUrl();\n }, 1000);\n }\n};\npromiseSoundUrl();\nfunction init(soundUrl) {\n Promise.all(sound.map(url => fetch(`${soundUrl}/${url}`).then(async response => {\n const name = url.replace(/\\.\\w+$/, \"\").replaceAll(/\\//gi, \"_\");\n const path = await response.blob();\n // const path = response.url\n return {\n [name]: path\n };\n })\n // {\n // const name = url.replace(/\\.\\w+$/, \"\").replaceAll(/\\//gi, \"_\")\n // const path = `${soundUrl}/${url}`\n // return { [name]: path }\n // }\n )).then(blobs => {\n let list = {};\n blobs.forEach(v => {\n list = {\n ...list,\n ...v\n };\n });\n // console.log(list)\n store.commit(\"config/soundList\", list);\n }).catch(err => console.error(err));\n}","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]} |