谷松阳~ 5 luni în urmă
părinte
comite
71d263ccd1
100 a modificat fișierele cu 606 adăugiri și 0 ștergeri
  1. BIN
      NRC1/产品原型设计/产品原型.rp
  2. BIN
      NRC3/产品原型设计/产品原型.rp
  3. BIN
      NRC4/产品原型设计/产品原型.rp
  4. BIN
      NRC5/产品原型设计/产品原型.rp
  5. BIN
      NRC6/产品原型设计/产品原型.rp
  6. BIN
      NRC6/应用部署测试/产品操作手册.docx
  7. BIN
      NRC6/移动应用开发/Charge.hap
  8. BIN
      NRC8/产品原型设计/产品原型.rp
  9. BIN
      NRC8/应用部署测试/产品操作手册.docx
  10. 11 0
      NRC8/移动应用开发/NRC8/.gitignore
  11. 10 0
      NRC8/移动应用开发/NRC8/AppScope/app.json5
  12. 8 0
      NRC8/移动应用开发/NRC8/AppScope/resources/base/element/string.json
  13. BIN
      NRC8/移动应用开发/NRC8/AppScope/resources/base/media/icon_logo.png
  14. 27 0
      NRC8/移动应用开发/NRC8/build-profile.json5
  15. 6 0
      NRC8/移动应用开发/NRC8/entry/.gitignore
  16. 14 0
      NRC8/移动应用开发/NRC8/entry/build-profile.json5
  17. 2 0
      NRC8/移动应用开发/NRC8/entry/hvigorfile.ts
  18. 10 0
      NRC8/移动应用开发/NRC8/entry/oh-package.json5
  19. 3 0
      NRC8/移动应用开发/NRC8/entry/src/main/ets/common/CommonConstants.ets
  20. 41 0
      NRC8/移动应用开发/NRC8/entry/src/main/ets/entryability/EntryAbility.ts
  21. 35 0
      NRC8/移动应用开发/NRC8/entry/src/main/ets/http/utils.ets
  22. 8 0
      NRC8/移动应用开发/NRC8/entry/src/main/ets/model/dataModel.ets
  23. 270 0
      NRC8/移动应用开发/NRC8/entry/src/main/ets/pages/HomePage.ets
  24. 63 0
      NRC8/移动应用开发/NRC8/entry/src/main/ets/pages/Index.ets
  25. 42 0
      NRC8/移动应用开发/NRC8/entry/src/main/module.json5
  26. 8 0
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/element/color.json
  27. 16 0
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/element/string.json
  28. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ChargeStation.png
  29. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/addcarBg.png
  30. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/addchargingBg.png
  31. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/avatar.png
  32. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/back.png
  33. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg.png
  34. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_add_car.png
  35. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car.png
  36. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car01.png
  37. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car_02.png
  38. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car_list.png
  39. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_re_record_item.png
  40. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_record_item.png
  41. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_station.png
  42. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bottomBg.png
  43. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/car.png
  44. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/car1.png
  45. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/carCharging.png
  46. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/cars.png
  47. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/charging.png
  48. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/chargingBg.png
  49. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/chargingIcon.png
  50. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/chongdianzhuang.png
  51. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/electric.png
  52. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_arrow.png
  53. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_back.png
  54. 31 0
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_bottom_home.svg
  55. 0 0
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_bottom_record.svg
  56. 1 0
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_bottom_user.svg
  57. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_call.png
  58. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_close.png
  59. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_home.png
  60. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_home_active.png
  61. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_logo.png
  62. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_mine.png
  63. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_mine_active.png
  64. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_order.png
  65. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_order_active.png
  66. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_privacy.png
  67. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_right_arrow.png
  68. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_user_agreement.png
  69. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon.png
  70. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_about.png
  71. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_add_car.png
  72. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_add_station.png
  73. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_authentication.png
  74. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_avatar.png
  75. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_back.png
  76. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_data.png
  77. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_false.png
  78. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_forward.png
  79. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_history.png
  80. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_lock.png
  81. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_login_select.png
  82. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_logo.png
  83. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_lx_car.png
  84. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_my_back.png
  85. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_neu.png
  86. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_one_charge.png
  87. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_photo.png
  88. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_predetermine.png
  89. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_repair.png
  90. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_right.png
  91. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_setting.png
  92. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_share.png
  93. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_station.png
  94. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_thunder.png
  95. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_true.png
  96. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/location.png
  97. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/logo.png
  98. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/mileage.png
  99. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/navigation.png
  100. BIN
      NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/orderId.png

