XUYangWei 2 mesi fa
parent
commit
bc3b8aea3b

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

@@ -335,7 +335,7 @@ export class YTUserRequest extends YTRequest {
   }
 
   //点香悬浮文字修改
-  static updateInseCharacter(param:Params, success: (res: string) => void, fail: (err: Error) => void){
+  static updateInseCharacter(param:Params){
     const  id=AppStorage.get('updateID') as number
     if(id!=undefined) {
       YTRequest.post<ReqString, ReqString>(`/api/woodenfish/config/modify`,

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

@@ -2,9 +2,13 @@ import { IBestToast } from "basic"
 
 @Component
 export struct TextInputCom{
-  @Prop text:string
+   @Prop
+   text:string=""
   changeText=(text:string)=>{
 
+  }
+  deleteText=()=>{
+
   }
   build() {
     Stack({alignContent:Alignment.End}){
@@ -20,11 +24,22 @@ export struct TextInputCom{
             this.text=value.slice(0,7)
             return
           }
+          // if(value.length<4){
+          //   IBestToast.show({
+          //     message:'最少4个字'
+          //   })
+          //   // this.text=value.slice(0,7)
+          //   return
+          // }
+          // this.text=value
           this.text=value
           this.changeText(this.text)
 
         })
-      Image($r('[basic].media.quxiao')).width(24).margin({right:10}).onClick(()=>{this.text=""})
+      Image($r('[basic].media.quxiao')).width(24).margin({right:10}).onClick(()=>{
+        // this.text=""
+        this.deleteText()
+      })
     }
   }
 }

+ 13 - 0
features/feature/src/main/ets/models/index.ets

@@ -1,3 +1,5 @@
+import { ClassFilter } from "@ohos/hypium/src/main/module/config/Filter";
+
 // 观察者模式装饰器
 @ObservedV2
 export class Cell {
@@ -6,4 +8,15 @@ export class Cell {
   opacity: number = 0; // 文字透明度
   @Trace // 跟踪属性变化
   y: number = 0; // 文字的垂直偏移量
+}
+//监听多行文本输入得
+@ObservedV2
+export class InputText{
+  id:number
+  @Trace
+  text:string
+  constructor(id:number,text:string) {
+    this.id=id
+    this.text=text
+  }
 }

+ 91 - 17
features/feature/src/main/ets/view/FragranceSettingView.ets

@@ -1,6 +1,8 @@
 import { webview } from '@kit.ArkWeb'
 import { AppStorageKeyFishCollect, avPlayerManager, IBestToast, YTHeader, YTUserRequest } from 'basic'
 import { TextInputCom } from '../component/TextInputCom'
+import { promptAction } from '@kit.ArkUI'
+import { InputText } from '../models'
 
 @Builder
 function FragranceSettingBuilder() {
@@ -12,13 +14,38 @@ function FragranceSettingBuilder() {
 
 @Component
 struct FragranceSettingView {
-  @StorageLink(AppStorageKeyFishCollect.TEXTARR)
+
+  @State
   textArr:string[]=[]
+
+  @State
+  textArrClass:InputText[]=[]
+
   @State
   currSelectNumber:number=1
   @State
   currSelectTimeNumber:number=1
 
+parseStringArray(input: string): string[] {
+  if(input=="['']"){
+    return [];
+  }
+  const trimmed = input.trim();
+  try {
+    // 统一处理引号格式:将单引号转为双引号
+    const jsonCompatible = trimmed.replace(/'/g, '"')
+    const parsed = JSON.parse(jsonCompatible as string)  as string[]
+
+    // 验证解析结果确实是字符串数组
+    if (Array.isArray(parsed) && parsed.every(item => typeof item === 'string')) {
+      return parsed;
+    }
+    return [];
+  } catch (error) {
+    return []; // 解析失败返回空数组
+  }
+}
+
   //获取香烟数量和燃烧时间
   updateNumAndTime(){
     YTUserRequest.getFishFra((res)=>{
@@ -37,6 +64,24 @@ struct FragranceSettingView {
         this.currSelectNumber=3
       }
 
+      const inputString=res.incenseCharacters as string
+      // for (let index = 0; index < inputString.length; index++) {
+      //
+      //
+      // }
+      // this.textArr = JSON.parse(jsonString)
+      this.textArr=this.parseStringArray(inputString)
+      this.textArr.forEach((item,index)=>{
+        this.textArrClass.push(new InputText(index,item))
+      })
+      // if(this.textArr[0]=""&&this.textArr.length==1){
+      //   this.textArr=[]
+      // }
+      // promptAction.showToast({
+      //   message:JSON.stringify(this.textArr[])
+      // })
+
+
     })
   }
 
@@ -45,7 +90,18 @@ struct FragranceSettingView {
     this.updateNumAndTime()
   }
   aboutToDisappear(): void {
-    // YTUserRequest.updateSuspensionCharacters()
+    let arrString=""
+//    //   this.textArr.forEach((item)=>{
+    //     //     arrString=arrString+item
+    //     // })
+    //
+    this.textArr=this.textArrClass.map(item=>item.text)
+
+    arrString=`['${this.textArr.join("','")}']`
+    // promptAction.showToast({
+    //   message:arrString
+    // })
+    YTUserRequest.updateInseCharacter({'incenseCharacters':arrString})
   }
   build() {
     Column() {
@@ -58,19 +114,31 @@ struct FragranceSettingView {
           Text('悬浮文字').fontColor(Color.White)
         }.width('100%')
         .justifyContent(FlexAlign.Start)
-        List({space:20}){
-          ForEach(this.textArr,(item:string,index:number)=>{
-            ListItem() {
-              TextInputCom({
-                text: item,
-                changeText: (value: string) => {
-                  this.textArr[index] = value
-                }
-              })
-            }
-          })
-        }.layoutWeight(1).scrollBar(BarState.Off)
-
+        if(this.textArrClass.length!=0) {
+          List({ space: 20 }) {
+            ForEach(this.textArrClass, (item: InputText, index: number) => {
+              ListItem() {
+                TextInputCom({
+                  text: item.text,
+                  changeText: (value: string) => {
+                    item.text=value
+                    // this.textArr[index] = value
+                    // item=value
+                  },
+                  deleteText: () => {
+                    const arr = this.textArrClass.filter((item, Index) => {
+                      return Index != index
+                    })
+                    this.textArrClass = []
+                    this.textArrClass = arr
+                    this.textArr=this.textArrClass.map(item=>item.text)
+                  }
+                })
+              }
+            },(item:string,index)=>{return item+index})
+          }.layoutWeight(1).scrollBar(BarState.Off)
+
+        }
 
 
         //取消
@@ -84,13 +152,19 @@ struct FragranceSettingView {
         .justifyContent(FlexAlign.Center)
         .backgroundColor('#646561')
         .onClick(()=>{
-          if(this.textArr.length>6){
+
+          if(this.textArrClass.length==5){
             IBestToast.show({
               message:'最多支持五行文本'
             })
             return
           }
-          this.textArr.push('')
+          const len=this.textArrClass.length as number
+          this.textArrClass.push(new InputText(len,'未命名'))
+          this.textArr=this.textArrClass.map(item=>item.text)
+          // promptAction.showToast({
+          //   message:this.textArr.length.toString()
+          // })
         })
 
 

+ 97 - 32
features/feature/src/main/ets/view/FragranceView.ets

@@ -4,8 +4,8 @@ import { promptAction } from '@kit.ArkUI';
 @Component
 export struct FragranceView{
   // @StorageProp(AppStorageKeyFishCollect.TEXTARR)
-  // @State
-  // textArr:string[]=['xxxx','xxxx','xxxx','xxx','xxxx','xxxx']
+  @State
+  textArr:string[]=[]
   private averageAngle: number = 0
   private radius1: number = 50
   private radius2: number =1
@@ -17,8 +17,8 @@ export struct FragranceView{
 
   private intervalID = setInterval(()=> {//每0.1秒执行5°的转动,动画更平滑
 
-    for (let index = 0; index < 6; index++) {
-      let doubleAngle = (this.averageAngle -60 * index + 0) * Math.PI / 180
+    for (let index = 0; index < 5; index++) {
+      let doubleAngle = (this.averageAngle -72 * index + 0) * Math.PI / 180
       let sin = Math.sin(doubleAngle);
       let cos = Math.cos(doubleAngle);
       this.widAr[index] =this.radius1+this.radius1*cos
@@ -74,6 +74,29 @@ export struct FragranceView{
   @State interId:number=0
   @State isShow:boolean=false
 
+  @State timeTextCountDown:string=""
+  interIdTimeCountDown:number=0
+
+  parseStringArray(input: string): string[] {
+    if(input=="['']"){
+      return [];
+    }
+    const trimmed = input.trim();
+
+    try {
+      // 统一处理引号格式:将单引号转为双引号
+      const jsonCompatible = trimmed.replace(/'/g, '"')
+      const parsed = JSON.parse(jsonCompatible as string)  as string[]
+
+      // 验证解析结果确实是字符串数组
+      if (Array.isArray(parsed) && parsed.every(item => typeof item === 'string')) {
+        return parsed;
+      }
+      return [];
+    } catch (error) {
+      return []; // 解析失败返回空数组
+    }
+  }
 
   //获取香烟数量和燃烧时间
   updateNumAndTime(){
@@ -92,11 +115,17 @@ export struct FragranceView{
       }else{
         this.num=3
       }
+      this.textArr=[]
+      const inputString=res.incenseCharacters as string
+
+      // const jsonString = inputString.replace(/'/g, '"') as string
+      this.textArr = this.parseStringArray(inputString)
+      this.startDownTime(this.time)
+      this.caluePosition()
 
-      //测试时间
-      this.time=1
 
     })
+
   }
 
   //计算香烟位置,启动动画
@@ -113,20 +142,49 @@ export struct FragranceView{
     this.state=AnimationStatus.Running
 
     //位移计算
-    this.moveY=0
+    // this.moveY=0
     if(this.time!=-1) {
       this.interId = setInterval(() => {
         this.moveY = this.moveY + 8
-      }, this.time * 60000 / 20)
+      }, this.time * 3000)
     }
+    //
+
+  }
+  //倒计时
+  startDownTime(time:number){
+    clearInterval(this.interIdTimeCountDown)
+    if(this.time!=10&&this.time!=30){
+      this.timeTextCountDown='不限时'
+      return
+    }
+    let t=time*60
+    // this.timeTextCountDown=(time*60).toString()
+    // this.formatTime(t)
+  this.interIdTimeCountDown=setInterval(()=>{
+      t=t-1
+      this.timeTextCountDown=this.formatTime(t)
+      // this.timeTextCountDown=this.formatTime(Number(this.timeTextCountDown))
+      // this.timeTextCountDown=(t-1).toString()
+    },1000)
+  }
+  // 格式化时间显示
+  private formatTime(totalSeconds: number): string {
+    const hours = Math.floor(totalSeconds / 3600)
+    const minutes = Math.floor((totalSeconds % 3600) / 60)
+    const seconds = totalSeconds % 60
 
+    return `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`
   }
 
 
-  aboutToAppear(): void {
+  aboutToAppear() {
+
+   this.updateNumAndTime()
+
+    // this.caluePosition()
+
 
-    this.updateNumAndTime()
-    this.caluePosition()
 
     // if(this.textArr.length==0){
     //   this.textArr.push('诸事顺遂')
@@ -165,7 +223,7 @@ export struct FragranceView{
             //   }.position({ x: this.widAr[index], y: this.heiAr[index] })
             // })
             Column() {
-              Text('天天吃饭')
+              Text(this.textArr[0]==undefined?"":this.textArr[0])
                 .fontSize(20)
                 .width(this.img)
                 .height(this.img)
@@ -175,7 +233,7 @@ export struct FragranceView{
 
 
             Column() {
-              Text('天天向上')
+              Text(this.textArr[1]==undefined?"":this.textArr[1])
                 .fontSize(20)
                 .width(this.img)
                 .height(this.img)
@@ -184,7 +242,7 @@ export struct FragranceView{
             }.position({ x: this.widAr[1], y: this.heiAr[1] })
 
             Column() {
-              Text('清纯男大')
+              Text(this.textArr[2]==undefined?"":this.textArr[2])
                 .fontSize(20)
                 .width(this.img)
                 .height(this.img)
@@ -193,7 +251,7 @@ export struct FragranceView{
             }.position({ x: this.widAr[2], y: this.heiAr[2] })
 
             Column() {
-              Text('官人梧州')
+              Text(this.textArr[3]==undefined?"":this.textArr[3])
                 .fontSize(20)
                 .width(this.img)
                 .height(this.img)
@@ -202,21 +260,21 @@ export struct FragranceView{
             }.position({ x: this.widAr[3], y: this.heiAr[3] })
 
             Column() {
-              Text('年年岁岁')
+              Text(this.textArr[4]==undefined?"":this.textArr[4])
                 .fontSize(20)
                 .width(this.img)
                 .height(this.img)
                 .fontColor(Color.White)
 
             }.position({ x: this.widAr[4], y: this.heiAr[4] })
-            Column() {
-              Text('平平安安')
-                .fontSize(20)
-                .width(this.img)
-                .height(this.img)
-                .fontColor(Color.White)
-
-            }.position({ x: this.widAr[5], y: this.heiAr[5] })
+            // Column() {
+            //   Text('平平安安')
+            //     .fontSize(20)
+            //     .width(this.img)
+            //     .height(this.img)
+            //     .fontColor(Color.White)
+            //
+            // }.position({ x: this.widAr[5], y: this.heiAr[5] })
 
           }.width(300)
           .height(350)
@@ -340,12 +398,12 @@ export struct FragranceView{
         }
 
         // 按钮控制区域
-        Row(){
-          Button('xxx').onClick(()=>{
-            this.time=1
-            this.caluePosition()
-          })
-        }
+        // Row(){
+        //   Button('xxx').onClick(()=>{
+        //     this.time=1
+        //     this.caluePosition()
+        //   })
+        // }
         // Row({space:20}){
         //   Button('启动').onClick(()=>{
         //     this.isShow=true
@@ -392,7 +450,7 @@ export struct FragranceView{
           }.width(24).height(24)
 
           Row({space:32}){
-            Text(`30:00`).fontColor($r('[basic].color.login_main_yellow'))
+            Text(`${this.timeTextCountDown}`).fontColor($r('[basic].color.login_main_yellow'))
 
             Text('重置')
               .borderRadius(20)
@@ -405,6 +463,12 @@ export struct FragranceView{
               .backgroundColor($r('[basic].color.login_main_yellow'))
               .fontColor(Color.Black)
               .onClick(() => {
+                clearInterval(this.interIdTimeCountDown)
+                this.moveY=0
+                this.state=AnimationStatus.Stopped
+                this.state=AnimationStatus.Running
+                this.startDownTime(this.time)
+
               })
           }
           Image($r('[basic].media.shezhix')).width(24).onClick(()=>{
@@ -423,7 +487,8 @@ export struct FragranceView{
       console.info('IsaKit Test Text isVisible: ' + isVisible + ', currentRatio:' + currentRatio)
       if (isVisible) {
        this.updateNumAndTime()
-        this.caluePosition()
+        // this.caluePosition()
+        // this.startDownTime(this.time)
       }
     })
   }

+ 106 - 69
features/feature/src/main/ets/view/MainView.ets

@@ -63,14 +63,14 @@ export struct MainView{
 
   //全部用分钟来计算,实际传递给后端用小时制
   //实际后端要的小时来算的数据
-  @Watch('caluc')
+  // @Watch('caluc')
   @State countdownHour:number=10
 
   //倒计时时间间隔
   @State countdownTime:number=1
 
   //倒计时敲击次数渲染文本
-  @Watch('caluc')
+  // @Watch('caluc')
   @State countdownCount:string="1"
 
   //倒计时自定义的文本分钟
@@ -96,9 +96,12 @@ export struct MainView{
   //模式 1(结束 手动) 2无限,3固定次数 4倒计时
   @State woodenfishModel:number=1
   //进度条功德数
+  @Watch('total')
   @State currentMerit:number=0
   //总功德数
   @State totalMerit:number=10
+  private Merit:number[]=[10,200,500,1000,2000,5000,6000,8000]
+  private MeritIndex:number=0
 
   //自动点击缩放参数
   @State scaleValue:number=1
@@ -115,6 +118,13 @@ export struct MainView{
     height:'100%',
   })
 
+  total(){
+    if(this.currentMerit>this.totalMerit){
+      this.MeritIndex++
+      this.totalMerit=this.Merit[this.MeritIndex]
+    }
+
+  }
 
   // 初始化方法,在组件即将显示时被调用
   aboutToAppear(): void {
@@ -123,14 +133,15 @@ export struct MainView{
     }
     YTUserRequest.getFishFra((res)=>{
 
-      promptAction.showToast({
-        message:JSON.stringify(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
@@ -138,7 +149,31 @@ export struct MainView{
       //倒计时
       this.countdownTime=res.countdownTime as number
       this.countdownHour=(res.countdownHour as number)
+      if(this.countdownHour>60){
+        this.countAutoHour=this.countdownHour.toString()
+      }
+
       this.isAuto=this.woodenfishModel!=1?true:false
+
+      this.text=res.suspensionCharacters as string
+      //需要渲染
+      this.infiniteTimeText=this.infiniteTime.toString()
+      this.fixedNumText=this.fixedNum.toString()
+      this.fixedTimeText=this.fixedTime.toString()
+      this.countdownCount=(this.countdownHour*60/this.countdownTime).toString()
+
+      for (let i = 0; i < this.Merit.length; i++) {
+        if(this.currentMerit>this.Merit[i]&&this.currentMerit<this.Merit[i+1]){
+          this.totalMerit=this.Merit[i+1]
+        }
+      }
+
+      // promptAction.showToast({
+      //   message:this.countdownCount
+      // })
+
+
+
       //判断是否自动并设置敲击时间
       clearInterval(this.inversetId)
       //自动敲击
@@ -238,7 +273,7 @@ export struct MainView{
       const b=setTimeout(()=>{
         clearInterval(this.inversetId)
         clearTimeout(b)
-      },this.countdownHour*1000*this.countdownHour)
+      },this.countdownHour*60000)
 
 
     }
@@ -253,7 +288,7 @@ export struct MainView{
       Row(){
         Image($r('[basic].media.quxiao')).width(20).onClick(()=>{
           this.isShowTimeManger = false
-
+          this.caluc()
           // 发送请求
           YTUserRequest.updateFishWoodenModel(
             {
@@ -265,16 +300,16 @@ export struct MainView{
               woodenfishModel:this.woodenfishModel
             } as Params)
 
-          promptAction.showToast({
-            message:JSON.stringify(   {
-                 countdownHour:this.countdownHour,
-                 countdownTime:this.countdownTime,
-                 fixedNum:this.fixedNum,
-                 fixedTime:this.fixedTime,
-                 infiniteTime:this.infiniteTime,
-                 woodenfishModel:this.woodenfishModel
-               } as Params)
-          })
+          // promptAction.showToast({
+          //   message:JSON.stringify(   {
+          //     countdownHour:this.countdownHour,
+          //     countdownTime:this.countdownTime,
+          //     fixedNum:this.fixedNum,
+          //     fixedTime:this.fixedTime,
+          //     infiniteTime:this.infiniteTime,
+          //     woodenfishModel:this.woodenfishModel
+          //   } as Params)
+          // })
           this.autoOnclick()
 
 
@@ -311,52 +346,52 @@ export struct MainView{
           }.tabBar('无限').layoutWeight(1)
           TabContent() {
             Column(){
-            Column({space:16}) {
-              CountTextCom({
-                onclickCount:this.fixedNumText,
-                changeOnclickCount:(value:string)=>{
-                  this.fixedNumText=value
-                  //固定模式敲击次数
-                  this.fixedNum=Number(this.fixedNumText)
-                }
+              Column({space:16}) {
+                CountTextCom({
+                  onclickCount:this.fixedNumText,
+                  changeOnclickCount:(value:string)=>{
+                    this.fixedNumText=value
+                    //固定模式敲击次数
+                    this.fixedNum=Number(this.fixedNumText)
+                  }
 
-              })
-              TimeTextCom({
-                onclickTime:this.fixedTimeText,
-                changeText:(value:string)=>{
-                  this.fixedTimeText=value
-                  //固定模式间隔时间
-                  this.fixedTime=Number(this.fixedTimeText)
-                }
+                })
+                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)')
+                })
+              }.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}) {
-              TimeProgressCom({
-                progressValue:this.countdownHour,
-                changeTabCurrNumberAndCountTime:(progressValue:string,tabIndex?:number,)=>{
-                  if(progressValue!='自定义') {
-                    this.countdownHour = Number(progressValue)
-                  }
-                  if(tabIndex==3) {
-                    this.tabsController.changeIndex(tabIndex)
+              Column({space:16}) {
+                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
-              }
+                })
+                CountTextCom({
+                  onclickCount:this.countdownCount,
+                  changeOnclickCount:(value:string)=>{
+                    this.countdownCount=value
+                  }
 
-            })
+                })
 
-            }.width('100%').borderRadius(8).padding(20).backgroundColor('rgba(77, 77, 77, 1)')
+              }.width('100%').borderRadius(8).padding(20).backgroundColor('rgba(77, 77, 77, 1)')
 
             }.layoutWeight(1).justifyContent(FlexAlign.Start)
 
@@ -388,12 +423,12 @@ export struct MainView{
             .fontColor(this.currentIndex==0?Color.Black:'rgba(255, 255, 255, 0.35)')
             .backgroundColor(this.currentIndex==0?'rgba(250, 222, 113, 1)':Color.Transparent)
             .onClick(()=>{
-            this.currentIndex=0
-            this.tabsController.changeIndex(this.currentIndex)
+              this.currentIndex=0
+              this.tabsController.changeIndex(this.currentIndex)
               this.woodenfishModel=2
 
 
-          })
+            })
           Text('固定次数')
             .layoutWeight(1)
             .textAlign(TextAlign.Center)
@@ -414,11 +449,11 @@ export struct MainView{
             .fontColor((this.currentIndex==2||this.currentIndex==3)?Color.Black:'rgba(255, 255, 255, 0.35)')
             .backgroundColor((this.currentIndex==2||this.currentIndex==3)?'rgba(250, 222, 113, 1)':Color.Transparent)
             .onClick(()=>{
-            this.currentIndex=2
-            this.tabsController.changeIndex(this.currentIndex)
+              this.currentIndex=2
+              this.tabsController.changeIndex(this.currentIndex)
               this.woodenfishModel=4
 
-          })
+            })
 
         }.width('100%')
         .borderRadius(10)
@@ -471,6 +506,7 @@ export struct MainView{
                         .fontColor('rgba(0, 0, 0, 0.95)')
                         .onClick(() => {
                           this.currentMerit = 0
+                          this.totalMerit=this.Merit[0]
                           YTUserRequest.resetFish()
                         })
 
@@ -486,6 +522,7 @@ export struct MainView{
                         .width(80).color('rgba(61, 186, 208, 1)')
                         .style({ strokeWidth: 7, shadow: true })
                         .backgroundColor(Color.White)
+                        .value(this.currentMerit)
                       Text('集福').fontSize(20).fontColor('rgba(252, 253, 237, 1)')
                     }.margin({ left: 10 })
 
@@ -566,16 +603,16 @@ export struct MainView{
                               .fontColor(Color.White)
                               .backgroundColor('#252111')
                               .bindSheet($$this.isShowTimeManger, this.TimeMangerBuilder
-                            , {
-                                width: '100%',
-                                height: 400,
-                                showClose: false,
-                                onWillDismiss: ((dismissSheetAction: DismissSheetAction) => {
-                                  if (dismissSheetAction.reason == DismissReason.SLIDE_DOWN) {
-                                    dismissSheetAction.dismiss(); //注册dismiss行为
-                                  }
-                                }),
-                              })
+                                , {
+                                  width: '100%',
+                                  height: 400,
+                                  showClose: false,
+                                  onWillDismiss: ((dismissSheetAction: DismissSheetAction) => {
+                                    if (dismissSheetAction.reason == DismissReason.SLIDE_DOWN) {
+                                      dismissSheetAction.dismiss(); //注册dismiss行为
+                                    }
+                                  }),
+                                })
                               .onClick(() => {
                                 this.isShowTimeManger = true
                                 this.woodenfishModel=2

+ 6 - 4
features/user/src/main/ets/components/LoginInput.ets

@@ -24,13 +24,14 @@ export struct LoginInput {
   build() {
     Row({ space: 8 }) {
       Text(this.item?.txt)
-        .fontColor('#FF141111')
+        .fontColor(Color.White)
         .fontSize(16)
         .width(71)
         .textAlign(TextAlign.Center)
         .border({ width: { right: 1 }, color: '#FFB2B2B2' })
       TextInput({ text: this.inputData, placeholder: this.item?.placeHolder })
         .layoutWeight(1)
+        .fontColor(Color.White)
         .type(this.isPassword ? InputType.Password : InputType.PhoneNumber)
         .borderRadius(0)
         .textAlign(TextAlign.Start)
@@ -39,7 +40,7 @@ export struct LoginInput {
         .placeholderColor($r('[basic].color.main_na_color'))
         .backgroundColor(Color.Transparent)
         .padding(0)
-        .caretColor('rgba(0, 0, 0, 0.85)')
+        .caretColor(Color.White)
         .onChange(this.inputChange)
 
       if (this.needCode) {
@@ -75,8 +76,9 @@ export struct LoginInput {
       }
 
     }
-    .border({ width: { bottom: 1 }, color: '#f7f9fa' })
-    .height(56)
+    .borderRadius(21)
+    .backgroundColor('rgba(74, 74, 74, 1)')
+    .height(44)
     .width('100%')
     .margin({ bottom: this.marginBottom })
   }

+ 1 - 0
features/user/src/main/ets/components/OtherLoginMethods.ets

@@ -8,6 +8,7 @@ export struct OtherLoginMethods {
   build() {
     Column() {
       Text('其他登入方式')
+        .fontColor(Color.White)
         .fontSize($r('[basic].float.page_text_font_size_10'))
         .margin({ bottom: 16 })
       Row({ space: 16 }) {

+ 2 - 2
features/user/src/main/ets/components/Terms.ets

@@ -4,7 +4,7 @@ import { yTRouter } from 'basic'
 @Extend(Span)
 function spanEx(click: () => void) {
   // .decoration({ type: TextDecorationType.Underline, color: $r('[basic].color.main_ac_color_dark') })
-  .fontColor('rgba(0, 0, 0, 0.85)')
+  .fontColor(Color.White)
   .onClick(click)
 }
 
@@ -46,7 +46,7 @@ export struct Terms {
           Span('。')
         }
         .fontWeight(300)
-        .fontColor('#FF686868')
+        .fontColor(Color.White)
         .fontSize(12)
 
       }

+ 10 - 3
features/user/src/main/ets/pages/LoginPage.ets

@@ -34,7 +34,7 @@ struct LoginPage {
             .fontWeight(400)
             .alignSelf(ItemAlign.End)
             .textAlign(TextAlign.Center)
-            .fontColor('rgba(0, 0, 0, 0.85)')
+            .fontColor(Color.White)
             .onClick(() => {
               yTRouter.routerBack()
             })
@@ -43,6 +43,11 @@ struct LoginPage {
             .borderRadius(12)
             .backgroundColor('#4DFFFFFF')
             .margin({ bottom: 24, right: 28, top: 20 })
+
+          Row() {
+            Image($r('app.media.muyubanck')).width(159).height(159).borderRadius(20)
+          }.width('100%')
+          .justifyContent(FlexAlign.Center)
         }
         .padding({ left: 16, })
         .height(193)
@@ -63,7 +68,7 @@ struct LoginPage {
               // .backgroundColor(this.tabBarIndex == 1 ? Color.White : Color.Transparent)
               .height(48)
               .textAlign(TextAlign.Center)
-              .fontColor(this.tabBarIndex == 1 ? '#FF141111' : '#80141111')
+              .fontColor(this.tabBarIndex == 1 ? Color.White : 'rgba(255, 255, 255, 0.35)')
               .onClick(() => {
                 this.tabBarIndex = 1
                 this.tabController.changeIndex(1)
@@ -80,7 +85,7 @@ struct LoginPage {
             Text('注册')
               .fontSize(20)
               .fontWeight(600)
-              .fontColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? '#FF141111' : '#80141111')
+              .fontColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? Color.White : 'rgba(255, 255, 255, 0.35)')
               // .backgroundColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? Color.White : Color.Transparent)
               .textAlign(TextAlign.Center)
               .height(48)
@@ -142,6 +147,8 @@ struct LoginPage {
     })
     // .backgroundImage(this.tabBarIndex==1?$r('app.media.login'):$r('app.media.register'))
     // .backgroundImageSize({width:'100%',height:'100%'})
+    // .backgroundImage($r('app.media.muyubanck'))
+    .backgroundColor(Color.Black)
     .height('100%')
   }
 }

+ 1 - 7
features/user/src/main/ets/pages/SettingPage.ets

@@ -186,13 +186,7 @@ struct SettingPage {
           })
             .margin({ top: 324, bottom: 12 })
             .borderRadius(40)
-            .linearGradient({
-              angle: 135,
-              colors: [
-                ['rgba(230, 163, 240,1)', 0.2],
-                ['rgba(191, 242, 255, 1)', 1]
-              ]
-            })
+            .backgroundColor($r('[basic].color.login_main_yellow'))
           YTButton({
             btContent: '注销用户',
             btFontColor: 'rgba(28, 28, 28, 0.6)',

+ 5 - 5
features/user/src/main/ets/views/LoginView.ets

@@ -86,7 +86,7 @@ export struct LoginView {
       Row() {
         if (!this.isPassword) {
           Text('密码登录')
-            .fontColor('rgba(0, 0, 0, 0.85)')
+            .fontColor(Color.White)
             .fontSize(12)
             .fontWeight(700)
             .onClick(() => {
@@ -95,7 +95,7 @@ export struct LoginView {
           Blank()
         } else {
           Text('验证码登录')
-            .fontColor('rgba(0, 0, 0, 0.85)')
+            .fontColor(Color.White)
             .fontWeight(700)
             .fontSize(12)
             .onClick(() => {
@@ -103,7 +103,7 @@ export struct LoginView {
             })
           Blank()
           Text('忘记密码?')
-            .fontColor('rgba(0, 0, 0, 0.85)')
+            .fontColor(Color.White)
             .fontSize(12)
             .fontWeight(700)
             .onClick(() => {
@@ -117,7 +117,7 @@ export struct LoginView {
 
       YTButton({
         btContent: '登录',
-        btFontColor:'rgba(0, 0, 0, 0.75)',
+        btFontColor:Color.Black,
         bgc:Color.Transparent,
         click: () => {
           this.loginCollect.executeLogin("common")
@@ -135,7 +135,7 @@ export struct LoginView {
 
 
       Text('未注册的手机号码登陆后将自动注册')
-        .fontColor('rgba(0, 0, 0, 0.85)')
+        .fontColor(Color.White)
         .fontSize(12)
         .margin({ top: 16, bottom: 56 })
         .alignSelf(ItemAlign.Start)

+ 2 - 2
features/user/src/main/ets/views/Mine.ets

@@ -93,8 +93,8 @@ export struct Mine {
         // utd: uniformTypeDescriptor.UniformDataType.HYPERLINK,
         utd:uniformTypeDescriptor.UniformDataType.TEXT,
         title: '静心木鱼',
-        content:'http://appgallery.huawei.com/app/detail?id=6917580107917312127',
-        description:"http://appgallery.huawei.com/app/detail?id=6917580107917312127"
+        content:'http://appgallery.huawei.com/app/detail?id=6917581171725638374',
+        description:"http://appgallery.huawei.com/app/detail?id=6917581171725638374"
         // content: 'store://appgallery.huawei.com/app/detail?id=6917580107917312127',
         // thumbnail:new Uint8Array(buffer),
         // thumbnailUri:"https://imgtool.net/cdn/image/2023/20230401_1.jpg"

+ 4 - 4
features/user/src/main/ets/views/RegisterOrResetPassView.ets

@@ -25,7 +25,7 @@ export struct RegisterOrResetPassComp {
   }
 
   build() {
-    Column() {
+    Column({space:8}) {
       LoginInput({
         item: this.inputPhoneNumberType,
         inputData: this.loginCollect.phonenumber,
@@ -67,13 +67,13 @@ export struct RegisterOrResetPassComp {
         .fontSize(10)
         .fontColor('#e1e1e1')
         .margin({ top: 4, bottom: 48 })
-        .fontColor('rgba(0, 0, 0, 0.85)')
+        // .fontColor('rgba(0, 0, 0, 0.85)')
 
 
       YTButton({
         //: '立即重置'
         btContent: this.calcButtonContent(),
-        btFontColor:'rgba(0, 0, 0, 0.75)',
+        btFontColor:Color.Black,
         bgc:Color.Transparent,
         click: () => {
           this.loginCollect.executeLogin("common")
@@ -95,7 +95,7 @@ export struct RegisterOrResetPassComp {
       }else{
         Text('注册成功后将自动登录')
           .fontSize(10)
-          .fontColor('rgba(0, 0, 0, 0.85)')
+          .fontColor(Color.White)
           .margin({ top: 16 })
       }
 

BIN
features/user/src/main/resources/base/media/hua_wei.png


BIN
features/user/src/main/resources/base/media/muyubanck.png


+ 1 - 1
products/entry/src/main/module.json5

@@ -53,7 +53,7 @@
     "metadata": [
       {
         "name": "client_id",
-        "value": "6917580107833284123"
+        "value": "6917581171725638374"
       }
     ],
     "extensionAbilities": [