// 验证码相关数据
const captchaImage = ref("");
// 刷新验证码
const refreshCaptcha = () => {
captchaImage.value = `http://192.168.2.110/api/captcha.php?timestamp=${Date.now()}`;
};
// 初始化时刷新验证码
refreshCaptcha();
等于说咱就是一整个直接利用时间的方法重新获取接口数据,给验证码绑定一个点击事件即可
// 验证码相关数据
const captchaImage = ref("");
// 刷新验证码
const refreshCaptcha = () => {
captchaImage.value = `http://192.168.2.110/api/captcha.php?timestamp=${Date.now()}`;
};
// 初始化时刷新验证码
refreshCaptcha();
等于说咱就是一整个直接利用时间的方法重新获取接口数据,给验证码绑定一个点击事件即可