|
|
@@ -41,13 +41,38 @@
|
|
|
langReplaceTextIgnoreKeys: languageInfo.langReplaceTextIgnoreKeys
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
+ getVerify();
|
|
|
})();
|
|
|
// 刷新验证码
|
|
|
function refresh_code()
|
|
|
{
|
|
|
- document.querySelector('.code_img').src = '/login/verify?' + Math.random();
|
|
|
+ getVerify();
|
|
|
+ // document.querySelector('.code_img').src = 'http://localhost:8081/login/verifyCode?' + Math.random();
|
|
|
+ }
|
|
|
+ function getVerify() {
|
|
|
+ // 创建请求对象
|
|
|
+ var request = new XMLHttpRequest()
|
|
|
+ request.open('get', 'http://localhost:8081/login/verifyCode')
|
|
|
+ request.send()
|
|
|
+ // 获取网络请求响应的数据
|
|
|
+ request.onreadystatechange = function () {
|
|
|
+ // 响应完毕,并且请求成功
|
|
|
+ if (request.readyState === 4 && request.status === 200) {
|
|
|
+ var res = JSON.parse(request.responseText)
|
|
|
+ document.querySelector('.code_img').src = "data:image/jpeg;base64," + res.img;
|
|
|
+ console.log(res.token)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
+<style>
|
|
|
+ .amis-scope .cxd-InputGroup .cxd-TextControl-input:not(:last-child) {
|
|
|
+ border-right-width: -1;
|
|
|
+ border-top-right-radius: 0;
|
|
|
+ border-bottom-right-radius: 0;
|
|
|
+}
|
|
|
+</style>
|
|
|
</body>
|
|
|
</html>
|
|
|
|