Ver Fonte

git界面静态模板

XUYangWei há 2 meses atrás
pai
commit
35b0919191

+ 133 - 0
features/feature/src/main/ets/components/maincomponent/BindSheetSwiper.ets

@@ -0,0 +1,133 @@
+// import { BuilderHeader } from "./BuilderHeader"
+// import { SwiperCom } from "./SwiperCom"
+// import { TaskItem } from "./TaskItem"
+//
+// @ComponentV2
+// export struct BindSheetSwiper{
+//   @Param swiperController:SwiperController=new SwiperController()
+//   @Event cancel:()=>void=()=>{}
+//   @Event confirm:()=>void=()=>{}
+//   build() {
+//     Swiper(this.swiperController){
+//       Column(){
+//         Row(){
+//           BuilderHeader({
+//             leftTitle:"取消",
+//             centerTitle:"养护打卡",
+//             rightTitle:'打卡',
+//             leftClick:()=>{
+//               this.cancel()
+//               // this.isShowMaintenanceBuilder=false
+//             },
+//             rightClick:()=>{
+//               this.confirm()
+//               // this.isShowMaintenanceBuilder=true
+//             }
+//           })
+//         }.width('100%')
+//         .margin({bottom:16})
+//
+//         Column({space:20}) {
+//           Column() {
+//             TaskItem({
+//               title:"打卡事项",
+//               TaskText:"xxx",
+//               swiperChange:()=>{
+//                 this.swiperController.changeIndex(1,true)
+//               }
+//             })
+//             TaskItem({
+//               title:"打卡植物",
+//               TaskText:"xxx",
+//               swiperChange:()=>{
+//                 this.swiperController.changeIndex(2,true)
+//               }
+//             })
+//           }.backgroundColor('#F8F8F8')
+//           .padding({left:10,right:10})
+//           .borderRadius(12)
+//
+//           Column() {
+//             Row() {
+//               Text('打卡日期')
+//               Image($r('app.media.startIcon')).width(18)
+//             }.width('100%')
+//             .justifyContent(FlexAlign.SpaceBetween)
+//             .padding({ top: 16, bottom: 16 })
+//             .onClick(()=>{
+//               this.swiperController.changeIndex(3,true)
+//             })
+//
+//             Row() {
+//               Text('打卡时间')
+//               Image($r('app.media.startIcon')).width(18)
+//             }.width('100%')
+//             .justifyContent(FlexAlign.SpaceBetween)
+//             .padding({ top: 16, bottom: 16 })
+//           }.backgroundColor('#F8F8F8')
+//           .padding({left:10,right:10})
+//           .borderRadius(12)
+//           .onClick(()=>{
+//             this.swiperController.changeIndex(4,true)
+//
+//           })
+//         }.width('100%')
+//
+//
+//       }.width('100%')
+//       .height(530)
+//       .padding({top:19,left:16,right:16})
+//       .backgroundColor(Color.White)
+//       .borderRadius({topLeft:20,topRight:20})
+//       //打卡事项swiper
+//       SwiperCom({
+//         swiperBuilder1:()=>{
+//           this.SelectClockTask()
+//         },
+//         swiperBuilder2:()=>{
+//           this.AddClockTask()
+//         },
+//         swiperBuilder3: () => { this.AddClockTaskAndSelectIcon() },
+//         swiperComController:this.vm.swiperComController[0]
+//       })
+//
+//       SwiperCom({
+//         swiperBuilder1:()=>{
+//           //选择打卡植物
+//           this.SelectClockTaskGreenPlant()
+//         },
+//         swiperComController:this.vm.swiperComController[1]
+//       })
+//       SwiperCom({
+//         swiperBuilder1:()=>{
+//           //选择打卡日期
+//           this.SelectDate()
+//         },
+//         swiperComController:this.vm.swiperComController[2]
+//       })
+//       SwiperCom({
+//         swiperBuilder1:()=>{
+//           //选择打卡时间
+//           this.SelectTime()
+//         },
+//         swiperComController:this.vm.swiperComController[3]
+//       })
+//       TextArea({ placeholder:"您正在进行养护打卡,点击此处进行备注", text:"xxxx" }).width('100%')
+//         .height(165)
+//         .backgroundColor('#F8F8F8')
+//         .borderRadius(12)
+//         .placeholderColor('#4D333333')
+//         .placeholderFont({size:14})
+//         .fontColor('#FF206D43')
+//         .fontSize(16)
+//
+//     }
+//     .width('100%')
+//     .height(530)
+//     .autoPlay(false)
+//     .indicator(false)
+//     .disableSwipe(true)
+//     .curve(Curve.EaseIn)
+//     .duration(100)
+//   }
+// }