BIN
NRC1/产品原型设计/产品原型.rp


BIN
NRC3/产品原型设计/产品原型.rp


BIN
NRC4/产品原型设计/产品原型.rp


BIN
NRC5/产品原型设计/产品原型.rp


BIN
NRC6/产品原型设计/产品原型.rp


BIN
NRC6/应用部署测试/产品操作手册.docx


BIN
NRC6/移动应用开发/Charge.hap


BIN
NRC8/产品原型设计/产品原型.rp


BIN
NRC8/应用部署测试/产品操作手册.docx


+ 11 - 0
NRC8/移动应用开发/NRC8/.gitignore

@@ -0,0 +1,11 @@
+/node_modules
+/oh_modules
+/local.properties
+/.idea
+**/build
+/.hvigor
+.cxx
+/.clangd
+/.clang-format
+/.clang-tidy
+**/.test

+ 10 - 0
NRC8/移动应用开发/NRC8/AppScope/app.json5

@@ -0,0 +1,10 @@
+{
+  "app": {
+    "bundleName": "com.example.chargenrc4",
+    "vendor": "example",
+    "versionCode": 1000000,
+    "versionName": "1.0.0",
+    "icon": "$media:icon_logo",
+    "label": "$string:app_name"
+  }
+}

+ 8 - 0
NRC8/移动应用开发/NRC8/AppScope/resources/base/element/string.json

@@ -0,0 +1,8 @@
+{
+  "string": [
+    {
+      "name": "app_name",
+      "value": "Charge"
+    }
+  ]
+}

BIN
NRC8/移动应用开发/NRC8/AppScope/resources/base/media/icon_logo.png


+ 27 - 0
NRC8/移动应用开发/NRC8/build-profile.json5

@@ -0,0 +1,27 @@
+{
+  "app": {
+    "signingConfigs": [],
+    "compileSdkVersion": 9,
+    "compatibleSdkVersion": 9,
+    "products": [
+      {
+        "name": "default",
+        "signingConfig": "default",
+      }
+    ]
+  },
+  "modules": [
+    {
+      "name": "entry",
+      "srcPath": "./entry",
+      "targets": [
+        {
+          "name": "default",
+          "applyToProducts": [
+            "default"
+          ]
+        }
+      ]
+    }
+  ]
+}

+ 6 - 0
NRC8/移动应用开发/NRC8/entry/.gitignore

@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test

+ 14 - 0
NRC8/移动应用开发/NRC8/entry/build-profile.json5

@@ -0,0 +1,14 @@
+{
+  "apiType": 'stageMode',
+  "buildOption": {
+  },
+  "targets": [
+    {
+      "name": "default",
+      "runtimeOS": "HarmonyOS"
+    },
+    {
+      "name": "ohosTest",
+    }
+  ]
+}

+ 2 - 0
NRC8/移动应用开发/NRC8/entry/hvigorfile.ts

@@ -0,0 +1,2 @@
+// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
+export { hapTasks } from '@ohos/hvigor-ohos-plugin';

+ 10 - 0
NRC8/移动应用开发/NRC8/entry/oh-package.json5

@@ -0,0 +1,10 @@
+{
+  "name": "entry",
+  "version": "1.0.0",
+  "description": "Please describe the basic information.",
+  "main": "",
+  "author": "",
+  "license": "",
+  "dependencies": {}
+}
+

+ 3 - 0
NRC8/移动应用开发/NRC8/entry/src/main/ets/common/CommonConstants.ets

@@ -0,0 +1,3 @@
+export class CommonConstants {
+  static readonly BASE_URL: string = 'http://10.2.19.161:8080/zh-admin';
+}

+ 41 - 0
NRC8/移动应用开发/NRC8/entry/src/main/ets/entryability/EntryAbility.ts

