Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tanjunming2020
hello_uni-id-pages
提交
881c8d87
H
hello_uni-id-pages
项目概览
tanjunming2020
/
hello_uni-id-pages
与 Fork 源项目一致
Fork自
DCloud / hello_uni-id-pages
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello_uni-id-pages
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
881c8d87
编写于
8月 11, 2022
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
uni-id-pages(版本号1.0.8)新增 H5端支持微信登录,含:微信公众号内的网页授权登录 和 普通浏览器内网页生成二维码,实现手机微信扫码登录
上级
7b3e1648
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
55 deletion
+21
-55
pages.json
pages.json
+0
-8
pages/test/test.vue
pages/test/test.vue
+0
-22
uni_modules/uni-id-pages/changelog.md
uni_modules/uni-id-pages/changelog.md
+2
-3
uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
...ponents/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
+3
-4
uni_modules/uni-id-pages/config.js
uni_modules/uni-id-pages/config.js
+5
-4
uni_modules/uni-id-pages/package.json
uni_modules/uni-id-pages/package.json
+11
-14
未找到文件。
pages.json
浏览文件 @
881c8d87
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/test/test"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
...
...
pages/test/test.vue
已删除
100644 → 0
浏览文件 @
7b3e1648
<
template
>
<view>
<navigator
url=
"/pages/index/index"
>
index
</navigator>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
}
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
uni_modules/uni-id-pages/changelog.md
浏览文件 @
881c8d87
## 1.0.7(2022-07-19)
-
新增 web移动端,微信内基于公众号登录
-
新增 web电脑端,基于微信开放平台的微信扫码登录
## 1.0.8(2022-08-11)
-
新增 H5端支持微信登录(含微信公众号内的网页授权登录 和 普通浏览器内网页生成二维码,实现手机微信扫码登录)
[
详情
](
https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#weixinlogin
)
-
新增 登录成功(全局)回调事件:
`uni-id-pages-login-success`
,支持通过
[
uni.$on
](
https://uniapp.dcloud.net.cn/api/window/communication.html#on
)
监听;
## 1.0.7(2022-07-19)
-
修复 uni-id-co接口 logout时没有删除token的Bug
...
...
uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
浏览文件 @
881c8d87
...
...
@@ -307,8 +307,7 @@
// #ifdef H5
if
(
type
==
'
weixin
'
){
console
.
log
(
'
开始微信网页登录
'
);
// console.log('开始微信网页登录');
let
redirectUrl
=
location
.
protocol
+
'
//
'
+
document
.
domain
+
(
window
.
location
.
href
.
includes
(
'
#
'
)?
'
/#
'
:
''
)
+
...
...
@@ -316,7 +315,7 @@
console
.
log
(
'
redirectUrl----
'
,
redirectUrl
);
let
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'
micromessenger
'
){
console
.
log
(
'
在微信公众号内
'
);
//
console.log('在微信公众号内');
return
window
.
open
(
`https://open.weixin.qq.com/connect/oauth2/authorize?
appid=
${
config
.
appid
.
weixin
.
h5
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
...
...
@@ -325,7 +324,7 @@
&state=STATE&connect_redirect=1#wechat_redirect`
);
}
else
{
console
.
log
(
'
非微信公众号内
'
);
//
console.log('非微信公众号内');
return
location
.
href
=
`https://open.weixin.qq.com/connect/qrconnect?appid=
${
config
.
appid
.
weixin
.
web
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect`
...
...
uni_modules/uni-id-pages/config.js
浏览文件 @
881c8d87
...
...
@@ -34,12 +34,13 @@ export default {
'
register
'
,
'
login
'
]
},
// 提供各类服务接入(如微信登录服务)的应用id
"
appid
"
:{
"
weixin
"
:{
//
公众号
"
h5
"
:
"
wx32b2580e30ef8555
"
,
//
网站应用
"
web
"
:
"
wx4dcf96ab6af4c5e8
"
//
微信公众号的appid,来源:登录微信公众号(https://mp.weixin.qq.com)-> 设置与开发 -> 基本配置 -> 公众号开发信息 -> AppID
"
h5
"
:
"
xxxxxx
"
,
//
微信开放平台的appid,来源:登录微信开放平台(https://open.weixin.qq.com) -> 管理中心 -> 网站应用 -> 选择对应的应用名称,点击查看 -> AppID
"
web
"
:
"
xxxxxx
"
}
}
}
uni_modules/uni-id-pages/package.json
浏览文件 @
881c8d87
{
"id"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"version"
:
"1.0.
7
"
,
"version"
:
"1.0.
8
"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"keywords"
:
[
"用户管理"
,
"用户中心"
,
"短信验证码"
,
"login"
,
"登录"
],
"用户管理"
,
"用户中心"
,
"短信验证码"
,
"login"
,
"登录"
],
"repository"
:
"https://gitcode.net/dcloud/hello_uni-id-pages"
,
"engines"
:
{
"HBuilderX"
:
"^3.4.17"
},
"dcloudext"
:
{
"category"
:
[
"uniCloud"
,
"云端一体页面模板"
],
"sale"
:
{
"dcloudext"
:
{
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
...
...
@@ -35,7 +31,8 @@
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
""
"npmurl"
:
""
,
"type"
:
"unicloud-template-page"
},
"uni_modules"
:
{
"dependencies"
:
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录