+ 49 - 0
features/feature/src/main/ets/components/maincomponent/BindSheetTask/TaskGreenPlantsSelect.ets

@@ -0,0 +1,49 @@
+import { SearchGreenPlant } from "../SearchGreenPlant"
+
+@ComponentV2
+export struct TaskGreenPlantsSelect{
+
+  @Event selectGreenPlant:(id:number)=>void=(id:number)=>{}
+  build() {
+    Column() {
+      SearchGreenPlant({
+        submit:(keyword:string)=>{
+          //发送请求,搜索植物
+        }
+      })
+      Grid() {
+        ForEach([1, 2, 3, 4, 5, 6], () => {
+          GridItem() {
+            Column({ space: 9 }) {
+              Column() {
+                Image($r('app.media.app_icon')).width(63).height(92)
+
+              }
+              .width(88)
+              .height(113)
+              .justifyContent(FlexAlign.Center)
+              .backgroundColor('#FFE8EBF0')
+              .borderRadius(12)
+
+              Text('龟背竹').fontSize(14)
+            }
+            .width(107)
+            .height(155)
+            .justifyContent(FlexAlign.Center)
+            .border({
+              width: 1,
+              color: '#FF206D43'
+            })
+            .borderRadius(12)
+            .backgroundColor(Color.White)
+          }
+        })
+      }
+      .width('100%')
+      .layoutWeight(1)
+      .scrollBar(BarState.Off)
+      .columnsTemplate('1fr 1fr 1fr')
+      .rowsGap(10)
+    }
+  }
+}

+ 51 - 0
features/feature/src/main/ets/components/maincomponent/BindSheetTask/TaskGridCom.ets

@@ -0,0 +1,51 @@
+@ComponentV2
+export struct TaskGridCom{
+  @Local selectCurrentTask:number=-1
+  build() {
+    Column({space:24}) {
+      Row() {
+        Text('基本事项')
+      }.width('100%')
+      .justifyContent(FlexAlign.Start)
+      Scroll() {
+        Grid() {
+          ForEach([1, 2, 3, 4, 5, 6], (item:number,index:number) => {
+            GridItem() {
+              Column({space:10}) {
+                Column() {
+                  Image($r('app.media.startIcon')).width(45).height(45)
+                }.width(60)
+                .height(60)
+                .borderRadius(30)
+                .justifyContent(FlexAlign.Center)
+                .shadow({
+                  // 模糊半径
+                  radius: 10,
+                  // 阴影类型
+                  type: ShadowType.COLOR,
+                  // 阴影颜色
+                  color: '#1A000000',
+                  // X 轴偏移
+                  offsetX: 1,
+                  // Y 轴偏移
+                  offsetY: 1,
+                  // 是否内部填充,值为布尔型,默认为flase
+                  fill: false
+                })
+                .border({
+                  width:1,
+                  color:this.selectCurrentTask==index?'#206D43':'#fff'
+                })
+                Text('xxxx').fontSize(14)
+              }
+              .onClick(()=>{
+                this.selectCurrentTask=index
+              })
+
+            }
+          })
+        }.height('100%').columnsTemplate('1fr 1fr 1fr').rowsGap(10).scrollBar(BarState.Off)
+      }.layoutWeight(1).scrollBar(BarState.Off)
+    }.height(250)
+  }
+}

+ 18 - 0
features/feature/src/main/ets/components/maincomponent/BindSheetTask/TaskGridIconGrid.ets

@@ -0,0 +1,18 @@
+@ComponentV2
+export struct TaskGridIconGrid{
+  build() {
+    Column({space:24}) {
+        Grid() {
+          ForEach([1,1,1,1,1,1,1,1,1,1,1,1,1], () => {
+            GridItem() {
+              Column() {
+                Image($r('app.media.startIcon')).width(45).height(45)
+                Text('xxxx')
+              }
+            }
+          })
+        }.columnsTemplate('1fr 1fr 1fr')
+    }.layoutWeight(1)
+    .justifyContent(FlexAlign.Start)
+  }
+}

