Commit c54762d8 by doszhang

dos

parent 0d195a34
...@@ -84,9 +84,7 @@ $(document).ready(function () { ...@@ -84,9 +84,7 @@ $(document).ready(function () {
scene: 3 scene: 3
}, toscene) }, toscene)
$('.result').on('click', { $('.result').on('click', showResult)
// resultFlag: this.attr('class').replace(/[^0-9]/ig, "")
}, showResult)
}); });
...@@ -109,8 +107,8 @@ function toPage3() { ...@@ -109,8 +107,8 @@ function toPage3() {
} }
function showResult(event) { function showResult(event) {
const resultFlag = event const resultFlag = /-(\d)\s/g.exec($(event.target).attr('class'))[1]
console.log(resultFlag) createPoster(resultFlag)
} }
function createPoster(resultFlag) { function createPoster(resultFlag) {
...@@ -125,7 +123,7 @@ function createPoster(resultFlag) { ...@@ -125,7 +123,7 @@ function createPoster(resultFlag) {
posterObj.onload = function () { posterObj.onload = function () {
posterCtx.drawImage(posterObj, 0, 0, posterCanvas.width, posterCanvas.height); posterCtx.drawImage(posterObj, 0, 0, posterCanvas.width, posterCanvas.height);
setTimeout(function () { setTimeout(function () {
drawNum(); // drawNum();
}, 200); }, 200);
setTimeout(function () { setTimeout(function () {
$('.poster-canvas').append('<img class="posterimg" />'); $('.poster-canvas').append('<img class="posterimg" />');
......
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 sign in to comment