|
本帖最后由 ColdKiller 于 2022-6-13 10:23 编辑
小程序启动页为pages/login/login.stml文件,在登录页面在跳转首页(用api.openTabLayout()打开)的时候报错,跳转方法如下goIndex()代码所示,报错请看下方截图,麻烦大家帮忙看下啥问题,该如何解决,谢谢啦~~
- //跳转系统主页
- goIndex() {
- var param = {
- "name": "root",
- "tabBar": {
- "scrollEnabled": false,
- "background": "#fff",
- "color": "#999999",
- "selectedColor": "#FF7037",
- "frames": [{
- "name": "page1",
- "url": "../main/main.stml",
- "title": "首页"
- }, {
- "name": "page2",
- "url": "../user/user.stml",
- "title": "我的"
- }],
- "list": [{
- "iconPath": "../images/toolbar/home_no_selected.png",
- "selectedIconPath": "../images/toolbar/home_selected.png",
- "text": "首页"
- }, {
- "iconPath": "../images/toolbar/user_no_selected.png",
- "selectedIconPath": "../images/toolbar/user_selected.png",
- "text": "我的"
- }]
- }
- };
- api.openTabLayout(param);
- },
复制代码
|
-
控制台报错
-
指定启动页
|