XUYangWei 2 сар өмнө
parent
commit
74d2166338
86 өөрчлөгдсөн 1557 нэмэгдсэн , 662 устгасан
  1. 1 0
      commons/basic/src/main/ets/apis/YTRequest.ets
  2. 148 0
      commons/basic/src/main/ets/apis/YTUserRequest.ets
  3. 2 0
      commons/basic/src/main/ets/utils/YTRequest.ets
  4. 2 2
      features/feature/src/main/ets/utils/Sector.ets
  5. 279 191
      features/feature/src/main/ets/view/BigWheelView.ets
  6. 43 7
      features/feature/src/main/ets/view/EatWhatView.ets
  7. 182 283
      features/feature/src/main/ets/view/RollDiceView.ets
  8. 62 5
      features/feature/src/main/ets/view/TossCoinView.ets
  9. BIN
      features/feature/src/main/resources/base/media/103.png
  10. BIN
      features/feature/src/main/resources/base/media/104.png
  11. BIN
      features/feature/src/main/resources/base/media/105.png
  12. BIN
      features/feature/src/main/resources/base/media/106.png
  13. BIN
      features/feature/src/main/resources/base/media/107.png
  14. BIN
      features/feature/src/main/resources/base/media/108.png
  15. BIN
      features/feature/src/main/resources/base/media/109.png
  16. BIN
      features/feature/src/main/resources/base/media/110.png
  17. BIN
      features/feature/src/main/resources/base/media/114.png
  18. BIN
      features/feature/src/main/resources/base/media/115.png
  19. BIN
      features/feature/src/main/resources/base/media/beizi_1.png
  20. BIN
      features/feature/src/main/resources/base/media/beizi_10.png
  21. BIN
      features/feature/src/main/resources/base/media/beizi_11.png
  22. BIN
      features/feature/src/main/resources/base/media/beizi_12.png
  23. BIN
      features/feature/src/main/resources/base/media/beizi_13.png
  24. BIN
      features/feature/src/main/resources/base/media/beizi_14.png
  25. BIN
      features/feature/src/main/resources/base/media/beizi_15.png
  26. BIN
      features/feature/src/main/resources/base/media/beizi_16.png
  27. BIN
      features/feature/src/main/resources/base/media/beizi_17.png
  28. BIN
      features/feature/src/main/resources/base/media/beizi_18.png
  29. BIN
      features/feature/src/main/resources/base/media/beizi_19.png
  30. BIN
      features/feature/src/main/resources/base/media/beizi_2.png
  31. BIN
      features/feature/src/main/resources/base/media/beizi_20.png
  32. BIN
      features/feature/src/main/resources/base/media/beizi_21.png
  33. BIN
      features/feature/src/main/resources/base/media/beizi_22.png
  34. BIN
      features/feature/src/main/resources/base/media/beizi_23.png
  35. BIN
      features/feature/src/main/resources/base/media/beizi_24.png
  36. BIN
      features/feature/src/main/resources/base/media/beizi_25.png
  37. BIN
      features/feature/src/main/resources/base/media/beizi_26.png
  38. BIN
      features/feature/src/main/resources/base/media/beizi_27.png
  39. BIN
      features/feature/src/main/resources/base/media/beizi_28.png
  40. BIN
      features/feature/src/main/resources/base/media/beizi_29.png
  41. BIN
      features/feature/src/main/resources/base/media/beizi_3.png
  42. BIN
      features/feature/src/main/resources/base/media/beizi_30.png
  43. BIN
      features/feature/src/main/resources/base/media/beizi_31.png
  44. BIN
      features/feature/src/main/resources/base/media/beizi_32.png
  45. BIN
      features/feature/src/main/resources/base/media/beizi_33.png
  46. BIN
      features/feature/src/main/resources/base/media/beizi_34.png
  47. BIN
      features/feature/src/main/resources/base/media/beizi_35.png
  48. BIN
      features/feature/src/main/resources/base/media/beizi_36.png
  49. BIN
      features/feature/src/main/resources/base/media/beizi_37.png
  50. BIN
      features/feature/src/main/resources/base/media/beizi_38.png
  51. BIN
      features/feature/src/main/resources/base/media/beizi_39.png
  52. BIN
      features/feature/src/main/resources/base/media/beizi_4.png
  53. BIN
      features/feature/src/main/resources/base/media/beizi_40.png
  54. BIN
      features/feature/src/main/resources/base/media/beizi_41.png
  55. BIN
      features/feature/src/main/resources/base/media/beizi_42.png
  56. BIN
      features/feature/src/main/resources/base/media/beizi_43.png
  57. BIN
      features/feature/src/main/resources/base/media/beizi_44.png
  58. BIN
      features/feature/src/main/resources/base/media/beizi_45.png
  59. BIN
      features/feature/src/main/resources/base/media/beizi_46.png
  60. BIN
      features/feature/src/main/resources/base/media/beizi_47.png
  61. BIN
      features/feature/src/main/resources/base/media/beizi_48.png
  62. BIN
      features/feature/src/main/resources/base/media/beizi_49.png
  63. BIN
      features/feature/src/main/resources/base/media/beizi_5.png
  64. BIN
      features/feature/src/main/resources/base/media/beizi_50.png
  65. BIN
      features/feature/src/main/resources/base/media/beizi_51.png
  66. BIN
      features/feature/src/main/resources/base/media/beizi_52.png
  67. BIN
      features/feature/src/main/resources/base/media/beizi_53.png
  68. BIN
      features/feature/src/main/resources/base/media/beizi_54.png
  69. BIN
      features/feature/src/main/resources/base/media/beizi_55.png
  70. BIN
      features/feature/src/main/resources/base/media/beizi_56.png
  71. BIN
      features/feature/src/main/resources/base/media/beizi_57.png
  72. BIN
      features/feature/src/main/resources/base/media/beizi_58.png
  73. BIN
      features/feature/src/main/resources/base/media/beizi_6.png
  74. BIN
      features/feature/src/main/resources/base/media/beizi_7.png
  75. BIN
      features/feature/src/main/resources/base/media/beizi_8.png
  76. BIN
      features/feature/src/main/resources/base/media/beizi_9.png
  77. 640 72
      features/user/src/main/ets/pages/SettingPage.ets
  78. 183 91
      features/user/src/main/ets/views/Mine.ets
  79. 9 4
      features/user/src/main/ets/views/RegisterOrResetPassView.ets
  80. BIN
      features/user/src/main/resources/base/media/abountwo.png
  81. BIN
      features/user/src/main/resources/base/media/backzhanghao.png
  82. BIN
      features/user/src/main/resources/base/media/rightxx.png
  83. BIN
      features/user/src/main/resources/base/media/sharefri.png
  84. BIN
      features/user/src/main/resources/base/media/sugestion.png
  85. 0 1
      products/entry/src/main/ets/pages/Index.ets
  86. 6 6
      products/entry/src/main/module.json5

+ 1 - 0
commons/basic/src/main/ets/apis/YTRequest.ets

@@ -9,6 +9,7 @@ import { IBestToast, YTLog } from '../../../../Index';
 import { AppStorageKeyCollect } from '../constants';
 import { userInfo } from '../models/UserInfo';
 import { yTRouter } from '../utils/YTRouter';
+import { promptAction } from '@kit.ArkUI';
 
 
 // export const baseURL: string = 'https://hm-test.ytpm.net/prod-api'

+ 148 - 0
commons/basic/src/main/ets/apis/YTUserRequest.ets

@@ -9,6 +9,8 @@ import { YTLog } from '../../../../Index'
 import { AxiosProgressEvent, FormData } from '@ohos/axios'
 import { YTDate } from '../utils/FormatDate'
 import { HuaweiAuthPlugin } from '../utils/HuaWeiAuthPlugin'
+import { promptAction } from '@kit.ArkUI'
+import { staticMap } from '@kit.MapKit'
 
 //用户相关api
 export class YTUserRequest extends YTRequest {
@@ -205,4 +207,150 @@ export class YTUserRequest extends YTRequest {
         YTLog.error(e)
       })
   }