+ 20 - 0
features/feature/src/main/ets/components/maincomponent/TaskItem.ets

@@ -0,0 +1,20 @@
+@ComponentV2
+export struct TaskItem{
+  @Param title:string=""
+  @Param TaskText:string=""
+  @Event swiperChange:()=>void=()=>{}
+  build() {
+    Row() {
+      Text(this.title)
+      Blank()
+      Text(this.TaskText).margin({right:20})
+      Image($r('app.media.startIcon')).width(18)
+    }.width('100%')
+    .justifyContent(FlexAlign.SpaceBetween)
+    .padding({ top: 16, bottom: 16 })
+    .onClick(()=>{
+      this.swiperChange()
+    })
+
+  }
+}

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

@@ -1,62 +1,49 @@
-import { BackgroundPageModifier, DateOption, YTAddressSelectorDialog,
-  YTCalendarPicker,
-  YTDateUtil,
-  YTHeader,
-  yTRouter } from 'basic'
-import { UnitType } from 'basic/src/main/ets/datepicker/DatePickerEnums'
-import { promptAction } from '@kit.ArkUI'
+import { YTHeader, yTRouter } from 'basic'
 import { MainViewModel } from '../viewmodels/MainViewModel'
 import { SwiperCom } from '../components/maincomponent/SwiperCom'
 import { BuilderHeader } from '../components/maincomponent/BuilderHeader'
 import { DiaryDatePicker } from '../components/maincomponent/DiaryDatePicker'
 import { DiaryTimePicker } from '../components/maincomponent/DiaryTimePicker'
