/**
* 页面的初始数据
*/
Page({
data: {
shuzhi:1,
tishi:'余北小可爱! - By:你的小跟班'
},
hao(){
this.setData({
tishi:'亲爱的小可爱!真的吗?你答应了?',
shuzhi:1
})
},
nohao() {
console.log(this.data.shuzhi);
var i = this.data.shuzhi
var tishi
switch (i) {
case 1:
tishi ='工资上交'
break;
case 2:
tishi="家务全包"
break;
case 3:
tishi ="房产证写你的名字"
break;
case 4:
tishi =("保大");
break;
case 5:
tishi =("我妈会游泳");
break;
case 6:
tishi =("宠你");
break;
case 7:
tishi =("护犊子");
break;
case 8:
tishi =("不凶人");
break;
default:
tishi ="答应我吧"
}
i++;
console.log(tishi);
this.setData({
tishi: tishi,
shuzhi: i
})
}
})