百度智能小程序应该如何布局更美观?小程序布局方法(2)
搜外网
百度智能小程序 2019-03-21 00:30:11 字数:1171

百度智能小程序是百度在2018年新开发的重点项目,在2019年百度将投入更多到百度智能小程序里,有望一举超越微信小程序和支付宝小程序。如果等百度智能小程序火爆全国再去做肯定是晚了,所以从现在开始就要开始动手,勇敢吃螃蟹的人才能获得最好的红利!

在以前的文章里,我们讲过百度智能小程序是什么、怎样做好百度智能小程序体验设计、百度智能小程序接入自然搜索的步骤,今天我们就来讲讲百度智能小程序应该如何布局。


全面屏适配


1. 小程序框架

刘海手机已经成为现如今手机的主流趋势,开发者只要在顶部导航栏的下方布局页面即可,百度智能小程序官方会针对不同刘海屏幕的机型进行适配,方便开发者的开发。

8.png


但是百度智能小程序只能针对普通版本进行适配,如果使用透明框架的开发者,则需要自行适配。

9.png

左图:刘海iPhone的安全区 = 屏幕 -(系统状态栏(1) + 框架控制功能区(2)+ 底部指示区(3))

一般刘海iPhone刘海高度为44pt,我们可以参考这个数值。

右图:刘海安卓手机的安全区 = 屏幕 -(系统状态栏(1) + 框架控制功能区(2))

一般刘海安卓手机的刘海高度=系统状态栏高度,我们可以参考这个数值。


正确案例

正确考虑状态栏高度,页面的元素以及功能都在安全区内展现。

10-1.png


错误案例

页面元素和功能超出安全区,导致元素重叠,用户看着会感觉少了一部分或者很别扭。

10-2.png


2. 小游戏框架


竖屏小游戏

11.png


左图:刘海iPhone的安全区 = 屏幕 -(顶部刘海区(1) + 框架控制功能区(2)+ 底部指示区(3))

右图:刘海安卓手机的安全区 = 屏幕 -(顶部刘海区(1) + 框架控制功能区(2))


横屏小游戏

12.png

左图:刘海iPhone的安全区 = 屏幕 -(顶部刘海区(1) + 框架控制功能区(2)+ 底部指示区(3))

右图:刘海安卓手机的安全区 = 屏幕 -(顶部刘海区(1) + 框架控制功能区(2))


3. 注意:刘海iPhone底部适配

刘海iPhone的底部横条默认透明,高度为34pt,如开发者使用刘海iPhone百度智能小程序的底部标签栏,需要格外关注底部横条的配置,只有自动适配后底部标签栏才会出现背景颜色。

13.png13.png


左图:默认底部横条透明

右图:使用底部标签栏,自动适配底部横条

开发者可以自行按照喜欢的样式来调配和使用。

当开发者未使用底部标签栏组件,而是选择自主开发,千万要注意这个区域属于不可布局但是可操作的元素。


正确案例

底部横条进行了正确配置,颜色与底部栏一致,页面十分美观。

14-1.png


错误案例

底部横条未进行正确配置,用户会感觉很别扭。

14-2.png


本篇是系列文章,请点击查看接下来的文章:

百度智能小程序应该如何布局更美观?小程序布局方法(1)

百度智能小程序应该如何布局更美观?小程序布局方法(3)

百度智能小程序应该如何布局更美观?小程序布局方法(4)

百度智能小程序应该如何布局更美观?小程序布局方法(5)


0人参与回答
  • 未添加任何数据~~


提示信息

