Commit 8933abdf by 姜雷

修改绘制验证码方法名

parent 96591f73
...@@ -61,13 +61,13 @@ class Vcode extends Component { ...@@ -61,13 +61,13 @@ class Vcode extends Component {
this.setState({ this.setState({
vcode: data, vcode: data,
}); });
this.renderImg(data); this.drawImg(data);
}) })
.catch(console.error); .catch(console.error);
this.setState({ this.setState({
showImgBox: true, showImgBox: true,
}); });
// this.renderImg(1234); // this.drawImg(1234);
} else { } else {
Taro.showToast({ Taro.showToast({
title: '输入正确的手机号', title: '输入正确的手机号',
...@@ -86,7 +86,7 @@ class Vcode extends Component { ...@@ -86,7 +86,7 @@ class Vcode extends Component {
}); });
} }
renderImg(vcode: number) { drawImg(vcode: number) {
const ctx = Taro.createCanvasContext('Vcode', this.$scope); const ctx = Taro.createCanvasContext('Vcode', this.$scope);
ctx.setFillStyle('#6180f4'); ctx.setFillStyle('#6180f4');
ctx.fillRect(0, 0, 73, 38); ctx.fillRect(0, 0, 73, 38);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment