Bladeren bron

feat: 完成我的页面的UI搭建, 和对应的交互逻辑, 更换了部分的图标,修改包名和对应的证书

YuJing 1 maand geleden
bovenliggende
commit
a5ac6d353c
40 gewijzigde bestanden met toevoegingen van 718 en 358 verwijderingen
  1. 1 1
      AppScope/app.json5
  2. 3 3
      build-profile.json5
  3. 1 0
      commons/basic/src/main/ets/components/ToastBuilders/AgreePrivacy.ets
  4. 1 1
      commons/basic/src/main/ets/components/ToastBuilders/YtDoubleConfirm.ets
  5. 4 0
      commons/basic/src/main/ets/models/YTDiaLogModel.ets
  6. 1 1
      commons/basic/src/main/ets/utils/YTRouter.ets
  7. 224 9
      features/feature/src/main/ets/components/YTDiaLogBuild.ets
  8. 264 295
      features/feature/src/main/ets/components/bigwheel/BigWheelView.ets
  9. 6 5
      features/feature/src/main/ets/components/bigwheel/ReNameInput.ets
  10. 9 8
      features/feature/src/main/ets/components/ytBuildComp.ets
  11. 7 0
      features/feature/src/main/ets/model/Index.ets
  12. 7 3
      features/feature/src/main/ets/view/MainView.ets
  13. 14 3
      features/feature/src/main/ets/view/SecondView.ets
  14. 5 1
      features/feature/src/main/ets/viewModel/SecondViewModel.ets
  15. BIN
      features/feature/src/main/resources/base/media/Search.png
  16. 0 4
      features/feature/src/main/resources/base/media/Search.svg
  17. BIN
      features/feature/src/main/resources/base/media/Subtract.png
  18. BIN
      features/feature/src/main/resources/base/media/icon_edit.png
  19. BIN
      features/feature/src/main/resources/base/media/icon_fontBg.png
  20. BIN
      features/feature/src/main/resources/base/media/icon_title.png
  21. BIN
      features/feature/src/main/resources/base/media/zhizheng.png
  22. 1 1
      features/user/src/main/ets/components/Terms.ets
  23. 140 0
      features/user/src/main/ets/pages/ChangePassWord.ets
  24. 1 1
      features/user/src/main/ets/pages/Privacy.ets
  25. 8 6
      features/user/src/main/ets/pages/SettingPage.ets
  26. 1 1
      features/user/src/main/ets/pages/UserAgreement.ets
  27. 1 1
      features/user/src/main/ets/views/Mine.ets
  28. BIN
      features/user/src/main/resources/base/media/mine_bgc.png
  29. 5 0
      features/user/src/main/resources/base/profile/router_map.json
  30. 14 14
      products/entry/src/main/ets/pages/Index.ets
  31. BIN
      products/entry/src/main/resources/base/media/Main.png
  32. BIN
      products/entry/src/main/resources/base/media/Main_.png
  33. BIN
      products/entry/src/main/resources/base/media/Mine.png
  34. BIN
      products/entry/src/main/resources/base/media/Mine_.png
  35. BIN
      products/entry/src/main/resources/base/media/Second.png
  36. BIN
      products/entry/src/main/resources/base/media/Second_.png
  37. BIN
      products/entry/src/main/resources/base/media/Third.png
  38. BIN
      products/entry/src/main/resources/base/media/Third_.png
  39. BIN
      sign/萌食记调试证书Debug.p7b
  40. BIN
      sign/调试证书.p7b

+ 1 - 1
AppScope/app.json5

