收藏
回答

第三方微信小程序发布后ext.json 配置tabBar图标不显示

开发第三方平台小程序的,在开发和测试过程一切都正常,上传代码和发布小程序成功后,打开程序首页导航栏tabBar图标不见,ext.json里的ext字段里的属性也读取不了,这是怎么回事?求解答


ext.json 配置如下:

{

"extEnable": true,

"extAppid": "wx0ba806b9709f9b26",

"ext": {

"name": "extAppid",

"attr": {

"appid": "wx0ba806b9709f9b26"

}

},

"extPages": {

"pages/index/index":{

"navigationBarTitleText":"首页"

},

"pages/logs/logs": {

"navigationBarTitleText": "logs"

},

"pages/find/find": {

"navigationBarTitleText": "发现"

},

"pages/cart/cart": {

"navigationBarTitleText": "购物车"

},

"pages/my/my": {

"navigationBarTitleText": "我的"

},

"pages/product/product_desc": {

"navigationBarTitleText": "商品详情"

},

"pages/orders/order": {

"navigationBarTitleText": "我的订单"

},

"pages/cart/pay": {

"navigationBarTitleText": "支付"

},

"pages/address/address": {

"navigationBarTitleText": "地址"

},

"pages/address/newAddress": {

"navigationBarTitleText": "新增地址"

},

"pages/productList/productList": {

"navigationBarTitleText": "商品列表"

},

"pages/common/loading": {

"navigationBarTitleText": "加载"

},

"pages/orders/orderDetail": {

"navigationBarTitleText": "订单明细"

},

"pages/my/about": {

"navigationBarTitleText": "关于我们"

},

"pages/my/coupon": {

"navigationBarTitleText": "优惠券"

},

"pages/my/allCoupon": {

"navigationBarTitleText": "优惠券"

},

"pages/my/meetCoupon": {

"navigationBarTitleText": "符合的优惠券"

},

"pages/orders/logistic": {

"navigationBarTitleText": "物流信息"

}

},

"networkTimeout": {

"request": 10000,

"downloadFile": 10000

}

}


app.json 配置如下:


{

"pages": [

"pages/index/index",

"pages/logs/logs",

"pages/find/find",

"pages/cart/cart",

"pages/my/my",

"pages/product/product_desc",

"pages/orders/order",

"pages/cart/pay",

"pages/address/address",

"pages/address/newAddress",

"pages/productList/productList",

"pages/common/loading",

"pages/orders/orderDetail",

"pages/my/about",

"pages/my/coupon",

"pages/my/allCoupon",

"pages/my/meetCoupon",

"pages/orders/logistic"

],

"window": {

"backgroundTextStyle": "light",

"navigationBarBackgroundColor": "#fff",

"navigationBarTitleText": "微飞享",

"navigationBarTextStyle": "black"

},

"tabBar": {

"color": "#000",

"selectedColor": "#f40",

"list": [

{

"pagePath": "pages/index/index",

"text": "首页",

"iconPath": "./pages/image/icon/home1.png",

"selectedIconPath": "./pages/image/icon/home2.png"

},

{

"pagePath": "pages/find/find",

"text": "发现",

"iconPath": "./pages/image/icon/find1.png",

"selectedIconPath": "./pages/image/icon/find2.png"

},

{

"pagePath": "pages/cart/cart",

"text": "购物车",

"iconPath": "pages/image/icon/cart1.png",

"selectedIconPath": "./pages/image/icon/cart2.png"

},

{

"pagePath": "pages/my/my",

"text": "我的",

"iconPath": "./pages/image/icon/my1.png",

"selectedIconPath": "./pages/image/icon/my2.png"

}

]

},

"networkTimeout": {

"request": 10000,

"downloadFile": 10000

}

}

平台appid:wx54756e40d1f8a5ea

小程序appid: wx0ba806b9709f9b26

代码上传时间:2017-11-22 10:36








回答关注问题邀请回答
收藏

