代码调整
This commit is contained in:
parent
2156ac1880
commit
838b43e54d
@ -193,9 +193,9 @@ class Handler {
|
||||
stepOrder = JSON.parse(stepOrder);
|
||||
let operateOrder = getLocalStorage('operateOrder') || `1`;
|
||||
operateOrder = JSON.parse(operateOrder);
|
||||
const step = stepList[stepOrder - 1];
|
||||
// const index = stepOrder - 1 >= 0 ? stepOrder - 1 : 0;
|
||||
// const step = stepList[index];
|
||||
// const step = stepList[stepOrder - 1];
|
||||
const index = stepOrder - 1 >= 0 ? stepOrder - 1 : 0;
|
||||
const step = stepList[index];
|
||||
const stepOperation = step.operations[operateOrder];
|
||||
return stepOperation;
|
||||
} catch (e) {
|
||||
|
@ -129,7 +129,8 @@ const training = {
|
||||
},
|
||||
handleCheckNewTrainingResult:({commit, state}, valid) => {
|
||||
const stepList = JSON.parse(state.trainingDetail.stepJson);
|
||||
const step = stepList[state.stepOrder - 1];
|
||||
const index = state.stepOrder > 0 ? state.stepOrder - 1 : 0;
|
||||
const step = stepList[index];
|
||||
if (valid && step.operations.length === (state.operateOrder + 1 )) {
|
||||
commit('stepOverCountChange');
|
||||
} else if (valid) {
|
||||
|
Loading…
Reference in New Issue
Block a user