Skip to content

Commit

Permalink
fix: 微信小程序permission配置项缺少 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 authored Sep 10, 2024
1 parent 3099e76 commit 267f06e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/config/types/mpWeixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export interface MpWeixin {
navigateToMiniProgramAppIdList?: string[]

/** 接口权限设置,详见 <https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#permission> */
permission?: Record<'scope.userLocation', {
permission?: Record<'scope.userLocation'|'scope.userLocationBackground'|'scope.userFuzzyLocation', {
/** 小程序获取权限时展示的接口用途说明 */
desc: string
}>
Expand Down
34 changes: 30 additions & 4 deletions packages/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3245,6 +3245,35 @@
"description": "接口权限设置,详见 <https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#permission>",
"properties": {
"scope.userLocation": {
"description": "精确地理位置权限",
"additionalProperties": false,
"properties": {
"desc": {
"description": "小程序获取权限时展示的接口用途说明",
"type": "string"
}
},
"required": [
"desc"
],
"type": "object"
},
"scope.userLocationBackground": {
"description": "后台定位权限",
"additionalProperties": false,
"properties": {
"desc": {
"description": "小程序获取权限时展示的接口用途说明",
"type": "string"
}
},
"required": [
"desc"
],
"type": "object"
},
"scope.userFuzzyLocation": {
"description": "模糊地理位置权限",
"additionalProperties": false,
"properties": {
"desc": {
Expand All @@ -3258,9 +3287,6 @@
"type": "object"
}
},
"required": [
"scope.userLocation"
],
"type": "object"
},
"plugins": {
Expand Down Expand Up @@ -3662,4 +3688,4 @@
"type": "object"
}
}
}
}

0 comments on commit 267f06e

Please sign in to comment.