美文网首页
uni-pp运行到真机

uni-pp运行到真机

作者: Monica_b73c | 来源:发表于2019-03-22 09:38 被阅读0次

1、没有安卓的下载安卓手机模拟器

2、基本的构架

image.png

3、重点:对pages.json文件编写

{
"pages" : [
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/ucenter/wx",
"style" : {
"navigationBarTitleText" : "微信"
}
},
{
"path" : "pages/ucenter/txl",
"style" : {
"navigationBarTitleText" : "通讯录"
}
},
{
"path" : "pages/ucenter/fx",
"style" : {
"navigationBarTitleText" : "发现"
}
},
{
"path" : "pages/ucenter/me",
"style" : {
"navigationBarTitleText" : "我"
}
}
],
"tabBar":{
"color":"#000000",
"selectedColor":"#2F85FC",
"backgroundColor":"#FFFFFF",
"borderStyle":"black",
"list":[
{
"pagePath":"pages/ucenter/wx",
"iconPath":"static/wx1.png",
"selectedIconPath":"static/wx.png",
"text":"微信"
},

        {
        "pagePath":"pages/ucenter/txl",
        "iconPath":"static/txl1.png",
        "selectedIconPath":"static/txl.png",
        "text":"通讯录"
        },
        {
        "pagePath":"pages/ucenter/fx",
        "iconPath":"static/fx1.png",
        "selectedIconPath":"static/fx.png",
        "text":"发现"
        },
        {
        "pagePath":"pages/ucenter/me",
        "iconPath":"static/me1.png",
        "selectedIconPath":"static/me.png",
        "text":"我"
        }
    ]
},
"globalStyle" : {
    "navigationBarTextStyle" : "black",
    "navigationBarTitleText" : "uni-app",
    "navigationBarBackgroundColor" : "#F8F8F8",
    "backgroundColor" : "#F8F8F8"
}

}

4、逐步编写pages.json所连接的几个模块

image.png

5、运行(使用快捷键Ctrl+R选择运行到你所准备的设备)

相关文章

网友评论

      本文标题:uni-pp运行到真机

      本文链接:https://www.haomeiwen.com/subject/wgnkvqtx.html