|
[多端开发]
Android 编译后页面第二次打开变空白,是哪里出错了?
[复制链接]
本帖最后由 13466609197 于 2021-7-12 17:45 编辑
上周编译的程序程序没问题。今天编译后,有几个页面,第一次进程序可以显示,点别的页面,再回来,就显示空白了,就是只显示<template>中保存的内容,data和methods中的计算都不显示,调用的图片也不显示。
用自定义loader没有问题,就是编译后。
android版编译后这样,ios还没发现。
帮忙看看底部图标选择页面的代码没有问题吧?一个多月前用这个,一直没问题,就今早编译后就出问题了:
switchMainFrames(index){
this.data.currentIndex = index;
const framesMap = {
1: 'explore',
2: 'message',
3: 'me'
}
switch (index) {
case 0:
Object.values(framesMap).forEach(name => {
api.setFrameAttr({ name, hidden: true })
})
break;
case 1: //随访列表
api.openFrame({
name: 'explore',
url:'../../pages/explore/explore.stml',
rect: {
marginBottom: api.safeArea.bottom + 51,
}
});
break;
case 2: //患者动态
api.openFrame({
name: 'message',
url:'../../pages/message/message.stml',
rect: {
marginBottom: api.safeArea.bottom + 51,
}
});
break;
case 3:
api.openFrame({
name: 'me',
url:'../../pages/me/me.stml',
rect: {
marginBottom: api.safeArea.bottom + 51,
}
});
break;
default:
}
},
|
|