@@ -0,0 +1,41 @@
+import UIAbility from '@ohos.app.ability.UIAbility';
+import hilog from '@ohos.hilog';
+import window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+  onCreate(want, launchParam) {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+  }
+
+  onDestroy() {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+  }
+
+  onWindowStageCreate(windowStage: window.WindowStage) {
+    // Main window is created, set main page for this ability
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+    windowStage.loadContent('pages/Index', (err, data) => {
+      if (err.code) {
+        hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+        return;
+      }
+      hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
+    });
+  }
+
+  onWindowStageDestroy() {
+    // Main window is destroyed, release UI related resources
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+  }
+
+  onForeground() {
+    // Ability has brought to foreground
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+  }
+
+  onBackground() {
+    // Ability has back to background
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+  }
+}

+ 35 - 0
NRC8/移动应用开发/NRC8/entry/src/main/ets/http/utils.ets

@@ -0,0 +1,35 @@
+import http from '@ohos.net.http';
+import { CommonConstants } from '../common/CommonConstants'
+
+export default {
+  doRequest(uri: string, method: string, params: object, successFun: Function) {
+    const BASE_URL = CommonConstants.BASE_URL;
+
+    const httpRequest = http.createHttp();
+
+    // @ts-ignore
+    httpRequest.request(
+      BASE_URL + uri,
+      {
+        // @ts-ignore
+        method: method,
+        header: {
+          'Content-Type': 'application/json',
+          'Authorization': AppStorage.Get('token')
+        },
+        extraData: params
+      }, (err, data) => {
+      if (!err) {
+        if (data.responseCode === http.ResponseCode.OK) {
+          // @ts-ignore
+          let result = JSON.parse(data.result);
+          successFun(result);
+        } else {
+          console.info(`responseCode is ${data.responseCode}`)
+        }
+      } else {
+        console.error(`error: code is ${err.code}, message is ${err.message}`);
+      }
+    })
+  }
+}

+ 8 - 0
NRC8/移动应用开发/NRC8/entry/src/main/ets/model/dataModel.ets

@@ -0,0 +1,8 @@
+export class DataModel {
+  licencePlate: string
+  vehicleModel: string
+  vehicleBrand: string
+  remainingMileage: string
+  dumpEnergy: number
+  isCharge: boolean
+}

+ 270 - 0
NRC8/移动应用开发/NRC8/entry/src/main/ets/pages/HomePage.ets

