本篇是系列文章,在看本文之前请先看:

百度智能小程序接入自然搜索的步骤解析(1)

百度智能小程序接入自然搜索的步骤解析(2)

百度智能小程序接入自然搜索的步骤解析(3)

百度智能小程序接入自然搜索的步骤解析(4)


在开发者工具重新提包

完成增加 url-mapping 字段的步骤之后,要在开发者工具里进行重新提包。

如果在代码的编译过程中出现了Web化相关的报错信息,请根据报错信息进行修复,然后再进行下一步。

代码包在审核通过后,将会获得一个Web版本小程序的线上地址。

开发者可通过Web版本小程序的线上地址来确认自己的百度智能小程序是否已成功部署。

要注意的是,虽然这个Web版本小程序的域名可被访问,但不建议对外直接提供使用哦。


第五步:提交 sitemap

进入百度智能小程序平台,在百度智能小程序的首页,单击“投放管理>自然搜索管理”。

在自然搜索tab里,可上传sitemap。

要注意的是:

1、目前支持存量上传和增量上传两种方式

2、增量上传数据更新耗时较低,日均可提交的配额少。

3、存量上传并非实时生效,但是可提交的量较多,更新耗时也较长。


sitemap:
内容为小程序页面的path+query列表。百度小程序中Sitemap协议支持txt文本格式。


sitemap 示例:

pages/articleDetail/articleDetail?articleId=339652
pages/articleDetail/articleDetail?articleId=579379
pages/articleDetail/articleDetail?articleId=600884
pages/articleDetail/articleDetail?articleId=582423
pages/articleDetail/articleDetail?articleId=574993
pages/articleDetail/articleDetail?articleId=323853
pages/articleDetail/articleDetail?articleId=482151
pages/articleDetail/articleDetail?articleId=305078
pages/articleDetail/articleDetail?articleId=305074

说明:
当详情页面个数较多,而小程序的路径唯一时,请携带query依次提交sitemap。


联系电话:
1585150508*
QQ交谈:
小编
站长微信:
站长邮箱: service@qingjiuzhubei.com
47.62msRequest Duration2MBMemory UsageGET seoSchool/detail{id?}.htmlRouteAuth status
    • Booting (11.81ms)
    • Application (37.81ms)
      6 templates were rendered
      • site.zixun.seoDetail (resources/views/site/zixun/seoDetail.blade.php)9blade
        Params
        0
        cateAlls
        1
        newDetail
        2
        comment
        3
        hotnews
        4
        zuixinNews
        5
        xiangguan
        6
        t
        7
        d
        8
        k
      • layouts.site.layout (resources/views/layouts/site/layout.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • layouts.site.top (resources/views/layouts/site/top.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • layouts.site.bottom (resources/views/layouts/site/bottom.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • common.upgrade_vip (resources/views/common/upgrade_vip.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • kefu.kefu (resources/views/kefu/kefu.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      uri
      GET seoSchool/detail{id?}.html
      middleware
      web
      controller
      App\Http\Controllers\Site\ZixunController@seoSchoolDetail
      namespace
      App\Http\Controllers
      prefix
      /seoSchool
      where
      as
      seoSchoolDetail
      file
      app/Http/Controllers/Site/ZixunController.php:197-230
      8 statements were executed22.21ms
      • select * from `new_cates` where `pid` = '3' and `new_cates`.`deleted_at` is null1.85ms/app/Http/Controllers/Site/ZixunController.php:202zzshuju
        Metadata
        Bindings
        • 0. 3
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:202
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • select * from `news` where `news`.`id` = '26375' and `news`.`deleted_at` is null limit 1550μs/app/Http/Controllers/Site/ZixunController.php:203zzshuju
        Metadata
        Bindings
        • 0. 26375
        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:203
        • 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 null440μs/app/Http/Controllers/Site/ZixunController.php:203zzshuju
        Metadata
        Bindings
        • 0. 139
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 19. /app/Http/Controllers/Site/ZixunController.php:203
        • 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 `id` desc limit 101.1ms/app/Http/Controllers/Site/ZixunController.php:205zzshuju
        Metadata
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:205
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • select * from `news` where `news`.`deleted_at` is null order by `published_at` desc limit 101.04ms/app/Http/Controllers/Site/ZixunController.php:206zzshuju
        Metadata
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:206
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • select * from `news` where `newscate_id` = '139' and `news`.`deleted_at` is null order by `id` asc limit 108.97ms/app/Http/Controllers/Site/ZixunController.php:208zzshuju
        Metadata
        Bindings
        • 0. 139
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:208
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • update `news` set `browse` = `browse` + 1, `updated_at` = '2025-09-23 13:58:39' where `id` = '26375' and `news`.`deleted_at` is null7ms/app/Http/Model/News/News.php:170zzshuju
        Metadata
        Bindings
        • 0. 2025-09-23 13:58:39
        • 1. 26375
        Backtrace
        • 12. /app/Http/Model/News/News.php:170
        • 13. /app/Http/Controllers/Site/ZixunController.php:210
        • 21. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 55. /public/index.php:53
      • select * from `comments` where `news_id` = '26375'1.26ms/app/Http/Controllers/Site/ZixunController.php:214zzshuju
        Metadata
        Bindings
        • 0. 26375
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:214
        • 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
          IUm4ZT5XpsUGcmvjIFyKP7V7ES11csFR6AX61xVQ
          _previous
          array:1 [ "url" => "https://data.winndoo.cn/seoSchool/detail26375.html" ]
          PHPDEBUGBAR_STACK_DATA
          []
          _flash
          array:2 [ "old" => [] "new" => [] ]
          format
          html
          content_type
          text/html; charset=UTF-8
          status_text
          OK
          status_code
          200
          request_query
          []
          request_request
          []
          request_headers
          array:18 [ "cookie" => array:1 [ 0 => "Hm_lvt_767b4e8393ab59b402599f694cc019bd=1758607107; HMA...
          request_server
          array:42 [ "USER" => "apache" "HOME" => "/usr/share/httpd" "HTTP_COOKIE" => "Hm_lvt_767b4e8393...
          request_cookies
          array:4 [ "Hm_lvt_767b4e8393ab59b402599f694cc019bd" => null "HMACCOUNT" => null "Hm_lpvt_767b4...
          response_headers
          array:5 [ "cache-control" => array:1 [ 0 => "no-cache, private" ] "date" => array:1 [ ...
          path_info
          /seoSchool/detail26375.html
          session_attributes
          array:4 [ "_token" => "IUm4ZT5XpsUGcmvjIFyKP7V7ES11csFR6AX61xVQ" "_previous" => array:1 [ "u...