+import { SearchGreenPlant } from '../components/maincomponent/SearchGreenPlant'
+import { TaskItem } from '../components/maincomponent/TaskItem'
+import { TaskGridCom } from '../components/maincomponent/BindSheetTask/TaskGridCom'
+import { TaskGridIconGrid } from '../components/maincomponent/BindSheetTask/TaskGridIconGrid'
+import { TaskGreenPlantsSelect } from '../components/maincomponent/BindSheetTask/TaskGreenPlantsSelect'
 
 @ComponentV2
 export struct MainView {
   @Local isShowMaintenanceBuilder:boolean=false
+  @Local greenPlantList:number[]=[1,2,3]
   @Local vm:MainViewModel=new MainViewModel()
+  aboutToAppear(): void {
+    this.getGreenList()
+  }
+  async getGreenList(){
+    this.greenPlantList=await Promise.resolve([1,2,3])
+  }
   build() {
     Stack({ alignContent: Alignment.BottomEnd }) {
       Column() {
         YTHeader({
           backArrow: false,
           title: '我的绿植',
-          rightComp: this.rightComp,
-          headerPadding: { top: 19, left: 16, right: 16 }
+          rightComp:()=>{this.rightComp()} ,
+          headerPadding: { top: 19, left: 16, right: 16}
         })
         Column() {
-          Search({ value: "", placeholder: '搜索植物' })
-            .searchIcon({
-              src: $r('sys.media.ohos_ic_public_search_filled')
-            })
-            .cancelButton({
-              style: CancelButtonStyle.CONSTANT,
-              icon: {
-                src: $r('sys.media.ohos_ic_public_cancel_filled')
-              }
-            })
-            .width('100%')
-            .height(48)
-            .maxLength(20)
-            .borderRadius(12)
-            .backgroundColor('#fff')
-            .placeholderColor(Color.Grey)
-            .placeholderFont({ size: 16, weight: 400 })
-            .textFont({ size: 16, weight: 400 })
-            .onSubmit((value: string) => {
-
-            })
-            .onChange((value: string) => {
-
-            })
-
+          //搜索框
+          SearchGreenPlant({
+            submit:(keyword:string)=>{
+              //发送请求,搜索植物
+            }
+          })
           Row() {
             Text('最近添加').fontSize(14).fontColor('#333333')
             Image($r('app.media.main_icon_edit')).width(24)
           }.width('100%').justifyContent(FlexAlign.SpaceBetween)
 
           List({ space: 16 }) {
-            ForEach([1, 2, 3, 4], () => {
+            ForEach(this.greenPlantList, () => {
               ListItem() {
                 Row() {
                   Row() {
@@ -108,8 +95,6 @@ export struct MainView {
                 end: this.itemEnd(1, 0),
               })
             })
-
-
           }.width('100%')
 
         }.width('100%')
@@ -117,7 +102,8 @@ export struct MainView {
         .bindSheet($$this.isShowMaintenanceBuilder, this.MaintenanceClockBindSheetBuilder(), {
           height: 530,
           showClose: false,
-          backgroundColor: Color.Transparent
+          backgroundColor: Color.Transparent,
+          radius:{topLeft:20,topRight:20}
         })
       }.width('100%').height('100%')
       Column() {
@@ -220,7 +206,7 @@ export struct MainView {
                   this.isShowMaintenanceBuilder=false
                 },
                 rightClick:()=>{
-                  this.isShowMaintenanceBuilder=true
+                  this.isShowMaintenanceBuilder=false
                 }
               })
 
@@ -229,46 +215,39 @@ export struct MainView {
 
             Column({space:20}) {
               Column() {
-                Row() {
-                  Text('打卡事项')
-                  Image($r('app.media.startIcon')).width(18)
-                }.width('100%')
-                .justifyContent(FlexAlign.SpaceBetween)
-                .padding({ top: 16, bottom: 16 })
-                .onClick(()=>{
-                  this.vm.swiperController.changeIndex(1,true)
+                TaskItem({
+                  title:"打卡事项",
+                  TaskText:"xxx",
+                  swiperChange:()=>{
+                    this.vm.swiperController.changeIndex(1,true)
+                  }
                 })
-                Row() {
-                  Text('打卡植物')
-                  Image($r('app.media.startIcon')).width(18)
-                }.width('100%')
-                .justifyContent(FlexAlign.SpaceBetween)
-                .padding({ top: 16, bottom: 16 })
-                .onClick(()=>{
-                  this.vm.swiperController.changeIndex(2,true)
-
+                TaskItem({
+                  title:"打卡植物",
+                  TaskText:"xxx",
+                  swiperChange:()=>{
+                    this.vm.swiperController.changeIndex(2,true)
+                  }
                 })
               }.backgroundColor('#F8F8F8')
               .padding({left:10,right:10})
               .borderRadius(12)
 
               Column() {
-                Row() {
-                  Text('打卡日期')
-                  Image($r('app.media.startIcon')).width(18)
-                }.width('100%')
-                .justifyContent(FlexAlign.SpaceBetween)
-                .padding({ top: 16, bottom: 16 })
-                .onClick(()=>{
-                  this.vm.swiperController.changeIndex(3,true)
+                TaskItem({
+                  title:"打卡日期",
+                  TaskText:"xxx",
+                  swiperChange:()=>{
+                    this.vm.swiperController.changeIndex(3,true)
+                  }
+                })
+                TaskItem({
+                  title:"打卡时间",
+                  TaskText:"xxx",
+                  swiperChange:()=>{
+                    this.vm.swiperController.changeIndex(4,true)
+                  }
                 })
-
-                Row() {
-                  Text('打卡时间')
-                  Image($r('app.media.startIcon')).width(18)
-                }.width('100%')
-                .justifyContent(FlexAlign.SpaceBetween)
-                .padding({ top: 16, bottom: 16 })
               }.backgroundColor('#F8F8F8')
               .padding({left:10,right:10})
               .borderRadius(12)
@@ -356,34 +335,13 @@ export struct MainView {
           this.vm.swiperController.changeIndex(0,true)
         }
       })
-
-      Column({space:24}) {
-        Row() {
-          Text('基本事项')
-        }.width('100%')
-        .justifyContent(FlexAlign.Start)
-
-        Scroll() {
-          Grid() {
-            ForEach([1, 2, 3, 4, 5, 6,7,8,8,8], () => {
-              GridItem() {
-                Column({space:16}) {
-                  Image($r('app.media.startIcon')).width(45).height(45)
-                  Text('xxxx').fontSize(14)
-                }
-              }
-            })
-          }.height('100%').columnsTemplate('1fr 1fr 1fr').scrollBar(BarState.Off)
-        }.layoutWeight(1).scrollBar(BarState.Off)
-      }.height(300)
-
+      TaskGridCom()
       Column({space:24}) {
         Row() {
           Text('自定义')
         }.width('100%')
         .justifyContent(FlexAlign.Start)
-        Scroll() {
-          Grid() {
+        Grid() {
             ForEach([1], () => {
               GridItem() {
                 Column() {
@@ -394,22 +352,15 @@ export struct MainView {
                 })
               }
             })
-          }.columnsTemplate('1fr 1fr 1fr')
-        }.layoutWeight(1).scrollBar(BarState.Off)
-      }.layoutWeight(1)
-
-    }.width('100%')
-    .height(530)
+          }.columnsTemplate('1fr 1fr 1fr').layoutWeight(1)
+      }
+    }.ColStyle('#F8F8F8')
     .padding({top:16,left:16,right:16})
-    .backgroundColor(Color.White)
-    .borderRadius({topLeft:20,topRight:20})
   }
   //创建打卡事项
   @Builder
   AddClockTask(){
-    Column(){
       Column(){
-
         BuilderHeader({
           leftTitle:'上一步',
           centerTitle:'创建养护事项',
@@ -432,17 +383,11 @@ export struct MainView {
           //选择图标
           this.vm.swiperComController[0].changeIndex(2,true)
         })
-      }.width('100%')
-      .height(530)
+      }.ColStyle()
       .padding({top:16,left:16,right:16})
-      .backgroundColor(Color.White)
-      .borderRadius({topLeft:20,topRight:20})
-    }.width('100%')
-    .height('100%')
-    .justifyContent(FlexAlign.Center)
 
-  }
 
+  }
   //选择打卡事项图标
   @Builder
   AddClockTaskAndSelectIcon(){
@@ -459,26 +404,10 @@ export struct MainView {
           //选择事项图标成功,返回
         }
       })
-      Column({space:24}) {
-        Scroll() {
-          Grid() {
-            ForEach([1,1,1,1,1,1,1,1,1,1,1,1,1], () => {
-              GridItem() {
-                Column() {
-                  Image($r('app.media.startIcon')).width(45).height(45)
-                  Text('xxxx')
-                }
-              }
-            })
-          }.columnsTemplate('1fr 1fr 1fr')
-        }.layoutWeight(1).scrollBar(BarState.Off)
-      }.layoutWeight(1)
-
-    }.width('100%')
-    .height(530)
+      TaskGridIconGrid()
+    }.ColStyle()
     .padding({top:16,left:16,right:16})
-    .backgroundColor(Color.White)
-    .borderRadius({topLeft:20,topRight:20})
+
 
   }
   //选择打卡植物
@@ -499,74 +428,15 @@ export struct MainView {
         }
       })
 
-      Search({ value:"", placeholder: '搜索植物' })
-        .searchIcon({
-          src: $r('sys.media.ohos_ic_public_search_filled')
-        })
-        .cancelButton({
-          style: CancelButtonStyle.CONSTANT,
-          icon: {
-            src: $r('sys.media.ohos_ic_public_cancel_filled')
-          }
-        })
-        .width('100%')
-        .height(48)
-        .maxLength(20)
-        .border({
-          width:1,
-          color:"#1A000000"
-        })
-        .borderRadius(12)
-        .backgroundColor('#fff')
-        .placeholderColor(Color.Grey)
-        .placeholderFont({ size: 16, weight: 400 })
-        .textFont({ size: 16, weight: 400 })
-        .onSubmit((value: string) => {
-
-        })
-        .onChange((value: string) => {
-
-        })
-
-      Grid(){
-        ForEach([1,2,3,4,5,6],()=>{
-          GridItem(){
-            Column({space:9}){
-              Column(){
-                Image($r('app.media.app_icon')).width(63).height(92)
-
-              }.width(88)
-              .height(113)
-              .justifyContent(FlexAlign.Center)
-              .backgroundColor('#FFE8EBF0')
-              .borderRadius(12)
-              Text('龟背竹').fontSize(14)
-            }.width(107)
-            .height(155)
-            .justifyContent(FlexAlign.Center)
-            .border({
-              width:1,
-              color:'#FF206D43'
-            })
-            .borderRadius(12)
-            .backgroundColor(Color.White)
-          }
-        })
-      }.width('100%')
-      .layoutWeight(1)
-      .scrollBar(BarState.Off)
-      .columnsTemplate('1fr 1fr 1fr')
-      .rowsGap(10)
-
-
-
-
+      TaskGreenPlantsSelect({
+        selectGreenPlant:(id:number)=>{
+          //获取到选择的植物
+        }
+      })
 
-    }.width('100%')
-    .height(530)
+    }
     .padding({top:19,left:8,right:8})