@@ -0,0 +1,270 @@
+import utils from '../http/utils';
+
+@Entry
+@Component
+export struct HomePage {
+  @State licencePlate: string = '---';
+  @State vehicleModel: string = '---';
+  @State vehicleBrand: string = '---';
+  @State remainingMileage: string = '---';
+  @State dumpEnergy: number = 0;
+  @State isCharge: boolean = false;
+  private timer;
+
+  aboutToAppear() {
+    utils.doRequest('/login', 'POST',
+      {
+        username: 'user',
+        password: '123456'
+      },
+      (res) => {
+        AppStorage.SetOrCreate('token', res.token)
+        console.info('token: ', JSON.stringify(AppStorage.Get('token')))
+        utils.doRequest('/api/recharge/vehicle/selected', 'GET', {},
+          (res) => {
+            this.licencePlate = res.data.licencePlate;
+            this.vehicleModel = res.data.vehicleModel;
+            this.vehicleBrand = res.data.vehicleBrand;
+            this.remainingMileage = res.data.remainingMileage + "km"
+          })
+      })
+  }
+
+  build() {
+
+    Column({ space: 30 }) {
+
+      HomeLabel()
+        .margin({
+          top: 20
+        })
+
+      CarInfo({
+        licencePlate: this.licencePlate,
+        vehicleModel: this.vehicleModel,
+        vehicleBrand: this.vehicleBrand,
+        remainingMileage: this.remainingMileage
+      })
+
+      Scroll() {
+        Column() {
+          ChargeArea({ dumpEnergy: this.dumpEnergy, isCharge: this.isCharge })
+          Divider()
+            .color(Color.Grey)
+            .strokeWidth(1)
+            .width('90%')
+          FeatureButton()
+        }
+      }
+      .height(300)
+      .scrollBar(BarState.Off)
+
+    }
+    .width('100%')
+    .height('100%')
+    .padding({
+      left: 12,
+      right: 12
+    })
+    .backgroundImage($r('app.media.bg_car'))
+    .backgroundImageSize(ImageSize.Cover)
+
+  }
+}
+
+@Component
+struct HomeLabel {
+  build() {
+    Row({ space: 10 }) {
+      Image($r("app.media.icon_thunder"))
+        .width(52)
+      Text('智能充电家用版 App')
+        .fontSize(28)
+        .fontWeight(FontWeight.Bold)
+    }
+    .width('100%')
+  }
+}
+
+@Component
+struct CarInfo {
+  @Prop licencePlate: string;
+  @Prop vehicleModel: string;
+  @Prop vehicleBrand: string;
+  @Prop remainingMileage: string;
+
+  build() {
+    //车辆 3D 模型
+    Column() {
+      Image($r('app.media.bg_car01'))
+        .width('100%')
+
+      Row() {
+        Column() {
+          Text(this.licencePlate)
+            .textStyles()
+          Text('车牌')
+            .fontSize(18)
+        }
+
+        Column() {
+          Text(this.vehicleModel)
+            .textStyles()
+          Text('品牌')
+            .fontSize(18)
+        }
+
+        Column() {
+          Text(this.vehicleBrand)
+            .textStyles()
+          Text('型号')
+            .fontSize(18)
+        }
+
+
+        Column() {
+          Text(this.remainingMileage)
+            .textStyles()
+          Text('剩余里程')
+            .fontSize(18)
+        }
+      }
+      .width('100%')
+      .justifyContent(FlexAlign.SpaceAround)
+      .margin({
+        top: 20
+      })
+    }
+    .width('100%')
+  }
+}
+
+@Component
+struct ChargeArea {
+  @Prop dumpEnergy: number;
+  @Prop isCharge: boolean;
+
+  build() {
+    Column() {
+      Row() {
+        Column() {
+          Text('---')
+            .textStyles()
+          Text('充电功率')
+            .fontSize(18)
+        }
+
+        Column() {
+          Text('---')
+            .textStyles()
+          Text('充电电量')
+            .fontSize(18)
+        }
+
+        Column() {
+          Text('---')
+            .textStyles()
+          Text('剩余时间')
+            .fontSize(18)
+        }
+      }
+      .width('100%')
+      .justifyContent(FlexAlign.SpaceAround)
+      .margin({
+        bottom: 20
+      })
+
+
+      Row() {
+        Stack() {
+          Progress({ value: this.dumpEnergy, total: 100, type: ProgressType.ScaleRing })
+            .layoutWeight(1)
+            .width(200)
+            .style({
+              strokeWidth: 16,
+              scaleCount: 30,
+              scaleWidth: 8
+            })
+          Column({ space: 8 }) {
+            Text(this.dumpEnergy + " %")
+              .textStyles()
+            Text('电池电量')
+              .fontSize(18)
+            Button(this.isCharge ? '停止充电' : '开始充电')
+              .onClick(() => {
+                this.isCharge = !this.isCharge;
+                if (this.isCharge) {
+                  var timer = setInterval(() => {
+                    if (this.dumpEnergy >= 100 || !this.isCharge) {
+                      clearInterval(timer)
+                      this.isCharge = !this.isCharge;
+                    } else {
+                      this.dumpEnergy = this.dumpEnergy + 10;
+                    }
+                  }, 1000)
+                }
+              })
+          }
+        }
+      }
+    }
+    .justifyContent(FlexAlign.SpaceAround)
+    .cardStyles()
+
+  }
+}
+
+@Component
+struct FeatureButton {
+  build() {
+    Row() {
+      Column({ space: 8 }) {
+        Image($r('app.media.icon_add_station'))
+          .width(68)
+        Text('添加充电桩')
+          .fontSize(18)
+      }
+
+      Column({ space: 8 }) {
+        Image($r('app.media.icon_add_car'))
+          .width(68)
+        Text('添加车辆')
+          .fontSize(18)
+      }
+
+      Column({ space: 8 }) {
+        Image($r('app.media.icon_one_charge'))
+          .width(68)
+        Text('一键充电')
+          .fontSize(18)
+      }
+    }
+    .justifyContent(FlexAlign.SpaceAround)
+    .cardStyles()
+  }
+}
+
+@Extend(Text) function textStyles() {
+  .fontSize(22)
+  .fontWeight(FontWeight.Bold)
+  .margin({
+    bottom: 6
+  })
+}
+
+@Styles function cardStyles() {
+  .backgroundColor(Color.White)
+  .width('100%')
+  .padding(12)
+  .borderRadius(12)
+  .shadow({
+    color: "#ff6b6969",
+    radius: 2,
+    offsetX: 2,
+    offsetY: 2
+  })
+}
+
+
+
+

