提交 15ccefd1 authored 作者: 王鹏飞's avatar 王鹏飞

chore:登录优化;我的页面增加菜单;

上级 6eb67cfc
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
</div> </div>
<div class="login-bd"> <div class="login-bd">
<div class="login-form"> <div class="login-form">
<!-- 账号登录 -->
<!-- <account-login ref="form" @submit="onSubmit" v-if="!this.isWechat"></account-login> -->
<!-- 验证码登录 --> <!-- 验证码登录 -->
<code-login ref="form" @submit="onSubmit"></code-login> <code-login ref="form" @submit="onSubmit" v-if="isWechat"></code-login>
<!-- 账号登录 -->
<account-login ref="form" @submit="onSubmit" v-else></account-login>
<div class="login-button" @click="handleSubmit">立即绑定</div> <div class="login-button" @click="handleSubmit">立即绑定</div>
</div> </div>
</div> </div>
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
}, },
// 登录 // 登录
loginRequest(data) { loginRequest(data) {
const params = Object.assign({}, this.ruleForm, data) const params = Object.assign({}, this.ruleForm, data, { type: 1 })
api api
.login(params) .login(params)
.then(response => { .then(response => {
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
// 绑定微信并登录 // 绑定微信并登录
bindWechat(data) { bindWechat(data) {
const params = Object.assign({}, this.ruleForm, data, { const params = Object.assign({}, this.ruleForm, data, {
type: 2,
identity: 'transport', identity: 'transport',
unionid: this.unionid, unionid: this.unionid,
code: data.password code: data.password
...@@ -153,10 +154,7 @@ export default { ...@@ -153,10 +154,7 @@ export default {
window.location.href = wechatUrl window.location.href = wechatUrl
}, },
checkWechatLogin() { checkWechatLogin() {
return !!( return !!(Cookies.get('wechat_login_error') || Cookies.get('wechat_login_no_phone_error'))
Cookies.get('wechat_login_error') ||
Cookies.get('wechat_login_no_phone_error')
)
}, },
// 显示登录提示框 // 显示登录提示框
showLoginDialog() { showLoginDialog() {
...@@ -244,11 +242,7 @@ export default { ...@@ -244,11 +242,7 @@ export default {
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
line-height: 40px; line-height: 40px;
background: linear-gradient( background: linear-gradient(270deg, rgba(43, 124, 233, 1) 0%, rgba(103, 168, 255, 1) 100%);
270deg,
rgba(43, 124, 233, 1) 0%,
rgba(103, 168, 255, 1) 100%
);
text-align: center; text-align: center;
border-radius: 3px; border-radius: 3px;
cursor: pointer; cursor: pointer;
......
...@@ -29,6 +29,14 @@ export default { ...@@ -29,6 +29,14 @@ export default {
title: '已购课程', title: '已购课程',
url: '/my/buyCourses' url: '/my/buyCourses'
}, },
{
title: '已学课程',
url: '/my/learned'
},
{
title: '学习提醒',
url: '/my/alarm'
},
{ {
title: '已做试题', title: '已做试题',
url: '/my/questionsList' url: '/my/questionsList'
...@@ -38,10 +46,6 @@ export default { ...@@ -38,10 +46,6 @@ export default {
url: '/my/collectQuestions' url: '/my/collectQuestions'
}, },
// { // {
// title: '已学课程',
// url: '/my/buyCourses'
// }
// {
// title: '消息/通知', // title: '消息/通知',
// url: '/my/buyCourses' // url: '/my/buyCourses'
// }, // },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论