相逢便是缘
相逢便是缘
  • 发布:2024-08-29 11:39
  • 更新:2024-08-29 11:42
  • 阅读:121

打包h5后,subPackages下的页面无法访问

分类:uni-app

打包后subPackages下的页面无法访问:

{
"easycom": {
"autoscan": true,
"custom": {
"^u-(.)": "uview-ui/components/u-$1/u-$1.vue",
"s-(.
)": "@/components/s-$1/s-$1.vue" // 匹配components目录内的vue文件
}
},

"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages  
    {  
        "path": "pages/login/login",  
        "style": {  
            "navigationStyle": "custom", // 隐藏系统导航栏  
            "navigationBarTitleText": "就业政策智能推送平台"  
        }  
    },  
    {  
        "path": "pages/index/index",  
        // "meta": {  
        //   "showTabbar": true  
        // },  
        "style": {  
            "enablePullDownRefresh": true,  
            "navigationStyle": "custom", // 隐藏系统导航栏  
            "navigationBarTitleText": "就业政策智能推送平台"  
        }  
    },  
    {  
        "path": "pages/policyMatching/index",  
        "style": {  
            "enablePullDownRefresh": true,  
            "navigationStyle": "custom", // 隐藏系统导航栏  
            "navigationBarTitleText": "政策匹配"  
        }  
    },  
    {  
        "path": "pages/policySearch/index",  
        "style": {  
            "enablePullDownRefresh": true,  
            "navigationStyle": "custom", // 隐藏系统导航栏  
            "navigationBarTitleText": "政策检索"  
        }  
    },  
    {  
        "path": "pages/analogCalculation/index",  
        "style": {  
            "enablePullDownRefresh": false,  
            "navigationStyle": "custom", // 隐藏系统导航栏  
            "navigationBarTitleText": "模拟计算"  
        }  
    },  
    {  
        "path": "pages/policyCollection/index",  
        "style": {  
            "enablePullDownRefresh": false,  
            "navigationStyle": "custom", // 隐藏系统导航栏  
            "navigationBarTitleText": "政策收藏"  
        }  
    }  
    // ,  
    // {  
    //   "path": "pages/accredit/index",  
    //   "meta": {  
    //     "showTabbar": false  
    //   },  
    //   "style": {  
    //     "enablePullDownRefresh": false,  
    //     "navigationStyle": "custom" ,// 隐藏系统导航栏  
    //     "navigationBarTitleText": "用户授权"  
    //   }  
    // }  
],  

