zoukankan      html  css  js  c++  java
  • 微信小程序之permission字段

    最近查看我发布的小程序出了问题,没有显示天气,打开文件查看,出现如下提示

     

    那么如何解决呢

    在 app.json 里面增加 permission 属性配置
    然后在app.json中
    添加代码

     整个app.json:

    "permission": {
        "scope.userLocation": {
            "desc": "你的位置信息将用于小程序位置接口的效果展示"
        }
    }

    应该是小程序更新过之后需要用户自己允许是否获取地址

    {
     "pages": [
      "pages/index/index",
      "pages/home/home",
      "pages/logs/logs",
      "pages/test/test"
     ],
     "window": {
      "backgroundTextStyle": "light",
      "navigationBarBackgroundColor": "#405f80",
      "navigationBarTitleText": "这是标题",
      "navigationBarTextStyle": "black",
      "enablePullDownRefresh ": "true"
     },
     "tabBar": {
      "borderStyle": "white",
      "position": "bottom",
      "list": [
       {
        "pagePath": "pages/home/home",
        "text": "首页",
        "iconPath": "images/tab/paidui.png",
        "selectedIconPath": "images/tab/paidui1.png"
       },
       {
        "pagePath": "pages/test/test",
        "text": "记录",
        "iconPath": "images/tab/jilu.png",
        "selectedIconPath": "images/tab/jilu2.png"
       }
      ]
     },
     "permission": {
      "scope.userLocation": {
       "desc": "你的位置信息将用于小程序位置接口的效果展示"
      }
     }
    }
  • 相关阅读:
    三元运算符嵌套问题
    tp框架利用redis存储session
    PHP date('W')遇到跨年问题
    AES加解密 集成 spring MVC
    python SMTP 发送邮件
    mysql数据库安装过程
    (转)Apache启动过程
    apache服务器全局配置详解
    Apache 的 httpd.conf 详解(很实用)
    安装apache遇到的问题总结
  • 原文地址:https://www.cnblogs.com/liubingyjui/p/12836733.html
Copyright © 2011-2022 走看看