任务2-1操作步骤1:首页4模块搭建

任务二工单1:首页展示界面研发

1.清空index.vue页面中内容

<template>
    <view class="container">
        <view>首页展示</view>
    </view>
</template>
<script>
    export default {
        data() {
            return {  }
        }
    }
</script>

<style>
</style>

2.创建三个新的界面,主要为点餐配送界面menu、取餐信息界面take-foods、我的管理界面mine

1.png
2.png

创建好了3个页面后,在内容区域填写相关介绍
3.png

页面就创建好了
4. 新建四大模块页面.png

3.引入静态资源images引入static文件下

5. 引入静态资源images.png

4.在项目pages.json中,进行参数设置,完成基础交互。

{
    "pages": [{
        "path": "pages/index/index",
        "style": {
            "navigationBarTitleText": "云鲤奶茶",
            "navigationStyle": "custom"
        }
    },
    {
        "path" : "pages/menu/menu",
        "style" : 
        {
            "navigationBarTitleText": "云鲤奶茶",
            "navigationBarTextStyle": "black",
            "navigationBarBackgroundColor": "#ffffff"
        }
    },
    {
        "path" : "pages/take-foods/take-foods",
        "style" : 
        {
            "navigationBarTitleText": "云鲤奶茶",
            "navigationBarTextStyle": "black",
            "navigationBarBackgroundColor": "#ffffff"
        }
    },
    {
        "path" : "pages/mine/mine",
        "style" : 
        {
            "navigationBarTitleText": "云鲤乐园",
            "navigationBarTextStyle": "black",
            "navigationBarBackgroundColor": "#ffffff"
        }
    }],
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "uni-app",
        "navigationBarBackgroundColor": "#F8F8F8",
        "backgroundColor": "#F8F8F8",
        "app-plus": {
            "background": "#efeff4"
        }
    },
    "tabBar": {
        "color": "#919293",
        "selectedColor": "#97AF13",
        "backgroundColor": "#fff",
        "borderStyle": "black",
        "list": [{
            "pagePath": "pages/index/index",
            "text": "首页",
            "iconPath": "static/images/tabBar/index.png",
            "selectedIconPath": "static/images/tabBar/index_selected.png"
        }, {
            "pagePath": "pages/menu/menu",
            "text": "点餐",
            "iconPath": "static/images/tabBar/drink.png",
            "selectedIconPath": "static/images/tabBar/drink_selected.png"
        }, {
            "pagePath": "pages/take-foods/take-foods",
            "text": "取餐",
            "iconPath": "static/images/tabBar/take.png",
            "selectedIconPath": "static/images/tabBar/take_selected.png"
        }, {
            "pagePath": "pages/mine/mine",
            "text": "我的",
            "iconPath": "static/images/tabBar/mine.png",
            "selectedIconPath": "static/images/tabBar/mine_selected.png"
        }]
    }
}

5.对page.json中style、tabBar参数设置完成,运行项目至Chorme浏览器观察效果,如图表明成功

6.gif

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容