"subPackages": [ // 分包  
    // {  
    //  "root": "pageHome",  
    //  "pages": [  
    //      {  
    //          "path": "search",  
    //          "style": {  
    //              "navigationBarTitleText": "搜索",  
    //        "navigationStyle": "custom" ,// 隐藏系统导航栏  
    //        "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一  
    //          }  
    //      }  
    //  ]  
    // },  
    {  
        "root": "pages",  
        "pages": [{  
                "path": "analogCalculation/details/index",  
                "style": {  
                    // "enablePullDownRefresh": true,  
                    // "disableSwipeBack": true, // 禁止IOS侧滑事件  
                    "navigationStyle": "custom", // 隐藏系统导航栏  
                    "navigationBarTitleText": "详情"  
                }  
            },  
            {  
                "path": "policyMatching/details/index", // 政策匹配详情  
                "style": {  
                    // "enablePullDownRefresh": true,  
                    "navigationStyle": "custom", // 隐藏系统导航栏  
                    "navigationBarTitleText": "事项详情"  
                }  
            },  
            {  
                "path": "policySearch/details/index", // 政策检索详情  
                "style": {  
                    // "enablePullDownRefresh": true,  
                    "navigationStyle": "custom", // 隐藏系统导航栏  
                    "navigationBarTitleText": "事项详情"  
                }  
            },  
            {  
                "path": "policyCollection/details/index", // 政策收藏详情  
                "style": {  
                    // "enablePullDownRefresh": true,  
                    "navigationStyle": "custom", // 隐藏系统导航栏  
                    "navigationBarTitleText": "事项详情"  
                }  
            }  
        ]  
    }  
    // ,  
    // {  
    //  "root": "pageMine",  
    //  "pages": [  
    //      {  
    //          "path": "modifyPhone",  
    //          "style": {  
    //              "navigationBarTitleText": "修改手机号"  
    //          }  
    //      },  
    //      {  
    //          "path": "modifyPassword",  
    //          "style": {  
    //              "navigationBarTitleText": "修改密码"  
    //          }  
    //      }  
    //  ]  
    // }  
    // {  
    //  "root": "pageLogin",  
    //  "pages": [  
    //      {  
    //          "path": "login",  
    //          "style": {  
    //              // "navigationBarTitleText": "登录"  
    //          }  
    //      },  
    //      {  
    //          "path": "register",  
    //          "style": {  
    //              // "navigationBarTitleText": "注册"  
    //          }  
    //      }  
    //  ]  
    // }  
],  
"globalStyle": {  
    // "navigationStyle": "custom", // 自定义头部  
    "navigationBarTextStyle": "black", // 头部字体颜色  
    "navigationBarTitleText": "就业政策智能推送平台", // 头部名字  
    "navigationBarBackgroundColor": "#FFFFFF", // 头部背景  
    "backgroundColor": "#F8F8F8" // 下拉刷新背景色  
},  

"tabBar": {  
    "color": "#C4C4C4", //未选中的菜单文字颜色  
    "selectedColor": "#262626", //选中时的菜单文字颜色  
    "borderStyle": "white",  
    "backgroundColor": "#ffffff", //背景  
    // "midButton": {  
    //   "iconPath": "static/images/menu/home_new.png",  
    //   "iconWidth": "55px",  
    //   "height": "70px",  
    //   "text": "首页"  
    // },  
    "list": [{  
            "pagePath": "pages/index/index", //页面地址  
            "iconPath": "static/images/menu/home1.png", //未选中时的图片  
            "selectedIconPath": "static/images/menu/home2.png", //选中时的图片  
            "text": "首页" //菜单文字  
        },  
        {  
            "pagePath": "pages/policyMatching/index", //页面地址  
            "iconPath": "static/images/menu/normal1.png", //未选中时的图片  
            "selectedIconPath": "static/images/menu/normal2.png", //选中时的图片  
            "text": "政策匹配" //菜单文字 policyMatching  
        },  
        {  
            "pagePath": "pages/policySearch/index", //页面地址  
            "iconPath": "static/images/menu/search1.png", //未选中时的图片  
            "selectedIconPath": "static/images/menu/search2.png", //选中时的图片  
            "text": "政策检索" //菜单文字 policySearch  
        },  
        {  
            "pagePath": "pages/analogCalculation/index", //页面地址  
            "iconPath": "static/images/menu/compute1.png", //未选中时的图片  
            "selectedIconPath": "static/images/menu/compute2.png", //选中时的图片  
            "text": "模拟计算" //菜单文字 analogCalculation  
        },  
        {  
            "pagePath": "pages/policyCollection/index",  
            "iconPath": "static/images/menu/collect1.png",  
            "selectedIconPath": "static/images/menu/collect2.png",  
            "text": "政策收藏" //菜单文字 policyCollection  
        }  
    ]  
},  
"condition": { //模式配置,仅开发期间生效  
    "current": 0, //当前激活的模式(list 的索引项)  
    "list": [{  
        "name": "", //模式名称  
        "path": "", //启动页面,必选  
        "query": "" //启动参数,在页面的onLoad函数里面得到  
    }]  
}  

}

2024-08-29 11:39 负责人:无 分享
已邀请:
相逢便是缘

相逢便是缘 (作者)

分包页面本地可以访问,打包h5后分包页面访问不到

要回复问题请先登录注册