Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello_uni-id-pages
提交
53016f82
H
hello_uni-id-pages
项目概览
DCloud
/
hello_uni-id-pages
通知
1065
Star
33
Fork
43
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
2
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello_uni-id-pages
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
53016f82
编写于
8月 05, 2022
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: get h5 weixin config
上级
499e5a71
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
16 deletion
+22
-16
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-open-bridge/config.json
...ions/common/uni-config-center/uni-open-bridge/config.json
+12
-0
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/index.obj.js
...i-id-pages/uniCloud/cloudfunctions/uni-id-co/index.obj.js
+2
-0
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/get-h5-weixin-config.js
...dfunctions/uni-id-co/module/utils/get-h5-weixin-config.js
+4
-2
uni_modules/uni-open-bridge/uniCloud/cloudfunctions/common/uni-open-bridge-common/config.js
...ud/cloudfunctions/common/uni-open-bridge-common/config.js
+4
-14
未找到文件。
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-open-bridge/config.json
0 → 100644
浏览文件 @
53016f82
{
"schedule"
:
{
"__UNI__xxxxxx"
:
{
"enable"
:
true
,
"h5-weixin"
:
{
"enable"
:
false
,
"tasks"
:
[
"ticket"
]
}
}
},
"ipWhitelist"
:
[
"0.0.0.0"
]
}
\ No newline at end of file
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/index.obj.js
浏览文件 @
53016f82
...
...
@@ -488,6 +488,8 @@ module.exports = {
/**
* 获取微信公众号config参数
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-h5-weixin-config
* @param {object} params
* @param {string} params.url 当前页面url不带hash部分
* @returns
*/
getH5WeixinConfig
...
...
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/get-h5-weixin-config.js
浏览文件 @
53016f82
...
...
@@ -11,6 +11,8 @@ const {
/**
* 获取微信公众号config参数
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-h5-weixin-config
* @param {object} params
* @param {string} params.url 当前页面url不带hash部分
* @returns
*/
module
.
exports
=
async
function
(
params
)
{
...
...
@@ -28,8 +30,8 @@ module.exports = async function (params) {
appId
}
=
this
.
getClientInfo
()
const
weixinPlatform
=
getWeixinPlatform
.
call
(
this
)
const
getTicketRes
=
await
this
.
getTicket
.
getTicket
({
appId
,
const
getTicketRes
=
await
this
.
uniOpenBridge
.
getTicket
({
dcloudAppid
:
appId
,
platform
:
weixinPlatform
+
'
-weixin
'
})
if
(
!
getTicketRes
)
{
...
...
uni_modules/uni-open-bridge/uniCloud/cloudfunctions/common/uni-open-bridge-common/config.js
浏览文件 @
53016f82
...
...
@@ -3,8 +3,8 @@
const
configCenter
=
require
(
'
uni-config-center
'
)
const
OauthConfig
=
{
'
mp-weixin
'
:
[
'
oauth
'
,
'
weixin
'
],
'
h5-weixin
'
:
[
'
oauth
'
,
'
weixin
'
]
'
mp-weixin
'
:
[
'
mp-weixin
'
,
'
oauth
'
,
'
weixin
'
],
'
h5-weixin
'
:
[
'
web
'
,
'
oauth
'
,
'
h5-
weixin
'
]
}
class
ConfigBase
{
...
...
@@ -28,12 +28,7 @@ class ConfigBase {
return
(
item
.
dcloudAppid
===
appid
)
})
}
if
(
this
.
_uniId
.
dcloudAppid
===
appid
)
{
return
this
.
_uniId
}
return
null
return
this
.
_uniId
}
get
ready
()
{
...
...
@@ -73,13 +68,8 @@ class AppConfig extends ConfigBase {
}
getOauthConfig
(
appConfig
,
platformName
)
{
const
platformConfig
=
appConfig
[
platformName
]
if
(
!
platformConfig
)
{
return
null
}
let
tree
=
OauthConfig
[
platformName
]
let
node
=
platform
Config
let
node
=
app
Config
for
(
let
i
=
0
;
i
<
tree
.
length
;
i
++
)
{
let
nodeName
=
tree
[
i
]
if
(
node
[
nodeName
])
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录