WeChatウィジェットget Locationは、ap.jsonでpermissionフィールドを宣言する必要があります。
1960 ワード
小さいプログラムは一部の構成を更新しました。位置授権はまずap.jsonで声明します。これは以前は必要ではありません。get Locationにはap.jsonでpermissionフィールドを宣言する必要があります。

解決策:
ap.jsonに下記のコードを入れます。

全体のap.json:

解決策:
ap.jsonに下記のコードを入れます。
"permission": {
"scope.userLocation": {
"desc": " "
}
}
このようなヒントがあります。
全体のap.json:
{
"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": " "
}
}
}
ここで、WeChatウィジェットget Locationについては、ap.jsonの中で声明のpermissionフィールドの文章を紹介します。これまでの文章を検索したり、次の関連記事を見たりしてください。これからもよろしくお願いします。