소스 검색

烟下降

XUYangWei 2 달 전
부모
커밋
3630195dec
32개의 변경된 파일757개의 추가작업 그리고 447개의 파일을 삭제
  1. 20 1
      commons/basic/src/main/ets/apis/YTUserRequest.ets
  2. 58 0
      features/feature/src/main/ets/component/AutoDesiciTime.ets
  3. 58 0
      features/feature/src/main/ets/component/CountTextCom.ets
  4. 2 2
      features/feature/src/main/ets/component/TextInputCom.ets
  5. 75 0
      features/feature/src/main/ets/component/TimeProgressCom.ets
  6. 61 0
      features/feature/src/main/ets/component/TimeTextCom.ets
  7. 1 1
      features/feature/src/main/ets/view/FishSettingView.ets
  8. 32 2
      features/feature/src/main/ets/view/FragranceSettingView.ets
  9. 222 117
      features/feature/src/main/ets/view/FragranceView.ets
  10. 207 322
      features/feature/src/main/ets/view/MainView.ets
  11. BIN
      features/feature/src/main/resources/base/media/one_Fra_1.png
  12. BIN
      features/feature/src/main/resources/base/media/one_Fra_10.png
  13. BIN
      features/feature/src/main/resources/base/media/one_Fra_11.png
  14. BIN
      features/feature/src/main/resources/base/media/one_Fra_12.png
  15. BIN
      features/feature/src/main/resources/base/media/one_Fra_13.png
  16. BIN
      features/feature/src/main/resources/base/media/one_Fra_14.png
  17. BIN
      features/feature/src/main/resources/base/media/one_Fra_15.png
  18. BIN
      features/feature/src/main/resources/base/media/one_Fra_16.png
  19. BIN
      features/feature/src/main/resources/base/media/one_Fra_17.png
  20. BIN
      features/feature/src/main/resources/base/media/one_Fra_18.png
  21. BIN
      features/feature/src/main/resources/base/media/one_Fra_19.png
  22. BIN
      features/feature/src/main/resources/base/media/one_Fra_2.png
  23. BIN
      features/feature/src/main/resources/base/media/one_Fra_20.png
  24. BIN
      features/feature/src/main/resources/base/media/one_Fra_3.png
  25. BIN
      features/feature/src/main/resources/base/media/one_Fra_4.png
  26. BIN
      features/feature/src/main/resources/base/media/one_Fra_5.png
  27. BIN
      features/feature/src/main/resources/base/media/one_Fra_6.png
  28. BIN
      features/feature/src/main/resources/base/media/one_Fra_7.png
  29. BIN
      features/feature/src/main/resources/base/media/one_Fra_8.png
  30. BIN
      features/feature/src/main/resources/base/media/one_Fra_9.png
  31. BIN
      features/feature/src/main/resources/base/media/three_Fra_21.png
  32. 21 2
      features/user/src/main/ets/pages/SuggestionPage.ets

+ 20 - 1
commons/basic/src/main/ets/apis/YTUserRequest.ets

@@ -356,13 +356,32 @@ export class YTUserRequest extends YTRequest {
   }
 
   //点香数量点香时间
