XUYangWei 2 maanden geleden
bovenliggende
commit
2905ac55c6

+ 1 - 0
commons/basic/Index.ets

@@ -53,6 +53,7 @@ export * from "./src/main/ets/utils/YTBreakPoint"
 export { BasicType } from './src/main/ets/models/index'
 
 export * from '@mumu/crop'
+export {avPlayerManager} from './src/main/ets/utils/AVPlayerManager'
 
 export * from './src/main/ets/models'
 export{Vibration} from './src/main/ets/utils/VibrationUtils'

+ 29 - 0
commons/basic/src/main/ets/components/dialog/BlessCustomDialog.ets

@@ -0,0 +1,29 @@
+@CustomDialog
+export struct BlessCustomCustomDialog {
+  controller: CustomDialogController
+  @State img:ResourceStr=""
+  build() {
+    Column({space:21}){
+      Stack() {
+        Image(this.img).width(270)
+      }
+      Image($r('app.media.img')).width(32).onClick(()=>{
+        this.controller.close()
+
+      })
+    }.width('100%')
+    .height('100%')
+    .backgroundColor('rgba(0, 0, 0, 0.6)')
+    .justifyContent(FlexAlign.Center)
+  }
+}
+//
+// dialogController: CustomDialogController=new CustomDialogController({
+//   builder:FinishToDoCustomDialog({
+//     title:this.titleGroup
+//   }),
+//   alignment:DialogAlignment.Center,
+//   customStyle:true,
+//   width:'100%',
+//   height:'100%',
+// })

+ 0 - 1
commons/basic/src/main/ets/components/generalComp/AgreePrivacy.ets

