Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-id-pages-x
提交
b226c303
H
hello uni-id-pages-x
项目概览
DCloud
/
hello uni-id-pages-x
通知
40
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-id-pages-x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
b226c303
编写于
11月 17, 2023
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
资源目录 app-plus 改为 app
上级
89745c0e
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
101 addition
and
104 deletion
+101
-104
uni_modules/uni-id-pages-x/components/uni-id-pages-x-fab-login/uni-id-pages-x-fab-login.uvue
...ts/uni-id-pages-x-fab-login/uni-id-pages-x-fab-login.uvue
+9
-12
uni_modules/uni-id-pages-x/pages/login/login.uvue
uni_modules/uni-id-pages-x/pages/login/login.uvue
+92
-92
uni_modules/uni-id-pages-x/static/app/apple.png
uni_modules/uni-id-pages-x/static/app/apple.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/alipay.png
...odules/uni-id-pages-x/static/app/uni-fab-login/alipay.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/apple.png
...modules/uni-id-pages-x/static/app/uni-fab-login/apple.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/douyin.png
...odules/uni-id-pages-x/static/app/uni-fab-login/douyin.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/facebook.png
...ules/uni-id-pages-x/static/app/uni-fab-login/facebook.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/google.png
...odules/uni-id-pages-x/static/app/uni-fab-login/google.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/qq.png
uni_modules/uni-id-pages-x/static/app/uni-fab-login/qq.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/sinaweibo.png
...les/uni-id-pages-x/static/app/uni-fab-login/sinaweibo.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/taobao.png
...odules/uni-id-pages-x/static/app/uni-fab-login/taobao.png
+0
-0
uni_modules/uni-id-pages-x/static/app/uni-fab-login/univerify.png
...les/uni-id-pages-x/static/app/uni-fab-login/univerify.png
+0
-0
未找到文件。
uni_modules/uni-id-pages-x/components/uni-id-pages-x-fab-login/uni-id-pages-x-fab-login.uvue
浏览文件 @
b226c303
...
...
@@ -72,47 +72,47 @@
{
"id": "apple",
"text": "苹果登录",
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/apple.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/apple.png",
},
{
"id": "univerify",
"text": "一键登录",
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/univerify.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/univerify.png",
},
{
"id": "taobao",
"text": "淘宝登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/taobao.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/taobao.png",
},
{
"id": "facebook",
"text": "脸书登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/facebook.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/facebook.png",
},
{
"id": "alipay",
"text": "支付宝登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/alipay.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/alipay.png",
},
{
"id": "qq",
"text": "QQ登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/qq.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/qq.png",
},
{
"id": "google",
"text": "谷歌登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/google.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/google.png",
},
{
"id": "douyin",
"text": "抖音登录", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/douyin.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/douyin.png",
},
{
"id": "sinaweibo",
"text": "新浪微博", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/sinaweibo.png",
"logo": "/uni_modules/uni-id-pages-x/static/app/uni-fab-login/sinaweibo.png",
}
// #endif
] as Services[]
...
...
@@ -199,9 +199,6 @@
this.login_before(id)
}
},
toPage(path : string) {
// console.log(13, path);
},
login_before(type : string) {
// console.log(type);
// 提示空实现
...
...
uni_modules/uni-id-pages-x/pages/login/login.uvue
浏览文件 @
b226c303
<template>
<view class="page">
<!-- 顶部文字 -->
<!-- <text class="title">请选择登录方式{{loginType}}--isAgree:{{pendingAgreements}}</text> -->
<!-- 应用图标 -->
<image class="app-logo" :src="logo" mode="aspectFit"></image>
<!-- 苹果账号 微信账号 微信账号手机号 登录 -->
<view class="big-login-box" v-if="['apple','weixin', 'weixinMobile'].includes(loginType)">
<text class="tip">将根据第三方账号服务平台的授权范围获取你的信息</text>
<image v-if="loginType !== 'weixinMobile'" @click="login" :src="imgSrc" mode="widthFix" class="big-login-img">
</image>
<button v-else type="primary" open-type="getmobileNumber" @getmobilenumber="login"
class="uni-btn">微信授权手机号登录</button>
<!-- 同意隐私政策协议 -->
<uni-id-pages-x-agreements class="agreements-box" scope="login" />
</view>
<!-- 密码登录 -->
<uni-id-pages-x-loginByPwd v-if="loginType == 'username'" />
<!-- 手机号验证码登录 -->
<uni-id-pages-x-loginBySmsCode v-if="loginType == 'smsCode'" />
<!-- 固定定位的快捷登录按钮 -->
<uni-id-pages-x-fab-login :currentLoginType="loginType"
@changeLoginType="changeLoginType"></uni-id-pages-x-fab-login>
</view>
</template>
<script>
import { state } from '@/uni_modules/uni-id-pages-x/store.uts';
import config from '@/uni_modules/uni-id-pages-x/config.uts';
export default {
computed: {
//大快捷登录按钮图
imgSrc() : string {
return this.loginType == 'weixin' ? '/uni_modules/uni-id-pages-x/static/login/weixin.png' : '/uni_modules/uni-id-pages-x/static/app
-plus/apple.png'
},
pendingAgreements() : boolean {
return state.pendingAgreements
}
},
data() {
return {
loginType: "username" as string,
logo: "/static/logo.png"
}
},
onLoad(param : Map<string, string>) {
const type = param.get("type")
// 如果传递了参数就按参数指定的登录方式,否则指定为 config 中配置的第一项
if (type != null) {
this.loginType = type
} else {
let loginTypes = config.getArray<string>("loginTypes");
this.loginType = loginTypes![0];
}
},
methods: {
login() {
},
changeLoginType(type : string) {
// if (["weixin", "apple", "univerify"].includes(type)) {
// }
this.loginType = type
}
}
}
</script>
<style lang="scss" scoped>
@import url("/uni_modules/uni-id-pages-x/common/common.scss");
.app-logo {
width: 150rpx;
height: 150rpx;
margin: 30px 300rpx;
}
.big-login-box .agreements-box {
justify-content: center;
}
.big-login-img {
margin: 10px 25rpx;
height: 60px;
width: 700rpx;
}
<template>
<view class="page">
<!-- 顶部文字 -->
<!-- <text class="title">请选择登录方式{{loginType}}--isAgree:{{pendingAgreements}}</text> -->
<!-- 应用图标 -->
<image class="app-logo" :src="logo" mode="aspectFit"></image>
<!-- 苹果账号 微信账号 微信账号手机号 登录 -->
<view class="big-login-box" v-if="['apple','weixin', 'weixinMobile'].includes(loginType)">
<text class="tip">将根据第三方账号服务平台的授权范围获取你的信息</text>
<image v-if="loginType !== 'weixinMobile'" @click="login" :src="imgSrc" mode="widthFix" class="big-login-img">
</image>
<button v-else type="primary" open-type="getmobileNumber" @getmobilenumber="login"
class="uni-btn">微信授权手机号登录</button>
<!-- 同意隐私政策协议 -->
<uni-id-pages-x-agreements class="agreements-box" scope="login" />
</view>
<!-- 密码登录 -->
<uni-id-pages-x-loginByPwd v-if="loginType == 'username'" />
<!-- 手机号验证码登录 -->
<uni-id-pages-x-loginBySmsCode v-if="loginType == 'smsCode'" />
<!-- 固定定位的快捷登录按钮 -->
<uni-id-pages-x-fab-login :currentLoginType="loginType"
@changeLoginType="changeLoginType"></uni-id-pages-x-fab-login>
</view>
</template>
<script>
import { state } from '@/uni_modules/uni-id-pages-x/store.uts';
import config from '@/uni_modules/uni-id-pages-x/config.uts';
export default {
computed: {
//大快捷登录按钮图
imgSrc() : string {
return this.loginType == 'weixin' ? '/uni_modules/uni-id-pages-x/static/login/weixin.png' : '/uni_modules/uni-id-pages-x/static/app
/apple.png'
},
pendingAgreements() : boolean {
return state.pendingAgreements
}
},
data() {
return {
loginType: "username" as string,
logo: "/static/logo.png"
}
},
onLoad(param : Map<string, string>) {
const type = param.get("type")
// 如果传递了参数就按参数指定的登录方式,否则指定为 config 中配置的第一项
if (type != null) {
this.loginType = type
} else {
let loginTypes = config.getArray<string>("loginTypes");
this.loginType = loginTypes![0];
}
},
methods: {
login() {
},
changeLoginType(type : string) {
// if (["weixin", "apple", "univerify"].includes(type)) {
// }
this.loginType = type
}
}
}
</script>
<style lang="scss" scoped>
@import url("/uni_modules/uni-id-pages-x/common/common.scss");
.app-logo {
width: 150rpx;
height: 150rpx;
margin: 30px 300rpx;
}
.big-login-box .agreements-box {
justify-content: center;
}
.big-login-img {
margin: 10px 25rpx;
height: 60px;
width: 700rpx;
}
</style>
\ No newline at end of file
uni_modules/uni-id-pages-x/static/app
-plus
/apple.png
→
uni_modules/uni-id-pages-x/static/app/apple.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/alipay.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/alipay.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/apple.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/apple.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/douyin.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/douyin.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/facebook.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/facebook.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/google.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/google.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/qq.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/qq.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/sinaweibo.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/sinaweibo.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/taobao.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/taobao.png
浏览文件 @
b226c303
文件已移动
uni_modules/uni-id-pages-x/static/app
-plus
/uni-fab-login/univerify.png
→
uni_modules/uni-id-pages-x/static/app/uni-fab-login/univerify.png
浏览文件 @
b226c303
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录