+
+  //其他接口
+  //用户设置界面的密码重置
+  //获取验证码
+  static getMyCaptcha(phonenumber: string, success: (res: string) => void, fail: (err: Error) => void) {
+    YTRequest.post<ReqString, ReqString>(`/decisionApUser/sendSmsCode`,
+      { 'phonenumber': phonenumber })
+      .then(res => {
+        success(res['uuid'])
+      })
+      .catch((err: Error) => {
+        IBestToast.show({
+          message:err.message,
+          duration:500
+        })
+      })
+  }
+
+  static resetMyPassword(param: ReqString,callback?:()=>void) {
+    const uuid = AppStorage.get<string>('resetPassword'+'uuid')
+    if (uuid !== undefined) {
+      YTRequest.post<ReqString, ReqString>(`/decisionApUser/resetPwd`, {
+        'phonenumber': param['phonenumber'],
+        'password': param['password'],
+        'smsCode': param['smsCode'],
+        'confirmPassword':param['confirmPassword'],
+        'uuid': uuid
+      })
+        .then(res => {
+          if(res!=null) {
+            userInfo.logout()
+            callback?.()
+          }else{
+            IBestToast.show({
+              message:"验证码错误"
+            })
+          }
+
+        })
+        .catch((err:string)=>{
+          // IBestToast.show({
+          //   message:err
+          // })
+        })
+    }else{
+      IBestToast.show({
+        message:'请先获取验证码',duration:500
+      })
+    }
+  }
+
+
+
+  //抛硬币接口
+  static getTossCoinResult(result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(`/decisionCoinRecord/throwCoin`)
+      .then((res) => {
+        result(res as ReqString)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+  //获取最近得抛硬币一次接口
+
+  static getNearTossCoinResult(result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(` /decisionCoinRecord/queryByLastCoinRecord`)
+      .then((res) => {
+        result(res)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+  //获取筛子结果,获取最近得一次记录
+
+  static getRollDiceResult(diceCount:number,result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(`/decisionDiceRecord/rollDice?diceCount=${diceCount}`)
+      .then((res) => {
+        result(res)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+  static getNearRollDiceResult(result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(`/decisionDiceRecord/queryByDiceRecord`)
+      .then((res) => {
+        result(res)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+  //吃什么
+
+  static getEatResult(result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(`/decisionFoodRecord/randomFood`)
+      .then((res) => {
+        result(res)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+  static getNearEatResult(result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(`/decisionFoodRecord/queryByFoodRecord`)
+      .then((res) => {
+        result(res)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+
+  //随机数
+
+  static getNumberResult(count:number,maxValue:number,minValue:number,result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(`/decisionRandomNumberRecord/generateRandomNumbers?count=${count}&maxValue=${maxValue}&minValue=${minValue}`)
+      .then((res) => {
+        result(res)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+  static getNearNumberResult(result: ResultCallBack<ReqString>){
+    YTUserRequest.get<ReqString>(`/decisionRandomNumberRecord/queryLastRecord`)
+      .then((res) => {
+        result(res)
+      })
+      .catch((e: Error) => {
+        YTLog.error(e)
+      })
+  }
+
+
+
+
 }

+ 2 - 0
commons/basic/src/main/ets/utils/YTRequest.ets

@@ -12,6 +12,7 @@ import { AppStorageKeyCollect } from '../constants';
 import { ReqString } from '../models';
 import { userInfo, UserInfo } from '../models/UserInfo';
 import { HuaweiAuthPlugin } from './HuaWeiAuthPlugin';
+import { promptAction } from '@kit.ArkUI';
 
 
 // export const baseURL: string = 'https://hm-test.ytpm.net/prod-api'
@@ -43,6 +44,7 @@ instance.interceptors.response.use((response: AxiosResponse) => {
   YTLog.info(response)
   // 对响应错误做点什么
   if (response.data.code == 401) {
+
     userInfo.logout()
     yTRouter.router2LoginPage()
     return Promise.reject('401');

+ 2 - 2
features/feature/src/main/ets/utils/Sector.ets

@@ -57,8 +57,8 @@ export struct Sector {
         .fillOpacity(1) // 设置填充透明度
         .fill(this.color) // 设置填充颜色
         // .stroke('#f8edfa')
-        .stroke(Color.Black)
-        .strokeWidth(0.5) // 设置边框宽度为0
+        // .stroke(Color.Black)
+        .strokeWidth(0) // 设置边框宽度为0
         .rotate({ angle: 180 - (this.angle / 4 - 90) }); // 旋转扇形
     }
   }

+ 279 - 191
features/feature/src/main/ets/view/BigWheelView.ets

@@ -27,6 +27,9 @@ struct BigWheelView{
   isAnimating: boolean = false; // 动画状态
   colorIndex: number = 0; // 颜色索引
   spinDuration:number=5000
+  @State spinDurationTime:number=this.spinDuration/1000
+  //是否显示设置界面
+  @State isShow:boolean=false
 
   colorPalette: string[] = [ // 颜色调色板
     "#26c2ff",
@@ -102,226 +105,311 @@ struct BigWheelView{
 
 
   build() {
-    Column() {
-      YTHeader({ title: '大转盘' })
+    Stack({alignContent:Alignment.Top}){
+      Column() {
+        YTHeader({ title: '大转盘' })
 
-      Row() {
-        Text('转盘').fontSize(20).fontColor("#0b0e15"); // 显示转盘标题
-      }.width('100%').height(44).justifyContent(FlexAlign.Center); // 设置行的宽度和高度
+        Row() {
+          Text('转盘').fontSize(20).fontColor("#0b0e15"); // 显示转盘标题
+        }.width('100%').height(44).justifyContent(FlexAlign.Center); // 设置行的宽度和高度
 
-      // 显示当前状态
-      Text(this.isAnimating ? '旋转中' : `${this.selectedName}`).fontSize(20).fontColor("#0b0e15").height(40);
+        // 显示当前状态
+        Text(this.isAnimating ? '旋转中' : `${this.selectedName}`).fontSize(20).fontColor("#0b0e15").height(40);
 
-      Stack() {
         Stack() {
-          // 遍历每个单元格并绘制扇形
-          ForEach(this.cells, (cell: Cell) => {
-            Stack() {
-              Sector({ radius: lpx2px(this.wheelWidth) / 2, angle: cell.angle, color: cell.color }); // 创建扇形
-              Text(cell.title).fontColor(Color.White).margin({ bottom: `${this.wheelWidth / 1.4}lpx` }); // 显示单元格标题
-            }.width('100%').height('100%').rotate({ angle: cell.rotate }); // 设置宽度和高度,并旋转
-          });
-        }
-        .borderRadius('50%') // 设置圆角
-        .backgroundColor(Color.Gray) // 设置背景颜色
-        .width(`${this.wheelWidth}lpx`) // 设置转盘宽度
-        .height(`${this.wheelWidth}lpx`) // 设置转盘高度
-        .rotate({ angle: this.currentAngle }); // 旋转转盘
-
-        // 创建指针
-        // Image({ width: 20, height: 10 })
-        //   .points([[0, 0], [10, -20], [20, 0]]) // 设置指针的点
-        //   .fill("#d72b0b") // 设置指针颜色
-        //   .height(20) // 设置指针高度
-        //   .margin({ bottom: '140lpx' }); // 设置指针底部边距
-
-        // 创建开始按钮
-        // Button('开始')
-        //   .fontColor("#c53a2c") // 设置按钮字体颜色
-        //   .borderWidth(10) // 设置按钮边框宽度
-        //   .borderColor("#dd2218") // 设置按钮边框颜色
-        //   .backgroundColor("#fde427") // 设置按钮背景颜色
-        //   .width('200lpx') // 设置按钮宽度
-        //   .height('200lpx') // 设置按钮高度
-        //   .borderRadius('50%') // 设置按钮为圆形
-        //   .clickEffect({ level: ClickEffectLevel.LIGHT }) // 设置点击效果
-        Image($r('[basic].media.zhizheng'))
-          .width('70lpx') // 设置按钮宽度
-          .height('70lpx') // 设置按钮高度
-          .objectFit(ImageFit.Contain)
-          .clickEffect({ level: ClickEffectLevel.LIGHT }) // 设置点击效果
-          .onClick(() => { // 点击按钮时的回调函数
-            if (this.isAnimating) { // 如果正在动画中,返回
-              return;
-            }
-            if(this.selected.length==this.cells.length){
-              return
-            }
-            //如果都已经被选了,则不能再转了
-            this.calculateNoSelectedAngles()
-            this.selectedName = ""; // 清空选中的名称
-            this.isAnimating = true; // 设置动画状态为正在动画
-            animateTo({ // 开始动画
-              duration: this.spinDuration, // 动画持续时间为5000毫秒
-              curve: Curve.EaseInOut, // 动画曲线为缓入缓出
-              onFinish: () => { // 动画完成后的回调
-                this.currentAngle %= 360; // 保持当前角度在0到360之间
-                for (const cell of this.cells) { // 遍历每个单元格
-                  // 检查当前角度是否在单元格的角度范围内
-                  if (360 - this.currentAngle >= cell.angleStart && 360 - this.currentAngle <= cell.angleEnd) {
-                    this.selected.push(cell)
-                    //这里需要下次点击的时候
-                    cell.color='#202020'
-                    this.selectedName = cell.title; // 设置选中的名称为当前单元格的标题
-                    break; // 找到后退出循环
+          Stack() {
+            // 遍历每个单元格并绘制扇形
+            ForEach(this.cells, (cell: Cell) => {
+              Stack() {
+                Sector({ radius: lpx2px(this.wheelWidth) / 2, angle: cell.angle, color: cell.color }); // 创建扇形
+                Text(cell.title).fontColor(Color.White).margin({ bottom: `${this.wheelWidth / 1.4}lpx` }); // 显示单元格标题
+              }.width('100%').height('100%').rotate({ angle: cell.rotate }); // 设置宽度和高度,并旋转
+            });
+          }
+          .borderRadius('50%') // 设置圆角
+          .backgroundColor(Color.Gray) // 设置背景颜色
+          .width(`${this.wheelWidth}lpx`) // 设置转盘宽度
+          .height(`${this.wheelWidth}lpx`) // 设置转盘高度
+          .rotate({ angle: this.currentAngle }); // 旋转转盘
+
+          // 创建指针
+          // Image({ width: 20, height: 10 })
+          //   .points([[0, 0], [10, -20], [20, 0]]) // 设置指针的点
+          //   .fill("#d72b0b") // 设置指针颜色
+          //   .height(20) // 设置指针高度
+          //   .margin({ bottom: '140lpx' }); // 设置指针底部边距
+
+          // 创建开始按钮
+          // Button('开始')
+          //   .fontColor("#c53a2c") // 设置按钮字体颜色
+          //   .borderWidth(10) // 设置按钮边框宽度
+          //   .borderColor("#dd2218") // 设置按钮边框颜色
+          //   .backgroundColor("#fde427") // 设置按钮背景颜色
+          //   .width('200lpx') // 设置按钮宽度
+          //   .height('200lpx') // 设置按钮高度
+          //   .borderRadius('50%') // 设置按钮为圆形
+          //   .clickEffect({ level: ClickEffectLevel.LIGHT }) // 设置点击效果
+          Image($r('[basic].media.zhizheng'))
+            .width('70lpx') // 设置按钮宽度
+            .height('70lpx') // 设置按钮高度
+            .objectFit(ImageFit.Contain)
+            .clickEffect({ level: ClickEffectLevel.LIGHT }) // 设置点击效果
+            .onClick(() => { // 点击按钮时的回调函数
+              if (this.isAnimating) { // 如果正在动画中,返回
+                return;
+              }
+              if(this.selected.length==this.cells.length){
+                return
+              }
+              //如果都已经被选了,则不能再转了
+              this.calculateNoSelectedAngles()
+              this.selectedName = ""; // 清空选中的名称
+              this.isAnimating = true; // 设置动画状态为正在动画
+              animateTo({ // 开始动画
+                duration: this.spinDuration, // 动画持续时间为5000毫秒
+                curve: Curve.EaseInOut, // 动画曲线为缓入缓出
+                onFinish: () => { // 动画完成后的回调
+                  this.currentAngle %= 360; // 保持当前角度在0到360之间
+                  for (const cell of this.cells) { // 遍历每个单元格
+                    // 检查当前角度是否在单元格的角度范围内
+                    if (360 - this.currentAngle >= cell.angleStart && 360 - this.currentAngle <= cell.angleEnd) {
+                      this.selected.push(cell)
+                      //这里需要下次点击的时候
+                      cell.color='#202020'
+                      this.selectedName = cell.title; // 设置选中的名称为当前单元格的标题
+                      break; // 找到后退出循环
+                    }
                   }
-                }
-                this.isAnimating = false; // 设置动画状态为未动画
-              },
-            }, () => { // 动画进行中的回调
-              //在这里判断
-              // this.randomAngle=Math.floor(Math.random()*360)
-              // this.currentAngle += (360 * this.spinDuration/1000 + Math.floor(Math.random() * 360)); // 更新当前角度,增加随机旋转
-              //在这里算已经选过的,不能在指了
-
-              // this.currentAngle += (360 * this.spinDuration/1000 + Math.floor(Math.random() * 360)); // 更新当前角度,增加随机旋转
-
-              // promptAction.showToast({
-              //   message:this.randomAngle.toString()
-              // })
-              this.currentAngle += (360 * this.spinDuration/1000)+this.randomAngle
+                  this.isAnimating = false; // 设置动画状态为未动画
+                },
+              }, () => { // 动画进行中的回调
+                //在这里判断
+                // this.randomAngle=Math.floor(Math.random()*360)
+                // this.currentAngle += (360 * this.spinDuration/1000 + Math.floor(Math.random() * 360)); // 更新当前角度,增加随机旋转
+                //在这里算已经选过的,不能在指了
+
+                // this.currentAngle += (360 * this.spinDuration/1000 + Math.floor(Math.random() * 360)); // 更新当前角度,增加随机旋转
+
+                // promptAction.showToast({
+                //   message:this.randomAngle.toString()
+                // })
+                this.currentAngle += (360 * this.spinDuration/1000)+this.randomAngle
 
 
 
+              });
             });
-          });
-      }
-      .width(`${this.wheelWidth+26}lpx`)
-      .height(`${this.wheelWidth+26}lpx`)
-      .backgroundImage($r('[basic].media.xuanzhuankuang'))
-      .backgroundImageSize({width:'100%',height:'100%'})
-      .backgroundImagePosition(Alignment.Center)
-
-      // 创建滚动区域
-      Scroll() {
-        Column() {
-          // 遍历每个单元格,创建输入框和计数器
-          ForEach(this.cells, (item: Cell, index: number) => {
-            Row() {
-              // 创建文本输入框,显示单元格标题
-              TextInput({ text: item.title })
-                .layoutWeight(1) // 设置输入框占据剩余空间
-                .onChange((value) => { // 输入框内容变化时的回调
-                  item.title = value; // 更新单元格标题
-                });
-              // 创建计数器组件
-              CounterComponent({
-                options: {
-                  type: CounterType.COMPACT, // 设置计数器类型为紧凑型
-                  numberOptions: {
-                    label: `当前占比`, // 设置计数器标签
-                    value: item.proportion, // 设置计数器初始
-                    min: 1, // 设置最小
-                    max: 100, // 设置最大值
-                    step: 1, // 设置步长
-                    onChange: (value: number) => { // 计数器值变化时的回调
-                      item.proportion = value; // 更新单元格的比例
-                      this.calculateAngles(); // 重新计算角度
+        }
+        .width(`${this.wheelWidth+26}lpx`)
+        .height(`${this.wheelWidth+26}lpx`)
+        .backgroundImage($r('[basic].media.xuanzhuankuang'))
+        .backgroundImageSize({width:'100%',height:'100%'})
+        .backgroundImagePosition(Alignment.Center)
+
+        // 创建滚动区域
+        Scroll() {
+          Column() {
+            // 遍历每个单元格,创建输入框和计数器
+            ForEach(this.cells, (item: Cell, index: number) => {
+              Row() {
+                // 创建文本输入框,显示单元格标题
+                TextInput({ text: item.title })
+                  .layoutWeight(1) // 设置输入框占据剩余空间
+                  .onChange((value) => { // 输入框内容变化时的回调
+                    item.title = value; // 更新单元格标题
+                  });
+                // 创建计数器组件
+                CounterComponent({
+                  options: {
+                    type: CounterType.COMPACT, // 设置计数器类型为紧凑型
+                    numberOptions: {
+                      label: `当前占比`, // 设置计数器标签
+                      value: item.proportion, // 设置计数器初始值
+                      min: 1, // 设置最小
+                      max: 100, // 设置最大
+                      step: 1, // 设置步长
+                      onChange: (value: number) => { // 计数器值变化时的回调
+                        item.proportion = value; // 更新单元格的比例
+                        this.calculateAngles(); // 重新计算角度
+                      }
                     }
                   }
-                }
-              });
-              // 创建删除按钮
-              Button('删除').onClick(() => {
-                this.cells.splice(index, 1); // 从单元格数组中删除当前单元格
-                this.calculateAngles(); // 重新计算角度
-              });
-            }.width('100%').justifyContent(FlexAlign.SpaceBetween) // 设置行的宽度和内容对齐方式
-            .padding({ left: 40, right: 40 }); // 设置左右内边距
-          });
-        }.layoutWeight(1); // 设置滚动区域占据剩余空间
-      }.layoutWeight(1) // 设置滚动区域占据剩余空间
-      .margin({ top: 20, bottom: 20 }) // 设置上下外边距
-      .align(Alignment.Top); // 设置对齐方式为顶部对齐
-
-      Row(){
-        ForEach([2,3,4,5,6],(item:number,index)=>{
-          Text((item).toString()).width(20).fontColor(Color.Red).onClick(()=>{
-            //如果当前内容
-            // if(this.cells.length>(item+1)){
-            //
-            //
-            // }
-            this.cells=[]
-            for(let i=0;i<item;i++){
-              this.cells.push(new Cell(i+1,1, "转盘"+(i+1), this.colorPalette[i]));
+                });
+                // 创建删除按钮
+                Button('删除').onClick(() => {
+                  this.cells.splice(index, 1); // 从单元格数组中删除当前单元格
+                  this.calculateAngles(); // 重新计算角度
+                });
+              }.width('100%').justifyContent(FlexAlign.SpaceBetween) // 设置行的宽度和内容对齐方式
+              .padding({ left: 40, right: 40 }); // 设置左右内边距
+            });
+          }.layoutWeight(1); // 设置滚动区域占据剩余空间
+        }.layoutWeight(1) // 设置滚动区域占据剩余空间
+        .margin({ top: 20, bottom: 20 }) // 设置上下外边距
+        .align(Alignment.Top); // 设置对齐方式为顶部对齐
+
+        Row(){
+          ForEach([2,3,4,5,6],(item:number,index)=>{
+            Text((item).toString()).width(20).fontColor(Color.Red).onClick(()=>{
+              //如果当前内容
+              // if(this.cells.length>(item+1)){
+              //
+              //
+              // }
+              this.cells=[]
+              for(let i=0;i<item;i++){
+                this.cells.push(new Cell(i+1,1, "转盘"+(i+1), this.colorPalette[i]));
+              }
+              this.calculateAngles(); // 重新计算角度
+
+
+            })
+          })
+        }
+
+        Text('旋转秒数').fontColor(Color.Black)
+        CounterComponent({
+          options: {
+            type: CounterType.COMPACT, // 设置计数器类型为紧凑型
+            numberOptions: {
+              value: this.spinDuration/1000, // 设置计数器初始值 5
+              min: 1, // 设置最小值
+              max: 100, // 设置最大值
+              step: 1, // 设置步长
+              onChange: (value: number) => { // 计数器值变化时的回调
+                this.spinDuration = value*1000;
+                // this.calculateAngles(); // 重新计算角度
+              }
             }
-            this.calculateAngles(); // 重新计算角度
+          }
+        }).backgroundColor(Color.White)
 
 
-          })
-        })
-      }
-
-      Text('旋转秒数').fontColor(Color.Black)
-      CounterComponent({
-        options: {
-          type: CounterType.COMPACT, // 设置计数器类型为紧凑型
-          numberOptions: {
-            value: this.spinDuration/1000, // 设置计数器初始值 5
-            min: 1, // 设置最小值
-            max: 100, // 设置最大值
-            step: 1, // 设置步长
-            onChange: (value: number) => { // 计数器值变化时的回调
-              this.spinDuration = value*1000;
-              // this.calculateAngles(); // 重新计算角度
-            }
+        Row(){
+          Column(){
+            //是否允许结果重复
+            Button('是否允许结果重复').onClick(()=>{
+              this.isRepeat=!this.isRepeat
+            })
+            Text(this.isRepeat+"")
           }
-        }
-      }).backgroundColor(Color.White)
 
+          Column(){
+            Button('xxx').onClick(()=>{
+              //
+              // router.pushUrl({
+              //   url:"/pages/Test2ge".slice(1)
+              // })
+            })
 
-      Row(){
-        Column(){
-          //是否允许结果重复
-          Button('是否允许结果重复').onClick(()=>{
-            this.isRepeat=!this.isRepeat
-          })
-          Text(this.isRepeat+"")
+            Button('xxxxx').onClick(()=>{
+              // router.pushUrl({
+              //   url:"/pages/Index".slice(1)
+              // })
+            })
+          }
         }
 
-        Column(){
-          Button('xxx').onClick(()=>{
-            //
-            // router.pushUrl({
-            //   url:"/pages/Test2ge".slice(1)
-            // })
-          })
 
-          Button('xxxxx').onClick(()=>{
-            // router.pushUrl({
-            //   url:"/pages/Index".slice(1)
-            // })
-          })
-        }
-      }
+
+
+
+        // 创建添加新内容按钮
+        Button('添加新内容').onClick(() => {
+          // 向单元格数组中添加新单元格
+          // this.cells.push(new Cell(1, "新内容", this.colorPalette[this.colorIndex++ % this.colorPalette.length]));
+          this.calculateAngles(); // 重新计算角度
+        }).margin({ top: 20, bottom: 20 }); // 设置按钮的上下外边距
 
 
 
 
 
-      // 创建添加新内容按钮
-      Button('添加新内容').onClick(() => {
-        // 向单元格数组中添加新单元格
-        // this.cells.push(new Cell(1, "新内容", this.colorPalette[this.colorIndex++ % this.colorPalette.length]));
-        this.calculateAngles(); // 重新计算角度
-      }).margin({ top: 20, bottom: 20 }); // 设置按钮的上下外边距
+      }.width('100%').padding({ bottom: this.safeBottom })
+      .justifyContent(FlexAlign.Center).onClick(()=>{
+        this.isShow=false
+      })
+      Column(){
 
+        Row(){
+          Row({space:10}){
+            Image($r('[basic].media.qiehuan')).width(24)
+            Text('允许结果重复').fontWeight(700)
+          }
+          Row(){
+            Toggle({ type: ToggleType.Switch})
+              .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(()=>{
+
+              })
+
+          }
 
+        }.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('[basic].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(() => {
+              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]
+        ]
+      })
+    }
 
-    }.padding({ bottom: this.safeBottom })
-    .justifyContent(FlexAlign.Center)
   }
 }

+ 43 - 7
features/feature/src/main/ets/view/EatWhatView.ets

@@ -1,4 +1,5 @@
-import { YTAvoid, YTHeader } from 'basic'
+import { ReqString, YTAvoid, YTHeader, YTUserRequest } from 'basic'
+import { promptAction } from '@kit.ArkUI'
 
 @Builder
 function EatWhatViewBuilder(){
@@ -12,17 +13,42 @@ function EatWhatViewBuilder(){
 struct EatWhatView{
   @StorageProp(YTAvoid.SAFE_TOP_KEY) safeBottom: number = 0
 
+  // @State
+  // eat:ResourceStr[
+  eat: ImageFrameInfo[] = Array.from<string>({ length: 5 }).map<ImageFrameInfo>((v: string, index: number) => {
+    return {
+      src: $r(`app.media.${index+103}`),
+    }
+  })
   @State
-  eat:string[]=['1111','2222','3333','33333','4444','55555','66666','77777','88888']
+  eatResult:string=""
+
+
   @State
-  eatEat:string=""
+  eatEat:ResourceStr=""
   @State
   isrun:boolean=false
 
+  interId:number=0
 
+  //图片随机
   eatRandom(){
     return  this.eat[Math.floor(Math.random()*this.eat.length)]
   }
+  //最终接口数据
+  getEatResult(){
+    YTUserRequest.getEatResult((res)=>{
+      const a=res as ReqString
+      promptAction.showToast({
+        message:a['foodName'].toString()
+      })
+      this.eatResult=a['foodName']
+
+    })
+
+  }
+
+
   build() {
     Column() {
       YTHeader({ title: '吃什么' })
@@ -36,8 +62,14 @@ struct EatWhatView{
       Column() {
 
           Column(){
-            Text(this.eatEat).fontSize(20)
-          }.width(80)
+            if(this.isrun) {
+              Image(this.eatEat).width(30)
+            }else{
+              Text(this.eatResult)
+            }
+
+            // Text(this.eatEat).fontSize(20)
+          }.width(this.isrun?80:110)
           .height(70)
           .justifyContent(FlexAlign.Center)
           .backgroundImage($r('[basic].media.number'))
@@ -59,11 +91,15 @@ struct EatWhatView{
 
           setTimeout(()=>{
             this.isrun=false
+            this.eatResult=""
+            clearInterval(this.interId)
+            this.getEatResult()
+
           },3000)
 
           if(this.isrun) {
-            setInterval(() => {
-              this.eatEat = this.eatRandom()
+           this.interId= setInterval(() => {
+              this.eatEat = this.eatRandom().src as ResourceStr
             }, 100)
           }
 

+ 182 - 283
features/feature/src/main/ets/view/RollDiceView.ets

@@ -1,5 +1,6 @@
-import { YTAvoid, YTHeader } from 'basic'
+import { ReqString, YTAvoid, YTHeader, YTUserRequest } from 'basic'
 import { promptAction, PromptAction } from '@kit.ArkUI'
+import { it } from '@ohos/hypium'
 
 @Builder
 function RollDiceViewBuilder(){
@@ -12,7 +13,17 @@ function RollDiceViewBuilder(){
 @Component
 struct RollDiceView {
   @StorageProp(YTAvoid.SAFE_TOP_KEY) safeBottom: number = 0
-  images: ImageFrameInfo[] = Array.from<string>({ length: 6 }).map<ImageFrameInfo>((v: string, index: number) => {
+  //遮罩层的动画图片数组
+  cupImages: ImageFrameInfo[] =Array.from<string>({length:58}).map<ImageFrameInfo>((v:string,index:number)=>{
+    return {
+      src: $r(`app.media.beizi_${index}`),
+    }
+  })
+
+  @State state:AnimationStatus = AnimationStatus.Initial
+
+
+  images: ImageFrameInfo[] = Array.from<string>({ length: 5 }).map<ImageFrameInfo>((v: string, index: number) => {
     return {
       src: $r(`[basic].media.shai_${index+1}`),
     }
@@ -27,12 +38,37 @@ struct RollDiceView {
   @State
   number:number=1
 
+  //当前筛子的选中数量
+  @State
+  currSelectNumber:number=0
+
   randomNumber():number{
-   return Math.floor(Math.random()*6)
+   return Math.floor(Math.random()*5)
   }
   //筛子结果
   @State
-  RollDiceList:number[]=[]
+  RollDiceList:number[]=[0]
+
+  //获取筛子
+  getDiceResult(number:number){
+
+      YTUserRequest.getRollDiceResult(number,(res,err)=>{
+        // promptAction.showToast({
+        //   message:JSON.stringify(res)
+        // })
+        const a=res as ReqString
+        promptAction.showToast({
+          message:a['diceResults'].toString()
+        })
+        this.RollDiceList=a['diceResults'].split(',').map(item=>{
+          return Number(item)-1
+        })
+
+      })
+
+
+
+  }
 
   build() {
     Column() {
@@ -40,287 +76,157 @@ struct RollDiceView {
 
       Column(){
 
-        // Column(){
-        //   Video({
-        //     src:$rawfile('[basic].beizi.mp4'),
-        //     controller:this.controller
-        //   })
-        //     .width(300)
-        //     .height(600)
-        //     .objectFit(ImageFit.TOP_START)
-        //     .controls(false)
-        //
-        // }.width('100%')
-        // .height(500)
-        // //
-        // //
-        // //
-        // //
-        // //
-        // //
-        // Row(){
-        //   Button('开始播放').onClick(()=>{
-        //     this.controller.start()
-        //   })
-        //   Button('停止播放').onClick(()=>{
-        //     this.controller.stop()
-        //   })
-        //   // Button('开始播放').onClick(()=>{
-        //   //   this.controller.start()
-        //   // })
-        //
-        //
-        // }.width('100%')
-        // .height('100%')
-
-        //随机选取图片
-       Button('xxx').onClick(()=>{
-         this.RollDiceList=[]
-         this.number=(Math.floor(Math.random()*6)+1)
-
-         for(let i=0;i<this.number;i++){
-          this.RollDiceList.push(this.randomNumber())
-         }
-
-
-         promptAction.showToast({
-           message:this.number.toString()+"----"+JSON.stringify(this.RollDiceList)
-         })
-       })
-        Column() {
-          if (this.number==1) {
-            Column() {
-              Image($r(`[basic].media.shai_${this.RollDiceList[0]+1}`)).width(200).height(200)
-            }
-          }else if (this.number==2){
-            Column(){
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[0]+1}`)).width(100).height(100)
-              }.width('100%')
-              .justifyContent(FlexAlign.Start)
-
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[1]+1}`)).width(100).height(100)
-              }.width('100%')
-              .justifyContent(FlexAlign.End)
-            }
-          }else if(this.number==3){
-            Column(){
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[0]+1}`)).width(100).height(100)
-              }.width('100%')
-              .justifyContent(FlexAlign.Center)
-
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[1]+1}`)).width(100).height(100)
-                Image($r(`[basic].media.shai_${this.RollDiceList[2]+1}`)).width(100).height(100)
-              }.width('100%')
-              .justifyContent(FlexAlign.End)
-            }
-          }else if(this.number==4){
-            Column(){
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[0]+1}`)).width(100).height(100)
-                Image($r(`[basic].media.shai_${this.RollDiceList[1]+1}`)).width(100).height(100)
-              }.width('100%')
-              .justifyContent(FlexAlign.Center)
-
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[2]+1}`)).width(100).height(100)
-                Image($r(`[basic].media.shai_${this.RollDiceList[3]+1}`)).width(100).height(100)
-              }.width('100%')
-              .justifyContent(FlexAlign.End)
+        Stack() {
+
+
+          Column() {
+            if (this.currSelectNumber+1 == 1) {
+              Column() {
+                Image($r(`[basic].media.shai_${this.RollDiceList[0] + 1}`)).width(150)
+              }
+            } else if (this.currSelectNumber+1  == 2) {
+              Column() {
+                Row() {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[0] + 1}`)).width(100)
+                }.width('100%')
+                .justifyContent(FlexAlign.Start)
+
+                Row() {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[1] + 1}`)).width(100)
+                }.width('100%')
+                .justifyContent(FlexAlign.End)
+              }
+            } else if (this.currSelectNumber+1  == 3) {
+              Column() {
+                Row() {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[0] + 1}`)).width(100)
+                }.width('100%')
+                .justifyContent(FlexAlign.Center)
+
+                Row({space:10}) {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[1] + 1}`)).width(100)
+                  Image($r(`[basic].media.shai_${this.RollDiceList[2] + 1}`)).width(100)
+                }.width('100%')
+                .justifyContent(FlexAlign.Center)
+              }
+            } else if (this.currSelectNumber+1  == 4) {
+              Column() {
+                Row({space:10}) {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[0] + 1}`)).width(60)
+                  Image($r(`[basic].media.shai_${this.RollDiceList[1] + 1}`)).width(60)
+                }.width('100%')
+                .justifyContent(FlexAlign.Center)
+
+                Row({space:10}) {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[2] + 1}`)).width(60)
+                  Image($r(`[basic].media.shai_${this.RollDiceList[3] + 1}`)).width(60)
+                }.width('100%')
+                .justifyContent(FlexAlign.Center)
+              }
+            } else if (this.currSelectNumber+1  == 5) {
+              Column() {
+                Row({space:30}) {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[0] + 1}`)).width(60)
+                  Image($r(`[basic].media.shai_${this.RollDiceList[1] + 1}`)).width(60)
+                }.width('100%')
+                .justifyContent(FlexAlign.Center)
+
+                Row({space:10}) {
+                  Image($r(`[basic].media.shai_${this.RollDiceList[2] + 1}`)).width(60)
+                  Image($r(`[basic].media.shai_${this.RollDiceList[3] + 1}`)).width(60)
+                  Image($r(`[basic].media.shai_${this.RollDiceList[4] + 1}`)).width(60)
+                }.width('100%')
+                .justifyContent(FlexAlign.Center)
+              }
             }
-          }else if(this.number==5){
-            Column(){
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[0]+1}`)).width(60).height(60)
-                Image($r(`[basic].media.shai_${this.RollDiceList[1]+1}`)).width(60).height(60)
-              }.width('100%')
-              .justifyContent(FlexAlign.Center)
-
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[2]+1}`)).width(60).height(60)
-                Image($r(`[basic].media.shai_${this.RollDiceList[3]+1}`)).width(60).height(60)
-                Image($r(`[basic].media.shai_${this.RollDiceList[4]+1}`)).width(60).height(60)
-              }.width('100%')
-              .justifyContent(FlexAlign.End)
-            }
-          }else if(this.number==6){
-            Column(){
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[0]+1}`)).width(60).height(60)
-                Image($r(`[basic].media.shai_${this.RollDiceList[1]+1}`)).width(60).height(60)
-                Image($r(`[basic].media.shai_${this.RollDiceList[2]+1}`)).width(60).height(60)
-
-              }.width('100%')
-              .justifyContent(FlexAlign.Center)
-
-              Row(){
-                Image($r(`[basic].media.shai_${this.RollDiceList[3]+1}`)).width(60).height(60)
-                Image($r(`[basic].media.shai_${this.RollDiceList[4]+1}`)).width(60).height(60)
-                Image($r(`[basic].media.shai_${this.RollDiceList[5]+1}`)).width(60).height(60)
-              }.width('100%')
-              .justifyContent(FlexAlign.End)
-            }
-          }
-        }.width('100%')
-        .height(300)
-
-
-
-
-
-
-        // Column() {
-        // //   if (this.currentIndex == 0) {
-        // //     Image($r('[basic].media.one_1'))
-        // //   } else if (this.currentIndex == 1) {
-        // //     Image($r('[basic].media.one_2'))
-        // //   } else if (this.currentIndex == 2) {
-        // //     Image($r('[basic].media.one_3'))
-        // //   } else if (this.currentIndex == 3) {
-        // //     Image($r('[basic].media.one_4'))
-        // //   } else if (this.currentIndex == 4) {
-        // //     Image($r('[basic].media.one_5'))
-        // //   } else if (this.currentIndex == 5) {
-        // //     Image($r('[basic].media.one_6'))
-        // //   }
-        // // }.width(100)
-        // // .height(100)
-        //
-        //   if (this.currentIndex == 0) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //
-        //   } else if (this.currentIndex == 1) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_3')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   } else if (this.currentIndex == 2) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_4')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   } else if (this.currentIndex == 3) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_5')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   } else if (this.currentIndex == 4) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_6')).width(50)
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   } else if (this.currentIndex == 5) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_6')).width(50)
-        //       Image($r('[basic].media.one_1')).width(50)
-        //     }
-        //   }
-        //   else if (this.currentIndex == 6) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_3')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   }
-        //   else if (this.currentIndex == 7) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_4')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   }
-        //   else if (this.currentIndex == 8) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_5')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   }
-        //   else if (this.currentIndex == 9) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_1')).width(50)
-        //       Image($r('[basic].media.one_6')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   }
-        //   else if (this.currentIndex == 10) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_3')).width(50)
-        //       Image($r('[basic].media.one_3')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   }
-        //   else if (this.currentIndex == 11) {
-        //     Row({space:10}){
-        //       Image($r('[basic].media.one_3')).width(50)
-        //       Image($r('[basic].media.one_4')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //       Image($r('[basic].media.one_2')).width(50)
-        //     }
-        //   }
-        // }.width('100%')
-        // .height(100)
-
+            // else if (this.currSelectNumber+1  == 6) {
+            //   Column() {
+            //     Row() {
+            //       Image($r(`[basic].media.shai_${this.RollDiceList[0] + 1}`)).width(60).height(60)
+            //       Image($r(`[basic].media.shai_${this.RollDiceList[1] + 1}`)).width(60).height(60)
+            //       Image($r(`[basic].media.shai_${this.RollDiceList[2] + 1}`)).width(60).height(60)
+            //
+            //     }.width('100%')
+            //     .justifyContent(FlexAlign.Center)
+            //
+            //     Row() {
+            //       Image($r(`[basic].media.shai_${this.RollDiceList[3] + 1}`)).width(60).height(60)
+            //       Image($r(`[basic].media.shai_${this.RollDiceList[4] + 1}`)).width(60).height(60)
+            //       Image($r(`[basic].media.shai_${this.RollDiceList[5] + 1}`)).width(60).height(60)
+            //     }.width('100%')
+            //     .justifyContent(FlexAlign.End)
+            //   }
+            // }
+          }.width(200)
+          .height(400)
+          .margin({bottom:100})
+          .justifyContent(FlexAlign.End)
+
+          ImageAnimator()
+            .width('110%')
+            .height(500)
+            .images(this.cupImages)// 动画数组
+            .duration(this.cupImages.length * 100)// 持续
+            .state(this.state)// 动画状态
+            .iterations(-1) // 播放次数
 
 
+        }.width('100%')
+        .height(500)
 
 
       }.width('100%')
       .height(500)
       .justifyContent(FlexAlign.Center)
+      //随机选取图片
+      Button('掷筛子').fontColor(Color.White)
+        .backgroundColor('#fd54e3').width('70%')
+        .height(44).borderRadius(20)
+        .margin({top:40,bottom:30})
+        .onClick(()=>{
+
+
+        this.state=AnimationStatus.Running
+        this.RollDiceList=[]
+       // const timeCupId=setTimeout(()=>{
+       //    this.number=(Math.floor(Math.random()*6)+1)
+       //    for(let i=0;i<this.number;i++){
+       //      this.RollDiceList.push(this.randomNumber())
+       //    }
+       //  },3000)
+
+          const timeCupId=setTimeout(()=>{
+            this.getDiceResult(this.number)
+           },3000)
+
+
+        const timeId=setTimeout(()=>{
+          this.state=AnimationStatus.Stopped
+
+        },this.cupImages.length * 100)
+      })
+      Row({space:15}) {
+        ForEach([0, 1, 2, 3, 4],(item:number,index:number)=>{
+          Text((item+1).toString())
+            .width(50)
+            .height(50)
+            .textAlign(TextAlign.Center)
+            .border({width:1,color:'#000000'})
+            .borderRadius('50%')
+            .backgroundColor(this.currSelectNumber==index?'#bff2ff':'#f2f2f2').onClick(()=>{
+            this.currSelectNumber=index
+            this.number=item+1
+            this.RollDiceList=[]
+            for (let idx = 0; idx < item+1; idx++) {
+              this.RollDiceList.push(idx)
+            }
+
+
+          })
+        })
+
+      }
 
-      // ImageAnimator()
-      //   .animatorFancy() // 抽取公共属性
-      //   .images(this.images) // 动画数组
-      //   .duration(this.images.length * 100)// 持续
-      //   .state(this.state)// 动画状态
-      //   .iterations(-1) // 播放次数
-      // //
-      // // Button('x').onClick(()=>{
-      // //   this.currentIndex=Math.floor(Math.random()*6) as number
-      // // })
-      // Button('xx').onClick(()=>{
-      //   this.currentIndex=Math.floor(Math.random()*12) as number
-      // })
-      //
-      // // 按钮控制区域
-      // Row({ space: 20 }) {
-      //   Button('启动').onClick(() => {
-      //     this.state = AnimationStatus.Running
-      //   })
-      //   Button('暂停').onClick(() => {
-      //     this.state = AnimationStatus.Paused
-      //   })
-      //   Button('停止').onClick(() => {
-      //     this.state = AnimationStatus.Stopped
-      //   })
-      // }
 
 
 
@@ -330,11 +236,4 @@ struct RollDiceView {
     .backgroundColor(Color.White)
   }
 
-  @Styles
-  animatorFancy() {
-    .width(300)
-    .aspectRatio(2)
-    .padding(10)
-    .borderRadius(10)
-  }
 }

+ 62 - 5
features/feature/src/main/ets/view/TossCoinView.ets

@@ -1,4 +1,5 @@
-import { YTAvoid, YTHeader } from 'basic'
+import { ReqString, YTAvoid, YTHeader, YTUserRequest } from 'basic'
+import { promptAction } from '@kit.ArkUI'
 
 @Builder
 function TossCoinViewBuilder(){
@@ -18,10 +19,34 @@ struct TossCoinView{
   @State verticalOffset: number = 0 // 纵向位移
   @State isAnimRun: boolean = false // 动画是否正在执行
 
+  number1:number[]=[22,26,30,34]
+  number2:number[]=[24,28,32,36]
+
+
+  getResult() {
+
+      YTUserRequest.getTossCoinResult((res)=>{
+        const a=res as ReqString
+        const b=a['result'] as string
+        promptAction.showToast({
+          message:b
+        })
+        if(b=='正面'){
+          this.rotationAngle=0
+        }else{
+          this.rotationAngle=180
+        }
+
+      })
+  }
+
 
   // 判断当前是否显示正面
   isHeadsFaceUp() {
     let normalizedAngle = this.rotationAngle % 360; // 规范化角度
+    // promptAction.showToast({
+    //   message:normalizedAngle.toString()
+    // })
     // 判断角度范围,确定是否显示正面
     if (normalizedAngle >= 0 && normalizedAngle < 90 || normalizedAngle >= 270 && normalizedAngle <= 360) {
       return true; // 显示正面
@@ -38,6 +63,7 @@ struct TossCoinView{
     let maxAnimationSteps = 2 * (10 + Math.floor(Math.random() * 10)); // 计算最大动画次数
     let totalAnimationDuration = 1500; // 动画总时长 2000
 
+
     // 第一次动画,向上抛出
     animateToImmediately({
       duration: totalAnimationDuration / 2, // 动画时长为总时长的一半
@@ -182,10 +208,6 @@ struct TossCoinView{
           angle: this.rotationAngle
         })
         .translate({ x: 0, y: this.verticalOffset }) // 设置纵向位移
-        .onClick(() => { // 点击事件处理
-          this.runAnimation()
-
-        });
       }.width('100%').height(500).justifyContent(FlexAlign.Center).margin({bottom:100}) // 设置组件的宽度、权重、对齐方式和底部内边距
 
       Button('抛硬币').fontColor(Color.White)
@@ -193,8 +215,43 @@ struct TossCoinView{
         .height(44).borderRadius(20)
         .onClick(()=>{
           this.runAnimation()
+          setTimeout(()=>{
+            this.getResult()
+          },1000)
+
         })
 
+      //
+      // Button('xxxx').onClick(()=>{
+      //   YTUserRequest.getTossCoinResult((res)=>{
+      //     const a=res as ReqString
+      //     const b=a['result']
+      //     promptAction.showToast({
+      //       message:b.toString()
+      //     })
+      //   })
+      // })
+      // Button('xxxx').onClick(()=>{
+      //   YTUserRequest.getRollDiceResult(3,(res,err)=>{
+      //     // promptAction.showToast({
+      //     //   message:JSON.stringify(res)
+      //     // })
+      //     const a=res as ReqString
+      //     promptAction.showToast({
+      //       message:a['diceResults'].toString()
+      //     })
+      //   })
+      // })
+
+      // Button('xxx').onClick(()=>{
+      //   YTUserRequest.getNumberResult(3,10,1,(res)=>{
+      //     const a=res as ReqString
+      //     promptAction.showToast({
+      //       message:JSON.stringify(a)
+      //     })
+      //   })
+      // })
+
 
     }.padding({ bottom: this.safeBottom })
     .height('100%')

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 640 - 72
features/user/src/main/ets/pages/SettingPage.ets

@@ -1,6 +1,7 @@
 import {
   BasicType,
   IBestToast,
+  ReqString,
   reviseImgHeaderBuilder,
   takePicture,
   Upload,
@@ -10,10 +11,14 @@ import {
   YTButton,
   YTHeader,
   YTLog,
+  YTRequest,
   yTRouter,
   yTToast,
-  YTUserRequest
+  YTUserRequest,
+
 } from 'basic'
+import { LoginInput } from '../components/LoginInput'
+import { CodeInputType} from '../models'
 
 @Builder
 function settingBuilder() {
@@ -25,11 +30,25 @@ function settingBuilder() {
 
 @Component
 struct SettingPage {
+  @StorageProp(YTAvoid.SAFE_TOP_KEY) safeTop: number = 0
   @StorageProp(YTAvoid.SAFE_BOTTOM_KEY) safeBottom: number = 0
   @StorageProp(UserInfo.KEY) userInfo: UserInfo = userInfo
   @State showReviseName: boolean = false
   @State showHeaderImgRevise: boolean = false
   @State value: string = ''
+
+  @State phoneNumber: string = ''
+  @State captcha: string = ''
+  @State password: string = ''
+  @State confirmPassword: string = ''
+  @State time: number = 61
+  private declare sa: number
+  needCode: boolean = true
+  @Prop isAgree:boolean = false
+  @Prop isPassword: boolean = false
+  //方便区分各个操作的uuid
+  // @Prop userOperation: UserOperation = UserOperation.RESET_PASSWORD
+
   reviseBuilderArr: Array<BasicType<undefined>> = [
     {
       text: '头像修改',
@@ -43,6 +62,14 @@ struct SettingPage {
       click: () => {
         this.showReviseName = true
       }
+    },
+    {
+      text:"密码设置",
+      click:()=>{
+        //跳转到密码设置界面
+        this.isShowPassWordReSet=true
+
+      }
     }
   ]
   options: BasicType<undefined>[] = [
@@ -74,60 +101,340 @@ struct SettingPage {
       }
     },
   ]
+  inputPhoneNumberType: CodeInputType = {
+    txt: '+86',
+    placeHolder: '请输入手机号码'
+  }
+  inputCaptchaType: CodeInputType = {
+    txt: '验证码',
+    placeHolder: '请输入验证码'
+  }
+  inputPasswordType: CodeInputType = {
+    txt: '密码',
+    placeHolder: '设置密码'
+  }
+  //确认
+  inputConfirmPasswordType: CodeInputType = {
+    txt: '确认密码',
+    placeHolder: '再次确认密码'
+  }
+
+  private ReSetPassWordList:CodeInputType[]=[
+    this.inputPhoneNumberType,this.inputCaptchaType,this.inputPasswordType,this.inputConfirmPasswordType
+  ]
+
+  @State isShowPassWordReSet:boolean=false
 
   build() {
     Column() {
       YTHeader({ title: '用户设置' })
-      Column() {
-        ForEach(this.reviseBuilderArr, (item: BasicType<undefined>, index) => {
-          this.reviseBuilder(item)
-          if (index < this.reviseBuilderArr.length - 1) {
-            Column() {
+      if (!this.isShowPassWordReSet) {
+        Column() {
+          ForEach(this.reviseBuilderArr, (item: BasicType<undefined>, index) => {
+            this.reviseBuilder(item)
+            if (item.text == '头像修改') {
+              Column() {
+                Text('')
+                  .height(1)
+                  .width('100%')
+                  .backgroundColor('#0A000000')
+              }
+              .padding({ left: 12, right: 8 })
+              .bindSheet($$this.showHeaderImgRevise, this.changeBuilder, {
+                height: 204,
+                backgroundColor: Color.White,
+                showClose: false,
+                radius: { topLeft: 10, topRight: 10 }
+              })
+            }else{
               Text('')
                 .height(1)
                 .width('100%')
                 .backgroundColor('#0A000000')
             }
-            .padding({ left: 12, right: 8 })
-            .bindSheet($$this.showHeaderImgRevise, this.changeBuilder, {
-              height: 204,
-              backgroundColor: Color.White,
-              showClose: false
-            })
-          }
+          })
+          YTButton({
+            btContent: '退出登录',
+            btHeight: 48,
+            btPadding: {
+              top: 12,
+              bottom: 12
+            },
+            btBorderRadius: 40,
+            bgc: 'rgba(28, 28, 28, 1)',
+            click: () => {
+              this.userInfo.logout()
+              yTRouter.routerBack()
+              IBestToast.show({ message: '退出登录成功' })
+            }
+          })
+            .margin({ top: 324, bottom: 12 })
+          YTButton({
+            btContent: '注销用户',
+            btFontColor: 'rgba(28, 28, 28, 0.6)',
+            btHeight: 48,
+            btBorderRadius: 40,
+            btPadding: {
+              top: 12,
+              bottom: 12
+            },
+            bgc: Color.White,
+            click: () => {
+              yTToast.doubleConfirm({
+                message: '注销后数据无法恢复,是否注销?', click: () => {
+                  IBestToast.show({ message: '注销成功' })
+                  userInfo.logout()
+                  yTToast.hide()
+                  yTRouter.routerBack()
+                }
+              })
+            }
+          })
+        }
+        .bindSheet($$this.showReviseName, this.reviseNameBuilder, {
+          height: 275,
+          showClose: false,
+          backgroundColor: Color.White,
+          radius: { topLeft: 10, topRight: 10 }
         })
-        YTButton({
-          btContent: '退出登录', click: () => {
-            this.userInfo.logout()
-            yTRouter.routerBack()
-            IBestToast.show({ message: '退出登录成功' })
-          }
+        .padding({
+          top: 29,
+          left: 16,
+          right: 16,
         })
-          .margin({ top: 426, bottom: 12 })
-        YTButton({
-          btContent: '注销用户',
-          btFontColor: Color.Red,
-          bgc: Color.White,
-          click: () => {
-            yTToast.doubleConfirm({
-              text: '警告⚠', message: '确定要注销吗?\n注销后数据可能丢失无法恢复!', click: () => {
-                userInfo.logout()
-                yTToast.hide()
-                yTRouter.routerBack()
-              }
-            })
+      }else{
+        Column(){
+          Row({ space: 8 }) {
+            Text(this.inputPhoneNumberType.txt).width(75)
+            Blank()
+            TextInput({ placeholder: this.inputPhoneNumberType?.placeHolder, text: $$this.phoneNumber })
+              .layoutWeight(1)
+              .type(InputType.PhoneNumber)
+              .borderRadius(0)
+              .textAlign(TextAlign.Start)
+              .height(31)
+              .placeholderFont({ size: 16 })
+              .fontSize(16)
+              .fontWeight(500)
+              .fontColor('rgba(28, 28, 28, 1)')
+              .placeholderColor($r('[basic].color.main_na_color'))
+              .backgroundColor(Color.Transparent)
+              .padding(0)
+              .caretColor($r('[basic].color.main_ac_color_dark'))
+          }
+          .height(56)
+          .width('100%')
+          .padding({ left: 8,right:10})
+          Divider().strokeWidth(1).color('#1A1C1C1C').margin({bottom:12})
+
+
+          Row({ space: 8 }) {
+            Text(this.inputCaptchaType.txt).width(75)
+            Blank()
+            TextInput({ placeholder: this.inputCaptchaType?.placeHolder, text: $$this.captcha })
+              .layoutWeight(1)
+              .type(InputType.PhoneNumber)
+              .borderRadius(0)
+              .textAlign(TextAlign.Start)
+              .height(31)
+              .placeholderFont({ size: 16 })
+              .fontSize(16)
+              .fontWeight(500)
+              .fontColor('rgba(28, 28, 28, 1)')
+              .placeholderColor($r('[basic].color.main_na_color'))
+              .backgroundColor(Color.Transparent)
+              .padding(0)
+              .caretColor($r('[basic].color.main_ac_color_dark'))
+
+            if (this.needCode) {
+              Text(this.time == 61 ? '获取验证码' : this.time + '后重新发送')
+                .height(32)
+                .fontSize(12)
+                .borderRadius(8)
+                .padding({left:12,right:12,top:8,bottom:8})
+                .textAlign(TextAlign.Center)
+                .fontColor('rgba(255, 255, 255, 1)')
+                .backgroundColor('rgba(28, 28, 28, 1)')
+                .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) {
+                      this.time = 60
+                      this.sa = setInterval(() => {
+                        this.time--
+                        if (this.time < 1) {
+                          this.time = 61
+                          clearInterval(this.sa)
+                        }
+                      }, 1000)
+                      //重置密码
+                      // TODO  此处放置验证码获取逻辑
+                    YTUserRequest.getMyCaptcha(this.phoneNumber, (res) => {
+                      if (!res) {
+                        IBestToast.show({ message: '请勿重复发送验证码' })
+                        return
+                      }
+                      AppStorage.setOrCreate<string>('resetPassword'+'uuid', res)
+                    }, (err) => {
+                      // IBestToast.show({ message: err })
+                      clearInterval(this.sa)
+                      this.time = 61
+                    })
+
+
+                      // YTUserRequest.getCaptcha(this.phoneNumber, (res) => {
+                      //   if (!res) {
+                      //     IBestToast.show({ message: '请勿重复发送验证码' })
+                      //     return
+                      //   }
+                      //   AppStorage.setOrCreate<string>(this.userOperation +'uuid', res)
+                      // }, (err) => {
+                      //   // IBestToast.show({ message: err })
+                      //   clearInterval(this.sa)
+                      //   this.time = 61
+                      // })
+                  } else {
+                    if (!this.phoneNumber.match(rep)) {
+                      IBestToast.show({ message: '请输入正确的手机号' })
+                    }
+                  }
+
+                  // IBestToast.show({ message: '请同意用户协议后发送验证码' })
+                })
+                .enabled(this.time == 61)
+            }
+
+
+          }
+          .height(56)
+          .width('100%')
+          .padding({ left: 8,right:10})
+
+          Divider().strokeWidth(1).color('#1A1C1C1C').margin({bottom:12})
+
+
+          Row({ space: 8 }) {
+            Text(this.inputPasswordType.txt).width(75)
+            Blank()
+            TextInput({ placeholder: this.inputPasswordType?.placeHolder, text: $$this.password})
+              .layoutWeight(1)
+              .type(InputType.Password)
+              .borderRadius(0)
+              .textAlign(TextAlign.Start)
+              .height(31)
+              .placeholderFont({ size: 16 })
+              .fontSize(16)
+              .maxLength(20)
+              .fontWeight(500)
+              .fontColor('rgba(28, 28, 28, 1)')
+              .placeholderColor($r('[basic].color.main_na_color'))
+              .backgroundColor(Color.Transparent)
+              .padding(0)
+              .caretColor($r('[basic].color.main_ac_color_dark'))
+
+
+
+          }
+          .height(56)
+          .width('100%')
+          .padding({ left: 8,right:10})
+
+
+
+          Divider().strokeWidth(1).color('#1A1C1C1C').margin({bottom:12})
+          Text('密码必须包含8-20位数字或字母、特殊符号')
+            .fontSize(10)
+            .fontColor('#e1e1e1')
+            .height(24)
+            .textAlign(TextAlign.Center)
+
+          Row({ space: 8 }) {
+            Text(this.inputConfirmPasswordType.txt).width(75)
+            Blank()
+            TextInput({ placeholder: this.inputConfirmPasswordType?.placeHolder, text: $$this.confirmPassword })
+              .layoutWeight(1)
+              .type(InputType.Password)
+              .borderRadius(0)
+              .textAlign(TextAlign.Start)
+              .height(31)
+              .placeholderFont({ size: 16 })
+              .fontSize(16)
+              .fontWeight(500)
+              .fontColor('rgba(28, 28, 28, 1)')
+              .placeholderColor($r('[basic].color.main_na_color'))
+              .backgroundColor(Color.Transparent)
+              .padding(0)
+              .maxLength(20)
+              .caretColor($r('[basic].color.main_ac_color_dark'))
           }
+          .height(56)
+          .width('100%')
+          .padding({ left: 8,right:10})
+
+          Divider().strokeWidth(1).color('#1A1C1C1C').margin({bottom:12})
+
+          YTButton({
+            btContent: '完成',
+            btHeight: 48,
+            btPadding: {
+              top: 12,
+              bottom: 12
+            },
+            btBorderRadius: 40,
+            bgc: 'rgba(28, 28, 28, 1)',
+            click: () => {
+              //设置成功
+              if (this.phoneNumber.trim() == '') {
+                IBestToast.show({ message: '请输入手机号码', duration: 500 })
+                return
+              }
+              if (this.captcha.trim() == '') {
+                IBestToast.show({ message: '请输入验证码', duration: 500 })
+                return
+              }
+              if (this.password.trim() == '') {
+                IBestToast.show({ message: '请输入密码', duration: 500 })
+                return
+              }
+              if (this.password.trim().length < 8 || this.password.trim().length > 20) {
+                IBestToast.show({ message: '密码长度不符合要求', duration: 500 })
+                return
+              }
+
+              if (this.password != this.confirmPassword) {
+                IBestToast.show({ message: '两次输入的密码不一致', duration: 500 })
+                return
+              }
+              let param: ReqString = {
+                'phonenumber': this.phoneNumber,
+                'smsCode': this.captcha,
+                'password': this.password,
+                'confirmPassword': this.confirmPassword
+              }
+              // LoginApi.resetPassword(param, () => {
+              //   this.confirm?.()
+              // })
+              YTUserRequest.resetMyPassword(param,()=>{
+                //重置密码成功之后返回密码登录页面
+                // this.confirm?.()
+                IBestToast.show({
+                  message:"重置成功"
+                })
+                this.userInfo.logout()
+                this.isShowPassWordReSet=false
+                yTRouter.routerBack()
+              })
+
+              //todo:设置密码
+            }
+          })
+            .margin({ top: 324, bottom: 12 })
+
+        } .padding({
+          top: 29,
+          left: 16,
+          right: 16,
         })
       }
-      .bindSheet($$this.showReviseName, this.reviseNameBuilder, {
-        height: 275,
-        showClose: false,
-        backgroundColor: Color.White
-      })
-      .padding({
-        left: 16,
-        right: 16,
-      })
     }
     .padding({ bottom: this.safeBottom })
 
@@ -137,28 +444,34 @@ struct SettingPage {
   reviseBuilder(item: BasicType<undefined>) {
     Row() {
       Text(item.text)
-        .fontSize($r('[basic].float.page_text_font_size_12'))
-        .fontColor('#80000000')
+        .fontSize(16)
+        .fontWeight(500)
+        .fontColor('rgba(28, 28, 28, 1)')
       Row() {
         if (typeof item.src == 'string') {
-          Image(this.userInfo.getHeadImg() ? this.userInfo.getHeadImg() : $r('app.media.default_img'))
+          Image(this.userInfo.getHeadImg() ? this.userInfo.getHeadImg() : $r("app.media.app_icon"))
             .height(24)
             .width(24)
             .borderRadius(12)
         } else {
-          Text(this.userInfo.getName() ?? this.userInfo.getPhoneNumber() ?? this.userInfo.getId()?.toString())
-            .fontSize($r('[basic].float.page_text_font_size_12'))
-            .fontColor('#CC000000')
+          if (item.text == '密码设置') {
+            Text()
+
+          } else{
+            Text(this.userInfo.getName() ?? this.userInfo.getPhoneNumber() ?? this.userInfo.getId()?.toString())
+              .fontSize($r('[basic].float.page_text_font_size_12'))
+              .fontColor('#CC000000')
+          }
         }
-        Image($r('app.media.right_arrow'))
+        Image($r('app.media.rightxx'))
           .width(24)
           .width(24)
       }
     }
     .width('100%')
     .justifyContent(FlexAlign.SpaceBetween)
-    .padding({ left: 12, right: 4 })
-    .height(36)
+    .padding({ left: 12, right: 4,top:17,bottom:18 })
+    .height(56)
     .onClick(item.click)
   }
 
@@ -173,6 +486,7 @@ struct SettingPage {
         .fontSize(12)
 
       TextInput({ text: $$this.value, placeholder: '请输入昵称' })
+        .placeholderColor('rgba(28, 28, 28, 1)')
         .borderRadius(4)
         .fontSize(12)
         .placeholderFont({ size: 12 })
@@ -185,24 +499,24 @@ struct SettingPage {
         .onChange((value) => {
           if (value.length > 7) {
             this.value = value.slice(0, 7)
-            IBestToast.show({ type: "warning", message: '用户名称最大为7位' })
+            IBestToast.show({message: '用户名称最大为7位' })
           }
         })
 
       Row({ space: 32 }) {
         YTButton({
           btContent: '取消',
-          btHeight: 25,
-          btWidth: 78,
-          btBorder: { width: 1, color: '#1A000000' },
+          btHeight: 42,
+          btWidth: 104,
+          btFontSize:16,
           btPadding: {
-            left: 26,
-            right: 26,
-            top: 4,
-            bottom: 4
+            left: 36,
+            right: 36,
+            top: 9,
+            bottom: 9
           },
-          bgc: Color.White,
-          btFontColor: $r('sys.color.mask_secondary'),
+          bgc: 'rgba(245, 245, 247, 1)',
+          btFontColor: 'rgba(53, 60, 70, 1)',
           click: () => {
             this.showReviseName = false
             this.value = ''
@@ -211,13 +525,15 @@ struct SettingPage {
         })
         YTButton({
           btContent: '完成',
-          btHeight: 25,
-          btWidth: 78,
+          btHeight: 42,
+          btWidth: 104,
+          btFontSize:16,
+          bgc:"rgba(28, 28, 28, 1)",
           btPadding: {
-            left: 26,
-            right: 26,
-            top: 4,
-            bottom: 4
+            left: 36,
+            right: 36,
+            top: 9,
+            bottom: 9
           },
           click: () => {
             if (!this.value) {
@@ -227,11 +543,11 @@ struct SettingPage {
               })
               return
             }
-            YTUserRequest.changeNickname(this.value, () => {
-              IBestToast.show({ message: '名称修改成功' })
-              this.showReviseName = false
-            })
-
+            // YTRequest.changeNickname(this.value, () => {
+            //   IBestToast.show({ message: '名称修改成功' })
+            // })
+            //TODO 发送请求后关闭弹窗
+            this.showReviseName = false
           }
         })
       }
@@ -246,4 +562,256 @@ struct SettingPage {
   changeBuilder() {
     reviseImgHeaderBuilder(this.options)
   }
-}
+}
+
+
+
+// import {
+//   BasicType,
+//   IBestToast,
+//   reviseImgHeaderBuilder,
+//   takePicture,
+//   Upload,
+//   userInfo,
+//   UserInfo,
+//   YTAvoid,
+//   YTButton,
+//   YTHeader,
+//   YTLog,
+//   yTRouter,
+//   yTToast,
+//   YTUserRequest
+// } from 'basic'
+//
+// @Builder
+// function settingBuilder() {
+//   NavDestination() {
+//     SettingPage()
+//   }
+//   .hideTitleBar(true)
+// }
+//
+// @Component
+// struct SettingPage {
+//   @StorageProp(YTAvoid.SAFE_BOTTOM_KEY) safeBottom: number = 0
+//   @StorageProp(UserInfo.KEY) userInfo: UserInfo = userInfo
+//   @State showReviseName: boolean = false
+//   @State showHeaderImgRevise: boolean = false
+//   @State value: string = ''
+//   reviseBuilderArr: Array<BasicType<undefined>> = [
+//     {
+//       text: '头像修改',
+//       src: '',
+//       click: () => {
+//         this.showHeaderImgRevise = true
+//       }
+//     },
+//     {
+//       text: '昵称修改',
+//       click: () => {
+//         this.showReviseName = true
+//       }
+//     }
+//   ]
+//   options: BasicType<undefined>[] = [
+//     {
+//       text: '拍照',
+//       click: async () => {
+//         try {
+//           const fullpath = await takePicture(this.getUIContext().getHostContext()!)
+//           this.showHeaderImgRevise = false
+//           yTRouter.router2DelPhotoPage({ src: fullpath, type: 'header' })
+//         } catch (e) {
+//           YTLog.warn(e)
+//         }
+//       }
+//     },
+//     {
+//       text: '从相册中选择',
+//       click: () => {
+//         Upload.selectImage(this.getUIContext().getHostContext()!, (fullPath) => {
+//           this.showHeaderImgRevise = false
+//           yTRouter.router2DelPhotoPage({ src: fullPath, type: 'header' })
+//         })
+//       }
+//     },
+//     {
+//       text: '取消',
+//       click: () => {
+//         this.showHeaderImgRevise = false
+//       }
+//     },
+//   ]
+//
+//   build() {
+//     Column() {
+//       YTHeader({ title: '用户设置' })
+//       Column() {
+//         ForEach(this.reviseBuilderArr, (item: BasicType<undefined>, index) => {
+//           this.reviseBuilder(item)
+//           if (index < this.reviseBuilderArr.length - 1) {
+//             Column() {
+//               Text('')
+//                 .height(1)
+//                 .width('100%')
+//                 .backgroundColor('#0A000000')
+//             }
+//             .padding({ left: 12, right: 8 })
+//             .bindSheet($$this.showHeaderImgRevise, this.changeBuilder, {
+//               height: 204,
+//               backgroundColor: Color.White,
+//               showClose: false
+//             })
+//           }
+//         })
+//         YTButton({
+//           btContent: '退出登录', click: () => {
+//             this.userInfo.logout()
+//             yTRouter.routerBack()
+//             IBestToast.show({ message: '退出登录成功' })
+//           }
+//         })
+//           .margin({ top: 426, bottom: 12 })
+//         YTButton({
+//           btContent: '注销用户',
+//           btFontColor: Color.Red,
+//           bgc: Color.White,
+//           click: () => {
+//             yTToast.doubleConfirm({
+//               text: '警告⚠', message: '确定要注销吗?\n注销后数据可能丢失无法恢复!', click: () => {
+//                 userInfo.logout()
+//                 yTToast.hide()
+//                 yTRouter.routerBack()
+//               }
+//             })
+//           }
+//         })
+//       }
+//       .bindSheet($$this.showReviseName, this.reviseNameBuilder, {
+//         height: 275,
+//         showClose: false,
+//         backgroundColor: Color.White
+//       })
+//       .padding({
+//         left: 16,
+//         right: 16,
+//       })
+//     }
+//     .padding({ bottom: this.safeBottom })
+//
+//   }
+//
+//   @Builder
+//   reviseBuilder(item: BasicType<undefined>) {
+//     Row() {
+//       Text(item.text)
+//         .fontSize($r('[basic].float.page_text_font_size_12'))
+//         .fontColor('#80000000')
+//       Row() {
+//         if (typeof item.src == 'string') {
+//           Image(this.userInfo.getHeadImg() ? this.userInfo.getHeadImg() : $r('app.media.default_img'))
+//             .height(24)
+//             .width(24)
+//             .borderRadius(12)
+//         } else {
+//           Text(this.userInfo.getName() ?? this.userInfo.getPhoneNumber() ?? this.userInfo.getId()?.toString())
+//             .fontSize($r('[basic].float.page_text_font_size_12'))
+//             .fontColor('#CC000000')
+//         }
+//         Image($r('app.media.right_arrow'))
+//           .width(24)
+//           .width(24)
+//       }
+//     }
+//     .width('100%')
+//     .justifyContent(FlexAlign.SpaceBetween)
+//     .padding({ left: 12, right: 4 })
+//     .height(36)
+//     .onClick(item.click)
+//   }
+//
+//   @Builder
+//   reviseNameBuilder() {
+//     Column() {
+//
+//       Text('昵称')
+//         .width('100%')
+//         .height(36)
+//         .textAlign(TextAlign.Start)
+//         .fontSize(12)
+//
+//       TextInput({ text: $$this.value, placeholder: '请输入昵称' })
+//         .borderRadius(4)
+//         .fontSize(12)
+//         .placeholderFont({ size: 12 })
+//         .placeholderColor('#14000000')
+//         .height(36)
+//         .width('100%')
+//         .backgroundColor(Color.White)
+//         .border({ width: 1, color: '#14000000' })
+//         .margin({ bottom: 25 })
+//         .onChange((value) => {
+//           if (value.length > 7) {
+//             this.value = value.slice(0, 7)
+//             IBestToast.show({ type: "warning", message: '用户名称最大为7位' })
+//           }
+//         })
+//
+//       Row({ space: 32 }) {
+//         YTButton({
+//           btContent: '取消',
+//           btHeight: 25,
+//           btWidth: 78,
+//           btBorder: { width: 1, color: '#1A000000' },
+//           btPadding: {
+//             left: 26,
+//             right: 26,
+//             top: 4,
+//             bottom: 4
+//           },
+//           bgc: Color.White,
+//           btFontColor: $r('sys.color.mask_secondary'),
+//           click: () => {
+//             this.showReviseName = false
+//             this.value = ''
+//
+//           }
+//         })
+//         YTButton({
+//           btContent: '完成',
+//           btHeight: 25,
+//           btWidth: 78,
+//           btPadding: {
+//             left: 26,
+//             right: 26,
+//             top: 4,
+//             bottom: 4
+//           },
+//           click: () => {
+//             if (!this.value) {
+//               IBestToast.show({
+//                 type: "warning",
+//                 message: "昵称不能为空"
+//               })
+//               return
+//             }
+//             YTUserRequest.changeNickname(this.value, () => {
+//               IBestToast.show({ message: '名称修改成功' })
+//               this.showReviseName = false
+//             })
+//
+//           }
+//         })
+//       }
+//       .justifyContent(FlexAlign.Center)
+//       .width('100%')
+//
+//     }
+//     .padding({ left: 22, right: 22, top: 8 })
+//   }
+//
+//   @Builder
+//   changeBuilder() {
+//     reviseImgHeaderBuilder(this.options)
+//   }
+// }

+ 183 - 91
features/user/src/main/ets/views/Mine.ets

@@ -1,23 +1,39 @@
-import {
-  BasicType,
-  copyText,
-  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 { 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 { 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
+  @State isAutoBackImg:boolean=false
   setArr: Array<BasicType<undefined>> = [
     {
+      acSrc:$r('app.media.sharefri'),
+      text: '分享给好友',
+      click: () => {
+
+        this.shareData()
+
+
+      },
+      src: $r('app.media.rightxx')
+    },
+    {
+      acSrc:$r('app.media.sugestion'),
       text: '意见反馈',
       click: () => {
         if (this.userInfo.checkLogin()) {
@@ -26,111 +42,183 @@ export struct Mine {
           yTRouter.router2LoginPage()
         }
       },
-      src: $r('app.media.right_arrow')
+      src: $r('app.media.rightxx')
     },
+    // {
+    //   acSrc:$r('app.media.sharefri'),
+    //   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('出现未知错误,请稍后再试')
+    //     });
+    //   },
+    //   src: $r('app.media.rightxx')
+    // },
     {
-      text: '给个好评',
+      acSrc:$r('app.media.abountwo'),
+      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.router2AboutUS()
       },
-      src: $r('app.media.right_arrow')
+      src: $r('app.media.rightxx')
     },
     {
-      text: '关于我们',
+      acSrc:$r('app.media.backzhanghao'),
+      text: '退出账号',
       click: () => {
-        yTRouter.router2AboutUS()
+        this.userInfo.logout()
+        IBestToast.show({ message: '退出登录成功' })
+
       },
-      src: $r('app.media.right_arrow')
+      src: $r('app.media.rightxx')
     }
   ]
 
-  aboutToAppear(): void {
+  @State private isShow:boolean=false
 
+  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=6917580107917312127',
+        description:"http://appgallery.huawei.com/app/detail?id=6917580107917312127"
+        // content: 'store://appgallery.huawei.com/app/detail?id=6917580107917312127',
+        // thumbnail:new Uint8Array(buffer),
+        // thumbnailUri:"https://imgtool.net/cdn/image/2023/20230401_1.jpg"
+      })
+      const controller = new systemShare.ShareController(data)
+      const context = getContext() as common.UIAbilityContext;
+      // 进行分享面板显示
+      controller.show(context, {
+        previewMode: systemShare.SharePreviewMode.DEFAULT,
+        selectionMode: systemShare.SelectionMode.SINGLE
+      })
+    }
+    catch (error) {
+      promptAction.showToast({ message: '当前设备不支持分享' })
+    }
   }
 
   build() {
     Column() {
+      Row(){
+
+        Text('我的').fontSize(18).fontWeight(700).fontColor('#000')
 
 
+      }.width('100%').justifyContent(FlexAlign.Center)
+      .height(44 + this.safeTop)
+      .padding({ top: this.safeTop ,left:10,right:10})
+      .margin({bottom:40})
+
       Column() {
-        Row() {
-          Row() {
-            Image(this.userInfo.getHeadImg() ?? $r('app.media.app_icon'))
-              .aspectRatio(1)
-              .height(40)
-              .borderRadius(20)
-              .margin({ right: 9 })
-
-            Column({ space: 7 }) {
-              Text(this.userInfo.getName() ?? this.userInfo.getPhoneNumber() ?? this.userInfo.getId()?.toString() ??
-                '未登录')
-                .fontSize($r('[basic].float.page_text_font_size_16'))
-                .fontColor('Color.Black')
-              Text() {
-                Span('ID:' + (this.userInfo.getId()?.toString().padStart(8, '0') ?? '00000000'))
-                ImageSpan($r('app.media.copy'))
-                  .width(7)
-                  .height(8)
-                  .margin({ left: 4 })
-                  .onClick(() => {
-                    copyText((this.userInfo.getId()?.toString().padStart(8, '0') ?? '00000000'))
-                  })
-                  .offset({ bottom: 4 })
-              }
-              .fontColor('#80000000')
-              .fontSize($r('[basic].float.page_text_font_size_10'))
-            }
-            .alignItems(HorizontalAlign.Start)
-          }
-          .onClick(() => {
+        Column() {
+          //头像
+          Image(this.userInfo.getHeadImg() ?? $r("app.media.app_icon"))
+            .aspectRatio(1)
+            .width(80)
+            .height(80)
+            .borderRadius(40)
+            .margin({bottom:10 })
 
+          Text(this.userInfo.getName() ?? this.userInfo.getPhoneNumber() ?? this.userInfo.getId()?.toString() ??
+            '未登录')
+            .fontSize(18)
+            .fontColor('#FF1C1C1C')
+            .fontWeight(500)
+          // Text() {
+          //   Span('ID:' + (this.userInfo.getId()?.toString().padStart(8, '0') ?? '00000000'))
+          //   ImageSpan($r('app.media.copy'))
+          //     .width(7)
+          //     .height(8)
+          //     .margin({ left: 4 })
+          //     .onClick(() => {
+          //       copyText((this.userInfo.getId()?.toString().padStart(8, '0') ?? '00000000'))
+          //     })
+          //     .offset({ bottom: 4 })
+          // }
+          // .fontColor('#80000000')
+          // .fontSize($r('[basic].float.page_text_font_size_10'))
+
+        }.alignItems(HorizontalAlign.Center)
+        .onClick(() => {
+          if (this.userInfo.checkLogin()) {
+            yTRouter.router2SettingPage()
+            return
+          }
+          yTRouter.router2LoginPage()
+        })
+        Text('用户设置')
+          .fontSize(14)
+          .padding({left:14,right:14,top:4,bottom:4})
+          .fontColor('#707376')
+          .border({width:1,color:'#c6cacf'})
+          .borderRadius(15)
+          .margin({top:8})  //(68,32  )
+          .onClick(()=>{
             if (this.userInfo.checkLogin()) {
               yTRouter.router2SettingPage()
               return
             }
+            IBestToast.show({
+              message:"请登录"
+            })
             yTRouter.router2LoginPage()
+
           })
-        }
-        .width('100%')
-        .margin({ bottom: 30 })
 
+      }
+      .padding({left:13,top:4})
+      .width('100%')
+      .margin({ bottom: 30 })
+
+
+      Column(){
         // ShowBannerAd()
         Column() {
-          List() {
+
+          List({space:5}) {
             ForEach(this.setArr, (item: BasicType<undefined>, index) => {
               ListItem() {
                 Row() {
-                  Text(item.text)
-                    .fontColor('#80000000')
-                    .fontSize(12)
-                  if (!index) {
-                    Row() {
-                      Text(this.userInfo.getAiNum()?.toString() ?? '')
-                        .fontWeight(600)
-                        .fontSize($r('[basic].float.page_text_font_size_14'))
-                      Image($r('app.media.right_arrow'))
-                        .width(24)
-                        .aspectRatio(1)
-                    }
-                  } else {
-                    Image($r('app.media.right_arrow'))
+                  Row({space:10}) {
+                    Image(item.acSrc).width(24)
+                    Text(item.text)
+                      .fontWeight(500).fontColor('#FF1C1C1C')
+                  }
+                  // if (index==0) {
+                  //   // Row() {
+                  //   //   Text('去分享').fontSize(14).fontColor('#801C1C1C')
+                  //   //   // Text(this.userInfo.getAiNum()?.toString() ?? '')
+                  //   //   //   .fontWeight(600)
+                  //   //   //   .fontSize($r('[basic].float.page_text_font_size_14'))
+                  //   //   // Image($r('app.media.rightxx'))
+                  //   //   //   .width(24)
+                  //   //   //   .aspectRatio(1)
+                  //   // }
+                  // }
+                  // else {
+                    Image($r('app.media.rightxx'))
                       .width(24)
                       .aspectRatio(1)
-                  }
+                  // }
                 }
                 .width('100%')
-                .height(36)
+                .backgroundColor(Color.White)
+                .height(56)
+                .padding({left:10,right:10})
                 .justifyContent(FlexAlign.SpaceBetween)
                 .onClick(() => {
                   item.click?.()
@@ -138,19 +226,23 @@ export struct Mine {
               }
             })
           }
-          .padding({ left: 12, right: 4 })
-          .divider({ strokeWidth: 1, color: '#0A000000', endMargin: 8 })
-          .margin({ top: 30 })
+          // .divider({ strokeWidth: 1, color: '#1A1C1C1C'})
           .width('100%')
-          .height('100%')
         }
+        .padding({left:8,right:8})  //24=16+8
         .layoutWeight(1)
         .width('100%')
+      }.width('100%')
+      .backgroundColor('#f7f7f7')
+      .borderRadius({topLeft:20,topRight:20})
+      .layoutWeight(1)
+      .padding({ left: 16, right: 16 })
+
+    }.width('100%')
+    .height('100%')
+    .backgroundColor(Color.Black)
+    .backgroundImage($r('[basic].media.backimgNumber'))
+    .backgroundImageSize({width:'100%',height:"100%"})
 
-      }
-      .padding({ top: this.safeTop + 22, left: 16, right: 16 })
-      .height('100%')
-    }.backgroundImage($r('[basic].media.back'))
-    .backgroundImageSize({width:'100%',height:'100%'})
   }
 }

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

@@ -79,10 +79,15 @@ export struct RegisterOrResetPassComp {
         btBorderRadius: 32
       })
 
-      Text('注册成功后将自动登录')
-        .fontSize(10)
-        .fontColor($r('[basic].color.main_ac_color_dark'))
-        .margin({ top: 16 })
+      if(this.loginCollect.getOperation()=='reset'){
+
+      }else{
+        Text('注册成功后将自动登录')
+          .fontSize(10)
+          .fontColor($r('[basic].color.main_ac_color_dark'))
+          .margin({ top: 16 })
+      }
+
     }
     .width('100%')
     .height('100%')

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


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


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


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


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


+ 0 - 1
products/entry/src/main/ets/pages/Index.ets

@@ -27,7 +27,6 @@ struct Index {
       context: this.getUIContext(),
       options: { alignment: DialogAlignment.Center, maskColor: '#80000000' }
     })
-    yTRouter.router2LoginPage()
   }
   build() {
     Navigation(yTRouter) {

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

@@ -47,12 +47,12 @@
         ]
       }
     ],
-//    "metadata": [
-//      {
-//        "name": "client_id",
-//        "value": "6917573740100956853"
-//      }
-//    ],
+    "metadata": [
+      {
+        "name": "client_id",
+        "value": "6917580107833284123"
+      }
+    ],
     "extensionAbilities": [
       {
         "name": "EntryBackupAbility",