修复请求问题

This commit is contained in:
2025-07-23 10:10:39 +08:00
parent b711e87f50
commit eb2b6c15f2
2 changed files with 14 additions and 5 deletions

View File

@@ -18,7 +18,7 @@
</el-input>
</el-col>
<el-col :span="10" class="login-captcha">
<img :src="captchaPath" @click="getCaptcha()" alt="">
<img :src="captchaPath" @click="getCaptcha()" alt="">
</el-col>
</el-row>
</el-form-item>
@@ -35,6 +35,7 @@
<script>
import { getUUID } from '@/utils'
import { entryName } from '@/utils/httpRequest'
import { method } from 'lodash'
export default {
data () {
return {
@@ -91,9 +92,17 @@
})
},
// 获取验证码
getCaptcha () {
async getCaptcha () {
this.dataForm.uuid = getUUID()
this.captchaPath = this.$http.adornUrl(`indetcode/getCode?uuid=${this.dataForm.uuid}`)
const res =await this.$http({
url:'indetcode/getCode',
method:'get',
params:{
uuid:this.dataForm.uuid
}
})
console.log(res);
this.captchaPath=res.data.data.img
}
}
}