-    .backgroundColor(Color.White)
-    .borderRadius({topLeft:20,topRight:20})
+    .ColStyle()
 
   }
   //选择日期
@@ -585,10 +455,7 @@ export struct MainView {
         }
 
       })
-    }.width('100%')
-    .backgroundColor(Color.Transparent)
-    .height(530)
-    .borderRadius({topLeft:20,topRight:20})
+    }.ColStyle(Color.Transparent)
   }
   @Builder
   SelectTime(){
@@ -603,11 +470,16 @@ export struct MainView {
         }
 
       })
-    }.width('100%')
-    .height(530)
-    .backgroundColor(Color.White)
-    .borderRadius({topLeft:20,topRight:20})
+    }.ColStyle()
   }
-
 }
-//YTCalendarPicker()
+// 全局样式(需加static)
+@Extend(Column)
+ function ColStyle(color:ResourceColor=Color.White) {
+  // 样式属性
+  .width('100%')
+  .height(530)
+  .backgroundColor(color)
+  .borderRadius({topLeft:20,topRight:20})
+}
+

+ 8 - 8
features/user/src/main/ets/pages/AboutUS.ets

@@ -25,7 +25,7 @@ export struct AboutUS {
   }
 
   build() {
-    Column() {
+    Column({space:40}) {
       YTHeader({ defaultStyle: { title: '关于我们' } })
 
       Column() {
@@ -42,8 +42,8 @@ export struct AboutUS {
           ForEach(this.listData, (item: string, index) => {
             ListItem() {
               Row() {
-                Text(item).fontSize(13)
-                  .fontColor(Color.Gray)
+                Text(item).fontSize(16).fontWeight(500)
+                  .fontColor('#333333')
                 Blank()
                 Image($r('app.media.MRight')).width('24').height('24').margin({ right: 10 })
               }.width('100%')
@@ -63,8 +63,8 @@ export struct AboutUS {
 
           ListItem() {
             Row() {
-              Text('个性化推荐').fontSize(13)
-                .fontColor(Color.Gray)
+              Text('个性化推荐').fontSize(16).fontWeight(500)
+                .fontColor('#333333')
               Blank()
               Row() {
                 Text()
@@ -79,7 +79,7 @@ export struct AboutUS {
               .aspectRatio(2)
               .borderRadius(20)
               .justifyContent(this.isAgree ? FlexAlign.End : FlexAlign.Start)
-              .backgroundColor(this.isAgree ? $r('[basic].color.main_ac_color_dark') : '#D9D9D9')
+              .backgroundColor(this.isAgree ? '#2a7853' : '#D9D9D9')
               .onClick(() => {
                 animateTo({ duration: 200 }, () => {
                   this.isAgree = !this.isAgree
@@ -94,8 +94,8 @@ export struct AboutUS {
         .divider({
           strokeWidth: 1,
           color: '#DFDFDF',
-          startMargin: 20,
-          endMargin: 10
+          startMargin: 5,
+          endMargin: 5
         })
         .width('100%')
         .padding({ top: 10 })

+ 101 - 149
features/user/src/main/ets/views/Mine.ets

@@ -1,186 +1,138 @@
-import { BasicType, IBestToast, userInfo, UserInfo, YTAvoid, YTLog, yTRouter } from 'basic'
-import { common, Want } from '@kit.AbilityKit'
-import { BusinessError } from '@kit.BasicServicesKit'
-import { BUNDLE_NAME } from 'BuildProfile'
-import { systemShare } from '@kit.ShareKit'
-import { uniformTypeDescriptor } from '@kit.ArkData'
+import {
+  AppStorageKeyCollect,
+  BasicType, IBestToast, userInfo, UserInfo, YTAvoid,
+  YTButton,
+  YTLog, yTRouter, YTUserRequest } from "basic"
+import { common, Want } from "@kit.AbilityKit"
+import { BusinessError } from "@kit.BasicServicesKit"
+import { BUNDLE_NAME } from "BuildProfile"
+import { systemShare } from "@kit.ShareKit"
+import { uniformTypeDescriptor } from "@kit.ArkData"
+import { promptAction } from "@kit.ArkUI"
+
+
+@Builder
+function MineBuilder() {
+  NavDestination() {
+    Mine()
+  }.title("关于我们")
+  .hideTitleBar(true)
+}
 
 @Component
 export struct Mine {
   @StorageProp(YTAvoid.SAFE_TOP_KEY) safeTop: number = 0
-  @StorageProp(UserInfo.KEY) userInfo: UserInfo = userInfo
-  setArr: Array<BasicType> = [
+  @State isAutoBackImg:boolean=false
+  @StorageProp(AppStorageKeyCollect.OAID)
+  odid:string=""
+  setArr: Array<BasicType<undefined>> = [
     {
+      // acSrc:$r('app.media.icon_mine_share'),
+      acSrc:$r('app.media.app_icon'),
       text: '分享给好友',
-      message: '去分享',
       click: () => {
         this.shareData()
       },
       src: $r('app.media.mine_right_arrow')
     },
     {
+      acSrc:$r("app.media.app_icon"),
+      // acSrc:$r("app.media.icon_mine_suggestion"),
+
       text: '意见反馈',
       click: () => {
-        if (this.userInfo.checkLogin()) {
-          yTRouter.router2SuggestionPage()
-        } else {
-          yTRouter.router2LoginPage()
-        }
-      },
-      src: $r('app.media.mine_right_arrow')
-    },
-    {
-      text: '给个好评',
-      click: () => {
-        const want: Want = {
-          uri: "store://appgallery.huawei.com/app/detail?id=" + BUNDLE_NAME
-        };
-        const context = this.getUIContext().getHostContext() as common.UIAbilityContext;
-        context.startAbility(want).then(() => {
-          //拉起成功
-          YTLog.info('跳转成功')
-        }).catch((err: BusinessError) => {
-          // 拉起失败
-          YTLog.error(err)
-          IBestToast.show('出现未知错误,请稍后再试')
-        });
+        yTRouter.router2SuggestionPage()
       },
       src: $r('app.media.mine_right_arrow')
     },
     {
+      // acSrc:$r('app.media.icon_mine_about'),
+      acSrc:$r('app.media.app_icon'),
       text: '关于我们',
       click: () => {
         yTRouter.router2AboutUS()
       },
       src: $r('app.media.mine_right_arrow')
-    }
+    },
   ]
-
-  aboutToAppear(): void {
-
-  }
-
-  build() {
-    RelativeContainer() {
-      Image(this.userInfo.getHeadImg())
-        .aspectRatio(1)
-        .height(80)
-        .borderRadius(999)
-        .border({ width: 4, color: Color.White })
-
-        .alignRules({
-          top: { anchor: "__container__", align: VerticalAlign.Top },
-          left: { anchor: "__container__", align: HorizontalAlign.Start },
-          bottom: { anchor: "bottomColumn", align: VerticalAlign.Top },
-          bias: { vertical: 176 / (176 - 40) }
-        })
-        .offset({ x: 28 })
-        .zIndex(999)
-        .id("headerImg")
-      Text(this.userInfo.getName())
-        .fontSize(18)
-        .fontColor('#FF1C1C1C')
-        .fontWeight(500)
-        .alignRules({
-          top: { anchor: "headerImg", align: VerticalAlign.Bottom },
-          left: { anchor: "headerImg", align: HorizontalAlign.Start },
-        })
-        .offset({ x: 28, y: 20 })
-        .zIndex(999)
-
-
-      Text(this.userInfo.checkLogin() ? '编辑' : '登录')
-        .textAlign(TextAlign.Center)
-        .height(29)
-        .width(57)
-        .borderRadius(32)
-        .fontColor(Color.White)
-        .fontSize(14)
-        .fontWeight(400)
-        .alignRules({
-          center: { anchor: "headerImg", align: VerticalAlign.Bottom },
-          right: { anchor: "__container__", align: HorizontalAlign.End },
-        })
-        .zIndex(999)
-        .linearGradient({ angle: 135, colors: [['#CAE2F9', -0.1571], ['#D4D1F4', 0.4709], ['#EDF5FD', 1.1235]] })
-        .offset({ x: -32, y: -2 })
-        .onClick(() => {
-          if (!this.userInfo.checkLogin()) {
-            yTRouter.router2LoginPage()
-          } else {
-            yTRouter.router2SettingPage()
-          }
-        })
-      Column() {
-        List() {
-          ForEach(this.setArr, (item: BasicType, index) => {
-            ListItem() {
-              Row() {
-                Text(item.text)
-                  .fontColor('#FF1C1C1C')
-                  .fontSize(14)
-                if (!index) {
-                  Text('去分享')
-                    .fontColor('#801C1C1C')
-                    .fontSize(14)
-                    .fontWeight(400)
-                } else {
-                  Image($r('app.media.right_arrow'))
-                    .width(24)
-                    .aspectRatio(1)
-                }
-              }
-              .width('100%')
-              .height(56)
-              .justifyContent(FlexAlign.SpaceBetween)
-              .onClick(() => {
-                item.click?.()
-              })
-            }
-          })
-        }
-        .divider({ strokeWidth: 1, color: '#1A1C1C1C', })
-        .width('100%')
-        .height('100%')
-      }
-      .backgroundColor(Color.White)
-      .width('100%')
-      .height(550)
-      .borderRadius({ topRight: 32 })
-      .alignRules({
-        bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
-        left: { anchor: "__container__", align: HorizontalAlign.Start },
-      })
-      .id("bottomColumn")
-      .padding({ top: 142, left: 24, right: 24 })
-
-    }
-    .height('100%')
-    .backgroundImage($r('app.media.mine_bgc'))
-    .backgroundImageSize({ width: '100%', height: 305 })
-    .backgroundImagePosition(Alignment.Top)
-  }
-
-  async shareData() {
+  async  shareData() {
     try {
       // 构造ShareData,需配置一条有效数据信息
       const data = new systemShare.SharedData({
         // utd: uniformTypeDescriptor.UniformDataType.HYPERLINK,
-        utd: uniformTypeDescriptor.UniformDataType.TEXT,
-        title: '盒小仓',
-        content: 'http://appgallery.huawei.com/app/detail?id=6917580461832049757',
-        description: "http://appgallery.huawei.com/app/detail?id=6917580461832049757"
+        utd:uniformTypeDescriptor.UniformDataType.TEXT,
+        title: '静心',
+        content:'http://appgallery.huawei.com/app/detail?id=6917585407845246645',
+        description:"http://appgallery.huawei.com/app/detail?id=6917585407845246645"
       })
       const controller = new systemShare.ShareController(data)
-      const context = this.getUIContext().getHostContext()! as common.UIAbilityContext;
+      const context = getContext() as common.UIAbilityContext;
       // 进行分享面板显示
       controller.show(context, {
         previewMode: systemShare.SharePreviewMode.DEFAULT,
-        selectionMode: systemShare.SelectionMode.SINGLE,
-        // anchor: { windowOffset: { x: 0, y: 0 }, size: { width: this.breakWidth, height: 500 } }
+        selectionMode: systemShare.SelectionMode.SINGLE
       })
-    } catch (error) {
-      IBestToast.show({ message: '当前设备不支持', duration: 500 })
+    }
+    catch (error) {
+      promptAction.showToast({ message: '当前设备不支持分享' })
     }
   }
+
+  build() {
+    Column() {
+      Column() {
+        Column({space:12}) {
+          //头像
+          Image($r("app.media.app_icon"))
+            .aspectRatio(1)
+            .width(95)
+            .height(95)
+          Text('绿植养护助手').fontColor('#333333').fontSize(18).fontWeight(500)
+
+        }.alignItems(HorizontalAlign.Center)
+      }
+      .width('100%')
+      .margin({ bottom: 28,top:95 })
+      Column(){
+        // ShowBannerAd()
+        Column() {
+          List({space:15}) {
+            ForEach(this.setArr, (item: BasicType<undefined>, index) => {
+              ListItem() {
+                Row() {
+                  Row({space:10}) {
+                    Image(item.acSrc).width(18)
+                    Text(item.text)
+                      .fontWeight(500).fontColor('#333333')
+                  }
+                  Image(item.src).width(22).height(22).fillColor(Color.Black)
+                }
+                .width('100%')
+                .height(68) //24+16+28
+                .padding({left:10,right:10})
+                .justifyContent(FlexAlign.SpaceBetween)
+                .backgroundColor('#EEEEEE')
+                .borderRadius(22)
+                .onClick(() => {
+                  item.click?.()
+                })
+              }
+            })
+          }
+          // .divider({ strokeWidth: 1, color: '#1A1C1C1C'})
+          .width('100%')
+        }.justifyContent(FlexAlign.Start)
+        // .padding({left:8,right:8})
+        .layoutWeight(1)
+        .width('100%')
+      }.width('100%')
+      .layoutWeight(1)
+      .padding({ left: 16, right: 16 })
+
+    }.width('100%')
+    .height('100%')
+    .backgroundColor('#FFFFFFFF')
+  }
+
+
 }