|
@@ -116,12 +116,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import md5 from 'md5'
|
|
|
+// import md5 from 'md5'
|
|
|
import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
|
|
|
import { mapActions } from 'vuex'
|
|
|
import { timeFix } from '@/utils/util'
|
|
|
import { getSmsCaptcha, get2step } from '@/api/login'
|
|
|
-import { updateTheme } from '@/components/SettingDrawer/settingConfig'
|
|
|
+// import { updateTheme } from '@/components/SettingDrawer/settingConfig'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -159,7 +159,6 @@ export default {
|
|
|
// })
|
|
|
// this.requiredTwoStepCaptcha = true
|
|
|
const rem = this.$cookies.get('REMEMBER_ME')
|
|
|
- console.log(rem)
|
|
|
if (rem && rem.rememberMe) {
|
|
|
this.username = rem.username
|
|
|
this.password = rem.password
|
|
@@ -264,11 +263,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
loginSuccess (res) {
|
|
|
- console.log(res)
|
|
|
// check res.homePage define, set $router.push name res.homePage
|
|
|
// Why not enter onComplete
|
|
|
this.$router.push({ name: 'index' }, () => {
|
|
|
- console.log('onComplete')
|
|
|
this.$notification.success({
|
|
|
message: '欢迎',
|
|
|
description: `${timeFix()},欢迎回来`
|
|
@@ -277,7 +274,6 @@ export default {
|
|
|
this.isLoginError = false
|
|
|
},
|
|
|
requestFailed (err) {
|
|
|
- console.log(err, 'error')
|
|
|
this.isLoginError = true
|
|
|
this.$notification['error']({
|
|
|
message: '提示',
|