|
|
@ -1,11 +1,11 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view class="register absolute"> |
|
|
|
<view class="register absolute"> |
|
|
|
<view class="whiteBg" v-if="formItem === 1"> |
|
|
|
<view class="whiteBg"> |
|
|
|
<view class="title acea-row"> |
|
|
|
<view class="title acea-row"> |
|
|
|
<view class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)" :key="index">{{ item }}</view> |
|
|
|
<view class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)" :key="index">{{ item }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 手机号登录 --> |
|
|
|
<!-- 手机号登录 --> |
|
|
|
<view class="list" :hidden="current !== 0"> |
|
|
|
<view class="list"> |
|
|
|
<form @submit.prevent="submit"> |
|
|
|
<form @submit.prevent="submit"> |
|
|
|
<view class="item getPhoneCode"> |
|
|
|
<view class="item getPhoneCode"> |
|
|
|
<view class="phoneInput acea-row row-between-wrapper"> |
|
|
|
<view class="phoneInput acea-row row-between-wrapper"> |
|
|
@ -23,80 +23,18 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</form> |
|
|
|
</form> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 账号密码登录 --> |
|
|
|
|
|
|
|
<view class="list" :hidden="current !== 1"> |
|
|
|
<view class="logon" @click="loginMobile">手机号登录</view> |
|
|
|
<view class="item"> |
|
|
|
|
|
|
|
<view class="acea-row row-between-wrapper"> |
|
|
|
|
|
|
|
<input type="text" placeholder="输入手机号码" v-model="account" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item"> |
|
|
|
|
|
|
|
<view class="acea-row row-between-wrapper"> |
|
|
|
|
|
|
|
<input type="password" placeholder="输入密码" v-model="password" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- <view class="item"> |
|
|
|
|
|
|
|
<view class="align-left"> |
|
|
|
|
|
|
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> |
|
|
|
|
|
|
|
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" |
|
|
|
|
|
|
|
@click="code">{{ text }}</button> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="logon" @click="loginMobile" :hidden="current === 1">手机号登录</view> |
|
|
|
|
|
|
|
<view class="logon" @click="submit" :hidden="current !== 1">登录</view> |
|
|
|
|
|
|
|
<view class="tip"> |
|
|
|
<view class="tip"> |
|
|
|
第一次使用? |
|
|
|
未注册的手机号验证通过后会自动注册 |
|
|
|
<text @click="formItem = 2" class="font-color-red">立即注册</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 注册 --> |
|
|
|
|
|
|
|
<view class="whiteBg" v-else> |
|
|
|
|
|
|
|
<view class="title acea-row row-between-wrapper"> |
|
|
|
|
|
|
|
<view class="item on">注册账号</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="list"> |
|
|
|
|
|
|
|
<view class="item"> |
|
|
|
|
|
|
|
<view> |
|
|
|
|
|
|
|
<!-- <svg class="icon" aria-hidden="true"> |
|
|
|
|
|
|
|
<use xlink:href="#icon-phone_" /> |
|
|
|
|
|
|
|
</svg>--> |
|
|
|
|
|
|
|
<input name="account" type="text" placeholder="输入手机号码" v-model="account" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item"> |
|
|
|
|
|
|
|
<view class="align-left"> |
|
|
|
|
|
|
|
<!-- <svg class="icon" aria-hidden="true"> |
|
|
|
|
|
|
|
<use xlink:href="#icon-code_1" /> |
|
|
|
|
|
|
|
</svg>--> |
|
|
|
|
|
|
|
<input name="verifyCode" type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> |
|
|
|
|
|
|
|
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">{{ text }}</button> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="item"> |
|
|
|
<view class="hint"> |
|
|
|
<view> |
|
|
|
<radio :checked="isChecked" @tap.stop="onChange" /> |
|
|
|
<!-- <svg class="icon" aria-hidden="true"> |
|
|
|
我已经阅读并遵守 |
|
|
|
<use xlink:href="#icon-code_" /> |
|
|
|
<text class="link" @tap="goNewsDetail(50,'用户协议')">《用户协议》</text>与 |
|
|
|
</svg>--> |
|
|
|
<text class="link" @tap="goNewsDetail(49,'隐私政策')">《隐私政策》</text> |
|
|
|
<input name="password" type="password" placeholder="填写您的登录密码" v-model="password" /> |
|
|
|
<!--上面协议是固定的 请添加相应id文章--> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- #ifndef H5 --> |
|
|
|
|
|
|
|
<view class="item"> |
|
|
|
|
|
|
|
<view> |
|
|
|
|
|
|
|
<!-- <svg class="icon" aria-hidden="true"> |
|
|
|
|
|
|
|
<use xlink:href="#icon-phone_" /> |
|
|
|
|
|
|
|
</svg>--> |
|
|
|
|
|
|
|
<input name="inviteCode" type="text" placeholder="输入邀请码" v-model="inviteCode" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="logon" @click="register">注册</view> |
|
|
|
|
|
|
|
<view class="tip"> |
|
|
|
|
|
|
|
已有账号? |
|
|
|
|
|
|
|
<text @click="formItem = 1" class="font-color-red">立即登录</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -117,7 +55,7 @@ export default { |
|
|
|
mixins: [sendVerifyCode], |
|
|
|
mixins: [sendVerifyCode], |
|
|
|
data: function() { |
|
|
|
data: function() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
navList: ['手机号登录', '密码登录'], |
|
|
|
navList: ['手机号登录'], |
|
|
|
// navList: ["手机号登录",], |
|
|
|
// navList: ["手机号登录",], |
|
|
|
current: 0, |
|
|
|
current: 0, |
|
|
|
account: '', |
|
|
|
account: '', |
|
|
@ -129,10 +67,23 @@ export default { |
|
|
|
timer: null, |
|
|
|
timer: null, |
|
|
|
clock: 60, |
|
|
|
clock: 60, |
|
|
|
clockText: '验证码', |
|
|
|
clockText: '验证码', |
|
|
|
|
|
|
|
isChecked: false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
onChange() { |
|
|
|
|
|
|
|
console.log('isChecked;',this.isChecked) |
|
|
|
|
|
|
|
this.isChecked = !this.isChecked |
|
|
|
|
|
|
|
}, |
|
|
|
async loginMobile() { |
|
|
|
async loginMobile() { |
|
|
|
|
|
|
|
if(!this.isChecked) { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: '请勾选下面协议', |
|
|
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
|
|
duration: 2000, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
var that = this |
|
|
|
var that = this |
|
|
|
const { account, captcha } = that |
|
|
|
const { account, captcha } = that |
|
|
|
try { |
|
|
|
try { |
|
|
@ -325,6 +276,18 @@ export default { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
<style lang="scss"> |
|
|
|
|
|
|
|
.hint { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
padding: 20rpx 40rpx; |
|
|
|
|
|
|
|
font-size: 25rpx; |
|
|
|
|
|
|
|
color: #000; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.link { |
|
|
|
|
|
|
|
color: #ff8e3c; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
.register .whiteBg .title .item { |
|
|
|
.register .whiteBg .title .item { |
|
|
|
border-bottom: 2px solid; |
|
|
|
border-bottom: 2px solid; |
|
|
|
} |
|
|
|
} |
|
|
|