|
|
@@ -100,7 +100,7 @@ export struct MainView{
|
|
|
@State currentMerit:number=0
|
|
|
//总功德数
|
|
|
@State totalMerit:number=10
|
|
|
- private Merit:number[]=[10,200,500,1000,2000,5000,6000,8000]
|
|
|
+ private Merit:number[]=[10,200,500,1000,2000,5000,6000,8000,9000,9999]
|
|
|
private MeritIndex:number=0
|
|
|
|
|
|
//自动点击缩放参数
|
|
|
@@ -129,6 +129,13 @@ export struct MainView{
|
|
|
})
|
|
|
|
|
|
total(){
|
|
|
+ if(this.currentMerit==9999){
|
|
|
+ this.currentMerit = 0
|
|
|
+ this.totalMerit=this.Merit[0]
|
|
|
+ YTUserRequest.resetMainFish()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if(this.currentMerit>this.totalMerit){
|
|
|
this.MeritIndex++
|
|
|
this.totalMerit=this.Merit[this.MeritIndex]
|
|
|
@@ -141,6 +148,9 @@ export struct MainView{
|
|
|
for (let i = 0; i < this.count; i++) {
|
|
|
this.list.push(new Cell()); // 初始化 Cell 数组
|
|
|
}
|
|
|
+ if(this.text!="") {
|
|
|
+ this.list.forEach(item => item.value = this.text)
|
|
|
+ }
|
|
|
YTUserRequest.getFishFra((res)=>{
|
|
|
|
|
|
// promptAction.showToast({
|
|
|
@@ -415,7 +425,7 @@ export struct MainView{
|
|
|
|
|
|
})
|
|
|
|
|
|
- }.width('100%').borderRadius(8).padding(20).backgroundColor('rgba(77, 77, 77, 1)')
|
|
|
+ }.width('100%').borderRadius(8).padding(10).backgroundColor('rgba(77, 77, 77, 1)')
|
|
|
|
|
|
}.layoutWeight(1).justifyContent(FlexAlign.Start)
|
|
|
|
|
|
@@ -495,10 +505,10 @@ export struct MainView{
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
clockFish(){
|
|
|
YTUserRequest.knockingFish()
|
|
|
}
|
|
|
-
|
|
|
build() {
|
|
|
Stack() {
|
|
|
Image($r('[basic].media.dengguang')).width('100%').height('100%')
|
|
|
@@ -613,11 +623,12 @@ export struct MainView{
|
|
|
if (this.isShowSilder) {
|
|
|
//是否开启声音
|
|
|
Image($r('[basic].media.zhendong')).width(32).onClick(() => {
|
|
|
- this.isOpenMusic = !this.isOpenMusic
|
|
|
+ this.isOpenVibration = !this.isOpenVibration
|
|
|
+
|
|
|
})
|
|
|
//是否开启震动
|
|
|
Image($r('[basic].media.shengying')).width(32).onClick(() => {
|
|
|
- this.isOpenVibration = !this.isOpenVibration
|
|
|
+ this.isOpenMusic = !this.isOpenMusic
|
|
|
})
|
|
|
|
|
|
Column() {
|
|
|
@@ -760,6 +771,18 @@ export struct MainView{
|
|
|
left: 20,
|
|
|
right: 20
|
|
|
})
|
|
|
- }.backgroundColor(Color.Black)
|
|
|
+ }.backgroundColor(Color.Black).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
|
|
|
+ console.info('IsaKit Test Text isVisible: ' + isVisible + ', currentRatio:' + currentRatio)
|
|
|
+ if (!isVisible) {
|
|
|
+ //每次隐藏时关闭定时器
|
|
|
+ clearInterval(this.inversetId)
|
|
|
+ }else{
|
|
|
+ if(this.woodenfishModel==1){
|
|
|
+
|
|
|
+ }else {
|
|
|
+ this.autoOnclick()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|