Commit 87feed56 authored by waterword's avatar waterword

成功跳转

parent 6ceaf359
......@@ -130,9 +130,12 @@
touchedYesButton: function (node, topNode, x, y) {
globalThis.factoryTest.color = 1
router.push({
path: "factory_testList"
});
// router.push({
// path: "factory_testList"
// }
var yesJumpPage = require("yesJumpPage.js");
yesJumpPage.yesGoToNextPage(this);
//);
},
touchedNGButton: function (node, topNode, x, y) {
......
......@@ -23,7 +23,7 @@
var bglight = require("factory_bglight.js");
// var systemCtrl = require("systemCtrl.js");
var systemCtrl = require("systemCtrl.js");
var yesJumpPage = require("yesJumpPage.js");
// var _userdata = require("userdata.js");
// var userData = _userdata.userData;
export default {
......@@ -162,6 +162,7 @@
globalThis.factoryTest = obj;
}
this.initializeFactoryTestProperties();
yesJumpPage.initPage();
},
initializeFactoryTestProperties: function () {
......
var appItem = [];
function initPage(pageAppItem){
appItem = pageAppItem;
}
function yesGoToNextPage(that) {
// 获取当前页面索引
let currentIndex = that.index;
// 检查是否在列表范围内
if (currentIndex < appItem.length - 1) {
// 增加索引以获取下一个页面信息
currentIndex++;
let nextApp = appItem[currentIndex];
// 确保下一个测试项是启用状态
if (nextApp.en === 1) {
router.push({
path: nextApp.startup
});
} else {
console.log("Next test item is disabled.");
}
} else {
console.log("Already at the last test item.");
}
}
module.exports = {
yesGoToNextPage: yesGoToNextPage,
initPage: initPage,
}
\ No newline at end of file
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