9 个回答

  • 棉花糖
    棉花糖
    2018-05-14

    关注下

    2018-05-14
    有用
    回复
  • 小肖小肖爱吃夜宵
    小肖小肖爱吃夜宵
    2018-01-10

    你好,问题解决了吗?我也遇到这个问题了

    2018-01-10
    有用
    回复
  • Lazy
    Lazy
    2017-11-22

    好的,万分感谢。我再测试

    2017-11-22
    有用
    回复
  • oric
    oric
    2017-11-22

    ext.json里面只需要配置你想覆盖或者增加的配置项。不修改tabBar的话不需要配置。

    作为ext_json的值是String,要转义引号

    我体验了你2017-11-22 10:36上传的版本,有tabBar图标,你可以用api获取二维码进行体验。

    ext的属性是不是因为你两边的ext就是不一样的造成的?


    2017-11-22
    有用
    回复
  • Lazy
    Lazy
    2017-11-22

    很感谢你帮助。如果格式格式正确为什么 页面 tabBar 的图标没显示,也获取不了ext.json 字段 ext 属性呢?没发布前是在IDE和手机预览都是正常的。真想不明白。。。这个是在IDE详情里的信息

    2017-11-22
    有用
    回复
  • Lazy
    Lazy
    2017-11-22

    我在app.json 里配置 "tabBar" , ext.json 里 还需要配置吗? 后台直接copy  ext.json  作为ext_json 参数post上去 可以吗?

    2017-11-22
    有用
    回复
  • oric
    oric
    2017-11-22

    你的格式正确的,不正确会有返回错误码。

    示例有问题。。我们改一下。。


    2017-11-22
    有用
    回复
  • Lazy
    Lazy
    2017-11-22

    post上去的ext_json格式正确吗?

    我看到官方给出示例是这样的:

    ext_json需为string类型,格式示例如下

    {

    extAppid:"",

    ext:{

    "attr1":"value1",

    "attr2":"value2",

    },

    extPages:{

    "index":{

    },

    "search/index":{

    },

    },

    pages:["index","search/index"],

    "window":{

    },

    "networkTimeout":{

    },

    "tabBar":{

    },

    }

    官方的 extAppid、ext、extPages、pages  是没有 “”包裹的,post 上去的 有 “”包裹着,这个会错吗?


    2017-11-22
    有用
    回复
  • oric
    oric
    2017-11-22

    我看到你这个时间提交的版本体验是有tabBar的

    post上来的ext_json也不是你上面的那个,是下面这样的,你先自查一下。

    {  

                "extEnable": true, 

                "extAppid":"wx0ba806b9709f9b26",   

                "ext": {  

                      "name": "微飞享", 

                      "extAppid":"wx0ba806b9709f9b26"  

                },  

                "extPages": {

                  "pages/index/index":{

                    "navigationBarTitleText": "微飞享"

                  },

                  "pages/logs/logs":{

                    "navigationBarTitleText": "日志"

                  },

                  "pages/find/find":{

                    "navigationBarTitleText": "发现"

                  },

                  "pages/cart/cart":{

                    "navigationBarTitleText": "购物车"

                  },

                  "pages/my/my":{

                    "navigationBarTitleText": "个人中心"

                  },

                  "pages/product/product_desc":{

                    "navigationBarTitleText": "商品详情"

                  },

                  "pages/orders/order":{

                    "navigationBarTitleText": "订单"

                  },

                  "pages/cart/pay":{

                    "navigationBarTitleText": "支付"

                  },

                  "pages/address/address":{

                    "navigationBarTitleText": "地址"

                  },

                  "pages/address/newAddress":{

                    "navigationBarTitleText": "新增地址"

                  },

                  "pages/productList/productList":{

                    "navigationBarTitleText": "商品列表"

                  },

                  "pages/common/loading":{

                    "navigationBarTitleText": "加载"

                  },

                  "pages/orders/orderDetail":{

                    "navigationBarTitleText": "订单明细"

                  },

                  "pages/my/about":{

                    "navigationBarTitleText": "关于我们"

                  },

                  "pages/my/coupon":{

                    "navigationBarTitleText": "优惠券"

                  },

                  "pages/my/allCoupon":{

                    "navigationBarTitleText": "所用优惠券"

                  },

                  "pages/my/meetCoupon":{

                    "navigationBarTitleText": "符合的优惠券"

                  },

                  "pages/orders/logistic": {

                    "navigationBarTitleText": "物流信息"

                  }

                },

        "window":{  

                  "backgroundTextStyle":"light",

                  "navigationBarBackgroundColor": "#fff",  

                  "navigationBarTitleText": "小程序",

                  "navigationBarTextStyle":"black"  

                },

          "tabBar": {   

                  "color": "#000",

                  "selectedColor": "#f40",

                  "list": [

                    {

                      "pagePath": "pages/index/index",

                      "text": "首页",

                      "iconPath": "./pages/image/icon/home1.png",

                      "selectedIconPath": "./pages/image/icon/home2.png"

                    },

                    {

                      "pagePath": "pages/find/find",

                      "text": "发现",

                      "iconPath": "./pages/image/icon/find1.png",

                      "selectedIconPath": "./pages/image/icon/find2.png"

                    },

                    {

                      "pagePath": "pages/cart/cart",

                      "text": "购物车",

                      "iconPath": "pages/image/icon/cart1.png",

                      "selectedIconPath": "./pages/image/icon/cart2.png"

                    },

                    {

                      "pagePath": "pages/my/my",

                      "text": "我的",

                      "iconPath": "./pages/image/icon/my1.png",

                      "selectedIconPath": "./pages/image/icon/my2.png"

                    }

                  ]

                },

                "networkTimeout": {  

                "request": 10000,

                "downloadFile": 10000   

                } 

              }


    2017-11-22
    有用
    回复
登录 后发表内容