Commit 6292c829 authored by hewenhao's avatar hewenhao

feat: 优化

parent 55eb6768
{ {
"name": "learn-math-weapp", "name": "learn-math-weapp",
"version": "1.1.3", "version": "1.1.4",
"private": true, "private": true,
"description": "", "description": "",
"scripts": { "scripts": {
......
...@@ -70,7 +70,7 @@ const guideModel: GuideModel = { ...@@ -70,7 +70,7 @@ const guideModel: GuideModel = {
pkGuideStep: 0, pkGuideStep: 0,
activePkGuideFromHis: false, activePkGuideFromHis: false,
showPkGuideFromHis: false, showPkGuideFromHis: false,
pkGuideTimes: getStorage(StorageKeys.pkGuideTimes), pkGuideTimes: getStorage(StorageKeys.pkGuideTimes) ?? 0,
isAddDeskTopGuideComplete: getStorage(StorageKeys.isAddDeskTopGuideComplete), isAddDeskTopGuideComplete: getStorage(StorageKeys.isAddDeskTopGuideComplete),
isStoreGuideComplete: getStorage(StorageKeys.isStoreGuideComplete), isStoreGuideComplete: getStorage(StorageKeys.isStoreGuideComplete),
...@@ -84,19 +84,18 @@ const guideModel: GuideModel = { ...@@ -84,19 +84,18 @@ const guideModel: GuideModel = {
}), }),
addPkGuideTimes: action((state) => { addPkGuideTimes: action((state) => {
let next let nextVal = 1
if (state.pkGuideTimes) { if (state.pkGuideTimes) {
/** 只显示3次pk历史pk引导 */ /** 只显示3次pk历史pk引导 */
if (state.pkGuideTimes >= 8) { if (state.pkGuideTimes >= 8) {
return return
} }
next = (+state.pkGuideTimes) + 1 nextVal = (+state.pkGuideTimes) + 1
} else {
next = 1
} }
state.pkGuideTimes = next
state.pkGuideTimes = nextVal
state.showPkGuideFromHis = true state.showPkGuideFromHis = true
updateStorage(StorageKeys.pkGuideTimes, next) updateStorage(StorageKeys.pkGuideTimes, nextVal)
}), }),
updatePkGuideActive: action((state, payload) => { updatePkGuideActive: action((state, payload) => {
......
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