diff --git a/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/default/pages/index/index.js index 177e8dc6f3322f96bab710b51e94bcc55eaf2514..2d999e3ce8ccf29afd8ffa7c8578fc66702f093e 100644 --- a/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/default/pages/index/index.js +++ b/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/default/pages/index/index.js @@ -20,7 +20,7 @@ import {Core, ExpectExtend} from 'deccjsunit/index' const injectRef = Object.getPrototypeOf(global) || global injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - +var once = true export default { data: { title: "" @@ -29,19 +29,22 @@ export default { this.title = this.$t('strings.world'); }, onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - core.init() + if (once) { + once = false + console.info('onShow finish') + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + core.addService('expect', expectExtend) + core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) + const configService = core.getDefaultService('config') + configService.setConfig(this) - require('../../../test/List.test') - core.execute() + require('../../../test/List.test') + core.execute() + } }, onReady() { },