Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
uni-starter
提交
f3fed494
U
uni-starter
项目概览
言程序plus
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f3fed494
编写于
4月 07, 2021
作者:
芊
芊里
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitee.com/dcloud/base-app
上级
6db68978
85cf8673
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
85 addition
and
154 deletion
+85
-154
pages.json
pages.json
+15
-17
uni_modules/uni-login-page/pages/index/index--.nvue
uni_modules/uni-login-page/pages/index/index--.nvue
+0
-128
uni_modules/uni-login-page/pages/index/index.vue
uni_modules/uni-login-page/pages/index/index.vue
+69
-5
uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue
...uick-login/components/uni-quick-login/uni-quick-login.vue
+1
-4
未找到文件。
pages.json
浏览文件 @
f3fed494
...
@@ -20,28 +20,26 @@
...
@@ -20,28 +20,26 @@
},
{
},
{
"path"
:
"uni_modules/uni-login-page/pages/index/index"
,
"path"
:
"uni_modules/uni-login-page/pages/index/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
//
"backgroundColor"
:
"transparent"
,
"backgroundColor"
:
"transparent"
,
"app-plus"
:
{
"app-plus"
:
{
"animationType"
:
"fade-in"
,
"animationType"
:
"fade-in"
,
"background"
:
"transparent"
,
"background"
:
"transparent"
,
"popGesture"
:
"none"
,
"popGesture"
:
"none"
"titleNView"
:
false
//
"navigationBarTitleText"
:
""
,
//
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
//
"app-plus"
:
{
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
}
}
}
//
"navigationBarTitleText"
:
""
,
//
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
//
"app-plus"
:
{
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
},
{
},
{
"path"
:
"pages/search/search"
,
"path"
:
"pages/search/search"
,
"style"
:
{
"style"
:
{
...
...
uni_modules/uni-login-page/pages/index/index--.nvue
已删除
100644 → 0
浏览文件 @
6db68978
<template>
<view class="content">
<view class="quick-login-box">
<view class="item" v-for="({text,logo,name},index) in providerList" :key="index" @click="login(name)">
<image class="logo" :src="logo" mode="widthFix"></image>
<text class="login-title">{{text}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
config: {
"weixin": {
"text": "微信登陆",
"logo": "../../static/login/img/weixin.png"
},
"qq": {
"text": "QQ登陆",
"logo": "../../static/login/img/qq.png"
},
"apple": {
"text": "苹果登陆",
"logo": "../../static/login/img/apple.png"
},
"sinaweibo": {
"text": "微博登录",
"logo": "../../static/login/img/sinaweibo.png"
},
"univerify": {
"text": "一键登陆",
"logo": "../../static/login/img/univerify.png"
}
},
providerList: [],
univerifyStyle: {
"fullScreen": true, // 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
"backgroundColor": "#ffffff", // 授权页面背景颜色,默认值:#ffffff
}
}
},
onLoad() {
uni.getProvider({
"service": "oauth",
success: res => {
this.providerList = res.provider.map((name) => {
return {...this.config[name],name}
})
},
fail: (err) => {
console.error('获取服务供应商失败:' + JSON.stringify(err));
}
})
},
methods: {
login(type) {
uni.login({
"provider": type,
"univerifyStyle":this.univerifyStyle,
success: e => {
console.log(e);
this.quickLogin(e.authResult,type)
},
fail: (err) => {
console.log(err);
if(err.errCode===30002){
}
}
});
},
quickLogin(authResult,type){
//请勿直接使用authResult中的unionid或openid直接用于登陆,前端的数据都是不可靠的
console.log({...authResult,type});
uniCloud.callFunction({//联网验证登陆
"name": "user",
"data": {
"action": "quickLogin",
"params": {...authResult,type}
},
success: (e) => {
console.log(e.result);
uni.showModal({
content: JSON.stringify(e.result),
showCancel: false
});
if(type=='univerify'){
uni.closeAuthView()
}
},
fail: (err) => {
console.log(err);
if(err.errCode===30002){
}
}
})
}
}
}
</script>
<style scoped>
.quick-login-box {
flex-direction: row;
width: 750rpx;
justify-content: space-around;
}
.item {
flex-direction: column;
justify-content: center;
align-items: center;
height: 200rpx;
}
.logo {
width: 60rpx;
height: 60rpx;
}
.login-title {
font-size: 26rpx;
}
</style>
\ No newline at end of file
uni_modules/uni-login-page/pages/index/index.vue
浏览文件 @
f3fed494
<
template
>
<
template
>
<view
class=
"wrap"
:class=
"
{'hidden':!isShow}
">
<view
class=
"wrap"
v-show=
"isShow
"
>
<uni-nav-bar
left-icon=
"back"
right-text=
"帮助"
:statusBar=
"true"
:border=
"false"
></uni-nav-bar>
<uni-nav-bar
@
clickLeft=
"back"
left-icon=
"back"
right-text=
"帮助"
:statusBar=
"true"
:border=
"false"
></uni-nav-bar>
<view
v-if=
"isShow"
class=
"wrap-content"
>
<view
class=
"wrap-content"
>
<view
class=
"content"
>
<view
class=
"content"
>
<!-- 顶部文字 -->
<!-- 顶部文字 -->
<text
class=
"content-top-title"
>
登陆后即可展示自己
</text>
<text
class=
"content-top-title"
>
登陆后即可展示自己
</text>
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</view>
</view>
<!-- 登录按钮弹窗 -->
<!-- 登录按钮弹窗 -->
<login-action-sheet
ref=
"loginActionSheet"
></login-action-sheet>
<login-action-sheet
ref=
"loginActionSheet"
></login-action-sheet>
<uni-quick-login
@
univerifyEnd=
"isShow = 1"
></uni-quick-login>
<uni-quick-login></uni-quick-login>
</view>
</view>
</
template
>
</
template
>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isShow
:
tru
e
,
isShow
:
fals
e
,
link
:
[{
link
:
[{
text
:
'
用户协议
'
,
text
:
'
用户协议
'
,
to
:
'
/baidu.com
'
to
:
'
/baidu.com
'
...
@@ -54,6 +54,11 @@
...
@@ -54,6 +54,11 @@
currenPhoneArea
:
'
+86
'
,
currenPhoneArea
:
'
+86
'
,
phoneNumber
:
''
phoneNumber
:
''
}
}
},
onReady
()
{
setTimeout
(()
=>
{
this
.
isShow
=
true
},
1500
);
},
},
computed
:
{
computed
:
{
canGetShortMsg
()
{
canGetShortMsg
()
{
...
@@ -81,17 +86,76 @@
...
@@ -81,17 +86,76 @@
},
},
openLoginList
()
{
openLoginList
()
{
this
.
$refs
.
loginActionSheet
.
open
();
this
.
$refs
.
loginActionSheet
.
open
();
},
back
(){
uni
.
navigateBack
()
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
<<<<<<<
HEAD
page
{
background
:
transparent
;
}
/* #ifndef APP-NVUE */
page
{
display
:
flex
;
flex-direction
:
column
;
flex
:
1
;
height
:
100%
;
}
/* #endif */
.wrap
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
flex-direction
:
column
;
flex
:
1
;
width
:
750
rpx
;
background-color
:
#fff
;
}
.wrap-content
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
flex
:
1
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.content
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
width
:
630
rpx
;
flex-direction
:
column
;
}
=======
@import
url("../../common/loginPage.css")
;
@import
url("../../common/loginPage.css")
;
>>>>>>>
4102167
b2d3d22ebf4994a07a5b8421d8539345c
.content-top-title
{
.content-top-title
{
text-align
:
center
;
text-align
:
center
;
}
}
<<<<<<<
HEAD
@import
url("../../common/myStyle.css")
;
.lgnin-iknow
{
padding-top
:
24
rpx
;
padding-bottom
:
48
rpx
;
}
.phone-input-box
{
height
:
85
rpx
;
background-color
:
#f9f9f9
;
border-radius
:
6
rpx
;
flex-direction
:
row
;
flex-wrap
:
nowrap
;
align-items
:
center
;
=======
.login-iknow{
.login-iknow{
>>>>>>>
4102167b2d3d22ebf4994a07a5b8421d8539345c
justify-content
:
center
;
justify-content
:
center
;
}
}
</
style
>
</
style
>
\ No newline at end of file
uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue
浏览文件 @
f3fed494
<
template
>
<
template
>
<view
class=
"quick-login-box"
v-if=
"isShow"
>
<view
class=
"quick-login-box"
>
<view
class=
"item"
v-for=
"(
{text,logo,name},index) in providerList" :key="index" @click="login(name)">
<view
class=
"item"
v-for=
"(
{text,logo,name},index) in providerList" :key="index" @click="login(name)">
<image
class=
"logo"
:src=
"logo"
mode=
"widthFix"
></image>
<image
class=
"logo"
:src=
"logo"
mode=
"widthFix"
></image>
<text
class=
"login-title"
>
{{
text
}}
</text>
<text
class=
"login-title"
>
{{
text
}}
</text>
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isShow
:
false
,
config
:
{
config
:
{
"
weixin
"
:
{
"
weixin
"
:
{
"
text
"
:
"
微信登陆
"
,
"
text
"
:
"
微信登陆
"
,
...
@@ -78,8 +77,6 @@
...
@@ -78,8 +77,6 @@
console
.
log
(
err
);
console
.
log
(
err
);
if
(
err
.
errCode
===
30002
){
if
(
err
.
errCode
===
30002
){
console
.
log
(
'
你手动关闭了,一键登陆
'
);
console
.
log
(
'
你手动关闭了,一键登陆
'
);
this
.
isShow
=
1
this
.
$emit
(
'
univerifyEnd
'
)
}
}
}
}
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录