Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello_uni-id-pages
提交
e4a9dfbe
H
hello_uni-id-pages
项目概览
DCloud
/
hello_uni-id-pages
通知
1054
Star
31
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看板
提交
e4a9dfbe
编写于
9月 02, 2022
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
deps: bump uni-open-bridge-common from 1.0.0 to 1.0.2
上级
098b4780
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
43 addition
and
6 deletion
+43
-6
uni_modules/uni-open-bridge-common/changelog.md
uni_modules/uni-open-bridge-common/changelog.md
+2
-0
uni_modules/uni-open-bridge-common/package.json
uni_modules/uni-open-bridge-common/package.json
+1
-1
uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/consts.js
...ud/cloudfunctions/common/uni-open-bridge-common/consts.js
+8
-1
uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/index.js
...oud/cloudfunctions/common/uni-open-bridge-common/index.js
+13
-4
uni_modules/uni-open-bridge-common/uniCloud/database/opendb-open-data.schema.json
...dge-common/uniCloud/database/opendb-open-data.schema.json
+19
-0
未找到文件。
uni_modules/uni-open-bridge-common/changelog.md
浏览文件 @
e4a9dfbe
## 1.0.2(2022-09-02)
-
新增 依赖数据表schema opendb-open-data
## 1.0.0(2022-08-22)
-
首次发布
uni_modules/uni-open-bridge-common/package.json
浏览文件 @
e4a9dfbe
{
"id"
:
"uni-open-bridge-common"
,
"displayName"
:
"uni-open-bridge-common"
,
"version"
:
"1.0.
0
"
,
"version"
:
"1.0.
2
"
,
"description"
:
"统一接管微信等三方平台认证凭据"
,
"keywords"
:
[
"uni-open-bridge-common"
,
...
...
uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/consts.js
浏览文件 @
e4a9dfbe
'
use strict
'
;
const
TAG
=
"
UNI_OPEN_BRIDGE
"
const
HTTP_STATUS
=
{
SUCCESS
:
200
}
...
...
@@ -13,7 +15,12 @@ const PlatformType = {
QQ_APP
:
'
qq-app
'
}
const
ErrorCodeType
=
{
SYSTEM_ERROR
:
TAG
+
"
_SYSTEM_ERROR
"
}
module
.
exports
=
{
HTTP_STATUS
,
PlatformType
PlatformType
,
ErrorCodeType
}
uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/index.js
浏览文件 @
e4a9dfbe
'
use strict
'
;
const
{
PlatformType
PlatformType
,
ErrorCodeType
}
=
require
(
'
./consts.js
'
)
const
{
...
...
@@ -31,8 +32,15 @@ class AccessToken extends Storage {
async
fallback
(
parameters
)
{
const
oauthConfig
=
appConfig
.
get
(
parameters
.
dcloudAppid
,
parameters
.
platform
)
const
methodName
=
(
parameters
.
platform
===
PlatformType
.
WEIXIN_MP
)
?
'
GetMPAccessTokenData
'
:
'
GetH5AccessTokenData
'
let
methodName
if
(
parameters
.
platform
===
PlatformType
.
WEIXIN_MP
)
{
methodName
=
'
GetMPAccessTokenData
'
}
else
if
(
parameters
.
platform
===
PlatformType
.
WEIXIN_H5
)
{
methodName
=
'
GetH5AccessTokenData
'
}
else
{
throw
new
BridgeError
(
ErrorCodeType
.
SYSTEM_ERROR
,
"
platform invalid
"
)
}
const
responseData
=
await
WeixinServer
[
methodName
](
oauthConfig
)
const
duration
=
responseData
.
expires_in
...
...
@@ -206,5 +214,6 @@ module.exports = {
setTicket
,
removeTicket
,
PlatformType
,
WeixinServer
WeixinServer
,
ErrorCodeType
}
uni_modules/uni-open-bridge-common/uniCloud/database/opendb-open-data.schema.json
0 → 100644
浏览文件 @
e4a9dfbe
//
文档教程:
https://uniapp.dcloud.net.cn/uniCloud/schema
{
"bsonType"
:
"object"
,
"required"
:
[
"_id"
,
"value"
],
"properties"
:
{
"_id"
:
{
"bsonType"
:
"string"
,
"description"
:
"key,格式:uni-id:[dcloudAppid]:[platform]:[openid]:[access-token|user-access-token|session-key|encrypt-key-version|ticket]"
},
"value"
:
{
"bsonType"
:
"object"
,
"description"
:
"字段_id对应的值"
},
"expired"
:
{
"bsonType"
:
"date"
,
"description"
:
"过期时间"
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录