-  static updateIncese(param:Params, success: (res: string) => void, fail: (err: Error) => void){
+  static updateInceseNum(param:Params){
     const  id=AppStorage.get('updateID') as number
     if(id!=undefined) {
       YTRequest.post<ReqString, ReqString>(`/api/woodenfish/config/modify`,
         {
           "id": id,
           "incenseNum": param.incenseNum as number,
+        })
+        .then(res => {
+
+        })
+        .catch((err: Error) => {
+          IBestToast.show({
+            message: err.message,
+            duration: 500
+          })
+        })
+    }
+  }
+  //点香数量点香时间
+  static updateInceseTime(param:Params){
+    const  id=AppStorage.get('updateID') as number
+    if(id!=undefined) {
+      YTRequest.post<ReqString, ReqString>(`/api/woodenfish/config/modify`,
+        {
+          "id": id,
           "incenseTime": param.incenseTime as number,
         })
         .then(res => {

+ 58 - 0
features/feature/src/main/ets/component/AutoDesiciTime.ets

@@ -0,0 +1,58 @@
+import { IBestToast } from "basic"
+
+@Component
+export struct AutoDesiciTime{
+  //自定义时间分钟
+  @Prop
+  countAutoHour:string
+
+  woodenfishModel:number=4
+
+  tabChangeIndex:number=2
+
+  changeAutoHour=(countAutoHour:string)=>{
+
+  }
+  backTab=(woodenfishModel:number,tabChangeIndex:number)=>{
+
+  }
+  build() {
+    Column({space:30}) {
+      Text('自定义时间').fontColor(Color.White)
+      Row() {
+        TextInput({text:this.countAutoHour})
+          .width(70)
+          .height(40)
+          .padding(0)
+          .fontColor(Color.White)
+          .type(InputType.Number) // 设置输入类型为数字
+          .textAlign(TextAlign.Center)
+          .borderRadius(4)
+          .backgroundColor(Color.Gray)
+          .onChange((value)=>{
+            if(Number(value)>120){
+              IBestToast.show({
+                message:'最多不得超过120分钟'
+              })
+              this.countAutoHour="120"
+              return
+            }
+            this.countAutoHour=value
+            this.changeAutoHour(this.countAutoHour)
+
+          })
+
+        Text('分钟').fontColor('rgba(250, 222, 113, 1)')
+      }
+
+      Row(){
+        Text('确定').fontColor(Color.White)
+      }.width(180).height(45).backgroundColor('rgba(250, 222, 113, 1)').borderRadius(15).justifyContent(FlexAlign.Center).onClick(()=>{
+        this.backTab(this.woodenfishModel,this.tabChangeIndex)
+
+      })
+    }
+
+
+  }
+}

+ 58 - 0
features/feature/src/main/ets/component/CountTextCom.ets

@@ -0,0 +1,58 @@
+import { IBestToast } from "basic"
+
+@Component
+export struct CountTextCom{
+
+  //敲击次数 1次
+  @Prop
+  onclickCount:string
+  changeOnclickCount=(onclickCount:string)=>{
+
+  }
+
+  build() {
+    Column({space:16}) {
+      Row() {
+        Text() {
+          Span('敲击次数').fontSize(16)
+          Span('(1-9999次)').fontSize(12)
+        }.fontColor(Color.White)
+      }.width('100%')
+      .justifyContent(FlexAlign.Start)
+
+      Row() {
+        TextInput({ text: this.onclickCount })
+          .width(70)
+          .height(40)
+          .padding(0)
+          .fontColor(Color.White)
+          .type(InputType.Number) // 设置输入类型为数字
+          .textAlign(TextAlign.Center)
+          .borderRadius(4)
+          .backgroundColor(Color.Gray)
+          .margin({ right: 5 })
+          .onChange((value) => {
+            if (Number(value) > 9999) {
+              IBestToast.show({
+                message: "敲击次数不能大于9999"
+              })
+              this.onclickCount = "9999"
+              return
+            }
+            if (Number(value) <= 0) {
+              IBestToast.show({
+                message: "敲击次数不能小于1"
+              })
+              this.onclickCount = "1"
+              return
+            }
+            this.onclickCount = value
+            this.changeOnclickCount(this.onclickCount)
+
+          })
+        Text('次').fontColor('rgba(250, 222, 113, 1)')
+      }.width('100%').justifyContent(FlexAlign.Center)
+    }
+
+  }
+}

+ 2 - 2
features/feature/src/main/ets/component/TextInputCom.ets

@@ -2,7 +2,7 @@ import { IBestToast } from "basic"
 
 @Component
 export struct TextInputCom{
-  @Prop text:string=""
+  @Prop text:string
   changeText=(text:string)=>{
 
   }
@@ -24,7 +24,7 @@ export struct TextInputCom{
           this.changeText(this.text)
 
         })
-      Image($r('app.media.muyu')).width(24).margin({right:10}).onClick(()=>{this.text=""})
+      Image($r('[basic].media.quxiao')).width(24).margin({right:10}).onClick(()=>{this.text=""})
     }
   }
 }

+ 75 - 0
features/feature/src/main/ets/component/TimeProgressCom.ets

@@ -0,0 +1,75 @@
+import { it } from "@ohos/hypium"
+
+@Component
+export struct TimeProgressCom{
+  @State
+  minuts:string[]=['10','20','30','40','50','60','自定义']
+  @State
+  currSelectIndex:number=0
+
+  @Prop
+  progressValue:number
+  @State currtTime:number=0
+  changeTabCurrNumberAndCountTime=(progressValue:number,currentTabIndex?:number)=>{
+  }
+  aboutToAppear(): void {
+    this.currtTime=this.progressValue-10
+  }
+  build() {
+    Column({space:16}) {
+      Row(){
+        Text() {
+          Span('倒计时').fontSize(16)
+        }.fontColor(Color.White)
+      }.width('100%')
+      .justifyContent(FlexAlign.Start)
+      Stack({alignContent:Alignment.TopStart}) {
+        Progress({ value: this.currtTime, total: 60, type: ProgressType.Linear }).width(290).height(16).backgroundColor('rgba(255, 255, 255, 0.55)').margin({left:14})
+        Row({space:17}){
+          ForEach(this.minuts,(item:string,index:number)=> {
+            Column() {
+              Column() {
+              }
+              .width(16)
+              .height(16)
+              .borderRadius('50%')
+              .onClick(() => {
+                this.currSelectIndex=index
+
+                if (this.currSelectIndex != 6) {
+                  this.progressValue = Number(item)  //比实际小10
+                  this.currtTime=this.progressValue-10
+                  // this.countdownHour=item+10
+                  this.changeTabCurrNumberAndCountTime(this.progressValue)
+                } else {
+                  //自定义
+                  this.progressValue=Number(item)
+                  this.currtTime=this.progressValue-10
+                  // this.currentIndex = 3
+                  this.changeTabCurrNumberAndCountTime(this.progressValue,3)
+                }
+              })
+              .backgroundColor(  this.currSelectIndex==index ? Color.Yellow : Color.White)
+              Column() {
+                if (item != '自定义') {
+                  Text(item+ "分钟")
+                    .fontSize(10)
+                    .fontColor( this.currSelectIndex==index? Color.White : 'rgba(255, 255, 255, 0.55)')
+                } else {
+                  Text('自定义')
+                    .fontSize(10)
+                    .fontColor( this.currSelectIndex==index ? Color.White : 'rgba(255, 255, 255, 0.55)')
+                }
+              }
+            }.alignItems(HorizontalAlign.Start)
+          })
+
+
+        }.width('100%')
+
+      }
+
+    }
+
+  }
+}

+ 61 - 0
features/feature/src/main/ets/component/TimeTextCom.ets

@@ -0,0 +1,61 @@
+import { IBestToast } from "basic"
+
+@Component
+export struct TimeTextCom{
+
+  //时间间隔 默认1秒
+  @Prop
+  onclickTime:string
+  changeText=(onclickTime:string)=>{
+
+  }
+
+  build() {
+    Column({ space: 16 }) {
+      Row() {
+        Text() {
+          Span('敲击间隔时长').fontSize(16)
+          Span('(1-10秒)').fontSize(12)
+        }.fontColor(Color.White)
+      }.width('100%')
+      .justifyContent(FlexAlign.Start)
+
+
+      Row() {
+        TextInput({text:this.onclickTime})
+          .width(70)
+          .height(40)
+          .padding(0)
+          .fontColor(Color.White)
+          .type(InputType.Number) // 设置输入类型为数字
+          .textAlign(TextAlign.Center)
+          .borderRadius(4)
+          .backgroundColor(Color.Gray)
+          .margin({ right: 5 })
+          .onChange((value)=>{
+            if(Number(value)>10){
+              IBestToast.show({
+                message:"间隔时间不能大于10秒"
+              })
+              this.onclickTime="10"
+              return
+            }
+            if(Number(value)<=0){
+              IBestToast.show({
+                message:"间隔时间不能小于一秒"
+              })
+              this.onclickTime="1"
+              return
+            }
+            this.onclickTime=value
+            this.changeText(this.onclickTime)
+
+
+          })
+
+        Text('秒').fontColor('rgba(250, 222, 113, 1)')
+      }.width('100%').justifyContent(FlexAlign.Center)
+    }
+
+  }
+}

+ 1 - 1
features/feature/src/main/ets/view/FishSettingView.ets

@@ -43,7 +43,7 @@ struct FishSettingView {
               }
 
             })
-          Image($r('app.media.muyu')).width(24).margin({right:10}).onClick(()=>{this.textValue=""})
+          Image($r('[basic].media.quxiao')).width(24).margin({right:10}).onClick(()=>{this.textValue=""})
         }
 
       }.width('100%')

+ 32 - 2
features/feature/src/main/ets/view/FragranceSettingView.ets

