|
|
@@ -94,15 +94,24 @@
|
|
94
|
94
|
// this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
|
|
95
|
95
|
// },
|
|
96
|
96
|
// 获取图形验证码
|
|
97
|
|
- getCode() {
|
|
98
|
|
- getCodeImg().then(res => {
|
|
99
|
|
- this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
|
100
|
|
- if (this.captchaEnabled) {
|
|
101
|
|
- this.codeUrl = 'data:image/gif;base64,' + res.img
|
|
102
|
|
- this.loginForm.uuid = res.uuid
|
|
103
|
|
- }
|
|
104
|
|
- })
|
|
105
|
|
- },
|
|
|
97
|
+ // getCode() {
|
|
|
98
|
+ // getCodeImg().then(res => {
|
|
|
99
|
+ // this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
|
|
100
|
+ // if (this.captchaEnabled) {
|
|
|
101
|
+ // this.codeUrl = 'data:image/gif;base64,' + res.img
|
|
|
102
|
+ // this.loginForm.uuid = res.uuid
|
|
|
103
|
+ // }
|
|
|
104
|
+ // })
|
|
|
105
|
+ // },
|
|
|
106
|
+ // 获取验证码
|
|
|
107
|
+ getCode() {
|
|
|
108
|
+ this.$axios.get('/captchaImage').then(res => {
|
|
|
109
|
+ this.codeUrl = 'data:image/png;base64,' + res.data.img;
|
|
|
110
|
+ this.loginForm.uuid = res.data.uuid;
|
|
|
111
|
+ }).catch(() => {
|
|
|
112
|
+ this.$message.error("验证码获取失败");
|
|
|
113
|
+ });
|
|
|
114
|
+ },
|
|
106
|
115
|
// 登录方法
|
|
107
|
116
|
async handleLogin() {
|
|
108
|
117
|
if (this.loginForm.username === "") {
|