@@ -46,7 +46,6 @@ export function agreePrivacy(item: BasicType<undefined>) {
       YTButton({
         btContent: '同意并登入',
         btHeight: 37,
-        bgc:'rgba(253, 95, 229, 1)',
         btFontColor:Color.White,
         click: () => {
           YTToast.getInstance().hide()

+ 1 - 1
commons/basic/src/main/ets/components/generalComp/YTButton.ets

@@ -5,7 +5,7 @@ export struct YTButton {
   btContent: string = ''
   btPadding?: Length | Padding
   btFontSize: number = 12
-  bgc: ResourceColor = $r('app.color.main_ac_color_dark')
+  bgc: ResourceColor = $r('app.color.login_main_yellow')
   btFontColor: ResourceColor = Color.White
   btBorder?: BorderOptions
   btState: boolean = true

+ 75 - 0
commons/basic/src/main/ets/utils/AVPlayerManager.ets

@@ -0,0 +1,75 @@
+import { media } from '@kit.MediaKit';
+
+class AVPlayerManager {
+  private avPlayer: media.AVPlayer | null = null
+  private loop: boolean = false
+  private rawFdPath: string = ''
+
+  async getAVPlayerInstance() {
+    // 如果已存在,直接返回
+    if (this.avPlayer !== null) {
+      return this.avPlayer
+    }
+    // 初始化播放器
+    const player = await media.createAVPlayer()
+    player.on('stateChange', (state) => {
+      switch (state) {
+        case 'initialized':
+          player.prepare()
+          break;
+        case 'prepared':
+          player.play()
+          break;
+        case 'playing':
+          player.play()
+          break;
+        case 'paused':
+          player.pause()
+          break;
+        case 'completed':
+          if (this.loop) {
+            player.play() // 播放结束继续播放:循环播放
+          } else {
+            player.stop() // 播放结束
+          }
+          break;
+        case 'stopped':
+          player.reset() // stop 时 reset -> 释放音频资源
+          break;
+        default:
+          break;
+      }
+    })
+    this.avPlayer = player
+    return this.avPlayer
+  }
+
+  // 加载 src/main/resources/rawfile 的文件
+  async playByRawSrc(rawFdPath: string) {
+    const player = await this.getAVPlayerInstance()
+    // 先释放原来的资源
+    await player.reset()
+    // 获取文件信息
+    const context = getContext()
+    // 加载 src/main/resources/rawfile 文件夹中的文件
+    const fileDescriptor = await context.resourceManager.getRawFd(rawFdPath)
+    // 设置播放路径
+    player.fdSrc = fileDescriptor
+    // 播放
+    player.play()
+  }
+
+  // 停止播放
+  async stop() {
+    const player = await this.getAVPlayerInstance()
+    this.loop = false
+    player.stop()
+  }
+
+  async setLoop(isLoop: boolean) {
+    this.loop = isLoop
+  }
+}
+
+
+export const avPlayerManager = new AVPlayerManager()

+ 3 - 1
commons/basic/src/main/ets/utils/VibrationUtils.ets

@@ -1,9 +1,11 @@
 import { vibrator } from '@kit.SensorServiceKit'
 
+
+
 export class Vibration{
   // 开启震动
   static startVibration() {
-    vibrator.startVibration({ type: 'time', duration: 200 }, { usage: 'alarm' })
+    vibrator.startVibration({ type: 'time', duration: 200 }, { usage: 'touch' })
   }
   // 关闭震动
   static stopVibration() {

+ 4 - 0
commons/basic/src/main/ets/utils/YTRouter.ets

@@ -14,6 +14,10 @@ export class YTRouter extends NavPathStack {
     return YTRouter.instance
   }
 
+  router2FishSettingPage() {
+    yTRouter.pushPathByName('FishSettingView', '')
+  }
+
   router2SettingPage() {
     yTRouter.pushPathByName('SettingPage', '')
   }

+ 4 - 0
commons/basic/src/main/resources/base/element/color.json

@@ -19,6 +19,10 @@
     {
       "name": "main_blank",
       "value": "#FF161718"
+    },
+    {
+      "name": "login_main_yellow",
+      "value": "#fbdf71"
     }
   ]
 }

+ 1 - 0
features/feature/Index.ets

@@ -1,3 +1,4 @@
 export { MainView } from './src/main/ets/view/MainView';
+export { FragranceView } from './src/main/ets/view/FragranceView';
 export { add } from './src/main/ets/utils/Calc';
 

+ 48 - 0
features/feature/src/main/ets/view/FishSettingView.ets

@@ -0,0 +1,48 @@
+import { webview } from '@kit.ArkWeb'
+import { YTHeader } from 'basic'
+
+@Builder
+function FishSettingViewBuilder() {
+  NavDestination() {
+    FishSettingView()
+  }.title("设置")
+  .hideTitleBar(true)
+}
+
+@Component
+struct FishSettingView {
+
+  build() {
+    Column() {
+      YTHeader({title:'设置'})
+
+      Column(){
+        Text('悬浮文字')
+        TextInput().width('80%').backgroundColor('#787878')
+      }.width('100%')
+      .height(200)
+
+      Column(){
+        Text('木鱼音色')
+        Row() {
+          ForEach([1, 2, 3], (item: number) => {
+            Column() {
+
+            }.width(50)
+            .height(50)
+            .backgroundColor(Color.Pink)
+          })
+        }
+
+
+
+      }.width('100%')
+      .height(200)
+
+
+
+    }.width('100%')
+    .height('100%')
+    .padding(20)
+  }
+}

+ 28 - 0
features/feature/src/main/ets/view/FragranceView.ets

@@ -4,6 +4,34 @@ import { YTHeader } from 'basic';
 export struct FragranceView{
   build() {
     Column(){
+      Column(){
+        Row(){
+          Text('xxxxx')
+
+        }.width('100%').justifyContent(FlexAlign.Center)
+        Row(){
+          Text('xxxxx')
+          Text('xxxxx')
+        }.width('100%').justifyContent(FlexAlign.SpaceBetween)
+
+
+        Row(){
+          Text('xxxxx')
+          Text('xxxxx')
+
+        }.width('100%').justifyContent(FlexAlign.SpaceEvenly)
+      }
+      .width('100%')
+      .padding({left:12,right:12})
+      .rotate({
+        x:0,
+        z:1,
+        y:0,
+        angle:50
+      })
+
+
+
 
     }.width('100%')
     .height('100%')

+ 287 - 112
features/feature/src/main/ets/view/MainView.ets

@@ -1,4 +1,6 @@
-import { Vibration, YTAvoid, YTHeader } from 'basic';
+import { avPlayerManager, Vibration, YTAvoid, YTHeader, yTRouter } from 'basic';
+import { faceDetector } from '@kit.CoreVisionKit';
+import { trustedAppService } from '@kit.DeviceSecurityKit';
 
 // 观察者模式装饰器
 @ObservedV2
@@ -19,6 +21,15 @@ export struct MainView{
   private count: number = 10; // 列表中 Cell 对象的数量
   private image: ResourceStr=$r('app.media.muyu')
 
+  //是否是手动
+  @State isHand:boolean=false
+  //是否展示侧边工具栏
+  @State isShowSilder:boolean=true
+  //是否开启声音
+  @State isOpenMusic:boolean=true
+  //是否开启震动
+  @State isOpenVibration:boolean=true
+
   //动画true/false
   @State isAnimation:boolean=false
   //进度条
@@ -29,15 +40,28 @@ export struct MainView{
   @State time:number=1000
 
   @State isShowTimeManger:boolean=false
+  @State valueTime:number=10
 
+  //开启关闭音乐
+  async openMusic(){
+    await avPlayerManager.playByRawSrc('music3.mp3')
 
-  @State valueTime:number=10
+  }
+  async closeMusic(){
+    await avPlayerManager.stop()
+  }
 
   //点击动画
   onclikMerit(){
     if(this.isAnimation){
       return
     }
+    if(this.isOpenMusic){
+      this.openMusic()
+    }
+    if(this.isOpenVibration){
+      Vibration.startVibration()
+    }
     this.isAnimation=true
     this.currentMerit++
     let index = this.indexCount % this.count; // 计算当前滚动的索引
@@ -51,6 +75,7 @@ export struct MainView{
           duration: 500, // 动画持续时间为1000毫秒
           onFinish:()=>{
             this.isAnimation=false
+            this.closeMusic()
           }
         }, () => {
           this.list[index].y = -200 // 设置 Cell 的垂直偏移量
@@ -72,41 +97,131 @@ export struct MainView{
       Stack({alignContent:Alignment.Top}) {
         Tabs({ barPosition: BarPosition.Start, controller: this.tabsController  }) {
           TabContent() {
-
-            TextInput()
-              .width(60)
-              .height(20)
-              .padding(0)
-              .type(InputType.Number) // 设置输入类型为数字
-              .textAlign(TextAlign.Center)
-              .borderRadius(4)
-              .backgroundColor(Color.Gray)
+            Column() {
+              Text('敲击间隔时长(1-10秒)')
+
+              Row() {
+                TextInput()
+                  .width(70)
+                  .height(40)
+                  .padding(0)
+                  .type(InputType.Number) // 设置输入类型为数字
+                  .textAlign(TextAlign.Center)
+                  .borderRadius(4)
+                  .backgroundColor(Color.Gray)
+
+                Text('秒')
+              }
+            }
 
           }.tabBar('无限')
 
           TabContent() {
-            TextInput()
-              .width(60)
-              .height(20)
-              .padding(0)
-              .type(InputType.Number) // 设置输入类型为数字
-              .textAlign(TextAlign.Center)
-              .borderRadius(4)
-              .backgroundColor(Color.Gray)
+            Column() {
+              Column() {
+                Text('敲击次数(1-9999次)')
+                Row() {
+                  TextInput()
+                    .width(70)
+                    .height(40)
+                    .padding(0)
+                    .type(InputType.Number) // 设置输入类型为数字
+                    .textAlign(TextAlign.Center)
+                    .borderRadius(4)
+                    .backgroundColor(Color.Gray)
+
+                  Text('秒')
+                }
+              }
+
+              Column() {
+                Text('敲击间隔时长(1-10秒)')
+                Row() {
+                  TextInput()
+                    .width(70)
+                    .height(40)
+                    .padding(0)
+                    .type(InputType.Number) // 设置输入类型为数字
+                    .textAlign(TextAlign.Center)
+                    .borderRadius(4)
+                    .backgroundColor(Color.Gray)
+
+                  Text('秒')
+                }
+              }
+
+            }
 
           }.tabBar('固定次数')
 
           TabContent() {
-            TextInput()
-              .width(60)
-              .height(20)
-              .padding(0)
-              .type(InputType.Number) // 设置输入类型为数字
-              .textAlign(TextAlign.Center)
-              .borderRadius(4)
-              .backgroundColor(Color.Gray)
+            Column() {
+              Column() {
+                Text('倒计时(1-9999次)')
+                Stack() {
+                  Progress({ value: this.valueTime, total: 70, type: ProgressType.Linear }).backgroundColor('#4c4c4c')
+                  Row({space:30}){
+                    ForEach([0,10,20,30,40,50,60,70],(item:number,index:number)=>{
+                      Column(){
+                      }.width(10)
+                      .height(10)
+                      .borderRadius('50%')
+                      .onClick(()=>{
+                        if(index!=7){
+                          this.valueTime=item
+                        }else{
+                          this.currentIndex=3
+                          this.tabsController.changeIndex(this.currentIndex)
+                        }
+
+                      })
+                      .backgroundColor(Color.Yellow)
+                      // .backgroundColor(this.valueTime>=item?Color.Yellow:Color.White)
+                    })
+
+
+                  }.width('100%')
+
+                }
+              }
+
+              Column() {
+                Text('敲击间隔时长(1-10秒)')
+                Row() {
+                  TextInput()
+                    .width(70)
+                    .height(40)
+                    .padding(0)
+                    .type(InputType.Number) // 设置输入类型为数字
+                    .textAlign(TextAlign.Center)
+                    .borderRadius(4)
+                    .backgroundColor(Color.Gray)
+
+                  Text('秒')
+                }
+              }
+
+            }
+
 
           }.tabBar('倒计时')
+          TabContent() {
+            Column() {
+              Text('自定义时间')
+              Row() {
+                TextInput()
+                  .width(70)
+                  .height(40)
+                  .padding(0)
+                  .type(InputType.Number) // 设置输入类型为数字
+                  .textAlign(TextAlign.Center)
+                  .borderRadius(4)
+                  .backgroundColor(Color.Gray)
+
+                Text('秒')
+              }
+            }
+          }.tabBar('自定义')
 
         }.width('100%').barHeight(0)
         Row(){
@@ -133,7 +248,7 @@ export struct MainView{
             .layoutWeight(1)
             .borderRadius(10)
             .height(30)
-            .backgroundColor(this.currentIndex==2?Color.Green:Color.Transparent)
+            .backgroundColor((this.currentIndex==2||this.currentIndex==3)?Color.Green:Color.Transparent)
             .onClick(()=>{
             this.currentIndex=2
             this.tabsController.changeIndex(this.currentIndex)
@@ -141,13 +256,15 @@ export struct MainView{
           })
 
         }.width('100%')
+        .borderRadius(10)
+        .height(30)
         .backgroundColor(Color.Pink)
       }
 
 
     }.width('100%')
     .height('100%')
-    .padding({top:30})
+    .padding(20)
     .backgroundColor(Color.White)
 
   }
@@ -162,99 +279,157 @@ export struct MainView{
   build() {
     Column() {
 
-      Row(){
-        Text(`积功德: ${this.currentMerit}`).fontColor(Color.White).layoutWeight(2)
-        Text('清零').fontColor(Color.White).onClick(()=>{
-          this.currentMerit=0
-        }).layoutWeight(1)
-
-        Image($r('app.media.muyu')).width(30).layoutWeight(1)
-
-
-
-      }.width('100%')
-      .justifyContent(FlexAlign.SpaceBetween)
-
       Row(){
         Column(){
-          Progress({ value: this.currentMerit, total: this.totalMerit, type: ProgressType.Ring })
-            .width(120).color(Color.Orange)
-            .style({ strokeWidth: 10, shadow: true })
-            .backgroundColor(Color.White)
+          //积功德+清零
+          Row({space:50}){
+            Text(){
+              Span('积功德: ').fontColor(Color.White)
+              Span(`${this.currentMerit}`).fontColor($r('[basic].color.login_main_yellow'))
+            }
+
+            Row() {
+              Text('清零')
+                .borderRadius(6)
+                .padding({
+                  left: 6,
+                  right: 6,
+                  top: 4,
+                  bottom: 4
+                })
+                .backgroundColor($r('[basic].color.login_main_yellow'))
+                .fontColor(Color.Black)
+                .onClick(() => {
+                  this.currentMerit = 0
+                })
+
+
+            }
+
+          }.width('100%').margin({left:80})
+
+          //进度条
+          Column(){
+            Progress({ value: this.currentMerit, total: this.totalMerit, type: ProgressType.Ring })
+              .width(80).color(Color.Blue)
+              .style({ strokeWidth: 5, shadow: true })
+              .backgroundColor(Color.White)
+
+            Text(`${this.currentMerit}/${this.totalMerit}`).fontColor(Color.White).margin({left:10})
+
+          }.width('100%').justifyContent(FlexAlign.Start).alignItems(HorizontalAlign.Start)
+        }.width('70%')
+        //右边的按钮
 
-          Text(`${this.currentMerit}/${this.totalMerit}`).fontColor(Color.White)
-        }
         Column({space:30}){
-          Image($r('app.media.muyu')).width(30)
-          Image($r('app.media.muyu')).width(30)
-        }
-      }.width('100%').justifyContent(FlexAlign.SpaceBetween)
+          Image($r('app.media.muyu')).width(30).onClick(() => {
+            this.isShowSilder=!this.isShowSilder
 
-      Row(){
-        Button('改变文字').onClick(()=>{
-          this.list.forEach(item=>{item.value='吴亮+1'})
-        })
-        Button('敲击时长间隔1秒').onClick(()=>{
-          this.time=1000
-
-        })
-        Button('固定10次').onClick(()=>{
-          //自动敲击
-          const a=setInterval(()=>{
-            this.onclikMerit()
-
-          },this.time)
-          const b=setTimeout(()=>{
-            clearInterval(a)
-            clearTimeout(b)
-          },this.time*10)
-
-
-        })
-        Button('倒计时规定时间').onClick(()=>{
-          this.onclikMerit()
-          const a=setInterval(()=>{
-            this.onclikMerit()
-          },this.time)
-          const b=setTimeout(()=>{
-            clearInterval(a)
-            clearTimeout(b)
-          },10000)
+          })
+          if(this.isShowSilder) {
+            //是否开启声音
+            Image($r('app.media.muyu')).width(30).onClick(()=>{
+              this.isOpenMusic=!this.isOpenMusic
+            })
+            //是否开启震动
+            Image($r('app.media.muyu')).width(30).onClick(()=>{
+              this.isOpenVibration=this.isOpenVibration
+            })
 
-        })
-      }
+            Column() {
+              Text(this.isHand ? '手动' : '自动').fontColor(Color.White).onClick(() => {
+                this.isHand = !this.isHand
+              })
+              Text('设置').fontColor(Color.White).bindSheet($$this.isShowTimeManger, this.timeMangerBuilder(), {
+                width: '100%',
+                height: 400,
+                showClose: false,
+              }).onClick(() => {
+                this.isShowTimeManger = true
+              })
+              Text('设置2').fontColor(Color.White).onClick(()=>{
+                //去往设置页面
+                yTRouter.router2FishSettingPage()
+              })
+            }
+          }
 
-      Button('xxx').bindSheet($$this.isShowTimeManger,this.timeMangerBuilder(),{
-        width:'100%',
-        height:400,
-        showClose:false
-      }).onClick(()=>{
-        this.isShowTimeManger=true
-      })
-
-      Button('震动').onClick(()=>{
-        Vibration.startVibration()
-      })
-
-
-      Stack() {
-        Progress({ value: this.valueTime, total: 70, type: ProgressType.Linear }).backgroundColor(Color.White)
-        Row({space:30}){
-          ForEach([0,10,20,30,40,50,60,70],(item:number)=>{
-            Column(){
-            }.width(10)
-            .height(10)
-            .borderRadius('50%')
-            .onClick(()=>{
-              this.valueTime=item
-            })
-            .backgroundColor(this.valueTime>=item?Color.Pink:Color.White)
-          })
+        }.layoutWeight(1)
+        .justifyContent(FlexAlign.Center)
+        .alignItems(HorizontalAlign.End)
 
 
-        }.width('100%')
 
-      }
+      }.width('100%')
+      .height(230)
+      .margin({top:20})
+      .alignItems(VerticalAlign.Top)
+
+      // Row(){
+      //   Button('改变文字').onClick(()=>{
+      //     this.list.forEach(item=>{item.value='吴亮+1'})
+      //   })
+      //   Button('敲击时长间隔1秒').onClick(()=>{
+      //     this.time=1000
+      //
+      //   })
+      //   Button('固定10次').onClick(()=>{
+      //     //自动敲击
+      //     const a=setInterval(()=>{
+      //       this.onclikMerit()
+      //
+      //     },this.time)
+      //     const b=setTimeout(()=>{
+      //       clearInterval(a)
+      //       clearTimeout(b)
+      //     },this.time*10)
+      //
+      //
+      //   })
+      //   Button('倒计时规定时间').onClick(()=>{
+      //     this.onclikMerit()
+      //     const a=setInterval(()=>{
+      //       this.onclikMerit()
+      //     },this.time)
+      //     const b=setTimeout(()=>{
+      //       clearInterval(a)
+      //       clearTimeout(b)
+      //     },10000)
+      //
+      //   })
+      // }
+      //
+      // Button('xxx').bindSheet($$this.isShowTimeManger,this.timeMangerBuilder(),{
+      //   width:'100%',
+      //   height:400,
+      //   showClose:false
+      // }).onClick(()=>{
+      //   this.isShowTimeManger=true
+      // })
+      //
+      // Button('震动').onClick(()=>{
+      //   Vibration.startVibration()
+      // })
+
+
+      // Stack() {
+      //   Progress({ value: this.valueTime, total: 70, type: ProgressType.Linear }).backgroundColor(Color.White)
+      //   Row({space:30}){
+      //     ForEach([0,10,20,30,40,50,60,70],(item:number)=>{
+      //       Column(){
+      //       }.width(10)
+      //       .height(10)
+      //       .borderRadius('50%')
+      //       .onClick(()=>{
+      //         this.valueTime=item
+      //       })
+      //       .backgroundColor(this.valueTime>=item?Color.Pink:Color.White)
+      //     })
+      //
+      //
+      //   }.width('100%')
+      //
+      // }
 
 
 

+ 6 - 0
features/feature/src/main/resources/base/profile/router_map.json

@@ -1,5 +1,11 @@
 {
   "routerMap": [
 
+    {
+      "name": "FishSettingView",
+      "pageSourceFile": "src/main/ets/view/FishSettingView.ets",
+      "buildFunction": "FishSettingViewBuilder"
+    }
+
   ]
 }

+ 1 - 1
features/user/src/main/ets/components/LoginInput.ets

@@ -46,7 +46,7 @@ export struct LoginInput {
         Text(this.time == 61 ? '获取验证码' : this.time + '后重新发送')
           .height(30)
           .fontSize(12)
-          .fontColor('rgba(253, 84, 227, 0.75)')
+          .fontColor($r('[basic].color.login_main_yellow'))
           .borderRadius(16)
           // .backgroundColor($r('[basic].color.main_ac_color_dark'))
           .onClick(() => {

+ 2 - 2
features/user/src/main/ets/pages/LoginPage.ets

@@ -51,7 +51,7 @@ struct LoginPage {
 
         Row() {
           Column() {
-              Text().width(30).height(8).backgroundColor(this.tabBarIndex==1?'#fd86eb':Color.Transparent).offset({y:35}).borderRadius(3)
+              Text().width(30).height(8).backgroundColor(this.tabBarIndex==1?'#fbdf71':Color.Transparent).offset({y:35}).borderRadius(3)
             Text('登录')
               .fontSize(20)
               .fontWeight(600)
@@ -76,7 +76,7 @@ struct LoginPage {
 
 
           Column() {
-              Text().width(30).height(8).backgroundColor(this.tabBarIndex==0?'#fd86eb':Color.Transparent).offset({y:35}).borderRadius(3)
+              Text().width(30).height(8).backgroundColor(this.tabBarIndex==0?'#fbdf71':Color.Transparent).offset({y:35}).borderRadius(3)
             Text('注册')
               .fontSize(20)
               .fontWeight(600)

+ 17 - 15
features/user/src/main/ets/pages/SettingPage.ets

@@ -262,7 +262,7 @@ struct SettingPage {
                 .borderRadius(8)
                 .padding({left:12,right:12,top:8,bottom:8})
                 .textAlign(TextAlign.Center)
-                .fontColor('rgba(253, 84, 227, 0.75)')
+                .fontColor($r('[basic].color.login_main_yellow'))
                 .onClick(() => {
                   const rep = new RegExp('^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}$');
                   if (this.phoneNumber.match(rep) && this.time == 61) {
@@ -437,13 +437,14 @@ 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'))
+            // .linearGradient({
+            //   angle: 135,
+            //   colors: [
+            //     ['rgba(230, 163, 240, 1)', 0.2],
+            //     ['rgba(191, 242, 255, 1)', 1]
+            //   ]
+            // })
 
         } .padding({
           top: 29,
@@ -566,13 +567,14 @@ struct SettingPage {
             this.showReviseName = false
           }
         }).borderRadius(21)
-          .linearGradient({
-            angle: 135,
-            colors: [
-              ['rgba(230, 163, 240, 1)', 0.2],
-              ['rgba(191, 242, 255, 1)', 1]
-            ]
-          })
+          .backgroundColor($r('[basic].color.login_main_yellow'))
+          // .linearGradient({
+          //   angle: 135,
+          //   colors: [
+          //     ['rgba(230, 163, 240, 1)', 0.2],
+          //     ['rgba(191, 242, 255, 1)', 1]
+          //   ]
+          // })
       }
       .justifyContent(FlexAlign.Center)
       .width('100%')

+ 8 - 7
features/user/src/main/ets/views/LoginView.ets

@@ -123,13 +123,14 @@ export struct LoginView {
           this.loginCollect.executeLogin("common")
         }
       }).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'))
+        // .linearGradient({
+        //   angle: 135,
+        //   colors: [
+        //     ['rgba(230, 163, 240, 1)', 0.2],
+        //     ['rgba(191, 242, 255, 1)', 1]
+        //   ]
+        // })
 
 
 

+ 8 - 7
features/user/src/main/ets/views/RegisterOrResetPassView.ets

@@ -80,13 +80,14 @@ export struct RegisterOrResetPassComp {
         },
         btBorderRadius: 32
       }).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'))
+        // .linearGradient({
+        //   angle: 135,
+        //   colors: [
+        //     ['rgba(230, 163, 240, 1)', 0.2],
+        //     ['rgba(191, 242, 255, 1)', 1]
+        //   ]
+        // })
 
 
       if(this.loginCollect.getOperation()=='reset'){

+ 2 - 2
products/entry/src/main/ets/pages/Index.ets

@@ -1,6 +1,6 @@
 import { BasicType, YTAvoid, yTRouter, yTToast} from 'basic';
 import { Mine } from 'user/src/main/ets/views/Mine';
-import { MainView} from 'feature';
+import { FragranceView, MainView} from 'feature';
 
 @Entry
 @Component
@@ -43,7 +43,7 @@ struct Index {
                 //放对应组件
                 MainView()
               } else if(index==1){
-
+                FragranceView()
               }else {
                 Mine()
               }

BIN
products/entry/src/main/resources/rawfile/music1.mp3


BIN
products/entry/src/main/resources/rawfile/music2.mp3


BIN
products/entry/src/main/resources/rawfile/music3.mp3