@@ -19,6 +19,31 @@ struct FragranceSettingView {
   @State
   currSelectTimeNumber:number=1
 
+  //获取香烟数量和燃烧时间
+  updateNumAndTime(){
+    YTUserRequest.getFishFra((res)=>{
+      const time=res.incenseTime as number
+      if(time==10){
+        this.currSelectTimeNumber=1
+      }else if(time==30){
+        this.currSelectTimeNumber=2
+      }else {
+        this.currSelectTimeNumber=3
+      }
+      const num=res.incenseNum as number
+      if(num==1){
+        this.currSelectNumber=1
+      }else{
+        this.currSelectNumber=3
+      }
+
+    })
+  }
+
+
+  aboutToAppear(): void {
+    this.updateNumAndTime()
+  }
   aboutToDisappear(): void {
     // YTUserRequest.updateSuspensionCharacters()
   }
@@ -97,7 +122,8 @@ struct FragranceSettingView {
               .borderRadius(8)
               .backgroundColor(this.currSelectNumber==1?'#FADE71':Color.Transparent)
               .onClick(()=>{
-            this.currSelectNumber=1
+               this.currSelectNumber=1
+                YTUserRequest.updateInceseNum({incenseNum:1})
             })
             Text('三支')
               .layoutWeight(1)
@@ -106,7 +132,8 @@ struct FragranceSettingView {
               .borderRadius(8)
               .backgroundColor(this.currSelectNumber==3?'#FADE71':Color.Transparent)
               .onClick(()=>{
-              this.currSelectNumber=3
+                this.currSelectNumber=3
+                YTUserRequest.updateInceseNum({incenseNum:3})
             })
 
           }.width(106)
@@ -145,6 +172,7 @@ struct FragranceSettingView {
               .backgroundColor(this.currSelectTimeNumber==1?'#FADE71':Color.Transparent)
               .onClick(()=>{
                 this.currSelectTimeNumber=1
+                YTUserRequest.updateInceseTime({incenseTime:10})
               })
             Text('30分钟')
               .width(62)
@@ -157,6 +185,7 @@ struct FragranceSettingView {
               .backgroundColor(this.currSelectTimeNumber==2?'#FADE71':Color.Transparent)
               .onClick(()=>{
                 this.currSelectTimeNumber=2
+                YTUserRequest.updateInceseTime({incenseTime:30})
               })
 
             Text('不限时')
@@ -171,6 +200,7 @@ struct FragranceSettingView {
               .backgroundColor(this.currSelectTimeNumber==3?'#FADE71':Color.Transparent)
               .onClick(()=>{
                 this.currSelectTimeNumber=3
+                YTUserRequest.updateInceseTime({incenseTime:0})
               })
 
           }.width('100%')

+ 222 - 117
features/feature/src/main/ets/view/FragranceView.ets

@@ -1,4 +1,4 @@
-import { AppStorageKeyFishCollect, YTHeader, yTRouter } from 'basic';
+import { AppStorageKeyFishCollect, YTHeader, yTRouter, YTUserRequest } from 'basic';
 import { promptAction } from '@kit.ArkUI';
 
 @Component
@@ -37,11 +37,16 @@ export struct FragranceView{
 
   }, 100)
 
-  images: ImageFrameInfo[] =Array.from<string>({length:20}).map<ImageFrameInfo>((v:string,index:number)=>{
+  imagesThree: ImageFrameInfo[] =Array.from<string>({length:20}).map<ImageFrameInfo>((v:string,index:number)=>{
     return {
       src: $r(`app.media.three_Fra_${index+1}`),
     }
   })
+  imagesOne: ImageFrameInfo[] =Array.from<string>({length:20}).map<ImageFrameInfo>((v:string,index:number)=>{
+    return {
+      src: $r(`app.media.one_Fra_${index+1}`),
+    }
+  })
   images2: ImageFrameInfo[] =Array.from<string>({length:5}).map<ImageFrameInfo>((v:string,index:number)=>{
     return {
       src: $r(`app.media.huo${index+1}`),
@@ -58,23 +63,82 @@ export struct FragranceView{
   @State state:AnimationStatus = AnimationStatus.Initial
 
   @State moveY:number=0
-  @State time:number=0
+
+  //燃烧时间
+  @State time:number=-1
+  //烧香数量
+  @State num:number=1
+
+
+
   @State interId:number=0
   @State isShow:boolean=false
 
-  // aboutToAppear(): void {
-  //
-  //   if(this.textArr.length==0){
-  //     this.textArr.push('诸事顺遂')
-  //   }
-  //
-  //   this.widAr=[]
-  //   this.heiAr=[]
-  //   this.textArr.forEach((item)=>{
-  //     this.widAr.push(this.radius1)
-  //     this.heiAr.push(this.radius2)
-  //   })
-  // }
+
+  //获取香烟数量和燃烧时间
+  updateNumAndTime(){
+    YTUserRequest.getFishFra((res)=>{
+      const time=res.incenseTime as number
+      if(time==10){
+        this.time=10
+      }else if(time==30){
+        this.time=30
+      }else {
+        this.time=-1
+      }
+      const num=res.incenseNum as number
+      if(num==1){
+        this.num=1
+      }else{
+        this.num=3
+      }
+
+      //测试时间
+      this.time=1
+
+    })
+  }
+
+  //计算香烟位置,启动动画
+
+  caluePosition(){
+    clearInterval(this.interId)
+    this.moveY=0
+    this.state=AnimationStatus.Stopped
+
+
+    //显示烟
+    this.isShow=true
+    //香缩减动画开始
+    this.state=AnimationStatus.Running
+
+    //位移计算
+    this.moveY=0
+    if(this.time!=-1) {
+      this.interId = setInterval(() => {
+        this.moveY = this.moveY + 8
+      }, this.time * 60000 / 20)
+    }
+
+  }
+
+
+  aboutToAppear(): void {
+
+    this.updateNumAndTime()
+    this.caluePosition()
+
+    // if(this.textArr.length==0){
+    //   this.textArr.push('诸事顺遂')
+    // }
+    //
+    // this.widAr=[]
+    // this.heiAr=[]
+    // this.textArr.forEach((item)=>{
+    //   this.widAr.push(this.radius1)
+    //   this.heiAr.push(this.radius2)
+    // })
+  }
 
   aboutToDisappear() {
     clearInterval(this.intervalID);
@@ -165,14 +229,30 @@ export struct FragranceView{
         .height('100%')
 
       Stack(){
-        ImageAnimator()
-          .width('100%')
-          .height('100%')
-          // .animatorFancy()// 抽取公共属性
-          .images(this.images)// 动画数组
-          .duration(this.images.length * 1000)// 持续
-          .state(this.state)// 动画状态
-          .iterations(-1) // 播放次数
+          //一根香烟
+          if(this.num==1){
+            ImageAnimator()
+              .width('100%')
+              .height('100%')
+              // .animatorFancy()// 抽取公共属性
+              .images(this.imagesOne)// 动画数组 十秒
+              .duration(this.time==-1?9999999:this.time*60000)
+              // .duration(this.imagesOne.length * 500*this.time)// 持续
+              .state(this.state)// 动画状态
+              .iterations(-1) // 播放次数
+
+            //三更香烟
+          }else {
+            ImageAnimator()
+              .width('100%')
+              .height('100%')
+              // .animatorFancy()// 抽取公共属性
+              .images(this.imagesThree)// 动画数组 //十秒
+              .duration(this.time==-1?9999999:this.time*60000)
+              // .duration(this.imagesThree.length * 500*this.time)// 持续
+              .state(this.state)// 动画状态
+              .iterations(-1) // 播放次数
+          }
 
 
         //火
@@ -186,92 +266,124 @@ export struct FragranceView{
           .iterations(-1) // 播放次数
 
 
+        //烟显示
         if(this.isShow) {
-          Stack() {
-            ImageAnimator()
-              .width('100%')
-              .height('100%')
-              .images(this.image3)// 动画数组
-              .duration(this.image3.length * 100)// 持续
-              .state(AnimationStatus.Running)// 动画状态
-              .iterations(-1) // 播放次数
-
-            ImageAnimator()
-              .width('100%')
-              .height('100%')
-              .margin({ right: 35 })
-              .images(this.image3)// 动画数组
-              .duration(this.image3.length * 100)// 持续
-              .state(AnimationStatus.Running)// 动画状态
-              .iterations(-1) // 播放次数
-
-            ImageAnimator()
-              .width('100%')
-              .height('100%')
-              .margin({ left: 35 })
-              .images(this.image3)// 动画数组
-              .duration(this.image3.length * 100)// 持续
-              .state(AnimationStatus.Running)// 动画状态
-              .iterations(-1) // 播放次数
-
-            // ImageAnimator()
-            //   .width('100%')
-            //   .height('100%')
-            //     // .animatorFancy()// 抽取公共属性
-            //   .images(this.images2)// 动画数组
-            //   .duration(this.images2.length * 100)// 持续
-            //   .state(AnimationStatus.Running)// 动画状态
-            //   .iterations(-1) // 播放次数
-
+          if(this.num==1) {
+            Stack() {
+              ImageAnimator()
+                .width('100%')
+                .height('100%')
+                .images(this.image3)// 动画数组
+                .duration(this.image3.length * 100)// 持续
+                .state(AnimationStatus.Running)// 动画状态
+                .iterations(-1) // 播放次数
+              // ImageAnimator()
+              //   .width('100%')
+              //   .height('100%')
+              //     // .animatorFancy()// 抽取公共属性
+              //   .images(this.images2)// 动画数组
+              //   .duration(this.images2.length * 100)// 持续
+              //   .state(AnimationStatus.Running)// 动画状态
+              //   .iterations(-1) // 播放次数
+
+
+            }.width('100%')
+            .height('100%')
+            .translate({
+              y: this.moveY
+            })
 
-          }.width('100%')
-          .height('100%')
-          .translate({
-            y: this.moveY
-          })
+          }else {
+            Stack() {
+              ImageAnimator()
+                .width('100%')
+                .height('100%')
+                .images(this.image3)// 动画数组
+                .duration(this.image3.length * 100)// 持续
+                .state(AnimationStatus.Running)// 动画状态
+                .iterations(-1) // 播放次数
+
+              ImageAnimator()
+                .width('100%')
+                .height('100%')
+                .margin({ right: 35 })
+                .images(this.image3)// 动画数组
+                .duration(this.image3.length * 100)// 持续
+                .state(AnimationStatus.Running)// 动画状态
+                .iterations(-1) // 播放次数
+
+              ImageAnimator()
+                .width('100%')
+                .height('100%')
+                .margin({ left: 35 })
+                .images(this.image3)// 动画数组
+                .duration(this.image3.length * 100)// 持续
+                .state(AnimationStatus.Running)// 动画状态
+                .iterations(-1) // 播放次数
+
+              // ImageAnimator()
+              //   .width('100%')
+              //   .height('100%')
+              //     // .animatorFancy()// 抽取公共属性
+              //   .images(this.images2)// 动画数组
+              //   .duration(this.images2.length * 100)// 持续
+              //   .state(AnimationStatus.Running)// 动画状态
+              //   .iterations(-1) // 播放次数
+
+
+            }.width('100%')
+            .height('100%')
+            .translate({
+              y: this.moveY
+            })
+          }
         }
 
         // 按钮控制区域
-        Row({space:20}){
-          Button('启动').onClick(()=>{
-            this.isShow=true
-            this.state=AnimationStatus.Running
-            this.interId=setInterval(()=>{
-              //2秒,20张,170 0.1秒一----10
-              //20秒 20张 170 1秒一张 0.9
-              //60秒  20张 170 3秒一张 170
-              //另外一种解决办法,根据照片的分布来设置位置position
-              //170 20张 第一张170 第二张160,10分钟,每半分钟一个状态移动位置
-              this.time=this.time+1
-              this.moveY=this.moveY+this.time*1
-            },1000)
-            setTimeout(()=>{
-              clearInterval(this.interId)
-              this.isShow=false
-            },20000)
-
-          })
-          Button('暂停').onClick(()=>{
-            this.state=AnimationStatus.Paused
-          })
-          Button('停止').onClick(()=>{
-            this.state=AnimationStatus.Stopped
-            this.moveY=0
-            this.time=0
-            this.isShow=false
-            clearTimeout(this.interId)
-          })
-          Button('XX').onClick(()=>{
-            promptAction.showToast({
-              message:this.moveY.toString()
-            })
+        Row(){
+          Button('xxx').onClick(()=>{
+            this.time=1
+            this.caluePosition()
           })
-          // Button('xxxxx').onClick(()=>{
-          //
-          // })
         }
-
-
+        // Row({space:20}){
+        //   Button('启动').onClick(()=>{
+        //     this.isShow=true
+        //     this.state=AnimationStatus.Running
+        //     this.interId=setInterval(()=>{
+        //       //2秒,20张,170 0.1秒一----10
+        //       //20秒 20张 170 1秒一张 0.9
+        //       //60秒  20张 170 3秒一张 170
+        //       //另外一种解决办法,根据照片的分布来设置位置position
+        //       //170 20张 第一张170 第二张160,10分钟,每半分钟一个状态移动位置
+        //       this.time=this.time+1
+        //       this.moveY=this.moveY+this.time*1
+        //     },1000)
+        //     setTimeout(()=>{
+        //       clearInterval(this.interId)
+        //       this.isShow=false
+        //     },20000)
+        //
+        //   })
+        //   Button('暂停').onClick(()=>{
+        //     this.state=AnimationStatus.Paused
+        //   })
+        //   Button('停止').onClick(()=>{
+        //     this.state=AnimationStatus.Stopped
+        //     this.moveY=0
+        //     this.time=0
+        //     this.isShow=false
+        //     clearTimeout(this.interId)
+        //   })
+        //   Button('XX').onClick(()=>{
+        //     promptAction.showToast({
+        //       message:this.moveY.toString()
+        //     })
+        //   })
+        //   // Button('xxxxx').onClick(()=>{
+        //   //
+        //   // })
+        // }
       }
 
         Row(){
@@ -294,32 +406,25 @@ export struct FragranceView{
               .fontColor(Color.Black)
               .onClick(() => {
               })
-
-
           }
-
           Image($r('[basic].media.shezhix')).width(24).onClick(()=>{
             yTRouter.router2FragranceSettingPage()
           })
-
         }.width('100%')
         .margin({bottom:640})
         .padding({left:16,right:16})
         .justifyContent(FlexAlign.SpaceBetween)
-
-
       }.width('100%')
       .height('100%')
-
-
-
-
-
-
     }.width('100%')
     .height('100%')
     .backgroundColor(Color.Black)
-
-
+    .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
+      console.info('IsaKit Test Text isVisible: ' + isVisible + ', currentRatio:' + currentRatio)
+      if (isVisible) {
+       this.updateNumAndTime()
+        this.caluePosition()
+      }
+    })
   }
 }

+ 207 - 322
features/feature/src/main/ets/view/MainView.ets

@@ -10,6 +10,11 @@ import { trustedAppService } from '@kit.DeviceSecurityKit';
 import { promptAction } from '@kit.ArkUI';
 import { Cell } from '../models';
 import { it } from '@ohos/hypium';
+import { TimeTextCom } from '../component/TimeTextCom';
+import { CountTextCom } from '../component/CountTextCom';
+import { TimeProgressCom } from '../component/TimeProgressCom';
+import { AutoAdComponent } from '@ohos.advertising.AutoAdComponent';
+import { AutoDesiciTime } from '../component/AutoDesiciTime';
 
 
 @Component
@@ -45,44 +50,60 @@ export struct MainView{
   @State isAnimation:boolean=false
 
 
-  //时间间隔
-  @State time:number=1000
+
 
   @State isShowTimeManger:boolean=false
 
-  //当前分钟
+  //时间间隔
+  @State time:number=1000
+
+  //当前倒计时 分钟渲染参数
   @State valueTime:number=10
 
 
+  //全部用分钟来计算,实际传递给后端用小时制
+  //实际后端要的小时来算的数据
   @Watch('caluc')
-  @State countdownHour:number=0.1
+  @State countdownHour:number=10
+
+  //倒计时时间间隔
   @State countdownTime:number=1
-  //
+
+  //倒计时敲击次数渲染文本
   @Watch('caluc')
   @State countdownCount:string="1"
 
+  //倒计时自定义的文本分钟
   @State countAutoHour:string=""
 
   caluc(){
     //计算间隔时长
-    this.countdownTime=this.countdownHour*60*60/Number(this.countdownCount)
+    this.countdownTime=this.countdownHour*60/Number(this.countdownCount)
   }
 
+  //固定次数
   @State fixedNum:number=1
+  //固定间隔时间
   @State fixedTime:number=1
+  //固定次数渲染文本
   @State fixedNumText:string="1"
+  //固定间隔时间渲染文本
   @State fixedTimeText:string="1"
-
-  @State infiniteTime:number=1 //无限模式间隔时长
+  //无限模式间隔时长
+  @State infiniteTime:number=1
+  //无限模式间隔时长渲染文本
   @State infiniteTimeText:string="1"
+  //模式 1(结束 手动) 2无限,3固定次数 4倒计时
   @State woodenfishModel:number=1
-  //进度条
+  //进度条功德数
   @State currentMerit:number=0
+  //总功德数
   @State totalMerit:number=10
 
+  //自动点击缩放参数
+  @State scaleValue:number=1
 
-
-
+  @State inversetId:number=-1
 
   dialogController: CustomDialogController=new CustomDialogController({
     builder:BlessCustomCustomDialog({
@@ -94,6 +115,40 @@ export struct MainView{
     height:'100%',
   })
 
+
+  // 初始化方法,在组件即将显示时被调用
+  aboutToAppear(): void {
+    for (let i = 0; i < this.count; i++) {
+      this.list.push(new Cell()); // 初始化 Cell 数组
+    }
+    YTUserRequest.getFishFra((res)=>{
+
+      promptAction.showToast({
+        message:JSON.stringify(res)
+      })
+      AppStorage.setOrCreate('updateID',res.id as number)
+      this.currentMerit=res.meritsValue as number
+      this.woodenfishModel=res.woodenfishModel as number
+      //无限间隔时长
+      this.infiniteTime=res.infiniteTime as number
+      //固定
+      this.fixedNum=res.fixedNum as number
+      this.fixedTime=res.fixedTime as number
+
+      //倒计时
+      this.countdownTime=res.countdownTime as number
+      this.countdownHour=(res.countdownHour as number)
+      this.isAuto=this.woodenfishModel!=1?true:false
+      //判断是否自动并设置敲击时间
+      clearInterval(this.inversetId)
+      //自动敲击
+
+      this.autoOnclick()
+
+    })
+
+  }
+
   //开启关闭音乐
   async openMusic(){
     await avPlayerManager.playByRawSrc('music3.mp3')
@@ -132,17 +187,19 @@ export struct MainView{
     this.indexCount++; // 更新索引计数器
     animateToImmediately({
       // 立即开始动画
-      duration: 0, // 动画持续时间为0毫秒
+      duration: 250, // 动画持续时间为0毫秒
+      curve: Curve.Linear,
       onFinish: () => { // 动画完成后的回调
+        this.scaleValue=1
         animateToImmediately({
           // 再次立即开始动画
-          duration: 500, // 动画持续时间为1000毫秒
+          duration: 250, // 动画持续时间为1000毫秒
           onFinish:()=>{
             this.isAnimation=false
             this.closeMusic()
           }
         }, () => {
-          this.list[index].y = -200 // 设置 Cell 的垂直偏移量
+          this.list[index].y = -150 // 设置 Cell 的垂直偏移量
           this.list[index].opacity = 0 // 设置 Cell 的透明度
         })
 
@@ -150,26 +207,61 @@ export struct MainView{
     }, () => {
       this.list[index].y = 0 // 设置 Cell 的垂直偏移量
       this.list[index].opacity = 1 // 设置 Cell 的透明度
+      this.scaleValue=0.8
 
     })
 
   }
 
+  //自动敲击
+  autoOnclick(){
+    clearInterval(this.inversetId)
+    if(this.woodenfishModel==1){
+      this.isAuto=false
+    }else if(this.woodenfishModel==2){
+      this.inversetId= setInterval(()=>{
+        this.onclikMerit()
+      },this.infiniteTime*1000)
+    }else if(this.woodenfishModel==3){
+      this.inversetId=setInterval(()=>{
+        this.onclikMerit()
+      },this.fixedTime*1000)
+      const b=setTimeout(()=>{
+        clearInterval(this.inversetId)
+        clearTimeout(b)
+      },this.fixedTime*1000*this.fixedNum)
+    }else if(this.woodenfishModel==4){
+      this.onclikMerit()
+      this.inversetId=setInterval(()=>{
+        this.onclikMerit()
+      },this.countdownTime*1000)
+      const b=setTimeout(()=>{
+        clearInterval(this.inversetId)
+        clearTimeout(b)
+      },this.countdownHour*1000*this.countdownHour)
+
+
+    }
+
+  }
+
   @Builder
-  timeMangerBuilder(){
+  TimeMangerBuilder(){
     Column(){
+
+      //图标
       Row(){
         Image($r('[basic].media.quxiao')).width(20).onClick(()=>{
           this.isShowTimeManger = false
 
-          //发送请求
+          // 发送请求
           YTUserRequest.updateFishWoodenModel(
             {
               countdownHour:this.countdownHour,
               countdownTime:this.countdownTime,
               fixedNum:this.fixedNum,
               fixedTime:this.fixedTime,
-              incenseTime:this.infiniteTime,
+              infiniteTime:this.infiniteTime,
               woodenfishModel:this.woodenfishModel
             } as Params)
 
@@ -177,16 +269,21 @@ export struct MainView{
             message:JSON.stringify(   {
                  countdownHour:this.countdownHour,
                  countdownTime:this.countdownTime,
-                fixedNum:this.fixedNum,
+                 fixedNum:this.fixedNum,
                  fixedTime:this.fixedTime,
-                 incenseTime:this.infiniteTime,
+                 infiniteTime:this.infiniteTime,
                  woodenfishModel:this.woodenfishModel
                } as Params)
           })
+          this.autoOnclick()
+
+
+
         })
 
       }.width('100%')
       .justifyContent(FlexAlign.End)
+      //标题
       Row(){
         Text('自动敲击设置').fontColor(Color.White).fontSize(20)
       }.width('100%')
@@ -196,249 +293,68 @@ export struct MainView{
         Tabs({ barPosition: BarPosition.Start, controller: this.tabsController,index:this.currentIndex  }) {
           TabContent() {
             Column() {
-              Column({ space: 16 }) {
-                Row() {
-                  Text() {
-                    Span('敲击间隔时长').fontSize(16)
-                    Span('(1-10秒)').fontSize(12)
-                  }.fontColor(Color.White)
-                }.width('100%')
-                .justifyContent(FlexAlign.Start)
-
-
-                Row() {
-                  TextInput({text:this.infiniteTimeText})
-                    .width(70)
-                    .height(40)
-                    .padding(0)
-                    .type(InputType.Number) // 设置输入类型为数字
-                    .textAlign(TextAlign.Center)
-                    .borderRadius(4)
-                    .backgroundColor(Color.Gray)
-                    .margin({ right: 5 })
-                    .onChange((value)=>{
-                      if(Number(value)>10){
-                        IBestToast.show({
-                          message:"间隔时间不能大于10秒"
-                        })
-                        this.infiniteTimeText="10"
-                        this.infiniteTime=10
-                        return
-                      }
-                      if(Number(value)<=0){
-                        IBestToast.show({
-                          message:"间隔时间不能小于一秒"
-                        })
-                        this.infiniteTimeText="1"
-                        this.infiniteTime=1
-                        return
-                      }
-                      this.infiniteTime=Number(value)
-                      this.infiniteTimeText=this.infiniteTime.toString()
-
-                    })
-
-                  Text('秒').fontColor('rgba(250, 222, 113, 1)')
-                }.width('100%').justifyContent(FlexAlign.Center)
-              }
-              .width('100%')
+              Column() {
+                TimeTextCom({
+                  onclickTime: this.infiniteTimeText,
+                  changeText: (value: string) => {
+                    this.infiniteTimeText = value
+                    //获取到无限模式间隔时间
+                    this.infiniteTime=Number(this.infiniteTimeText)
+                  }
+                })
+              }.width('100%')
               .height(136)
               .borderRadius(8)
               .padding(20)
               .backgroundColor('rgba(77, 77, 77, 1)')
-
             }.layoutWeight(1).justifyContent(FlexAlign.Start)
           }.tabBar('无限').layoutWeight(1)
           TabContent() {
             Column(){
             Column({space:16}) {
-              Row(){
-                Text() {
-                  Span('敲击次数').fontSize(16)
-                  Span('(1-9999次)').fontSize(12)
-                }.fontColor(Color.White)
-              }.width('100%')
-              .justifyContent(FlexAlign.Start)
-
-
-              Row() {
-                TextInput({text:this.fixedNumText})
-                  .width(70)
-                  .height(40)
-                  .padding(0)
-                  .type(InputType.Number) // 设置输入类型为数字
-                  .textAlign(TextAlign.Center)
-                  .borderRadius(4)
-                  .backgroundColor(Color.Gray)
-                  .margin({right:5})
-                  .onChange((value)=>{
-                    if(Number(value)>9999){
-                      IBestToast.show({
-                        message:"敲击次数不能大于9999"
-                      })
-                      this.fixedNumText="9999"
-                      this.fixedNum=9999
-                      return
-                    }
-                    if(Number(value)<=0){
-                      IBestToast.show({
-                        message:"敲击次数不能小于1"
-                      })
-                      this.fixedNumText="1"
-                      this.fixedNum=1
-                      return
-                    }
-                    this.fixedNum=Number(value)
-                    this.fixedNumText=this.fixedNum.toString()
-
-                  })
-
-                Text('次').fontColor('rgba(250, 222, 113, 1)')
-              }.width('100%').justifyContent(FlexAlign.Center)
-
-              Row(){
-                Text() {
-                  Span('敲击间隔时长').fontSize(16)
-                  Span('(1-10秒)').fontSize(12)
-                }.fontColor(Color.White)
-              }.width('100%')
-              .justifyContent(FlexAlign.Start)
-
-
-              Row() {
-                TextInput({text:this.fixedTimeText})
-                  .width(70)
-                  .height(40)
-                  .padding(0)
-                  .type(InputType.Number) // 设置输入类型为数字
-                  .textAlign(TextAlign.Center)
-                  .borderRadius(4)
-                  .backgroundColor(Color.Gray)
-                  .margin({right:5})
-                  .onChange((value)=>{
-                    if(Number(value)>10){
-                      IBestToast.show({
-                        message:"间隔时间不能大于10秒"
-                      })
-                      this.fixedTimeText="10"
-                      this.fixedTime=10
-                      return
-                    }
-                    if(Number(value)<=0){
-                      IBestToast.show({
-                        message:"间隔时间不能小于一秒"
-                      })
-                      this.fixedTimeText="1"
-                      this.fixedTime=1
-                      return
-                    }
-                    this.fixedTime=Number(value)
-                    this.fixedTimeText=this.fixedTime.toString()
-
-                  })
-
-
+              CountTextCom({
+                onclickCount:this.fixedNumText,
+                changeOnclickCount:(value:string)=>{
+                  this.fixedNumText=value
+                  //固定模式敲击次数
+                  this.fixedNum=Number(this.fixedNumText)
+                }
 
-                Text('秒').fontColor('rgba(250, 222, 113, 1)')
-              }.width('100%').justifyContent(FlexAlign.Center)
+              })
+              TimeTextCom({
+                onclickTime:this.fixedTimeText,
+                changeText:(value:string)=>{
+                  this.fixedTimeText=value
+                  //固定模式间隔时间
+                  this.fixedTime=Number(this.fixedTimeText)
+                }
 
+              })
             }.width('100%').height(210).borderRadius(8).padding(20).backgroundColor('rgba(77, 77, 77, 1)')
             }.layoutWeight(1).justifyContent(FlexAlign.Start)
           }.tabBar('固定次数').layoutWeight(1)
           TabContent() {
             Column(){
             Column({space:16}) {
-              Column({space:16}) {
-                Row(){
-                  Text() {
-                    Span('倒计时').fontSize(16)
-                  }.fontColor(Color.White)
-                }.width('100%')
-                .justifyContent(FlexAlign.Start)
-                Stack({alignContent:Alignment.TopStart}) {
-                  Progress({ value: this.valueTime, total: 60, type: ProgressType.Linear }).width(290).height(16).backgroundColor('rgba(255, 255, 255, 0.55)').margin({left:14})
-                  Row({space:17}){
-                    ForEach([0,10,20,30,40,50,60],(item:number,index:number)=> {
-
-                      Column() {
-                      Column() {
-                      }
-                      .width(16)
-                      .height(16)
-                      .borderRadius('50%')
-                      .onClick(() => {
-                        if (index != 6) {
-                          this.valueTime = item  //比实际小10
-                          this.countdownHour=(this.valueTime+10)/60
-                        } else {
-                          this.valueTime=item
-                          this.currentIndex = 3
-                          this.tabsController.changeIndex(this.currentIndex)
-                        }
-
-                      })
-                      .backgroundColor(this.valueTime == item ? Color.Yellow : Color.White)
-                        Column() {
-                          if (item != 60) {
-                            Text(Number(item+10) + "分钟")
-                              .fontSize(10)
-                              .fontColor(this.valueTime == item ? Color.White : 'rgba(255, 255, 255, 0.55)')
-                          } else {
-                            Text('自定义')
-                              .fontSize(10)
-                              .fontColor(this.valueTime == item ? Color.White : 'rgba(255, 255, 255, 0.55)')
-                          }
-                        }
-                    }.alignItems(HorizontalAlign.Start)
-                    })
-
-
-                  }.width('100%')
-
+              TimeProgressCom({
+                progressValue:this.countdownHour,
+                changeTabCurrNumberAndCountTime:(progressValue:string,tabIndex?:number,)=>{
+                  if(progressValue!='自定义') {
+                    this.countdownHour = Number(progressValue)
+                  }
+                  if(tabIndex==3) {
+                    this.tabsController.changeIndex(tabIndex)
+                  }
                 }
 
+              })
+            CountTextCom({
+              onclickCount:this.countdownCount,
+              changeOnclickCount:(value:string)=>{
+                this.countdownCount=value
               }
 
-              Column({space:16}) {
-                Row(){
-                  Text() {
-                    Span('敲击次数').fontSize(16)
-                    Span('(1-9999次)').fontSize(12)
-                  }.fontColor(Color.White)
-                }.width('100%')
-                .justifyContent(FlexAlign.Start)
-                Row() {
-                  TextInput({text:this.countdownCount})
-                    .width(70)
-                    .height(40)
-                    .padding(0)
-                    .type(InputType.Number) // 设置输入类型为数字
-                    .textAlign(TextAlign.Center)
-                    .borderRadius(4)
-                    .backgroundColor(Color.Gray)
-                    .onChange((value)=>{
-                      if(Number(value)>9999){
-                        IBestToast.show({
-                          message:"敲击次数不能大于9999"
-                        })
-                        this.countdownCount="9999"
-                        return
-                      }
-                      if(Number(value)<=0){
-                        IBestToast.show({
-                          message:"敲击次数不能小于1"
-                        })
-                        this.countdownCount="1"
-                        return
-                      }
-                      this.countdownCount=value
-
-
-                    })
-
-                  Text('次').fontColor('rgba(250, 222, 113, 1)')
-                }
-              }
+            })
 
             }.width('100%').borderRadius(8).padding(20).backgroundColor('rgba(77, 77, 77, 1)')
 
@@ -447,32 +363,18 @@ export struct MainView{
           }.tabBar('倒计时').layoutWeight(1)
           TabContent() {
             Column(){
-            Column({space:30}) {
-              Text('自定义时间').fontColor(Color.White)
-              Row() {
-                TextInput({text:this.countAutoHour})
-                  .width(70)
-                  .height(40)
-                  .padding(0)
-                  .type(InputType.Number) // 设置输入类型为数字
-                  .textAlign(TextAlign.Center)
-                  .borderRadius(4)
-                  .backgroundColor(Color.Gray)
-                  .onChange((value)=>{
-                    if(Number(value)>120){
-                      IBestToast.show({
-                        message:'最多不得超过120分钟'
-                      })
-                      this.countAutoHour="120"
-                      return
-                    }
-                    this.countAutoHour=value
-                    this.countdownHour=Number(this.countAutoHour)/60
-                  })
+              AutoDesiciTime({
+                countAutoHour:this.countAutoHour,
+                changeAutoHour:(countAutoHour:string)=>{
+                  this.countAutoHour=countAutoHour
+                  this.countdownHour=Number(this.countAutoHour)
+                },
+                backTab:(woodenfishModel:number,tabChangeIndex:number)=>{
+                  this.woodenfishModel=woodenfishModel
+                  this.tabsController.changeIndex(tabChangeIndex)
+                }
+              })
 
-                Text('分钟').fontColor('rgba(250, 222, 113, 1)')
-              }
-            }
             }.layoutWeight(1).justifyContent(FlexAlign.Start)
           }.tabBar('自定义').layoutWeight(1)
 
@@ -532,57 +434,7 @@ export struct MainView{
 
   }
 
-  // 初始化方法,在组件即将显示时被调用
-  aboutToAppear(): void {
-    for (let i = 0; i < this.count; i++) {
-      this.list.push(new Cell()); // 初始化 Cell 数组
-    }
-    YTUserRequest.getFishFra((res)=>{
-      AppStorage.setOrCreate('updateID',res.id as number)
-      this.currentMerit=res.meritsValue as number
-      this.woodenfishModel=res.woodenfishModel as number
-      //无限间隔时长
-      this.infiniteTime=res.infiniteTime as number
-      //固定
-      this.fixedNum=res.fixedNum as number
-      this.fixedTime=res.fixedTime as number
 
-      //倒计时
-      this.countdownTime=res.countdownTime as number
-      this.countdownHour=(res.countdownHour as number)*60
-      //判断是否自动并设置敲击时间
-      if(res.woodenfishModel==1){
-        this.isAuto=false
-      }else if(res.woodenfishModel==2){
-        setInterval(()=>{
-          this.onclikMerit()
-        },this.infiniteTime*1000)
-      }else if(res.woodenfishModel==3){
-            const a=setInterval(()=>{
-              this.onclikMerit()
-
-            },this.fixedTime)
-            const b=setTimeout(()=>{
-              clearInterval(a)
-              clearTimeout(b)
-            },this.fixedTime*this.fixedNum)
-      }else if(res.woodenfishModel==4){
-
-            this.onclikMerit()
-            const a=setInterval(()=>{
-              this.onclikMerit()
-            },this.countdownTime)
-            const b=setTimeout(()=>{
-              clearInterval(a)
-              clearTimeout(b)
-            },this.countdownHour*this.countdownHour)
-
-
-      }
-
-    })
-
-  }
 
   clockFish(){
     YTUserRequest.knockingFish()
@@ -596,7 +448,6 @@ export struct MainView{
         Stack({ alignContent: Alignment.Bottom }) {
           Column() {
             if (this.isShowMessage) {
-
               Row() {
                 Column({ space: 20 }) {
                   //积功德+清零
@@ -683,6 +534,8 @@ export struct MainView{
                               //如果本来是手动,再点击就是自动,就需要设置东西
                               // this.isHand = false
                               this.woodenfishModel=1
+                              clearInterval(this.inversetId)
+
                             }
                           })
                         if (this.isAuto) {
@@ -700,6 +553,7 @@ export struct MainView{
                                 this.isAuto = !this.isAuto
                                 if(this.isAuto==false){
                                   this.woodenfishModel=1
+                                  clearInterval(this.inversetId)
                                 }
                               })
                             Text('无限')
@@ -711,7 +565,8 @@ export struct MainView{
                               })
                               .fontColor(Color.White)
                               .backgroundColor('#252111')
-                              .bindSheet($$this.isShowTimeManger, this.timeMangerBuilder(), {
+                              .bindSheet($$this.isShowTimeManger, this.TimeMangerBuilder
+                            , {
                                 width: '100%',
                                 height: 400,
                                 showClose: false,
@@ -724,6 +579,32 @@ export struct MainView{
                               .onClick(() => {
                                 this.isShowTimeManger = true
                                 this.woodenfishModel=2
+                                // YTUserRequest.getFishFra((res)=>{
+                                //
+                                //   promptAction.showToast({
+                                //     message:JSON.stringify(res)
+                                //   })
+                                //   AppStorage.setOrCreate('updateID',res.id as number)
+                                //   this.currentMerit=res.meritsValue as number
+                                //   this.woodenfishModel=res.woodenfishModel as number
+                                //   //无限间隔时长
+                                //   this.infiniteTime=res.infiniteTime as number
+                                //   //固定
+                                //   this.fixedNum=res.fixedNum as number
+                                //   this.fixedTime=res.fixedTime as number
+                                //
+                                //   //倒计时
+                                //   this.countdownTime=res.countdownTime as number
+                                //   this.countdownHour=(res.countdownHour as number)
+                                //   this.isAuto=this.woodenfishModel!=1?true:false
+                                //   //判断是否自动并设置敲击时间
+                                //   clearInterval(this.inversetId)
+                                //   //自动敲击
+                                //
+                                //   this.autoOnclick()
+                                //
+                                // })
+
                               })
                             Text('设置')
                               .padding({
@@ -774,11 +655,15 @@ export struct MainView{
               .width(200)
               .height(200)
               .objectFit(ImageFit.Contain)
-              .clickEffect({
-                // 点击效果配置
-                scale: 0.5, // 缩放比例
-                level: ClickEffectLevel.LIGHT // 效果级别
+              .scale({
+                x:this.scaleValue,
+                y:this.scaleValue
               })
+              // .clickEffect({
+              //   // 点击效果配置
+              //   scale: 0.5, // 缩放比例
+              //   level: ClickEffectLevel.LIGHT // 效果级别
+              // })
               .onClick(() => { // 点击图片时触发的回调
                 if(!this.isAuto) {
                   this.onclikMerit()

BIN
features/feature/src/main/resources/base/media/one_Fra_1.png


BIN
features/feature/src/main/resources/base/media/one_Fra_10.png


BIN
features/feature/src/main/resources/base/media/one_Fra_11.png


BIN
features/feature/src/main/resources/base/media/one_Fra_12.png


BIN
features/feature/src/main/resources/base/media/one_Fra_13.png


BIN
features/feature/src/main/resources/base/media/one_Fra_14.png


BIN
features/feature/src/main/resources/base/media/one_Fra_15.png


BIN
features/feature/src/main/resources/base/media/one_Fra_16.png


BIN
features/feature/src/main/resources/base/media/one_Fra_17.png


BIN
features/feature/src/main/resources/base/media/one_Fra_18.png


BIN
features/feature/src/main/resources/base/media/one_Fra_19.png


BIN
features/feature/src/main/resources/base/media/one_Fra_2.png


BIN
features/feature/src/main/resources/base/media/one_Fra_20.png


BIN
features/feature/src/main/resources/base/media/one_Fra_3.png


BIN
features/feature/src/main/resources/base/media/one_Fra_4.png


BIN
features/feature/src/main/resources/base/media/one_Fra_5.png


BIN
features/feature/src/main/resources/base/media/one_Fra_6.png


BIN
features/feature/src/main/resources/base/media/one_Fra_7.png


BIN
features/feature/src/main/resources/base/media/one_Fra_8.png


BIN
features/feature/src/main/resources/base/media/one_Fra_9.png


BIN
features/feature/src/main/resources/base/media/three_Fra_21.png


+ 21 - 2
features/user/src/main/ets/pages/SuggestionPage.ets

@@ -1,4 +1,4 @@
-import { IBestToast, YTAvoid, YTButton, YTHeader, YTUserRequest } from 'basic'
+import { IBestToast, YTAvoid, YTButton, YTHeader, yTRouter, YTUserRequest } from 'basic'
 
 @Builder
 function suggestionBuilder() {
@@ -13,10 +13,29 @@ struct SuggestionPage {
   @StorageProp(YTAvoid.SAFE_BOTTOM_KEY) private safeBottom: number = 0
   @State private description: string = ''
   @State private contact: string = ''
+  @StorageProp(YTAvoid.SAFE_TOP_KEY) safeTop:number=0
 
   build() {
     Column() {
-      YTHeader({ title: '意见反馈' })
+      // YTHeader({ title: '意见反馈' })
+      Row() {
+        Image($r('app.media.ic_back'))
+          .width(24)
+          .margin({ left: 16 })
+          .onClick(()=>{
+            yTRouter.routerBack()
+
+          })
+        Text('关于我们')
+        Column(){
+
+        }.width(24)
+        .height(24)
+      }
+      .width('100%')
+      .justifyContent(FlexAlign.SpaceBetween)
+      .height(44 + this.safeTop)
+      .padding({ top: this.safeTop })
       Row() {
         Row() {
           Text()