@@ -1,6 +1,6 @@
 {
   "app": {
-    "bundleName": "com.ytpm.ltlab",
+    "bundleName": "com.ytpm.msj",
     "vendor": "example",
     "versionCode": 1000000,
     "versionName": "1.0.0",

+ 3 - 3
build-profile.json5

@@ -5,11 +5,11 @@
         "name": "default",
         "material": {
           "storeFile": "sign/basic.p12",
-          "storePassword": "000000181F0EECD983295AB4504A961E19D1B5914CB198FA414395A09865788F96EFF93C84981A55",
+          "storePassword": "00000018E50D93567D300FF424A2DC6D02E2D1E54DEF05320D99CA3054AA41637F8F0E55EF3C24FC",
           "keyAlias": "yt112233",
-          "keyPassword": "0000001871572C6DAC842AAE8EF9A99F0F746307476E0F0ACF919CC12B0F81467CF5B0CCDBF97E2D",
+          "keyPassword": "00000018A82AA755722A3B6E8E34B1E05664779679686F74E37E66BF01A330DE4DF1C2FA907A567B",
           "signAlg": "SHA256withECDSA",
-          "profile": "sign/聊天恋爱宝调试证书.p7b",
+          "profile": "sign/萌食记调试证书Debug.p7b",
           "certpath": "sign/调试证书.cer"
         }
       }

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

@@ -19,6 +19,7 @@ export function agreePrivacy(item: BasicType<undefined>) {
       YTButton({
         btContent: '同意并登入',
         btHeight: 37,
+        bgc: '#95C50A',
         click: () => {
           yTToast.hide()
           

+ 1 - 1
commons/basic/src/main/ets/components/ToastBuilders/YtDoubleConfirm.ets

@@ -21,7 +21,7 @@ export function yTDoubleConfirm(item: BasicType<undefined>) {
           btHeight: 37,
           btFontSize: 12,
           click: item.click,
-          btLinearGradient: { angle: 92, colors: [['#FF4597F7', 0.023], ['#FF6B6DF7', 1.081]] },
+          btLinearGradient: { angle: 92, colors: [['#95C50A', 0.023], ['#CAE9B3', 1.081]] },
         }
       )
       YTButton(

+ 4 - 0
commons/basic/src/main/ets/models/YTDiaLogModel.ets

@@ -26,6 +26,10 @@ export enum DiaLogPageEnum{
   RecipePopup,
   // 添加至食谱
   AddToRecipe,
+  // 大转盘设置页面
+  TurnTableSetting,
+  // 大转盘命名
+  TurnTableName,
 }
 
 export interface DiaLogParam{

+ 1 - 1
commons/basic/src/main/ets/utils/YTRouter.ets

@@ -70,7 +70,7 @@ class YTRouter extends NavPathStack {
 
   //UpdatePasswordPage
   router2UpdatePasswordPage() {
-    yTRouter.pushPathByName("UpdatePasswordPage", '')
+    yTRouter.pushPathByName("ChangePassWord", '')
   }
 
   routerBack() {

+ 224 - 9
features/feature/src/main/ets/components/YTDiaLogBuild.ets

@@ -1,6 +1,7 @@
-import { BasicType } from 'basic'
+import { BasicType, IBestToast } from 'basic'
 import { DiaLogPageEnum, DiaLogParam } from 'basic/src/main/ets/models/YTDiaLogModel'
-import { Recipe } from '../model/Index'
+import { Recipe, TurnTableRouteParams } from '../model/Index'
+import { ReNameInput } from './bigwheel/ReNameInput'
 import { NumberKeyBoard, NumberKeyBoardStyle } from './NumberKeyboard'
 import { YtDatePicker } from './YtDatePicker'
 import { _YtHeader } from './_YtHeader'
@@ -18,6 +19,8 @@ export function getBuilder(param: DiaLogParam, onBack: (ans?: string) => void){
   else if (param.pageEnum == DiaLogPageEnum.SelectGender) GenderPickerBuilder(onBack, param.param)
   else if (param.pageEnum == DiaLogPageEnum.RecipePopup) RecipePopupBuilder(onBack, param.param as BasicType<Recipe>)
   else if (param.pageEnum == DiaLogPageEnum.AddToRecipe) AddPlanComp({onBack: onBack})
+  else if (param.pageEnum == DiaLogPageEnum.TurnTableSetting) BigWheelManagerBuilder({onBack: onBack, param: param.param})
+  else if (param.pageEnum == DiaLogPageEnum.TurnTableName) BigWheelNameBuilder({onBack: onBack, param: param.param})
 }
 
 // 底部菜单
@@ -76,15 +79,16 @@ function DoubleConfirm(onBack: (ans?:string) => void, param?: BasicType) {
   Column() {
     if(param?.text)
       Text(param.text)
-        .fontColor($r('sys.color.mask_secondary'))
+        .fontColor(Color.Black)
         .lineHeight(18)
         .fontSize(18)
+        .textAlign(TextAlign.Center)
         .margin({ bottom: 18 })
     Row() {
       Text('取消')
         .fontSize(16)
         .fontWeight(400)
-        .borderRadius(36)
+        .borderRadius(param?.number ?? 36)
         .fontColor(Color.Black)
         .backgroundColor('#F5F5F7')
         .padding({ left: 36, top: 9, right: 36, bottom: 9})
@@ -95,11 +99,11 @@ function DoubleConfirm(onBack: (ans?:string) => void, param?: BasicType) {
       Text('确定')
         .fontSize(16)
         .fontWeight(400)
-        .borderRadius(36)
+        .borderRadius(param?.number ?? 36)
         .fontColor(Color.Black)
         .padding({ left: 36, top: 9, right: 36, bottom: 9})
         .linearGradient({
-          colors: [ ['#30E3CE', 0.4], ['#91F1FF', 0.8]],
+          colors: [ param?.color ? [param.color, 1 ] : ['#30E3CE', 0.4], ['#91F1FF', 0.8] ],
           angle: 200
         })
         .onClick(() => {
@@ -340,15 +344,15 @@ function RecipePopupBuilder(onBack: (ans?:string) => void, param?: BasicType<Rec
     .padding({ top: 12, right: 20 })
 
     // 食谱名
-    Row(){
+    Column(){
       Text(param?.generics?.name)
         .fontSize(24)
         .fontWeight(600)
     }
     .width("100%")
     .padding({ left: 32 })
-    .alignItems(VerticalAlign.Center)
-    .justifyContent(FlexAlign.Start)
+    .alignItems(HorizontalAlign.Start)
+    .justifyContent(FlexAlign.Center)
 
     Row({space: 13}){
       // 图片和标签
@@ -584,7 +588,218 @@ struct AddPlanComp{
   }
 }
 
+// 大转盘 - 设置弹窗
+@ComponentV2
+struct  BigWheelManagerBuilder{
+  @Local isRepeat: boolean = true
+  @Local spinDurationTime: number = 1
+  @Local spinDuration: number = 1
+
+  @Event onBack: (ans?:string) => void
+  @Param @Require param: BasicType<TurnTableRouteParams>
+
+  aboutToAppear(): void {
+    this.isRepeat = this.param.generics?.isRepeat!
+    this.spinDurationTime = this.param.generics?.spinDurationTime!
+    this.spinDuration = this.param.generics?.spinDuration!
+  }
+
+  build() {
+    Column() {
+      //允许结果是否重复
+      Row() {
+        Row({ space: 10 }) {
+          Image($r('app.media.qiehuan')).width(24)
+          Text('允许结果重复').fontWeight(700)
+        }
+        Row() {
+          Toggle({ type: ToggleType.Switch ,isOn:$$this.isRepeat})
+            .width(38)
+            .height(20)
+            .selectedColor('rgba(253, 84, 227, 1)')  //打开状态下的背景颜色
+            .switchStyle({
+              pointRadius: 8, //圆形滑块半径
+              trackBorderRadius: 14, //滑轨的圆角
+              pointColor: Color.White, //圆形滑块颜色  switchPointColor不生效
+              unselectedColor: 'rgba(233, 233, 234, 1)'  //关闭状态的背景颜色
+            })
+            .onClick(() => {
+              this.isRepeat=!this.isRepeat
+            })
+        }
+      }
+      .width('100%')
+      .height(40)
+      .backgroundColor('#F6F6F6')
+      .borderRadius(8)
+      .justifyContent(FlexAlign.SpaceBetween)
+      .padding({ left: 12, right: 12 })
+      .alignItems(VerticalAlign.Center)
+
+      Row() {
+        Text('每次转动轮盘可能会随机选中相同的选项').fontSize(12).fontColor('rgba(0, 0, 0, 0.45)')
+      }.width('100%')
+      .justifyContent(FlexAlign.Start)
+      .padding({ left: 22 })
+      .margin({ bottom: 25, top: 10 })
 
+      Row() {
+        Row({ space: 10 }) {
+          Image($r('app.media.xuanzhuantime')).width(24)
+          Text('旋转时长').fontWeight(700)
+        }
+
+        Row() {
+          Counter() {
+            Text(this.spinDurationTime.toString() + 's').border({ width: 0 })
+          }
+          .onInc(() => {
+            this.spinDurationTime++
+            this.spinDuration = this.spinDurationTime * 1000
+          })
+          .onDec(() => {
+            if(this.spinDurationTime==1){
+              IBestToast.show({
+                message:'秒数最低为1秒'
+              })
+              return
+            }
+            this.spinDurationTime--
+            this.spinDuration = this.spinDurationTime * 1000
+          })
+        }
+
+      }
+      .width('100%')
+      .height(40)
+      .backgroundColor('#F6F6F6')
+      .borderRadius(8)
+      .justifyContent(FlexAlign.SpaceBetween)
+      .padding({ left: 12, right: 12 })
+      .alignItems(VerticalAlign.Center)
+
+      Row({space: 45}){
+        Text('取消')
+          .borderRadius(15)
+          .fontColor(Color.Black)
+          .backgroundColor('#F5F5F7')
+          .padding({left: 30, right: 30, top: 12, bottom: 12})
+          .onClick(() => {
+            this.onBack()
+          })
+
+
+        Text('确定')
+          .borderRadius(15)
+          .fontColor(Color.White)
+          .backgroundColor('#95C50A')
+          .padding({left: 30, right: 30, top: 12, bottom: 12})
+          .onClick(() => {
+            let param: TurnTableRouteParams = {
+              isRepeat: this.isRepeat,
+              spinDurationTime: this.spinDurationTime,
+              spinDuration: this.spinDuration
+            }
+            this.onBack(JSON.stringify(param))
+          })
+      }
+      .width("100%")
+      .justifyContent(FlexAlign.Center)
+      .padding({top: 16})
+    }
+    .width('320')
+    .height(240)
+    .padding({ left: 22, top: 30, right: 22, bottom: 20 })
+    .borderRadius(20)
+    .backgroundColor(Color.White)
+  }
+}
+
+// 大转盘 - 转盘命名
+@ComponentV2
+struct  BigWheelNameBuilder{
+  @Local cells: string[] = []
+
+  @Event onBack: (ans?:string) => void
+  @Param @Require param: BasicType<string[]>
+
+  aboutToAppear(): void {
+    this.cells = this.param.generics!
+  }
+
+  build() {
+    Column() {
+      Row() {
+        Text('转盘命名').fontSize(20).fontWeight(500).fontColor('#FF1C1C1C').margin({left:110,right:64,top:24})
+        Column() {
+          Image($r('app.media.quxiaocl')).width(10)
+        }.width(24)
+        .height(24)
+        .backgroundColor(Color.White)
+        .justifyContent(FlexAlign.Center)
+        .borderRadius('50%')
+        .onClick(() => {
+          this.onBack()
+        })
+
+      }.width('100%')
+
+      Column({space:10}){
+        ForEach(this.cells,(item:string,index:number)=>{
+          Row({space:10}){
+            Text(`转盘${index}`)
+            TextInput({text: item})
+              .width(194)
+              .height(30)
+              .padding(0)
+              .border({width:{bottom:1,left:0,right:0,top:0},color:'rgba(0, 0, 0, 0.3)'})
+              .borderRadius(0)
+              .maxLength(5)
+              .backgroundColor(Color.Transparent)
+              .onChange((value:string)=>{
+                this.cells[index] = value
+              })
+          }.width('100%')
+        })
+      }
+
+      Row({space: 45}){
+        Text('取消')
+          .borderRadius(15)
+          .fontColor(Color.Black)
+          .backgroundColor('#F5F5F7')
+          .padding({left: 30, right: 30, top: 12, bottom: 12})
+          .onClick(() => {
+            this.onBack()
+          })
+
+
+        Text('确定')
+          .borderRadius(15)
+          .fontColor(Color.White)
+          .backgroundColor('#95C50A')
+          .padding({left: 30, right: 30, top: 12, bottom: 12})
+          .onClick(() => {
+            this.onBack(JSON.stringify(this.cells))
+          })
+      }
+      .width("100%")
+      .justifyContent(FlexAlign.Center)
+      .padding({top: 26})
+    }
+    .width(300)
+    .height(280 + ((this.cells.length-3) * 25))
+    .justifyContent(FlexAlign.Start)
+    .borderRadius(20)
+    .padding({left:16,right:16})
+    .linearGradient({
+      angle:135,
+      colors:[
+        ['rgba(255, 255, 255, 1)',1]
+      ]
+    })
+  }
+}
 
 
 

+ 264 - 295
features/feature/src/main/ets/components/bigwheel/BigWheelView.ets

@@ -1,5 +1,7 @@
 import { IBestToast, YTAvoid, yTRouter, yTToast } from 'basic'
+import { DiaLogPageEnum, DiaLogParam, YTDiaLogModel } from 'basic/src/main/ets/models/YTDiaLogModel'
 import { CellStorage } from '.'
+import { TurnTableRouteParams } from '../../model/Index'
 import { ReNameInput } from './ReNameInput'
 import { Cell, Sector } from './Sector'
 
@@ -108,29 +110,7 @@ export struct BigWheelView{
       return;
     }
     if(this.selected.length==this.cells.length){
-      yTToast.doubleConfirm({
-        message: '当前已经转完所有,是否重置', click: () => {
-            //背景色变成白色
-            this.cells.forEach((item)=>{
-              item.color='#fff'
-            })
-          //重置,所有的转盘重新开始
-          this.selected=[]
-          this.UnSelected=[]
-          this.UnSelected=this.cells
-          this.DBUnselectCell=this.UnSelected.map(item=>item.id)
-          this.DBSelectCell=[]
-          this.DBCells=this.cells.map((item)=>{
-            return {
-              id:item.id,
-              title:item.title,
-              proportion:item.proportion,
-              color:item.color
-            } as CellStorage
-          })
-          yTToast.hide()
-        }
-      })
+      this.isReloadDiaLog()
       return
     }
     //如果都已经被选了,则不能再转了
@@ -240,46 +220,253 @@ export struct BigWheelView{
     })
 
   }
+
+  // 打开设置弹窗
+  openSettingDiaLog(){
+    let param: DiaLogParam = {
+      align: YTDiaLogModel.Center,
+      pageEnum: DiaLogPageEnum.TurnTableSetting,
+      param: {
+        generics: {
+          isRepeat: this.isRepeat,
+          spinDurationTime: this.spinDurationTime,
+          spinDuration: this.spinDuration
+        }
+      }
+    }
+
+    yTRouter.router2NaviDiaLog(param, (ans)=>{
+      let res = ans.result as string
+      if(res) {
+        let obj = JSON.parse(res) as TurnTableRouteParams
+        this.isRepeat = obj.isRepeat ?? this.isRepeat
+        this.spinDurationTime = obj.spinDurationTime ?? this.spinDurationTime
+        this.spinDuration = obj.spinDuration ?? this.spinDuration
+      }
+    })
+  }
+
+  // 打开重命名转盘
+  openRenameDiaLog(){
+    let cellList: string[] = this.cells.map((item) => item.title)
+
+    let param: DiaLogParam = {
+      align: YTDiaLogModel.Center,
+      pageEnum: DiaLogPageEnum.TurnTableName,
+      param: {
+        generics: cellList
+      }
+    }
+
+    yTRouter.router2NaviDiaLog(param, (ans)=>{
+      let res = ans.result as string
+      if(res) {
+        let obj = JSON.parse(res) as string[]
+        this.cells.forEach((item,index) => {
+          item.title = obj[index]
+        })
+      }
+    })
+  }
+
+  // 询问是否重置转盘
+  isReloadDiaLog(){
+    let param: DiaLogParam = {
+      align: YTDiaLogModel.Center,
+      pageEnum: DiaLogPageEnum.Confirm,
+      param: {
+        text: '所有选项已转完,请确定是否重置转盘',
+        color: '#95C50A',
+        number: 8
+      }
+    }
+
+    yTRouter.router2NaviDiaLog(param, (ans)=>{
+      let res = ans.result as string
+      if(res == 'true') {
+        this.resetTurnTable()
+      }
+    })
+  }
+
+  // 重置转盘
+  resetTurnTable(){
+    //背景色变成白色
+    this.cells.forEach((item)=>{
+      item.color='#fff'
+    })
+    //重置,所有的转盘重新开始
+    this.selected=[]
+    this.UnSelected=[]
+    this.UnSelected=this.cells
+    this.DBUnselectCell=this.UnSelected.map(item=>item.id)
+    this.DBSelectCell=[]
+    this.DBCells=this.cells.map((item)=>{
+      return {
+        id:item.id,
+        title:item.title,
+        proportion:item.proportion,
+        color:item.color
+      } as CellStorage
+    })
+  }
+
   build() {
-    Stack({alignContent:Alignment.Center}){
-      Stack({alignContent:Alignment.Top}){
+    Column() {
+      // 标题
+      Row(){
+        Text()
+
+        Text('大转盘')
+          .fontSize(18)
+          .fontWeight(700)
+          .fontColor(Color.Black)
+        Image($r('app.media.Subtract'))
+          .width(24)
+          .margin({right: 16 })
+          .onClick(()=>{
+            this.isShow=true
+            this.openSettingDiaLog()
+          })
+      }.width('100%')
+      .height(84)
+      .justifyContent(FlexAlign.SpaceBetween)
+      .padding({ top: 44 })
+      .margin({bottom:20})
+
+      // 重置按钮
+      Row(){
+        Text('重置')
+          .borderRadius(8)
+          .fontColor(Color.White)
+          .backgroundColor('#95C50A')
+          .padding({left: 12, right:12, top: 8, bottom: 8})
+          .onClick(() => { this.resetTurnTable() })
+      }
+      .width('100%')
+      .justifyContent(FlexAlign.End)
+      .padding({left:30,right:30})
+
+      // 显示当前状态
+      Text(this.isAnimating ? '旋转中' : `${this.selectedName}`)
+        .fontSize(20)
+        .fontColor("#0b0e15")
+        .height(40)
+        .margin({top:30, bottom: 30})
+
+      // 转盘主体
+      Stack() {
+        Stack() {
+          // 遍历每个单元格并绘制扇形
+          ForEach(this.cells, (cell: Cell) => {
+            Stack() {
+              Sector({ radius: lpx2px(this.wheelWidth-15), angle: cell.angle, color: cell.color }); // 创建扇形
+              Text(cell.title).fontColor(Color.Black).fontWeight(700).margin({ bottom: this.wheelWidth / 1.4 }); // 显示单元格标题
+            }.width('100%').height('100%').rotate({ angle: cell.rotate }); // 设置宽度和高度,并旋转
+          });
+        }
+        .borderRadius('50%') // 设置圆角
+        .width(this.wheelWidth) // 设置转盘宽度
+        .height(this.wheelWidth) // 设置转盘高度
+        .rotate({ angle: this.currentAngle }); // 旋转转盘
+
         Column() {
-          // YTHeader({ title: '大转盘', })
-          Row(){
-            Image($r('[basic].media.ic_back'))
-              .width(24)
-              .margin({ left: 16 })
-              .onClick(()=>{
-                yTRouter.routerBack()
-              })
-            Text('大转盘')
-              .fontSize(18)
-              .fontWeight(700)
-              .fontColor(Color.Black)
-            Image($r('app.media.Subtract'))
-              .width(24)
-              .margin({right: 16 })
-              .onClick(()=>{
-                this.isShow=true
-              })
-          }.width('100%')
-          .height(84)
-          .justifyContent(FlexAlign.SpaceBetween)
-          .padding({ top: 44 })
-          .margin({bottom:20})
-          Row(){
-            Column(){}.width(24).height(24)
-            // Image($r('[basic].media.voicemuisc')).width(24)
-            Text('重置').fontColor('rgba(0, 0, 0, 0.65)').onClick(()=>{
-                //背景色变成白色
-                this.cells.forEach((item)=>{
-                  item.color='#fff'
-                })
+          Canvas(this.context)
+            .width(250)
+            .height(250)
+            .borderRadius('50%')
+            .backgroundColor(Color.Transparent)
+            .onReady(() => {
+              this.drawCircleWithCustomRadii()
+            })
+        } .width(this.wheelWidth) // 设置转盘宽度
+        .height(this.wheelWidth) // 设置转盘高度
+        .justifyContent(FlexAlign.Center)
+        .rotate({ angle: this.currentAngle }) // 旋转转盘
+
+        Image($r('app.media.zhizheng'))
+          .width(63) // 设置按钮宽度
+          .height(79) // 设置按钮高度
+          .objectFit(ImageFit.Contain)
+          .offset({y: -10})
+          .clickEffect({ level: ClickEffectLevel.LIGHT }) // 设置点击效果
+
+      }
+      .width(this.wheelWidth+35)
+      .height(this.wheelWidth+35)
+      .padding(20)
+      .backgroundImage($r('app.media.xuanzhuankuang'))
+      .backgroundImageSize({width:'100%',height:'100%'})
+      .backgroundImagePosition(Alignment.Center)
+
+      // 按钮
+      Button('转一转').fontColor(Color.White)
+        .width(246)
+        .height(44)
+        .borderRadius(8)
+        .backgroundColor('#95C50A')
+        .margin({top:80,bottom:30})
+        .onClick(()=>{
+          this.startAnimation()
+        })
+
+      // 大转盘的选择的项数切换
+      Row({space:15}) {
+        ForEach([2,3,4,5],(item:number,index:number)=>{
+          Text((item+1).toString())
+            .width(40)
+            .height(40)
+            .textAlign(TextAlign.Center)
+            .borderRadius('50%')
+            .backgroundColor(this.currSelectNumber == index ? '#95C50A' : '#F5F5F7')
+            .onClick(()=>{
+              this.currSelectNumber=index
+              this.number=item+1
+              const arr=this.cells
+              this.cells=[]
+              // 如果选中的长度比之前要长
+              if(this.number>arr.length) {
+                for (let i = 0; i < this.number; i++) {
+                  if (i < arr.length) {
+                    this.cells.push(arr[i])
+                  }else{
+                    this.cells.push(new Cell(i + 1, 1, "转盘" + (i + 1), '#fff'));
+                  }
+                }
+              }else{
+                //短
+                for (let i = 0; i < this.number; i++) {
+                  this.cells.push(arr[i])
+                }
+              }
+              //要继承之前没选中的,选中的数组根据id
+              this.calculateAngles(); // 重新计算角度
+              //选中的和没选中的也要重新计算角度
+              //找到id重新过滤
               this.selected=[]
               this.UnSelected=[]
-              this.UnSelected=this.cells
+              //每次选择扇形数量都要重新更新一下
+              let a=[] as number[]
+              let b=[] as number[]
+              //先获取选中数组,没选中数组id
+              a=this.DBSelectCell
+              b=this.DBUnselectCell
+              //遍历扇形,获取选中数组和没选中数组
+              for (let i = 0; i < this.cells.length; i++) {
+                for(let j=0;j<a.length;j++){
+                  if(a[j]==this.cells[i].id){
+                    this.selected.push(this.cells[i])
+                    continue
+                  }
+                }
+              }
+              //找到选中的id数组
+              this.DBSelectCell=this.selected.map(item=>item.id)
+              this.UnSelected=this.cells.filter((item)=>{
+                return !this.DBSelectCell.includes(item.id)
+              })
               this.DBUnselectCell=this.UnSelected.map(item=>item.id)
-              this.DBSelectCell=[]
+              this.DBCells=[]
               this.DBCells=this.cells.map((item)=>{
                 return {
                   id:item.id,
@@ -289,158 +476,28 @@ export struct BigWheelView{
                 } as CellStorage
               })
             })
-          }.width('100%')
-          .justifyContent(FlexAlign.SpaceBetween)
-          .padding({left:30,right:30})
-          // 显示当前状态
-          Text(this.isAnimating ? '旋转中' : `${this.selectedName}`)
-            .fontSize(20)
-            .fontColor("#0b0e15")
-            .height(40)
-            .margin({top:100})
-          Stack() {
-            Stack() {
-              // 遍历每个单元格并绘制扇形
-              ForEach(this.cells, (cell: Cell) => {
-                Stack() {
-                  Sector({ radius: lpx2px(this.wheelWidth-15), angle: cell.angle, color: cell.color }); // 创建扇形
-                  Text(cell.title).fontColor(Color.Black).fontWeight(700).margin({ bottom: this.wheelWidth / 1.4 }); // 显示单元格标题
-                }.width('100%').height('100%').rotate({ angle: cell.rotate }); // 设置宽度和高度,并旋转
-              });
-            }
-            .borderRadius('50%') // 设置圆角
-            // .backgroundColor(Color.Gray) // 设置背景颜色
-            .width(this.wheelWidth) // 设置转盘宽度
-            .height(this.wheelWidth) // 设置转盘高度
-            .rotate({ angle: this.currentAngle }); // 旋转转盘
-            Column() {
-              Canvas(this.context)
-                .width(250)
-                .height(250)
-                .borderRadius('50%')
-                .backgroundColor(Color.Transparent)
-                .onReady(() => {
-                  this.drawCircleWithCustomRadii()
-                })
-            } .width(this.wheelWidth) // 设置转盘宽度
-            .height(this.wheelWidth) // 设置转盘高度
-            .justifyContent(FlexAlign.Center)
-            .rotate({ angle: this.currentAngle }) // 旋转转盘
-            Image($r('app.media.zhizheng'))
-              .width(63) // 设置按钮宽度
-              .height(79) // 设置按钮高度
-              .objectFit(ImageFit.Contain)
-              .clickEffect({ level: ClickEffectLevel.LIGHT }) // 设置点击效果
-          }
-          .width(this.wheelWidth+15)
-          .height(this.wheelWidth+15)
-          .backgroundImage($r('app.media.xuanzhuankuang'))
-          .backgroundImageSize({width:'100%',height:'100%'})
-          .backgroundImagePosition(Alignment.Center)
-          Button('转一转').fontColor(Color.White)
-            .backgroundColor('#fd54e3').width(246)
-            .height(44).borderRadius(24)
-            .margin({top:99,bottom:48})
-            .onClick(()=>{
-              this.startAnimation()
-            })
-          Row({space:15}) {
-            ForEach([2,3,4,5],(item:number,index:number)=>{
-              Text((item+1).toString())
-                .width(40)
-                .height(40)
-                .textAlign(TextAlign.Center)
-                .border({width:1,color:'#000000'})
-                .borderRadius('50%')
-                .backgroundColor(this.currSelectNumber==index?'#bff2ff':'#f2f2f2')
-                .onClick(()=>{
-                  this.currSelectNumber=index
-                  this.number=item+1
-                  const arr=this.cells
-                  this.cells=[]
-                  //如果选中的长度比之前要长
-                  if(this.number>arr.length) {
-                    for (let i = 0; i < this.number; i++) {
-                      if (i < arr.length) {
-                        this.cells.push(arr[i])
-                      }else{
-                        this.cells.push(new Cell(i + 1, 1, "转盘" + (i + 1), '#fff'));
-                      }
-                    }
-                  }else{
-                    //短
-                    for (let i = 0; i < this.number; i++) {
-                      this.cells.push(arr[i])
-                    }
-                  }
-                  //要继承之前没选中的,选中的数组根据id
-                  this.calculateAngles(); // 重新计算角度
-                  //选中的和没选中的也要重新计算角度
-                  //找到id重新过滤
-                  this.selected=[]
-                  this.UnSelected=[]
-                  //每次选择扇形数量都要重新更新一下
-                  let a=[] as number[]
-                  let b=[] as number[]
-                  //先获取选中数组,没选中数组id
-                  a=this.DBSelectCell
-                  b=this.DBUnselectCell
-                  //遍历扇形,获取选中数组和没选中数组
-                  for (let i = 0; i < this.cells.length; i++) {
-                    for(let j=0;j<a.length;j++){
-                      if(a[j]==this.cells[i].id){
-                        this.selected.push(this.cells[i])
-                        continue
-                      }
-                    }
-                  }
-                  //找到选中的id数组
-                  this.DBSelectCell=this.selected.map(item=>item.id)
-                  this.UnSelected=this.cells.filter((item)=>{
-                    return !this.DBSelectCell.includes(item.id)
-                  })
-                  this.DBUnselectCell=this.UnSelected.map(item=>item.id)
-                  this.DBCells=[]
-                  this.DBCells=this.cells.map((item)=>{
-                    return {
-                      id:item.id,
-                      title:item.title,
-                      proportion:item.proportion,
-                      color:item.color
-                    } as CellStorage
-                  })
-                })
-            })
-            Row(){
-              Image($r('app.media.zidingyi')).width(16)
-              Text('命名').fontSize(12).fontColor(Color.White)
-            }.width(64)
-            .height(40)
-            .borderRadius(20)
-            .backgroundColor('rgba(255, 157, 240, 1)')
-            .justifyContent(FlexAlign.Center)
-            .onClick(()=>{
-              this.isshowRename=true
-            })
-          }
-        }.width('100%').padding({ bottom: this.safeBottom })
-        .justifyContent(FlexAlign.Center).onClick(()=>{
-          this.isShow=false
         })
-        //是否展示选项设置
-        if(this.isShow) {
-          this.BigWheelManagerBuilder()
-
-        }
-      }.height('100%')
-      .backgroundImage($r('app.media.backimgNumber'))
-      .backgroundImageSize({width:'100%',height:'100%'})
-      //重命名设置
-      if(this.isshowRename) {
-        this.ReNameBuilder()
 
+        // 选项命名
+        Row(){
+          Image($r('app.media.zidingyi')).width(16)
+          Text('命名').fontSize(12).fontColor(Color.White)
+        }.width(64)
+        .height(40)
+        .borderRadius(20)
+        .backgroundColor('#95C50A')
+        .justifyContent(FlexAlign.Center)
+        .onClick(()=>{
+          this.isshowRename=true
+          this.openRenameDiaLog()
+        })
       }
     }
+    .width('100%')
+    .padding({ bottom: this.safeBottom })
+    .justifyContent(FlexAlign.Center)
+    // .backgroundImage($r('app.media.backimgNumber'))
+    // .backgroundImageSize({width:'100%',height:'100%'})
   }
 
   @Builder
@@ -486,93 +543,5 @@ export struct BigWheelView{
 
     }.width('100%').height('100%').justifyContent(FlexAlign.Center).backgroundColor('rgba(30, 30, 30,0.5)')
   }
-  @Builder
-  BigWheelManagerBuilder(){
-    Column() {
-      //允许结果是否重复
-      Row() {
-        Row({ space: 10 }) {
-          Image($r('app.media.qiehuan')).width(24)
-          Text('允许结果重复').fontWeight(700)
-        }
-        Row() {
-          Toggle({ type: ToggleType.Switch ,isOn:$$this.isRepeat})
-            .width(38)
-            .height(20)
-            .selectedColor('rgba(253, 84, 227, 1)')  //打开状态下的背景颜色
-            .switchStyle({
-              pointRadius: 8, //圆形滑块半径
-              trackBorderRadius: 14, //滑轨的圆角
-              pointColor: Color.White, //圆形滑块颜色  switchPointColor不生效
-              unselectedColor: 'rgba(233, 233, 234, 1)'  //关闭状态的背景颜色
-            })
-            .onClick(() => {
-              this.isRepeat=!this.isRepeat
-            })
-        }
-      }
-      .width('100%')
-      .height(40)
-      .backgroundColor(Color.White)
-      .borderRadius(8)
-      .justifyContent(FlexAlign.SpaceBetween)
-      .padding({ left: 12, right: 12 })
-      .alignItems(VerticalAlign.Center)
-      Row() {
-        Text('每次转动轮盘可能会随机选中相同的选项').fontSize(12).fontColor('rgba(0, 0, 0, 0.45)')
-      }.width('100%')
-      .justifyContent(FlexAlign.Start)
-      .padding({ left: 22 })
-      .margin({ bottom: 25, top: 10 })
-
-      Row() {
-        Row({ space: 10 }) {
-          Image($r('app.media.xuanzhuantime')).width(24)
-          Text('旋转时长').fontWeight(700)
-        }
-
-        Row() {
-
-          Counter() {
-            Text(this.spinDurationTime.toString() + 's').border({ width: 0 })
-          }
-          .onInc(() => {
-            this.spinDurationTime++
-            this.spinDuration = this.spinDurationTime * 1000
-          })
-          .onDec(() => {
-            if(this.spinDurationTime==1){
-              IBestToast.show({
-                message:'秒数最低为1秒'
-              })
-              return
-            }
-            this.spinDurationTime--
-            this.spinDuration = this.spinDurationTime * 1000
-          })
-        }
-
-      }
-      .width('100%')
-      .height(40)
-      .backgroundColor(Color.White)
-      .borderRadius(8)
-      .justifyContent(FlexAlign.SpaceBetween)
-      .padding({ left: 12, right: 12 })
-      .alignItems(VerticalAlign.Center)
-
-    }
-    .width('100%')
-    .height(214)
-    .padding({ left: 22, top: 56, right: 22 })
-    .borderRadius({ bottomLeft: 20, bottomRight: 20 })
-    .linearGradient({
-      angle: 135,
-      colors: [
-        ['rgba(239, 144, 237, 1)', 0.2],
-        ['rgba(191, 242, 255, 1)', 1]
-      ]
-    })
-  }
-
 }
+

+ 6 - 5
features/feature/src/main/ets/components/bigwheel/ReNameInput.ets

@@ -15,13 +15,14 @@ export struct ReNameInput{
         .padding(0)
         .border({width:{bottom:1,left:0,right:0,top:0},color:'rgba(0, 0, 0, 0.3)'})
         .borderRadius(0)
+        .maxLength(5)
         .backgroundColor(Color.Transparent)
         .onChange((value:string)=>{
-          if(value.length>5){
-            this.text = value.slice(0, 5)
-            IBestToast.show({message: '名称最大为5位' })
-            return
-          }
+          // if(value.length>5){
+          //   this.text = value.slice(0, 5)
+          //   IBestToast.show({message: '名称最大为5位' })
+          //   return
+          // }
           this.inputChange(value)
         })
     }.width('100%')

+ 9 - 8
features/feature/src/main/ets/components/ytBuildComp.ets

@@ -49,28 +49,29 @@ export struct ytBuildComp {
         Column(){
           Row() {
             Text("登录使用更多功能")
-              .fontSize(20)
+              .fontSize(18)
               .fontWeight(400)
-              .fontColor(Color.White)
+              .fontColor(Color.Black)
 
             Text("马上登录")
               .fontSize(14)
               .fontWeight(500)
-              .borderRadius(20)
-              .padding({ top: 5, bottom: 5, left: 10, right: 10 })
-              .linearGradient({
-                colors: [['#30E3CE', 0.5], ['#91F1FF', 1]]
-              })
+              .borderRadius(10)
               .onClick(this.toLogin)
+              .fontColor(Color.White)
+              .backgroundColor('#95C50A')
+              .padding({ top: 5, bottom: 5, left: 10, right: 10 })
           }
           .width("100%")
+          .borderRadius(8)
           .alignItems(VerticalAlign.Center)
+          .backgroundColor('rgba(255, 255, 255, 1)')
           .justifyContent(FlexAlign.SpaceBetween)
           .padding({ left: 20, right: 20, top:  18, bottom: 18 })
-          .backgroundColor('rgba(0, 0, 0, 0.3)')
         }
         .width('100%')
         .height('100%')
+        .padding({left: 20, right: 20, bottom: 10})
         .justifyContent(FlexAlign.End)
         .alignItems(HorizontalAlign.Center)
         .backgroundColor('rgba(0, 0, 0, 0.2)')

+ 7 - 0
features/feature/src/main/ets/model/Index.ets

@@ -154,4 +154,11 @@ export class AddRecipeEventData {
   week?: string
   meal?: string
   recipe?: Recipe
+}
+
+// 大转盘页面开启弹窗的路由参数
+export class TurnTableRouteParams {
+  isRepeat?: boolean
+  spinDurationTime?: number
+  spinDuration?: number
 }

+ 7 - 3
features/feature/src/main/ets/view/MainView.ets

@@ -108,7 +108,7 @@ export struct MainView {
         // 每周食谱计划
         Column(){
           Row({space: 6}){
-            Image($r('app.media.icon_edit'))
+            Image($r('app.media.icon_title'))
               .width(24)
               .aspectRatio(1)
             Text("每周食谱计划")
@@ -149,7 +149,7 @@ export struct MainView {
         // 采购清单
         Column(){
           Row({space: 6}){
-            Image($r('app.media.icon_edit'))
+            Image($r('app.media.icon_title'))
               .width(24)
               .aspectRatio(1)
             Text(){
@@ -363,7 +363,11 @@ struct RecipeWidget{
   build() {
     Column({space: 8}){
       // 周几
-      Row(){
+      Stack(){
+        Image($r('app.media.icon_fontBg'))
+          .width(34)
+          .height(16)
+          .offset({x: 7, y: 3})
         Text(this.week)
           .fontSize(16)
           .fontWeight(600)

+ 14 - 3
features/feature/src/main/ets/view/SecondView.ets

@@ -15,9 +15,15 @@ export struct SecondView {
       Column({space: 15}){
         // 标题 和 年龄选择
         Row(){
-          Text('辅食食谱')
-            .fontSize(18)
-            .fontWeight(700)
+          Stack(){
+            Image($r('app.media.icon_fontBg'))
+              .width(50)
+              .height(16)
+              .offset({x: 7, y: 3})
+            Text('辅食食谱')
+              .fontSize(18)
+              .fontWeight(700)
+          }
 
           Row({space: 5}){
             Text('全部年龄')
@@ -64,6 +70,11 @@ export struct SecondView {
       .justifyContent(FlexAlign.Start)
       .alignItems(HorizontalAlign.Center)
       .padding({top: this.vm.safeTop, left:28,right: 28 })
+      .onVisibleAreaChange([0, 1], (e, r) => {
+        if(e && r == 1){
+          this.vm.getRecipeList()
+        }
+      })
     }
   }
 

+ 5 - 1
features/feature/src/main/ets/viewModel/SecondViewModel.ets

@@ -1,8 +1,9 @@
-import { YTAvoid, yTRouter } from "basic"
+import { userInfo, UserInfo, YTAvoid, yTRouter } from "basic"
 import { DiaLogPageEnum, DiaLogParam, YTDiaLogModel } from "basic/src/main/ets/models/YTDiaLogModel"
 import { BabyFoodApi } from "../Apis/BabyFoodApi"
 import { Recipe } from "../model/Index"
 import { routerUtils } from "../utils/RouterUtils"
+import { AppStorageV2 } from "@kit.ArkUI"
 
 @ObservedV2
 export class SecondViewModel{
@@ -12,6 +13,8 @@ export class SecondViewModel{
   // 搜索关键字
   @Trace keyword: string = ''
   @Trace recipe: Recipe[] = []
+  // 用户信息
+  @Trace userInfo: UserInfo = AppStorageV2.connect<UserInfo>(UserInfo, 'UserInfo', () => userInfo)!
 
   constructor() {
     this.safeTop = AppStorage.get(YTAvoid.SAFE_TOP_KEY) as number
@@ -25,6 +28,7 @@ export class SecondViewModel{
 
   // 获取食谱列表
   async getRecipeList(){
+    if(this.userInfo.checkLogin())
     this.recipe = await BabyFoodApi.getAllRecipes(this.keyword, this.monthRange)
   }
 

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


+ 0 - 4
features/feature/src/main/resources/base/media/Search.svg

@@ -1,4 +0,0 @@
-<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86 86" class="design-iconfont">
-  <rect x="14.3585" y="12.5641" width="57.2833" height="57.2833" rx="28.6417" stroke="#898989" stroke-width="10.8"/>
-  <path d="M63.2891 64.5L73.7541 75.2777" stroke="#898989" stroke-width="10.8" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>

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


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


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


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


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


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

@@ -33,7 +33,7 @@ export struct Terms {
           //   })
           //
           // Span('以及')
-          Span('《小易决定用户协议》')
+          Span('《萌食记用户协议》')
             .spanEx(() => {
               yTRouter.router2userAgreement()
 

+ 140 - 0
features/user/src/main/ets/pages/ChangePassWord.ets

@@ -0,0 +1,140 @@
+import { YTAvoid, YTButton, YTHeader, yTRouter } from 'basic'
+import { LoginCollect } from 'basic/src/main/ets/models/LoginCollect'
+import { LoginInput } from '../components/LoginInput'
+import { CodeInputType } from '../models'
+
+
+@Component
+struct ChangePassWord{
+  @State private loginCollect: LoginCollect = new LoginCollect('reset')
+  @StorageProp(YTAvoid.SAFE_TOP_KEY) safeTop: number = 0
+
+  private inputPhoneNumberType: CodeInputType = {
+    txt: '+86',
+    placeHolder: '手机号'
+  }
+  private inputCaptchaType: CodeInputType = {
+  txt: '验证码',
+  placeHolder: '验证码'
+}
+  private inputPasswordType: CodeInputType = {
+    txt: '密码',
+    placeHolder: '设置密码'
+  }
+  private inputConfirmPasswordType: CodeInputType = {
+    txt: '密码',
+    placeHolder: '确认密码'
+  }
+  private linearInfo: LinearGradientOptions = {
+    colors: [ ['#B9FD2A', 0.01], ['#F5FD6D', 1] ],
+    angle: 110
+  }
+  build() {
+    NavDestination(){
+      Column(){
+        YTHeader({ title: '用户设置', bgc: 'rgba(0, 0, 0, 0)'})
+
+        Column(){
+          // 手机号
+          LoginInput({
+            item: this.inputPhoneNumberType,
+            inputData: this.loginCollect.phonenumber,
+            isPassword: false,
+            needCode: false,
+            // changeStyle: true,
+            // fontSize: 16,
+            // fontColor: Color.White,
+            inputChange: (value: string) => {
+              this.loginCollect.phonenumber = value
+            }
+          })
+
+          // 验证码
+          LoginInput({
+            item: this.inputCaptchaType,
+            inputData: this.loginCollect.smsCode,
+            needCode: true,
+            loginCollect: this.loginCollect,
+            // changeStyle: true,
+            // fontSize: 16,
+            // fontColor: Color.White,
+            // codeSize: 12,
+            inputChange: (value) => {
+              this.loginCollect.smsCode = value
+            },
+            btLinearGradient: { colors: [['#95C50A', 1]] }
+          })
+
+          // 设置密码
+          LoginInput({
+            item: this.inputPasswordType,
+            inputData: this.loginCollect.password,
+            needCode: false,
+            isPassword: true,
+            marginBottom: 0,
+            // changeStyle: true,
+            // fontColor: Color.White,
+            // fontSize: 16,
+            inputChange: (value) => {
+              this.loginCollect.password = value
+            }
+          })
+
+          // 确认密码
+          LoginInput({
+            item: this.inputConfirmPasswordType,
+            inputData: this.loginCollect.confirmPassword,
+            isPassword: true,
+            needCode: false,
+            // fontColor: Color.White,
+            // changeStyle: true,
+            // fontSize: 16,
+            inputChange: (value) => {
+              this.loginCollect.confirmPassword = value
+            }
+          })
+
+          // 空白占位
+          Blank()
+            .layoutWeight(1)
+
+          YTButton({
+            bgc: '#95C50A',
+            btContent: '完成',
+            btFontColor: Color.White,
+            btFontSize: 20,
+            btBorderRadius: 8,
+            btBorder: {width: 0},
+            btPadding: {
+              left: 26,
+              right: 26,
+              top: 9,
+              bottom: 9
+            },
+            click: () => {
+              // 手动同意下, 防止在重置密码时会弹出隐私协议
+              this.loginCollect.isAgreePrivacy = true
+              this.loginCollect.executeLogin("common")
+            }
+
+          }).margin({ bottom: 142 })
+        }
+        .padding({ left: 14, right: 14})
+        .width("100%")
+        .layoutWeight(1)
+      }
+
+    }
+
+  }
+
+}
+
+
+@Builder
+function ChangePassWordBuilder() {
+  NavDestination() {
+    ChangePassWord()
+  }
+  .hideTitleBar(true)
+}

+ 1 - 1
features/user/src/main/ets/pages/Privacy.ets

@@ -21,7 +21,7 @@ export struct Privacy {
     Column() {
       YTHeader({ defaultStyle: { title: '隐私政策' } })
       Web({
-        src: "https://hm-static.ytpm.net/friend/doc/%E9%9A%90%E7%A7%81%E6%94%BF%E7%AD%96.html",
+        src: "https://hm-test.ytpm.net/babyfoodAgreement",
         controller: this.webviewController,
         renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
       }).padding(20)

+ 8 - 6
features/user/src/main/ets/pages/SettingPage.ets

@@ -45,12 +45,12 @@ struct SettingPage {
         this.showReviseName = true
       }
     },
-  // {
-  //   text: '密码设置',
-  //   click: () => {
-  //     yTRouter.router2UpdatePasswordPage()
-  //   }
-  // }
+  {
+    text: '密码设置',
+    click: () => {
+      yTRouter.router2UpdatePasswordPage()
+    }
+  }
   ]
   private options: BasicType[] = [
     {
@@ -134,6 +134,7 @@ struct SettingPage {
           btFontSize: 16,
           btHeight: 48,
           btBorderRadius: 40,
+          bgc: '#95C50A'
         })
         Text()
           .height(200)
@@ -243,6 +244,7 @@ struct SettingPage {
             top: 4,
             bottom: 4
           },
+          bgc: '#95C50A',
           click: () => {
             if (!this.value) {
               IBestToast.show({

+ 1 - 1
features/user/src/main/ets/pages/UserAgreement.ets

@@ -17,7 +17,7 @@ struct UserAgreementPage {
     Column() {
       YTHeader({ defaultStyle: { title: '用户协议' } })
       Web({
-        src: "https://hm-static.ytpm.net/friend/doc/%E7%94%A8%E6%88%B7%E5%8D%8F%E8%AE%AE.html",
+        src: "https://hm-test.ytpm.net/babyfoodUserAgreement",
         controller: this.webviewController,
         renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
       })

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

@@ -102,7 +102,7 @@ export struct Mine {
           right: { anchor: "__container__", align: HorizontalAlign.End },
         })
         .zIndex(999)
-        .linearGradient({ angle: 135, colors: [['#CAE2F9', -0.1571], ['#D4D1F4', 0.4709], ['#EDF5FD', 1.1235]] })
+        .linearGradient({ angle: 135, colors: [['#95C50A', 1]] })
         .offset({ x: -32, y: -2 })
         .onClick(() => {
           if (!this.userInfo.checkLogin()) {

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


+ 5 - 0
features/user/src/main/resources/base/profile/router_map.json

@@ -49,6 +49,11 @@
       "data": {
         "description": "this is DelPhotoPage"
       }
+    },
+    {
+      "name": "ChangePassWord",
+      "pageSourceFile": "src/main/ets/pages/ChangePassWord.ets",
+      "buildFunction": "ChangePassWordBuilder"
     }
   ]
 }

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

@@ -10,24 +10,24 @@ struct Index {
   //tabs展示内容
   contentList: BasicType<undefined>[] = [
     {
-      text: '日历',
-      src: $r('app.media.app_icon'),
-      acSrc: $r('app.media.app_icon')
+      text: '每周计划',
+      src: $r('app.media.Main_'),
+      acSrc: $r('app.media.Main')
     },
     {
-      text: '黄历',
-      src: $r('app.media.app_icon'),
-      acSrc: $r('app.media.app_icon')
+      text: '辅食食谱',
+      src: $r('app.media.Second_'),
+      acSrc: $r('app.media.Second')
     },
     {
-      text: '卡片',
-      src: $r('app.media.app_icon'),
-      acSrc: $r('app.media.app_icon')
+      text: '大转盘',
+      src: $r('app.media.Third_'),
+      acSrc: $r('app.media.Third')
     },
     {
-      text: '我',
-      src: $r('app.media.app_icon'),
-      acSrc: $r('app.media.app_icon')
+      text: '我',
+      src: $r('app.media.Mine_'),
+      acSrc: $r('app.media.Mine')
     }
   ]
   tabsController: TabsController = new TabsController()
@@ -92,8 +92,8 @@ struct Index {
       Text(item.text)
         .fontSize($r('[basic].float.page_text_font_size_10'))
         .lineHeight(16)
-        .fontColor(this.currentIndex == item.index ? $r('[basic].color.main_ac_color_dark') :
-        $r('[basic].color.main_na_color'))
+        .fontColor(this.currentIndex == item.index ? Color.Black :
+        '#ff8f8f8f')
     }
     .margin({ top: 5 })
     .onClick(() => {

BIN
products/entry/src/main/resources/base/media/Main.png


BIN
products/entry/src/main/resources/base/media/Main_.png


BIN
products/entry/src/main/resources/base/media/Mine.png


BIN
products/entry/src/main/resources/base/media/Mine_.png


BIN
products/entry/src/main/resources/base/media/Second.png


BIN
products/entry/src/main/resources/base/media/Second_.png


BIN
products/entry/src/main/resources/base/media/Third.png


BIN
products/entry/src/main/resources/base/media/Third_.png


BIN
sign/萌食记调试证书Debug.p7b


BIN
sign/调试证书.p7b