pages.json

{
	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
	    {
            "path" : "./pages/toBraille/toBraille",
            "style" :                                                                                    
            {
                "navigationBarTitleText": "致力于改变盲人的生活",
                "enablePullDownRefresh": false,
				"navigationBarBackgroundColor": "#f8f8f8"
            }
            
        }
        ,{
            "path" : "./pages/about/about",
            "style" :                                                                                    
            {
                "navigationBarTitleText": "",
                "enablePullDownRefresh": false
            }
            
        }
        ,{
            "path" : "./pages/my/my",
            "style" :                                                                                    
            {
                "navigationBarTitleText": "",
                "enablePullDownRefresh": false
            }
            
        }
    ],

	"globalStyle": {
		"navigationBarTextStyle": "black",
		"backgroundColor": "#ffffff",
		"navigationBarBackgroundColor": "#ffffff"
	},
	"tabBar": {
		"list": [
			{
				"pagePath": "./pages/toBraille/toBraille",
				"iconPath": "./static/images/instant-message.png",
				"selectedIconPath": "./static/images/instant-message.png",
				"text": "转盲文"
			},
			{
				"pagePath": "./pages/about/about",
				"iconPath": "./static/images/process-inquire.png",
				"selectedIconPath": "./static/images/process-inquire.png",
				"text": "关于"
			},
			{
				"pagePath": "./pages/my/my",
				"iconPath": "./static/images/staff-manage.png",
				"selectedIconPath": "./static/images/staff-manage.png",
				"text": "我的"
			}
		]
	}
	
}

明明配置好了但是页面没有任何显示

然后把路径前的 “ ./  ”去掉

正常显示

 估计是因为pages和tabBar里面配置的是访问路径而不是文件地址,所以不要 . /  

 

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