+ 63 - 0
NRC8/移动应用开发/NRC8/entry/src/main/ets/pages/Index.ets

@@ -0,0 +1,63 @@
+import { HomePage } from './HomePage';
+import http from '../http/utils';
+
+@Entry
+@Component
+struct Index {
+  @State currentIndex: number = 0;
+
+  @Builder
+  TabBuilder(options) {
+    Column({ space: 6 }) {
+      Image(this.currentIndex === options.index ? options.selectImg : options.normalImg)
+        .width(24)
+      Text(options.title)
+        .fontColor(this.currentIndex === options.index ? "#000000" : "#ff9b9696")
+    }
+  }
+
+  build() {
+    Column() {
+      Tabs({ barPosition: BarPosition.End }) {
+        TabContent() {
+          HomePage()
+        }
+        .tabBar(this.TabBuilder({
+          title: "首页",
+          index: 0,
+          selectImg: $r("app.media.ic_home_active"),
+          normalImg: $r("app.media.ic_home")
+        }))
+
+        TabContent() {
+          Text('订单')
+            .fontSize(20)
+        }
+        .tabBar(this.TabBuilder({
+          title: "订单",
+          index: 1,
+          selectImg: $r("app.media.ic_order_active"),
+          normalImg: $r("app.media.ic_order")
+        }))
+
+        TabContent() {
+          Text('个人中心')
+            .fontSize(20)
+        }
+        .tabBar(this.TabBuilder({
+          title: "个人中心",
+          index: 2,
+          selectImg: $r("app.media.ic_mine_active"),
+          normalImg: $r("app.media.ic_mine")
+        }))
+      }
+      .barHeight(70)
+      .onChange((value: number) => {
+        this.currentIndex = value;
+      })
+    }
+    .width('100%')
+    .height('100%')
+  }
+}
+

+ 42 - 0
NRC8/移动应用开发/NRC8/entry/src/main/module.json5

@@ -0,0 +1,42 @@
+{
+  "module": {
+    "name": "entry",
+    "type": "entry",
+    "description": "$string:module_desc",
+    "mainElement": "EntryAbility",
+    "deviceTypes": [
+      "phone",
+      "tablet"
+    ],
+    "deliveryWithInstall": true,
+    "installationFree": false,
+    "pages": "$profile:main_pages",
+    "abilities": [
+      {
+        "name": "EntryAbility",
+        "srcEntry": "./ets/entryability/EntryAbility.ts",
+        "description": "$string:EntryAbility_desc",
+        "icon": "$media:icon_logo",
+        "label": "$string:EntryAbility_label",
+        "startWindowIcon": "$media:icon",
+        "startWindowBackground": "$color:start_window_background",
+        "exported": true,
+        "skills": [
+          {
+            "entities": [
+              "entity.system.home"
+            ],
+            "actions": [
+              "action.system.home"
+            ]
+          }
+        ]
+      }
+    ],
+    "requestPermissions": [
+      {
+        "name": "ohos.permission.INTERNET"
+      }
+    ]
+  }
+}

+ 8 - 0
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/element/color.json

@@ -0,0 +1,8 @@
+{
+  "color": [
+    {
+      "name": "start_window_background",
+      "value": "#FFFFFF"
+    }
+  ]
+}

+ 16 - 0
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/element/string.json

@@ -0,0 +1,16 @@
+{
+  "string": [
+    {
+      "name": "module_desc",
+      "value": "module description"
+    },
+    {
+      "name": "EntryAbility_desc",
+      "value": "description"
+    },
+    {
+      "name": "EntryAbility_label",
+      "value": "Charge"
+    }
+  ]
+}

BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ChargeStation.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/addcarBg.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/addchargingBg.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/avatar.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/back.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_add_car.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car01.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car_02.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_car_list.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_re_record_item.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_record_item.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bg_station.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/bottomBg.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/car.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/car1.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/carCharging.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/cars.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/charging.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/chargingBg.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/chargingIcon.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/chongdianzhuang.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/electric.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_arrow.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_back.png


