提交 6924a42d 编写于 作者: DCloud_JSON's avatar DCloud_JSON

调整密码登陆

上级 845d00d6
......@@ -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"] //默认就是短信验证码登陆
},
......
<template>
<view class="center">
<view class="userInfo" @click="toSettings">
<view class="userInfo" @click="toEdit">
<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'
......
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"
......
......@@ -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: 20rpx;
}
.auth-box {
justify-content: flex-start;
margin-top: 20rpx;
justify-content: space-between;
margin-top: 20px;
}
.login-text-sub {
color: #8a8f8b;
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册