sui пре 5 година
родитељ
комит
a638e0ec9b
2 измењених фајлова са 12 додато и 3 уклоњено
  1. +2
    -1
      496_dongfengqichen/pages/index/index.js
  2. +10
    -2
      496_dongfengqichen/pages/luckyStar/luckyStar.js

+ 2
- 1
496_dongfengqichen/pages/index/index.js Прегледај датотеку

@@ -295,7 +295,8 @@ Page({
this.data.subscribeData.realname = "";
this.data.subscribeData.captcha = "";
this.setData({
subscribeData: this.data.subscribeData
subscribeData: this.data.subscribeData,
verificationCode: '获取验证码',
})
// this.setData({
// isRegister:true

+ 10
- 2
496_dongfengqichen/pages/luckyStar/luckyStar.js Прегледај датотеку

@@ -110,7 +110,6 @@ Page({
},
beginGame: function () {//开始游戏
app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => {
console.log(res);
if(res.code==200){
this.data.gameSign = res.data.sign;
this.endGame();
@@ -137,6 +136,9 @@ Page({
}, this,"POST")
},
startClaw:function(e){//开始控制爪子方向
if(!this.data.gameState){
return;
}
let direction = e.currentTarget.dataset.direction;
if (direction == "L") {//向左
if (this.data.clawLeft <= 130) {
@@ -188,7 +190,10 @@ Page({
}, 20);
}
},
endClaw:function(e){//结束爪子动作
endClaw: function (e) {//结束爪子动作
if (!this.data.gameState) {
return;
}
let direction = e.currentTarget.dataset.direction;
if (direction == "L") {//向左
clearInterval(this.data.setGroup.left);
@@ -201,6 +206,9 @@ Page({
}
},
getClaw:function(){//抓取
if (!this.data.gameState){
return;
}
this.setData({
clawTop: this.data.clawScale > 1 ? 490 - (2 * (this.data.clawScale-1) * 90) : 490 + (2 * (1 - this.data.clawScale) * 90 )
})

Loading…
Откажи
Сачувај