Commit 6292c829 authored by hewenhao's avatar hewenhao

feat: 优化

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