You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import{aC as e,af as s,s as t,aB as i}from"./index-IX2tYR8R.js";import{c as n}from"./car.C_k88K1b.js";let r=n();const o=e("wrong",{state:()=>({wrongList:[],frequency:s("frequency")?s("frequency"):0}),actions:{setFrequency(e){t("frequency",e),this.frequency=e},setList(e){let s={num:0,id:e},t=this.wrongList.findIndex((s=>s.id==e));-1!=t&&this.wrongList.splice(t,1),this.wrongList.push(s)},lookList(e){let s=this.wrongList.findIndex((s=>s.id==e));if(-1!=s){let t=this.wrongList[s];console.log("找到之前的错题了"),t.num=t.num+1,this.frequency&&t.num>=this.frequency&&(this.deleteWrongOrColFn(e),this.wrongList.splice(s,1))}},async deleteWrongOrColFn(e){let s=this.wrongList.findIndex((s=>s.id==e));-1!=s&&this.wrongList.splice(s,1);let t={carType:r.carInfo.carType,questionId:e,stepType:r.carInfo.stepType,type:1};await i(t)}}});export{o as q};
|