+ 31 - 0
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_bottom_home.svg

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px"
+     height="24px"
+     viewBox="0 0 24 24"
+     version="1.1"
+     xmlns="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>Public/ic_public_home_filled</title>
+    <defs>
+        <path
+            d="M12.5548977,4.55117487 L12.6529233,4.62758192 L12.6883166,4.65995815 L21,12.5839983 L21,19.25 C21,20.8476809 19.75108,22.1536609 18.1762728,22.2449073 L18,22.25 L6,22.25 C4.40231912,22.25 3.09633912,21.00108 3.00509269,19.4262728 L3,19.25 L3,12.5839983 L11.3117958,4.65995815 C11.6576006,4.33188693 12.1809818,4.29723756 12.5548977,4.55117487 Z M12,13.5 C10.4023191,13.5 9.09633912,14.74892 9.00509269,16.3237272 L9,16.5 L9,20.25 L15,20.25 L15,16.5 C15,14.8431458 13.6568542,13.5 12,13.5 Z M9.39893803,2.34618127 C10.9454248,1.02063659 13.259436,1.06634502 14.75299,2.48330658 L14.75299,2.48330658 L22.4382087,9.7744115 L22.5181827,9.85955793 C22.8392264,10.243763 22.8283766,10.8160918 22.475412,11.1881356 C22.0952963,11.5887982 21.4623504,11.6054546 21.0616879,11.2253389 L21.0616879,11.2253389 L13.3764692,3.93423398 L13.2633454,3.83462897 C12.4905831,3.20379726 11.3583509,3.23699892 10.6234274,3.93423398 L10.6234274,3.93423398 L2.93820874,11.2253389 L2.84897391,11.3007239 C2.44841532,11.6011159 1.87744922,11.5601794 1.52448461,11.1881356 C1.14436887,10.7874731 1.16102534,10.1545272 1.56168788,9.7744115 L1.56168788,9.7744115 L9.24690658,2.48330658 Z"
+            id="path-1"></path>
+    </defs>
+    <g
+        id="Public/ic_public_home_filled"
+        stroke="none"
+        stroke-width="1"
+        fill="none"
+        fill-rule="evenodd">
+        <mask
+            id="mask-2"
+            fill="white">
+            <use xlink:href="#path-1"></use>
+        </mask>
+        <use
+            id="形状结合"
+            fill="#000000"
+            fill-rule="nonzero"
+            xlink:href="#path-1"></use>
+    </g>
+</svg>

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_bottom_record.svg


+ 1 - 0
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_bottom_user.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702462021136" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4695" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M979.936 962.976c-22.656 48.768-83.136 52.544-101.152 52.544l-741.856 0c-12.736-0.736-64.352-6.336-87.776-50.432-9.888-18.592-17.664-49.728 1.408-92.32 34.752-77.408 115.264-84.928 134.496-85.6 137.056-21.216 181.568-68.384 181.984-68.832l3.2-3.328c14.624-13.792 19.616-38.016 20.928-59.072-88.64-67.424-144.704-197.632-144.704-340.736 0-229.344 142.272-310.688 264.128-310.688 121.888 0 264.192 81.376 264.192 310.688 0 143.104-56 273.28-144.64 340.704 1.376 21.12 6.368 45.408 20.864 59.104l4 4.288c0.096 0 44.832 46.816 181.216 67.904 31.392 1.248 90.336 18.336 128.608 75.936 29.888 44.992 24.704 79.168 15.072 99.84z" fill="#272636" p-id="4696"></path></svg>

BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_call.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_close.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_home.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_home_active.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_logo.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_mine.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_mine_active.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_order.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_order_active.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_privacy.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_right_arrow.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/ic_user_agreement.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_about.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_add_car.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_add_station.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_authentication.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_avatar.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_back.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_data.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_false.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_forward.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_history.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_lock.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_login_select.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_logo.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_lx_car.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_my_back.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_neu.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_one_charge.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_photo.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_predetermine.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_repair.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_right.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_setting.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_share.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_station.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_thunder.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/icon_true.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/location.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/logo.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/mileage.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/navigation.png


BIN
NRC8/移动应用开发/NRC8/entry/src/main/resources/base/media/orderId.png


Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff