|
|
@@ -10,7 +10,7 @@ |
|
|
|
<!-- 默认登录 --> |
|
|
|
<div v-if="loginMethod == 1"> |
|
|
|
<el-input |
|
|
|
placeholder="请输入用户名..." |
|
|
|
placeholder="请输入用户名" |
|
|
|
v-model="accountName" |
|
|
|
class="mb-20" |
|
|
|
:class="{'is-error':accountNameError}" |
|
|
@@ -19,9 +19,9 @@ |
|
|
|
<i slot="prefix" class="el-input__icon el-icon-user"></i> |
|
|
|
<div class="is-error-info" v-if="accountNameError">请输入用户名</div> |
|
|
|
</el-input> |
|
|
|
<div class="is-error-info" v-if="accountNameError">请输入用户名...</div> |
|
|
|
<div class="is-error-info" v-if="accountNameError">请输入用户名</div> |
|
|
|
<el-input |
|
|
|
placeholder="请输入登录密码..." |
|
|
|
placeholder="请输入登录密码" |
|
|
|
v-model="password" |
|
|
|
show-password |
|
|
|
class="mb-20" |
|
|
@@ -30,16 +30,16 @@ |
|
|
|
> |
|
|
|
<i slot="prefix" class="el-input__icon el-icon-lock"></i> |
|
|
|
</el-input> |
|
|
|
<div class="is-error-info" v-if="passwordError">请输入登录密码...</div> |
|
|
|
<div class="is-error-info" v-if="passwordError">请输入登录密码</div> |
|
|
|
</div> |
|
|
|
<!-- 手机登录 --> |
|
|
|
<div v-if="loginMethod == 2"> |
|
|
|
<el-input placeholder="请输入手机号码..." v-model="mobilePhone" class="mb-20"> |
|
|
|
<el-input placeholder="请输入手机号码" v-model="mobilePhone" class="mb-20"> |
|
|
|
<i slot="prefix" class="el-input__icon el-icon-mobile-phone"></i> |
|
|
|
</el-input> |
|
|
|
<div class="verification-code-row mb-20"> |
|
|
|
<el-input |
|
|
|
placeholder="请输入图片验证码..." |
|
|
|
placeholder="请输入图片验证码" |
|
|
|
v-model="imgCode" |
|
|
|
class="fl img-code-input" |
|
|
|
> |
|
|
@@ -56,7 +56,7 @@ |
|
|
|
</div> |
|
|
|
<div class="verification-code-row mb-20"> |
|
|
|
<el-input |
|
|
|
placeholder="请输入手机验证码..." |
|
|
|
placeholder="请输入手机验证码" |
|
|
|
v-model="phoneCode" |
|
|
|
class="fl img-code-input" |
|
|
|
:class="{'is-error':phoneCodeError}" |
|
|
@@ -83,7 +83,7 @@ |
|
|
|
<!-- 注册 || 忘记密码 --> |
|
|
|
<div v-if="loginMethod == 3 || loginMethod == 4"> |
|
|
|
<el-input |
|
|
|
placeholder="请输入手机号码..." |
|
|
|
placeholder="请输入手机号码" |
|
|
|
v-model="mobilePhone" |
|
|
|
class="mb-20" |
|
|
|
:class="{'is-error':mobilePhoneError}" |
|
|
@@ -96,7 +96,7 @@ |
|
|
|
v-if="mobilePhoneError" |
|
|
|
>{{ mobilePhone ? '请输入正确的手机号码':'请输入手机号码' }}</div> |
|
|
|
<el-input |
|
|
|
placeholder="请输入用户名..." |
|
|
|
placeholder="请输入用户名" |
|
|
|
v-model="accountName" |
|
|
|
class="mb-20" |
|
|
|
:class="{'is-error':accountNameError}" |
|
|
@@ -108,7 +108,7 @@ |
|
|
|
<div class="is-error-info" v-if="accountNameError && loginMethod == 3">请输入用户名</div> |
|
|
|
<form> |
|
|
|
<el-input |
|
|
|
placeholder="请输入新密码..." |
|
|
|
placeholder="请输入新密码" |
|
|
|
v-model="newPassword" |
|
|
|
show-password |
|
|
|
class="mb-20" |
|
|
@@ -122,7 +122,7 @@ |
|
|
|
<div class="is-error-info" v-if="newPasswordError">请输入新密码</div> |
|
|
|
<form> |
|
|
|
<el-input |
|
|
|
placeholder="请再次输入新密码..." |
|
|
|
placeholder="请再次输入新密码" |
|
|
|
v-model="confirmPassword" |
|
|
|
show-password |
|
|
|
class="mb-20" |
|
|
@@ -136,7 +136,7 @@ |
|
|
|
<div class="is-error-info" v-if="confirmPasswordError">请输入新密码</div> |
|
|
|
<div class="verification-code-row mb-20"> |
|
|
|
<el-input |
|
|
|
placeholder="请输入图片验证码..." |
|
|
|
placeholder="请输入图片验证码" |
|
|
|
v-model="imgCode" |
|
|
|
class="fl img-code-input" |
|
|
|
:class="{'is-error':imgCodeError}" |
|
|
@@ -156,7 +156,7 @@ |
|
|
|
</div> |
|
|
|
<div class="verification-code-row mb-20"> |
|
|
|
<el-input |
|
|
|
placeholder="请输入手机验证码..." |
|
|
|
placeholder="请输入手机验证码" |
|
|
|
v-model="phoneCode" |
|
|
|
class="fl img-code-input" |
|
|
|
:class="{'is-error':phoneCodeError}" |
|
|
@@ -180,12 +180,15 @@ |
|
|
|
>请输入手机验证码</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="remember-row mb-20" v-if="loginMethod == 1 || loginMethod == 2"> |
|
|
|
<div class="remember-row mb-20" v-if="loginMethod == 1 "> |
|
|
|
<div class="remember-password fl" v-if="loginMethod == 1"> |
|
|
|
<el-checkbox v-model="isRemember">记住密码</el-checkbox> |
|
|
|
</div> |
|
|
|
<span class="forgot-password fr pointer" @click="loginMethodChange(4)">忘记密码?</span> |
|
|
|
</div> |
|
|
|
<div class="remember-row mb-20" v-if="loginMethod == 4 || loginMethod == 2"> |
|
|
|
<span class="forgot-password fr pointer" @click="linkCustomerService">手机号不可用?</span> |
|
|
|
</div> |
|
|
|
<!-- 登录按钮 --> |
|
|
|
<div class="login-btn"> |
|
|
|
<el-button |
|
|
@@ -289,6 +292,14 @@ export default { |
|
|
|
word: "获取验证码", // 手机短信验证码文字 |
|
|
|
isOvertime: false, // 手机短信验证时间判断 |
|
|
|
phoneCodeDisable: false, // 手机短信验证码按钮禁用开启 |
|
|
|
// 客服参数 |
|
|
|
queryParams: { |
|
|
|
token: "1017bd2a605fb4f4a3f7267328cbf240", // 与后台交互的凭证 |
|
|
|
noCanClose: 0, // PC端是否显示广告 |
|
|
|
uid: "", // 用户ID |
|
|
|
nickName: "", //用户昵称 |
|
|
|
phone: "", //用户手机号 |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@@ -316,7 +327,7 @@ export default { |
|
|
|
getVerificationCode() { |
|
|
|
this.imgCodeUrl = |
|
|
|
process.env.VUE_APP_BASE_API + |
|
|
|
"/verificationCode/img?height=40&width=84&fontSize=25" + |
|
|
|
"verificationCode/img?height=40&width=84&fontSize=25" + |
|
|
|
"&n=" + |
|
|
|
parseInt(Math.random() * 9999 + 1); |
|
|
|
}, |
|
|
@@ -611,6 +622,28 @@ export default { |
|
|
|
this.phoneCodeError = false; |
|
|
|
this.mobilePhoneError = false; |
|
|
|
}, |
|
|
|
// 跳转客服 |
|
|
|
linkCustomerService() { |
|
|
|
// 是否登录 |
|
|
|
console.log(this.currentAccount, "this.currentAccount"); |
|
|
|
if (this.currentAccount) { |
|
|
|
this.queryParams.uid = this.currentAccount.accountId; |
|
|
|
this.queryParams.nickName = this.currentAccount.accountName; |
|
|
|
this.queryParams.phone = this.currentAccount.mobilePhone; |
|
|
|
} |
|
|
|
let url = `http://www.parkkf.com/chat/index?`; |
|
|
|
for (let key in this.queryParams) { |
|
|
|
if ( |
|
|
|
this.queryParams[key] !== "" && |
|
|
|
this.queryParams[key] !== undefined && |
|
|
|
this.queryParams[key] !== null |
|
|
|
) { |
|
|
|
url += `&${key}=${this.queryParams[key]}`; |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(url); |
|
|
|
window.open(url); |
|
|
|
}, |
|
|
|
}, |
|
|
|
destroyed() { |
|
|
|
clearInterval(this.sendTimer); |