Commit 4efdb1b9 authored by haiyoucuv's avatar haiyoucuv

新手引导

parent ee98036d
registry = http://npm.dui88.com
\ No newline at end of file
...@@ -37,6 +37,7 @@ export default [ ...@@ -37,6 +37,7 @@ export default [
"data": AESEncrypt(JSON.stringify({ "data": AESEncrypt(JSON.stringify({
recordId: "recordId", recordId: "recordId",
countdownSeconds: 120, countdownSeconds: 120,
minValidateScore: 100,
guide: true, guide: true,
}), "3C8C48E792E9241B", "cDOiBC1n2QrkAY2P"), }), "3C8C48E792E9241B", "cDOiBC1n2QrkAY2P"),
} }
......
This diff is collapsed.
...@@ -11,6 +11,7 @@ import SucPanel from "@/panels/SucPanel/SucPanel.tsx"; ...@@ -11,6 +11,7 @@ import SucPanel from "@/panels/SucPanel/SucPanel.tsx";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl.tsx"; import { ModalCtrl } from "@/core/ctrls/ModalCtrl.tsx";
import GamePage from "@/pages/GamePage/GamePage.tsx"; import GamePage from "@/pages/GamePage/GamePage.tsx";
import GuidePage from "@/pages/GuidePage/GuidePage.tsx"; import GuidePage from "@/pages/GuidePage/GuidePage.tsx";
import { startNecCaptcha } from '@spark/utils'
class GameStore { class GameStore {
...@@ -22,6 +23,7 @@ class GameStore { ...@@ -22,6 +23,7 @@ class GameStore {
startInfo: { startInfo: {
recordId?: number | string recordId?: number | string
countdownSeconds?: number countdownSeconds?: number
minValidateScore?: number
} = {} } = {}
async start() { async start() {
...@@ -100,7 +102,7 @@ class GameStore { ...@@ -100,7 +102,7 @@ class GameStore {
} }
async submit() { async submit() {
const { recordId } = this.startInfo; const { recordId, minValidateScore } = this.startInfo;
const { score } = this.gameInfo; const { score } = this.gameInfo;
const param = AESEncrypt(JSON.stringify({ const param = AESEncrypt(JSON.stringify({
timestamp: Date.now(), timestamp: Date.now(),
...@@ -108,7 +110,17 @@ class GameStore { ...@@ -108,7 +110,17 @@ class GameStore {
score, score,
}), "3C8C48E792E9241B", "cDOiBC1n2QrkAY2P"); }), "3C8C48E792E9241B", "cDOiBC1n2QrkAY2P");
const { success, data } = await API.submit({ param });
const params = {
param,
validate: '',
}
if (score >= minValidateScore) {
params.validate = await startNecCaptcha("1ee4615751874cbeaea4dd4681930f61", 3);
}
const { success, data } = await API.submit(params);
if (!success) { if (!success) {
PageCtrl.changePage(HomePage); PageCtrl.changePage(HomePage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment