Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-starter
提交
6924a42d
U
uni-starter
项目概览
DCloud
/
uni-starter
通知
4684
Star
229
Fork
210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
6924a42d
编写于
4月 22, 2021
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整密码登陆
上级
845d00d6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
46 deletion
+21
-46
baseapp.config.js
baseapp.config.js
+2
-2
pages/ucenter/ucenter.vue
pages/ucenter/ucenter.vue
+10
-16
uni_modules/uni-agree/utils/uni-agree.js
uni_modules/uni-agree/utils/uni-agree.js
+2
-2
uni_modules/uni-login-page/pages/pwd-login/pwd-login.vue
uni_modules/uni-login-page/pages/pwd-login/pwd-login.vue
+7
-8
uni_modules/uni-login-page/pages/register/register.vue
uni_modules/uni-login-page/pages/register/register.vue
+0
-18
未找到文件。
baseapp.config.js
浏览文件 @
6924a42d
...
...
@@ -15,8 +15,8 @@ module.exports = {
"
router
"
:{
"
needLogin
"
:[
//配置需要路由拦截的页面地址,在打开这些页面之前会自动检查(不联网)uni_id_token的值是否存在/过期等
"
/pages/ucenter/edit/edit
"
,
"
/
pages/ucenter/settings/settings
"
,
"
/uni_modules/uni-
login-page/pages/index/pwd-retrieve
"
"
/
uni_modules/uni-login-page/pages/index/pwd-retrieve
"
,
"
/uni_modules/uni-
id-users/pages/uni-id-users/edit
"
],
"
login
"
:[
"
univerify
"
,
"
smsCode
"
,
"
username
"
,
"
weixin
"
,
"
apple
"
]
//默认就是短信验证码登陆
},
...
...
pages/ucenter/ucenter.vue
浏览文件 @
6924a42d
<
template
>
<view
class=
"center"
>
<view
class=
"userInfo"
@
click=
"to
Settings
"
>
<view
class=
"userInfo"
@
click=
"to
Edit
"
>
<image
class=
"logo-img"
:src=
"login ? (userInfo.avatar || avatarUrl) :avatarUrl"
></image>
<view
class=
"logo-title"
>
<text
class=
"uer-name"
>
{{
login
?
userInfo
.
nickname
||
userInfo
.
username
||
userInfo
.
mobile
:
'
未登录
'
}}
</text>
...
...
@@ -83,6 +83,9 @@
},
{
title
:
'
关于
'
,
to
:
'
/pages/ucenter/about/about
'
},
{
title
:
'
设置
'
,
to
:
'
/pages/ucenter/settings/settings
'
}]
]
}
...
...
@@ -103,8 +106,7 @@
login
:
'
user/hasLogin
'
})
// #ifdef APP-PLUS
,
appVersion
()
{
,
appVersion
()
{
return
getApp
().
appVersion
}
// #endif
...
...
@@ -130,18 +132,11 @@
console
.
log
(
await
callCheckVersion
());
checkUpdate
()
},
goLogin
()
{
if
(
!
this
.
login
)
{
console
.
log
(
'
点击前往登录
'
);
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-login-page/pages/index/index
'
});
}
else
{
console
.
log
(
'
点击编辑信息
'
);
uni
.
navigateTo
({
url
:
'
./edit/edit
'
})
}
toEdit
()
{
console
.
log
(
'
点击编辑信息
'
);
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-id-users/pages/uni-id-users/edit
'
})
},
tapGrid
(
index
)
{
uni
.
showToast
({
...
...
@@ -173,7 +168,6 @@
* 获取积分信息
*/
getScore
()
{
if
(
!
this
.
userInfo
)
return
uni
.
showToast
({
title
:
'
请登录后查看积分
'
,
icon
:
'
none
'
...
...
uni_modules/uni-agree/utils/uni-agree.js
浏览文件 @
6924a42d
export
default
function
(){
if
(
uni
.
getSystemInfoSync
().
platform
==
"
android
"
)
{
let
iKnowAgree
=
uni
.
getStorageSync
(
'
iKnowAgree
'
)
||
false
;
if
(
!
iKnowAgree
){
let
userprotocol
=
uni
.
getStorageSync
(
'
userprotocol
'
)
||
false
;
if
(
!
userprotocol
){
uni
.
navigateTo
({
url
:
'
uni_modules/uni-agree/pages/uni-agree/uni-agree
'
,
animationType
:
"
none
"
...
...
uni_modules/uni-login-page/pages/pwd-login/pwd-login.vue
浏览文件 @
6924a42d
...
...
@@ -9,7 +9,7 @@
<uni-forms
ref=
"form"
:value=
"formData"
:rules=
"rules"
>
<uni-forms-item
name=
"phone"
>
<uni-easyinput
type=
"number"
class=
"phone-input-box"
:inputBorder=
"false"
v-model=
"formData.phone"
maxlength=
"11"
placeholder=
"请输入手机号/用户名
/邮箱
"
>
v-model=
"formData.phone"
maxlength=
"11"
placeholder=
"请输入手机号/用户名"
>
<template
slot=
"left"
>
<!-- 当前仅支持中国大陆手机号 -->
<!--
<picker
mode=
"selector"
:range=
"phoneArea"
@
change=
"selectPhoneArea"
>
-->
...
...
@@ -20,15 +20,14 @@
<uni-easyinput
type=
"password"
class=
"phone-input-box"
:inputBorder=
"false"
v-model=
"formData.pwd"
placeholder=
"请输入密码"
></uni-easyinput>
</uni-forms-item>
<button
class=
"send-btn-box"
:disabled=
"!canLogin"
:type=
"canLogin?'primary':'default'"
@
click=
"pwdLogin"
>
登录
</button>
<button
class=
"send-btn-box"
type=
"primary"
@
click=
"pwdLogin"
>
登录
</button>
</uni-forms>
<!-- 忘记密码 -->
<view
class=
"auth-box"
>
<text
class=
"login-text
login-text-sub"
>
忘记了?
</text>
<text
class=
"login-text"
@
click=
"toRetrievePwd"
>
找回密码
</text>
<text
class=
"login-text
"
@
click=
"toRetrievePwd"
>
忘记密码
</text>
<text
class=
"login-text"
@
click=
"toRetrievePwd"
>
注册账号
</text>
</view>
<
button
type=
"primary"
class=
"toRegister"
@
click=
"toRegister"
>
注册账号
</button
>
<
!-- <button type="primary" plain class="toRegister" @click="toRegister">注册账号</button> --
>
</view>
</view>
<uni-quick-login
ref=
"uniQuickLogin"
></uni-quick-login>
...
...
@@ -132,8 +131,8 @@
margin-top
:
20
rpx
;
}
.auth-box
{
justify-content
:
flex-start
;
margin-top
:
20
r
px
;
justify-content
:
space-between
;
margin-top
:
20px
;
}
.login-text-sub
{
color
:
#8a8f8b
;
...
...
uni_modules/uni-login-page/pages/register/register.vue
浏览文件 @
6924a42d
...
...
@@ -4,9 +4,6 @@
<uni-forms-item
name=
"username"
label=
"用户名"
required
>
<uni-easyinput
placeholder=
"请输入用户名"
v-model=
"formData.username"
trim=
"both"
/>
</uni-forms-item>
<uni-forms-item
name=
"gender"
label=
"性别"
>
<uni-data-checkbox
v-model=
"formData.gender"
:localdata=
"formOptions.gender_localdata"
/>
</uni-forms-item>
<uni-forms-item
name=
"nickname"
label=
"昵称"
>
<uni-easyinput
placeholder=
"请输入用户昵称"
v-model=
"formData.nickname"
trim=
"both"
/>
</uni-forms-item>
...
...
@@ -32,25 +29,10 @@ import mixin from '../../common/loginPage.mixin.js';
return
{
formData
:
{
"
username
"
:
""
,
"
gender
"
:
0
,
"
nickname
"
:
""
,
'
password
'
:
''
,
'
pwd2
'
:
''
},
formOptions
:
{
"
gender_localdata
"
:
[{
"
text
"
:
"
未知
"
,
"
value
"
:
0
},
{
"
text
"
:
"
男
"
,
"
value
"
:
1
},
{
"
text
"
:
"
女
"
,
"
value
"
:
2
}
]
},
rules
}
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录