联系电话:
1585150508*
QQ交谈:
小编
站长微信:
站长邮箱: service@qingjiuzhubei.com
281.79msRequest Duration4MBMemory UsageGET zixun/detail/{id?}.htmlRouteAuth status
    • Booting (12.36ms)
    • Application (272.01ms)
      6 templates were rendered
      • site.zixun.detail (resources/views/site/zixun/detail.blade.php)8blade
        Params
        0
        prevArticle
        1
        nextArticle
        2
        newDetail
        3
        comment
        4
        hotnews
        5
        t
        6
        d
        7
        k
      • layouts.site.layout (resources/views/layouts/site/layout.blade.php)18blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        prevArticle
        7
        nextArticle
        8
        newDetail
        9
        comment
        10
        hotnews
        11
        t
        12
        d
        13
        k
        14
        __empty_1
        15
        __currentLoopData
        16
        loop
        17
        hotnewsVal
      • layouts.site.top (resources/views/layouts/site/top.blade.php)18blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        prevArticle
        7
        nextArticle
        8
        newDetail
        9
        comment
        10
        hotnews
        11
        t
        12
        d
        13
        k
        14
        __empty_1
        15
        __currentLoopData
        16
        loop
        17
        hotnewsVal
      • layouts.site.bottom (resources/views/layouts/site/bottom.blade.php)18blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        prevArticle
        7
        nextArticle
        8
        newDetail
        9
        comment
        10
        hotnews
        11
        t
        12
        d
        13
        k
        14
        __empty_1
        15
        __currentLoopData
        16
        loop
        17
        hotnewsVal
      • common.upgrade_vip (resources/views/common/upgrade_vip.blade.php)18blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        prevArticle
        7
        nextArticle
        8
        newDetail
        9
        comment
        10
        hotnews
        11
        t
        12
        d
        13
        k
        14
        __empty_1
        15
        __currentLoopData
        16
        loop
        17
        hotnewsVal
      • kefu.kefu (resources/views/kefu/kefu.blade.php)18blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        prevArticle
        7
        nextArticle
        8
        newDetail
        9
        comment
        10
        hotnews
        11
        t
        12
        d
        13
        k
        14
        __empty_1
        15
        __currentLoopData
        16
        loop
        17
        hotnewsVal
      uri
      GET zixun/detail/{id?}.html
      middleware
      web
      controller
      App\Http\Controllers\Site\ZixunController@detail
      namespace
      App\Http\Controllers
      prefix
      /zixun
      where
      as
      zixunDetail
      file
      app/Http/Controllers/Site/ZixunController.php:105-132
      7 statements were executed255.72ms
      • select * from `news` where `news`.`id` = '26368' and `news`.`deleted_at` is null limit 16.2ms/app/Http/Controllers/Site/ZixunController.php:109zzshuju
        Metadata
        Bindings
        • 0. 26368
        Hints
        • Use SELECT * only if you need all columns from table
        • LIMIT without ORDER BY causes non-deterministic results, depending on the query execution plan
        Backtrace
        • 14. /app/Http/Controllers/Site/ZixunController.php:109
        • 22. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 56. /public/index.php:53
      • select * from `new_cates` where `new_cates`.`id` in ('139') and `new_cates`.`deleted_at` is null550μs/app/Http/Controllers/Site/ZixunController.php:109zzshuju
        Metadata
        Bindings
        • 0. 139
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 19. /app/Http/Controllers/Site/ZixunController.php:109
        • 27. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 61. /public/index.php:53
      • select * from `news` where `news`.`deleted_at` is null order by `browse` desc limit 10219.1ms/app/Http/Controllers/Site/ZixunController.php:110zzshuju
        Metadata
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:110
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • update `news` set `browse` = `browse` + 1, `updated_at` = '2025-04-12 13:00:25' where `id` = '26368' and `news`.`deleted_at` is null19.82ms/app/Http/Model/News/News.php:170zzshuju
        Metadata
        Bindings
        • 0. 2025-04-12 13:00:25
        • 1. 26368
        Backtrace
        • 12. /app/Http/Model/News/News.php:170
        • 13. /app/Http/Controllers/Site/ZixunController.php:111
        • 21. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 55. /public/index.php:53
      • select * from `news` where `id` < '26368' and `newscate_id` = '139' and `news`.`deleted_at` is null order by `id` desc limit 18.58ms/app/Http/Controllers/Site/ZixunController.php:115zzshuju
        Metadata
        Bindings
        • 0. 26368
        • 1. 139
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 13. /app/Http/Controllers/Site/ZixunController.php:115
        • 21. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 55. /public/index.php:53
      • select * from `news` where `id` > '26368' and `newscate_id` = '139' and `news`.`deleted_at` is null order by `id` asc limit 1960μs/app/Http/Controllers/Site/ZixunController.php:116zzshuju
        Metadata
        Bindings
        • 0. 26368
        • 1. 139
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 13. /app/Http/Controllers/Site/ZixunController.php:116
        • 21. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 55. /public/index.php:53
      • select * from `comments` where `news_id` = '26368'510μs/app/Http/Controllers/Site/ZixunController.php:117zzshuju
        Metadata
        Bindings
        • 0. 26368
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:117
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
        web
        array:2 [ "name" => "Guest" "user" => array:1 [ "guest" => true ] ]
        api
        array:2 [ "name" => "Guest" "user" => array:1 [ "guest" => true ] ]
          _token
          OeotwhOBmnXts3GPINKkfYG4to6plezGF7HP2Zzp
          _previous
          array:1 [ "url" => "http://data.winndoo.cn/zixun/detail/26368.html" ]
          PHPDEBUGBAR_STACK_DATA
          []
          format
          html
          content_type
          text/html; charset=UTF-8
          status_text
          OK
          status_code
          200
          request_query
          []
          request_request
          []
          request_headers
          array:10 [ "accept-encoding" => array:1 [ 0 => "gzip, deflate" ] "accept" => array:1 [ ...
          request_server
          array:33 [ "USER" => "apache" "HOME" => "/usr/share/httpd" "HTTP_ACCEPT_ENCODING" => "gzip, de...
          request_cookies
          []
          response_headers
          array:5 [ "cache-control" => array:1 [ 0 => "no-cache, private" ] "date" => array:1 [ ...
          path_info
          /zixun/detail/26368.html
          session_attributes
          array:3 [ "_token" => "OeotwhOBmnXts3GPINKkfYG4to6plezGF7HP2Zzp" "_previous" => array:1 [ "u...