diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/.gitignore" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..dc4e6353bf3caf74c5953d0bec81c72a3635bf33 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/.gitignore" @@ -0,0 +1,9 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/app.json5" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/app.json5" new file mode 100644 index 0000000000000000000000000000000000000000..60ac81a4b8785c4f4c3f766b8c5b6bb5f3fe4f2f --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/app.json5" @@ -0,0 +1,11 @@ +{ + "app": { + "bundleName": "com.example.arkhealthydietapplication", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/resources/base/element/string.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/resources/base/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..470051590d5c4eec788a7e1579cefa7bb33f9b7f --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/resources/base/element/string.json" @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "ArkHealthyDietApplication" + } + ] +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/resources/base/media/app_icon.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/resources/base/media/app_icon.png" new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/AppScope/resources/base/media/app_icon.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/README.md" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/README.md" new file mode 100644 index 0000000000000000000000000000000000000000..baedfa29b0f2c8ae2d46433a3220ea7b982f8359 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/README.md" @@ -0,0 +1,980 @@ +# Ark健康饮食应用 +## 作品简介 +- 通过《HarmonyOS ArkUI入门训练营之健康饮食应用》的训练营的学习之后,自己创作了一个健康饮食app Demo版。Ark健康饮食应用app是一个用户可以记录健康状况、查阅食物元素含量详细信息,以及在上面购买一些健康绿色食品的应用。在上面可以学习到很多,养成适量吃的习惯,提高人们的生活品质和保障身心健康。目前的版本实现功能还不算多,后续有空继续完善一下。(免责声明:本作品使用的图文数据都是用于学习的,请勿用于商业途径) + +## 程序框架 +- Ark健康饮食是使用HarmonyOS ArkUI开发的HarmonyOS应用程序。使用的是API9以及Stage模型进行开发。 +## 软件要求 +- DevEco Studio版本:DevEco Studio 3.1 Canary1及以上版本。 +- HarmonyOS SDK版本:API version 9及以上版本。 + +## 硬件要求 +- 设备类型:华为手机或运行在DevEco Studio上的华为手机设备模拟器。 +- HarmonyOS系统:3.1.0 Developer Canary1及以上版本。 + +## 效果展示 +![](image/1.gif) +## 代码结构解读 +``` +├─entry/src/main/ets // 代码区 +│ ├─common // 公共资源目录,比如实例类的定义,一些公共方法的地方 +│ ├─entryability +│ │ └─EntryAbility.ts // 程序入口类 +│ │─**Ability // 各个页面对应的Ability +│ ├─model +│ │ └─DataModel.ets // 商品的数据模型 +│ │ └─FoodDataModel.ets // 食物信息 +│ │ └─MenuBtnDataModel.ets // 首页中的按钮及跳转数据 +│ │ └─NutrientDefineDataModel.ets // 元素定义模型 +│ │ └─QuestionDataModel.ets // 每日答题的题库 +│ ├─pages // 各个页面 +│ ├─view // 自定义组件目录 +│ └─viewmodel // 视图业务逻辑文件目录 +``` + +## 核心功能 +### 食物榜单 +食物榜单是一个食物详细信息的数据库,通过页面展示了各种食物的元素含量,以及体现了蛋白质、脂肪、碳水的占比,通过图文可以直观地解释该类食物的优缺点,可以让用户注意饮食的量。 +![](image/swbd.gif) +这个功能有三个页面展示,分别是一级分类页面、二级分类页面以及食物详情页面。 +一级分类的布局是左右排列,通过社区大佬给的思路来实现的。 +```js +struct FirstTagPage { + @State firstTagList: FirstTag[] = TagViewModel.loadFirstTags() + private scroller = new Scroller() + @State secondTagList: Array = TagViewModel.loadSecondTags() + .filter(f => f.firstTag.findIndex(t => t.tagId == 1) >= 0) + @State selectedIndex: number = 0 + + build() { + Column() { + TopBarComponent({ pageName: pageName }) + + this.Content() + }.width(PERCENTAGE_100) + .backgroundColor(Color.White) + } + + @Builder Content() { + Row() { + // 左分类 + List() { + ForEach(this.firstTagList, (item: FirstTag, index) => { + ListItem() //... + }, (item: FirstTag) => item.tagId.toString()) + }.width(PERCENTAGE_20).height(PERCENTAGE_100) + + // 右分类 + List({ scroller: this.scroller }) { + // 分类列表 + ForEach(this.secondTagList, (item: SecondTag) => { + ListItem() //... + }, (item: SecondTag) => item.tagId.toString()) + }.width(PERCENTAGE_80).height(PERCENTAGE_100) + + }.width(PERCENTAGE_100).height(PERCENTAGE_100) + .alignItems(VerticalAlign.Top) + } +} +``` +```js +struct FoodDetailPage { + pageName = '食物详情' + tabs = ['营养档案', '食物排行', '配料成分'] + @State currentPosition: number = 0 + private controller: TabsController = new TabsController(); + @State navCurrentPosition: number = NavPageStyle.POSITION_INITIAL; + + build() { + Column() { + TopBarComponent({ pageName: this.pageName }) + Scroll() { + this.Content() + } + .scrollBarWidth(0) + }.width(PERCENTAGE_100) + } + + @Builder Content() { + Column() { + Row() { + Row() { + Image(foodDetail.foodImage).width(50).height(50).margin(15).borderRadius(10) + Text(foodDetail.foodName) + .fontSize(18) + .fontWeight(FontWeight.Bold) + .maxLines(2) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .width(PERCENTAGE_70) + }.width(PERCENTAGE_70).height(PERCENTAGE_100) + + Button(`点赞(${foodDetail.like})`) + .fontColor(Color.Black) + .fontSize(11) + .fontWeight(FontWeight.Medium) + .size({ width: 90, height: 30 }) + .backgroundColor(CommonData.BACK_COLOR) + }.width(PERCENTAGE_100).height(PERCENTAGE_15).backgroundColor(Color.White) + + FoodDetailTabsComponent({ tabMenus: this.tabs, currentPosition: $navCurrentPosition }) + + this.MenuContent() + } + .backgroundColor(CommonData.BACK_COLOR) + } + + @Builder MenuContent() { + Column() { + if (this.navCurrentPosition === 0) { + RecordView({ foodDetail: foodDetail }) + } else if (this.navCurrentPosition === 1) { + RankView() + } else if (this.navCurrentPosition === 2) { + CompositionView() + } + }.width(PERCENTAGE_100) + } + + @Builder ToolBarBuilder() { + Row() { + ForEach(this.tabs, (item: string, index) => { + Column() { + Row() { + Text(item) + .fontColor(this.navCurrentPosition === index ? $r('app.color.index_navigation_selected_text') : $r('app.color.text')) + .fontWeight(AppFontWeight.BOLDER) + .fontSize(AppFontSize.SMALLER) + .textAlign(TextAlign.Center) + } + } + .onClick(() => { + this.navCurrentPosition = index + this.controller.changeIndex(this.navCurrentPosition) + }) + }, (item: string) => item) + }.width(PERCENTAGE_100).height(PERCENTAGE_20).backgroundColor(Color.White) + } +} +``` +### 食物对比 +食物对比通过一个左右区域,用户从数据库中选择需要作对比的食物,可以详细列出不同或者相似食物中元素含量的差异。通过对比可以让用户更直观地感知食物营养的差异。 +![](image/swdb.gif) +```js +struct ComparePage { + pageName: string = '对比详情' + @State leftFood: FoodData = new FoodData() + @State rightFood: FoodData = new FoodData() + + build() { + Column() { + TopBarComponent({ pageName: this.pageName }) + this.Content() + }.width(PERCENTAGE_100).height(PERCENTAGE_100) + } + + @Builder Content() { + Column() { + this.Compare() + this.Table(this.leftFood, this.rightFood) + }.width(PERCENTAGE_100).backgroundColor(CommonData.BACK_COLOR) + } + @Builder Table(leftFood, rightFood) { + CardComponent() { + Column() { + Text(`营养元素`).fontSize(16).fontWeight(FontWeight.Bold) + }.width(PERCENTAGE_100).margin(15) + + if ((leftFood.foodId > 0 && rightFood.foodId > 0) || (leftFood.foodId > 0 || rightFood.foodId > 0)) { + ForEach(NutrientDefineDataModel.NUTRIENT_DEFINE, (item: NutrientDefine) => { + CompareTableItemComponent({ + leftShow: leftFood.foodName != null, + rightShow: rightFood.foodName != null, + nutrientDefine: item, + leftWeight: leftFood?.nutrientContent?.[NutrientDefineEnum[item.name]]?.v, + rightWeight: rightFood?.nutrientContent?.[NutrientDefineEnum[item.name]]?.v, + }) + }) + } else { + Text('点击加号,添加一个食物').fontSize(12).fontColor(CommonData.UN_SELECT_FONT_COLOR) + } + } + } + @Builder Compare() { + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + FoodHead({ foodDetail: $leftFood }) + Column() { + Image($rawfile('index/vs.png')).width(50).height(50) + }.width(PERCENTAGE_30) + + FoodHead({ foodDetail: $rightFood }) + }.width(PERCENTAGE_100) + }.height(PERCENTAGE_15).margin(15).justifyContent(FlexAlign.Center) + } +} + +@Component +struct FoodHead { + @Link foodDetail: FoodData + + build() { + Column() { + Stack() { + Row() { + if (this.foodDetail.foodImage == null) { + Image($rawfile('index/select_add.png')).width(20).height(20) + } else { + Image(this.foodDetail.foodImage).width(70).height(70).borderRadius(15) + } + } + .width(75) + .height(75) + .backgroundColor(this.foodDetail.foodImage == null ? Color.White : Color.Transparent) + .border({ width: 4, color: Color.White, radius: 15 }) + .justifyContent(FlexAlign.Center) + .onClick(() => { + console.warn("点击选择物品") + // 弹出窗口 + this.handleOpenSelectFoodView() + }) + + Row() { + Image($rawfile('index/select_error.png')).width(20).height(20) + } + .margin({ left: 68, bottom: 68 }) + .justifyContent(FlexAlign.Center) + .visibility(this.foodDetail.foodImage == null ? Visibility.Hidden : Visibility.Visible) + .onClick(() => { + console.warn("点击取消物品") + this.foodDetail = new FoodData() + }) + } + + Text(this.foodDetail.foodName).fontSize(14) + }.width(PERCENTAGE_30) + + } + + handleOpenSelectFoodView() { + let sheets: Array = totalFoods.map(f => { + return { + title: f.foodName, + action: () => { + this.foodDetail = f + console.log(JSON.stringify(this.foodDetail)) + } + } + }) + ActionSheet.show({ + title: '选择食物', + message: '', + sheets: sheets + }) + } +} +``` +### 喝水记录 +喝水记录是一个让用户记录每天喝水次数以及今天喝了多少毫升的水,让用户按时喝水。 +![](image/hsjl.gif) +在这个页面中,我通过定时器的方式实现了当前喝水毫升的累加动画,以及水上涨的动画效果,虽然很简单,不过对我来说挺有意思的。 +```js +import { CommonData } from '../common/constants/Constants'; +import TimeUtils from '../common/TimeUtils'; +import { PERCENTAGE_40 } from '../common/constants/Constants'; +import { PERCENTAGE_60 } from '../common/constants/Constants'; +import { PERCENTAGE_90 } from '../common/constants/Constants'; +import { PERCENTAGE_30 } from '../common/constants/Constants'; +import { PERCENTAGE_70 } from '../common/constants/Constants'; +import { PERCENTAGE_10 } from '../common/constants/Constants'; +import { PERCENTAGE_50 } from '../common/constants/Constants'; +import { PERCENTAGE_20 } from '../common/constants/Constants'; +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import TopBarComponent from '../view/TopBarComponent'; + +let waterColor = "#ff60c8fb" +let KEY = 'water' + +class WaterRecord { + target: number + curMl: number + curAddOnce: number = 200 + time: number = 2 + timeMills: number + + constructor(target: number, curMl: number, curAddOnce: number, time: number, timeMills: number) { + this.target = target + this.curMl = curMl + this.curAddOnce = curAddOnce + this.time = time + this.timeMills = timeMills + } +} + +@Entry +@Component +struct WaterRecordPage { + pageName: string = '喝水记录' + @State target: number = 1600 + @State curMl: number = 0 + curAddOnce: number = 0 + time: number = 0 + counter = null + + aboutToAppear() { + let record: WaterRecord + if (AppStorage.Has(KEY)) { + record = AppStorage.Get(KEY) + console.warn(JSON.stringify(record)) + let curTimeMills = TimeUtils.getToday0Point().getTime() + if (curTimeMills > record.timeMills) { + // 跨天了,重置 + record = this.resetRecord() + } + } else { + record = this.resetRecord() + } + this.target = record.target + this.curMl = record.curMl + this.curAddOnce = record.curAddOnce + this.time = record.time + } + + resetRecord() { + let record = new WaterRecord(1600, 0, 300, 0, TimeUtils.getToday0Point().getTime()) + AppStorage.SetOrCreate(KEY, record) + return record + } + + build() { + Column() { + TopBarComponent({ pageName: this.pageName }) + + this.Content() + }.width(PERCENTAGE_100) + .backgroundColor(Color.White) + } + + getTodayRecordMl() { + return Math.min(this.target, this.time * this.curAddOnce) + } + + @Builder Content() { + this.Top() + this.Center() + this.WaterInput() + Button('记录喝水') + .width(150) + .height(40) + .backgroundColor(waterColor) + .margin(20) + .onClick(() => { + if (this.getTodayRecordMl() >= this.target) { + return + } + this.time++ + let record = new WaterRecord(this.target, this.curAddOnce * this.time, this.curAddOnce, this.time, TimeUtils.getToday0Point() + .getTime()) + AppStorage.SetOrCreate(KEY, record) + + this.counter = setInterval(() => { + if (this.curMl >= this.getTodayRecordMl()) { + clearInterval(this.counter) + return + } + this.curMl = Math.min(this.getTodayRecordMl(), this.curMl + Math.ceil(Math.random() * 20)) + }, 10) + }) + } + + @Builder Top() { + Row() { + Row() { + Text(this.target.toString()) + .fontColor(waterColor) + .fontWeight(FontWeight.Bold) + .fontSize(26) + .width(PERCENTAGE_60) + .textAlign(TextAlign.Center) + + Text("目标ml") + .fontColor(waterColor) + .fontWeight(FontWeight.Medium) + .fontSize(16) + .width(PERCENTAGE_40) + .textAlign(TextAlign.Center) + .margin({ top: 8 }) + }.height(PERCENTAGE_100).width(PERCENTAGE_50) + + Divider().vertical(true).color(waterColor).strokeWidth(1) + Row() { + Text(`今天喝水 ${this.time}次`).fontSize(13).fontWeight(FontWeight.Medium).textAlign(TextAlign.Center) + }.height(PERCENTAGE_100).width(PERCENTAGE_50).alignItems(VerticalAlign.Center).padding(10) + } + .height("5%") + .width(PERCENTAGE_90) + .margin(10) + .backgroundColor("#ffeffafc") + .borderRadius(10) + + Row() { + Row() { + Text(`${this.curMl}`) + .fontColor(waterColor) + .fontWeight(FontWeight.Bold) + .fontSize(26) + .width(PERCENTAGE_60) + .textAlign(TextAlign.Center) + + Text("ml") + .fontColor(waterColor) + .fontWeight(FontWeight.Medium) + .fontSize(16) + .width(PERCENTAGE_40) + .textAlign(TextAlign.Center) + .margin({ top: 8 }) + }.height(PERCENTAGE_100).width(PERCENTAGE_50) + + Divider().vertical(true).color(waterColor).strokeWidth(1) + Row() { + Text(`进度 ${((this.curMl / this.target) * 100).toFixed(2)}%,剩余${this.target - this.curMl}ml`) + .fontSize(13) + .fontWeight(FontWeight.Medium) + .maxLines(2) + }.height(PERCENTAGE_100).width(PERCENTAGE_50).alignItems(VerticalAlign.Center).padding({ left: 10 }) + } + .height("5%") + .width(PERCENTAGE_90) + .margin(10) + .backgroundColor("#ffeffafc") + .borderRadius(10) + + Text('今日完成目标') + .fontColor(Color.Red) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .visibility(this.curMl >= this.target ? Visibility.Visible : Visibility.Hidden) + } + + @Builder Center() { + Stack({ alignContent: Alignment.Bottom }) { + Row() { + Row().width(PERCENTAGE_100).backgroundColor("#ffd1e4f2").height(`${((this.curMl / this.target) * 100)}%`) + }.width(200).height(230).margin({ bottom: 95 }).alignItems(VerticalAlign.Bottom) + + Image($rawfile('water/water_cup.png')) + .objectFit(ImageFit.Contain) + .width(200) + .height(400) + }.margin(20) + } + + @Builder WaterInput() { + Row() { + Text('本次记录:').fontSize(18) + TextInput({ text: this.curAddOnce.toString() }) + .backgroundColor(CommonData.BACK_COLOR) + .width(80) + .onChange(value => this.curAddOnce = parseInt(value)) + Text('ml').fontSize(20) + } + .height("5%") + .width(PERCENTAGE_70) + .backgroundColor(CommonData.BACK_COLOR) + .borderRadius(10) + .justifyContent(FlexAlign.Center) + } +} +``` +### 商城 +商城是一个绿色产品的购买地方,在商城中我们可以浏览应用上架的绿色产品,通过评论和购买数量可以评估产品的质量。可以给自己喜欢的产品加购付款哦~ +![](image/shop.gif) +在商城中,我通过AppStorage实现了加购商品类型的个数在tab按钮和购物车中同步展示。 +因为这个模块代码比较多,所以展示的不是很多,主要封装了很多组件,比如卡片样式的CardComponent、商品Item、数字选择器NumberPicker、Tag标签样式等: +```js +import BannerData from '../../common/bean/BannerData'; +import BannerComponent from './BannerComponent'; +import { GoodsListItem } from '../../common/constants/HomeConstants'; +import HomeViewModel from '../../viewmodel/HomeViewModel'; +import TopBarComponent from './TopBarComponent'; +import TabsComponent from './TabsComponent'; +import GoodsComponent from './GoodsComponent'; +import GoodsData from '../../common/bean/GoodsData'; +import { HomePageStyle, PERCENTAGE_100 } from '../../common/constants/Constants'; + +let viewModel: HomeViewModel = new HomeViewModel(); + +@Component +export default struct ShopView { + @State tabMenus: Resource[] = []; + @State goodsList: GoodsData[] = []; + @State currentGoodsType: number = 1; + @State bannerList: BannerData[] = []; + + aboutToAppear() { + this.goodsList = viewModel.getGoodsList(); + this.tabMenus = viewModel.loadTabViewMenu(); + this.bannerList = viewModel.loadBanner(); + } + + build() { + Column() { + Column() { + Blank().height(HomePageStyle.BLANK_HEIGHT) + TopBarComponent() + .padding({ + bottom: HomePageStyle.PADDING_VERTICAL, + left: HomePageStyle.PADDING_VERTICAL, + right: HomePageStyle.PADDING_VERTICAL, + }) + + TabsComponent({ tabMenus: this.tabMenus, currentGoodsType: $currentGoodsType }) + Column() { + BannerComponent({ bannerList: this.bannerList }) + Text("———————————— 我是分割线 ————————————") + .fontColor(Color.Gray) + .fontSize(10) + .margin({ top: 5, bottom: 5 }) + GoodsComponent({ goodsList: this.goodsList, currentGoodsType: $currentGoodsType}) + } + .width(PERCENTAGE_100) + .height(PERCENTAGE_100) + .border({ + width: GoodsListItem.BORDER_WIDTH, + color: Color.White, + radius: GoodsListItem.BORDER_RADIUS + }) + .backgroundColor($r("app.color.shopping_cart_bg")) + }.width(PERCENTAGE_100) + } + .height(PERCENTAGE_100) + .backgroundImageSize(ImageSize.Cover) + } +} +``` +购物车: +```js +import { CommonData } from '../../common/constants/Constants'; +import NumberPicker from '../NumberPicker'; +import { AppFontSize } from '../../common/constants/Constants'; +import { BalanceStyle } from '../../common/constants/Constants'; +import router from '@ohos.router'; +import CartRowComponent from './CartRowComponent'; +import { HomePageStyle } from '../../common/constants/Constants'; +import ShoppingCartViewModel from '../../viewmodel/ShoppingCartViewModel'; +import { GoodsListItem } from '../../common/constants/HomeConstants'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; +import GoodsData from '../../common/bean/GoodsData'; +import prompt from '@ohos.prompt' + +let selectIds: Set = new Set() +let vm = new ShoppingCartViewModel() + +@Component +export default struct ShoppingCartPage { + @Consume("idsInCart") @Watch("onGoodIdsChange") idsInCart: number[]; + @Provide totalPrice: number = 0 + @Provide goodsItems: GoodsData[] = [] + @Provide toggleType: number = 0 // 0 结算状态 1 编辑状态 + @Provide isSelectAll: boolean = false + @Provide btnName: string = '编辑' + + aboutToAppear() { + this.goodsItems = vm.getGoodsItems(Array.from(new Set(this.idsInCart))) + } + + onGoodIdsChange() { + this.goodsItems = vm.getGoodsItems(Array.from(new Set(this.idsInCart))) + } + + @Builder CartLayout() { + Text(`购物车(${this.goodsItems.length})`) + .fontSize(20) + .align(Alignment.Center) + .margin({ left: 10 }) + } + + build() { + Column() { + Column() { + Row() { + Row() { + this.CartLayout() + } + .align(Alignment.Start) + + Row() { + Text(this.toggleType === 1 ? "完成" : "编辑") + .fontColor(CommonData.SELECT_COLOR) + .fontSize(15) + .onClick(() => { + if (this.toggleType === 0) { + this.toggleType = 1 + } else { + this.toggleType = 0 + } + console.warn(this.toggleType.toString()) + }) + .margin({ right: 10 }) + Image($rawfile('index/gengduo.png')) + .objectFit(ImageFit.ScaleDown) + .height(20) + .width(20) + .renderMode(ImageRenderMode.Original) + } + .layoutWeight(BalanceStyle.LAYOUT_WEIGHT) + .alignItems(VerticalAlign.Bottom) + .justifyContent(FlexAlign.End) + + }.padding({ + left: HomePageStyle.PADDING_VERTICAL, + right: HomePageStyle.PADDING_VERTICAL, + }) + } + .alignItems(HorizontalAlign.Start) + .width(PERCENTAGE_100) + .height(30) + .margin({ top: 10, bottom: 10 }) + + ShopCartList(); + ShopCartBottom() + } + .alignItems(HorizontalAlign.Start) + } +} + +@Component +struct ShopCartList { + @Consume goodsItems: GoodsData[] + @Consume("idsInCart") idsInCart: number[] + @Consume toggleType: number + + build() { + Column() { + List() { + ForEach(this.goodsItems, item => { + ListItem() { + ShopCartListItem({ goodsItem: item }) + }.onClick(() => { + if (this.toggleType === 1) { + return + } + router.push({ + url: 'pages/DetailsPage', + params: { + id: item.id, + fromShoppingCart: true + }, + }) + }) + }, item => item.id.toString()) + } + .height(PERCENTAGE_100) + .width(PERCENTAGE_100) + .align(Alignment.Top) + .margin({ top: 5 }) + .padding({ left: GoodsListItem.ITEM_PADDING_HORIZONTAL, + right: GoodsListItem.ITEM_PADDING_HORIZONTAL }) + } + .height("88%") + .backgroundColor($r("app.color.shopping_cart_bg")) + } +} + +@Component +struct ShopCartListItem { + @Consume totalPrice: number + @Consume toggleType: number + @Consume isSelectAll: boolean + @Consume("idsInCart") idsInCart: number[] + @State count: number = 0 + isOn: boolean = false + goodsItem: GoodsData + + aboutToAppear() { + this.count = this.idsInCart.filter(v => v == this.goodsItem.id).length + } + + numberChange(oldValue: number, newValue: number) { + if (oldValue < newValue) { + //++ + let goodIds: number[] = AppStorage.Get('shoppingCart').split(",").filter(v => v).map(v => parseInt(v)) + goodIds.push(this.goodsItem.id) + AppStorage.Set('shoppingCart', goodIds.join(",")) + if (this.isOn) { + this.totalPrice += this.goodsItem.price + } + } else { + //-- + let goodIds: number[] = AppStorage.Get('shoppingCart').split(",").filter(v => v).map(v => parseInt(v)) + let i = goodIds.indexOf(this.goodsItem?.id) + if (i !== -1) { + goodIds = goodIds.slice(i, 1) + AppStorage.Set('shoppingCart', goodIds.join(",")) + if (this.isOn) { + this.totalPrice = Math.max(0, this.totalPrice - this.goodsItem.price) + } + } + } + } + + build() { + Row() { + Row() { + Toggle({ type: ToggleType.Checkbox, isOn: this.isSelectAll }) + .width(10) + .height(10) + .selectedColor(Color.Red) + .onChange((isOn: boolean) => { + this.isOn = isOn + if (isOn) { + console.log("isON") + if (this.toggleType === 0) { + this.totalPrice += this.goodsItem.price * this.count + } + selectIds.add(this.goodsItem.id) + } else { + if (this.toggleType === 0) { + this.totalPrice = Math.max(0, this.totalPrice - this.goodsItem.price * this.count) + } + selectIds.delete(this.goodsItem.id) + + } + }) + .margin({ bottom: 50 }) + } + .height("100%") + + Row() { + Image(this.goodsItem.goodsImg) + .objectFit(ImageFit.ScaleDown) + .height(100) + .width(100) + .renderMode(ImageRenderMode.Original) + .borderRadius(5) + .margin({ bottom: 50 }) + } + .height("100%") + + Column() { + Row() { + Text(this.goodsItem.goodsName) + .fontSize(15) + .maxLines(GoodsListItem.MAX_LINE_GOODS_NAME) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + } + .width("86%") + + CartRowComponent({ data: this.buildText1() }) + CartRowComponent({ data: this.buildCommonRowText("跨店每满299减50") }) + CartRowComponent({ data: this.buildCommonRowText("30天价保") }) + + Row() { + Text($r('app.string.detail_price_symbol')) + .fontSize(15) + .fontColor(Color.Red) + Text(`${this.goodsItem.price}.00`) + .fontSize(20) + .fontColor(Color.Red) + NumberPicker({ number: $count, numberChange: this.numberChange.bind(this) }) + .margin({ left: 45 }) + } + .alignItems(VerticalAlign.Bottom) + .margin({ top: 10 }) + } + .padding({ left: 10, right: 5 }) + .width("70%") + .alignItems(HorizontalAlign.Start) + .justifyContent(FlexAlign.Start) + } + .height(200) + .margin({ top: 10 }) + .width(PERCENTAGE_100) + .borderRadius(10) + .shadow({ + radius: 5, + color: Color.Gray, + offsetX: 0, + offsetY: 5 + }) + .backgroundColor(Color.White) + } + + @Builder buildText1() { + Text(`6期 `) + .fontSize(12) + .fontColor(Color.Red) + Row() { + Text("分期免息") + .fontSize(12) + .fontColor(Color.White) + } + .linearGradient({ + direction: GradientDirection.Right, + colors: [[0xF20401, 0.0], [0xFF4614, 0.1]] + }) + } + + @Builder buildCommonRowText(content: string) { + Text(content) + .fontSize(12) + .fontColor(Color.Red) + } +} + + +@Extend(Text) function setTextStyle () { + .fontColor(Color.Red) + .fontSize(18) +} + +@Component +struct ShopCartBottom { + @Consume totalPrice: number + @Consume goodsItems: GoodsData[] + @Consume("idsInCart") idsInCart: number[]; + @Consume toggleType: number + @Consume isSelectAll: boolean + + build() { + Row() { + Row() { + Toggle({ type: ToggleType.Checkbox }) + .width(10) + .height(10) + .selectedColor(Color.Red) + .onChange((isOn: boolean) => { + if (isOn) { + if (this.toggleType === 0) { + if (this.idsInCart.length) { + this.totalPrice = this.idsInCart.map(id => this.goodsItems.find(item => item.id == id)?.price) + .reduce((a, b) => a + b) + } else { + this.totalPrice = 0 + } + } + this.isSelectAll = true + this.goodsItems.map(v => v.id).forEach(id => selectIds.add(id)) + } else { + if (this.toggleType === 0) { + this.totalPrice = 0 + } + this.isSelectAll = false + selectIds.clear() + } + }) + Text("全选") + .fontSize(11) + } + .margin({ right: 5 }) + + Row() { + Text('合计: ') + .fontSize(15) + Text($r('app.string.detail_price_symbol')) + .setTextStyle() + Text(`${this.totalPrice}.00`) + .setTextStyle() + .margin({ left: 1 }) + .width(150) + Button() { + Text(`结算(${selectIds.size})`) + .fontColor(Color.White) + .fontSize(12) + } + .backgroundColor(Color.Orange) + .width(80) + .height(30) + .borderRadius(1) + .margin({ right: 5 }) + .onClick(() => { + if (selectIds.size <= 0) { + prompt.showToast({ + message: '您还没有选择宝贝哦!', + duration: 1000, + bottom: 1000 + }) + return; + } + this.removeGoods() + prompt.showToast({ + message: '结算成功', + duration: 1500, + }) + }) + + } + .width("100%") + .height("100%") + .visibility(this.toggleType === 1 ? Visibility.None : Visibility.Visible) + + Row() { + Button() { + Text('删除') + .fontColor(Color.Black) + .fontSize(14) + } + .width(60) + .height(30) + .backgroundColor(Color.White) + .borderRadius(1) + .border({ + color: Color.Gray, + width: 1 + }) + .onClick(() => { + if (selectIds.size <= 0) { + prompt.showToast({ + message: '您还没有选择商品哦!', + duration: 1000, + bottom: 1000 + }) + return; + } + // 确认删除吗 + prompt.showDialog({ + message: `确认要删除这${selectIds.size}种商品吗?`, + buttons: [ + { + text: '取消', + color: '#000000', + }, + { + text: '确认', + color: '#000000', + } + ], + }).then(data => { + if (data.index === 1) { + this.removeGoods() + } + }) + }) + } + .justifyContent(FlexAlign.End) + .width("80%") + .height("100%") + .visibility(this.toggleType === 0 ? Visibility.None : Visibility.Visible) + } + .height("5%") + .width('100%') + .backgroundColor(Color.White) + .alignItems(VerticalAlign.Center) + // .justifyContent(FlexAlign.End) + } + + removeGoods() { + this.goodsItems = this.goodsItems.filter(v =>!selectIds.has(v.id)) + this.idsInCart = this.idsInCart.filter(id =>!selectIds.has(id)) + let goodIds: number[] = AppStorage.Get('shoppingCart').split(",").filter(v => v).map(v => parseInt(v)) + AppStorage.Set('shoppingCart', goodIds.filter(v =>!selectIds.has(v)).join(",")) + selectIds = new Set() + this.totalPrice = 0 + } +} + +``` +## 学习总结 +- 通过训练营课程的学习,然后自己根据所学的知识在HarmonyOS平台上开发出一个属于自己的HarmonyOS应用程序,感觉很有成就感。 +- 通过ArkUI和类ts语言,可以封装很多通用的组件,通过万物皆对象的思想去设计感觉挺好的。 +- 对于开发工具以及编程语言的框架来说,虽然现在还是有一些瑕疵,不过我相信大佬们会很努力地完善和优化好这个生态的,我们也不必着急,耐心等待花开。相关的问题反馈我也单独发帖了。 +- 最后,希望以后自己继续完善应用,也希望HarmonyOS发展的越来越好,把生态壮大,让更多开发者参与进来共同创造! \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/build-profile.json5" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/build-profile.json5" new file mode 100644 index 0000000000000000000000000000000000000000..f56eb9ce06906aee9a8483de2bc40438e719af1b --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/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" + ] + } + ] + } + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/.gitignore" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..5a6ba80fa3d9498a23ae8ae7d9518f8743fa8a96 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/.gitignore" @@ -0,0 +1,4 @@ +/node_modules +/.preview +/build +/.cxx \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/build-profile.json5" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/build-profile.json5" new file mode 100644 index 0000000000000000000000000000000000000000..a0c5de3a47d8b7a5ab87b855b71008bbedf29789 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/build-profile.json5" @@ -0,0 +1,11 @@ +{ + "apiType": 'stageMode', + "buildOption": { + }, + "targets": [ + { + "name": "default", + "runtimeOS": "HarmonyOS" + } + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/hvigorfile.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/hvigorfile.ts" new file mode 100644 index 0000000000000000000000000000000000000000..80e4ec5b81689f238c34614b167a0b9e9c83e8d9 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/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'; diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/package-lock.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/package-lock.json" new file mode 100644 index 0000000000000000000000000000000000000000..6b5c677321c8c4acabe0282ef103e8ad3e03aab7 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/package-lock.json" @@ -0,0 +1,5 @@ +{ + "name": "entry", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/package.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/package.json" new file mode 100644 index 0000000000000000000000000000000000000000..c4c0623e693b7e1052d960105df2ddcfcf363f06 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/package.json" @@ -0,0 +1,13 @@ +{ + "name": "entry", + "version": "1.0.0", + "ohos": { + "org": "huawei", + "buildTool": "hvigor", + "directoryLevel": "module" + }, + "description": "example description", + "repository": {}, + "license": "ISC", + "dependencies": {} +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/DetailsAbility/DetailsAbility.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/DetailsAbility/DetailsAbility.ts" new file mode 100644 index 0000000000000000000000000000000000000000..6bde7e7c793db315746f6480d2d4f01d6aa87a12 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/DetailsAbility/DetailsAbility.ts" @@ -0,0 +1,46 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability'; + +const TAG: string = 'DetailsAbility'; +const KEY: string = 'GoodsId'; +const DETAIL_ABILITY_DOMAIN = 0x00002; + +export default class DetailsAbility extends Ability { + onCreate(want, launchParam) { + let id: number = want?.parameters?.id; + AppStorage.SetOrCreate(KEY, id); + hilog.info(DETAIL_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onCreate'); + } + + onDestroy() { + hilog.info(DETAIL_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + hilog.info(0x0000, TAG, '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/DetailsPage', (err, data) => { + if (err.code) { + hilog.error(DETAIL_ABILITY_DOMAIN, TAG, 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(DETAIL_ABILITY_DOMAIN, TAG, 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.info(DETAIL_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.info(DETAIL_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.info(DETAIL_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onBackground'); + } +}; diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/TimeUtils.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/TimeUtils.ets" new file mode 100644 index 0000000000000000000000000000000000000000..6c7186ffee01807c233f24241fc731f78af35360 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/TimeUtils.ets" @@ -0,0 +1,16 @@ +export default class TimeUtils { + public static ONE_SECOND_MILLS = 1000; + public static ONE_MINUTE_DURATION = 60; + public static ONE_HOUR_DURATION = 60 * 60; + public static HOURS_PER_DAY = 24; + public static ONE_DAY_DURATION = TimeUtils.HOURS_PER_DAY * 60 * 60; + public static ONE_WEEK_DURATION = 7 * 24 * 60 * 60; + public static ONE_MINUTE_MILLS = TimeUtils.ONE_MINUTE_DURATION * TimeUtils.ONE_SECOND_MILLS; + public static ONE_HOUR_DURATION_MILLIS = TimeUtils.ONE_HOUR_DURATION * TimeUtils.ONE_SECOND_MILLS; + public static ONE_DAY_DURATION_MILLIS = TimeUtils.ONE_DAY_DURATION * TimeUtils.ONE_SECOND_MILLS; + + public static getToday0Point():Date { + return new Date(new Date().setHours(0, 0, 0, 0)) + } + +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/TipsUtils.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/TipsUtils.ets" new file mode 100644 index 0000000000000000000000000000000000000000..6df5dfcd53238a5e44ed72c0420df03b43b28b53 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/TipsUtils.ets" @@ -0,0 +1,8 @@ +import prompt from '@ohos.prompt'; + +export const showToast = (msg:string) => { + prompt.showToast({ + message: msg, + duration: 1500, + }) +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/BannerData.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/BannerData.ets" new file mode 100644 index 0000000000000000000000000000000000000000..39a76187130280b3fd9d02a98ace278dc33b1229 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/BannerData.ets" @@ -0,0 +1,6 @@ +/** + * BannerData is used to initialize the BannerComponent. + */ +export default class BannerData { + imgSrc: Resource; +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/GoodsData.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/GoodsData.ets" new file mode 100644 index 0000000000000000000000000000000000000000..cf2289d9fb842162c1409cad6746314e84947f77 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/GoodsData.ets" @@ -0,0 +1,16 @@ +/** + * GoodsData is used to initialize the GoodsComponent. + */ +@Observed +export default class GoodsData { + id: number; + goodsName: Resource; + price: number; + originalPrice: number; + discounts: Resource; + label: Resource; + goodsImg: Resource; + goodsDescription: Resource; + goodsType: number; + commentCount: number; +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/GoodsServiceData.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/GoodsServiceData.ets" new file mode 100644 index 0000000000000000000000000000000000000000..e8f4b0cafda05202aa165a908c012fdfa41d2ec0 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/GoodsServiceData.ets" @@ -0,0 +1,9 @@ +/** + * GoodsData is used to initialize ServicesComponent. + */ +export default class GoodsServiceData { + id: number; + name: Resource; + description: Resource; + isShowActionMore: boolean +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/MenuBtnData.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/MenuBtnData.ets" new file mode 100644 index 0000000000000000000000000000000000000000..437aa97d9bf9781d326e7e2e32808bba68efe183 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/MenuBtnData.ets" @@ -0,0 +1,5 @@ +export default class MenuBtnData { + name: string; + image: Resource; + url?:string +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/MenuData.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/MenuData.ets" new file mode 100644 index 0000000000000000000000000000000000000000..83a60e1c523b718a664ea4ae696388ff13c2e86d --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/MenuData.ets" @@ -0,0 +1,6 @@ +export default class MenuData { + menuName: Resource; + menuContent: Resource; + fontWeight: string; + fontColor: string; +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/ToolBarData.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/ToolBarData.ets" new file mode 100644 index 0000000000000000000000000000000000000000..27ff4d14a8ee3efccce3461a7c0dcdbfd9f1495f --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/ToolBarData.ets" @@ -0,0 +1,9 @@ +/** + * ToolBarData is used to initialize ToolBarComponent. + */ +export default class ToolBarData { + num: number; + text: Resource; + icon_after: Resource; + icon: Resource; +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/FoodData.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/FoodData.ets" new file mode 100644 index 0000000000000000000000000000000000000000..dd9b4038d14e834d444d2cf5caa3dfe1a612f847 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/FoodData.ets" @@ -0,0 +1,38 @@ +import NutrientDefine from './NutrientDefine'; +import { FirstTag, SecondTag } from './Tag'; + +export default class FoodData { + foodId: number + foodName: string + foodImage: Resource + like: number + eatLevel: EatLevel // 1 绿 2 黄 3 红 + descItem: string[] + heat: number // 热量 + addPowerPercent: ThreeCategories // 供能比 + firstTag: FirstTag + secondTag: SecondTag + nutrientContent: NutrientContent[] +} + +export class EatLevel { + level: number + title: string + color: Color +} + +export class ThreeCategories { + p: number // 蛋白质 + f: number // 脂肪 + c: number // 碳水 +} + + +export class NutrientContent { + nd: NutrientDefine + v: number // 数值 + constructor(nd: NutrientDefine, v: number) { + this.nd = nd + this.v = v + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/NutrientDefine.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/NutrientDefine.ets" new file mode 100644 index 0000000000000000000000000000000000000000..1d895323b7f7889567200c6c823dd97d43b808e1 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/NutrientDefine.ets" @@ -0,0 +1,4 @@ +export default class NutrientDefine { + name:string + unit: string +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/Tag.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/Tag.ets" new file mode 100644 index 0000000000000000000000000000000000000000..fdefcb32bde0351acc44cb50f58451fe04081982 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/food/Tag.ets" @@ -0,0 +1,17 @@ +import { NutrientDefineEnum } from '../../../model/EnumList'; +export class FirstTag { + tagId: number + tagName: string +} + +export class SecondTag { + tagId: number + tagName: string + image: Resource + desc: string + firstTag: FirstTag[] + nutrientDefine: NutrientDefineEnum +} + + + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/question/Question.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/question/Question.ets" new file mode 100644 index 0000000000000000000000000000000000000000..00716c1ecfd1032192d0fcf7d8823c885842820c --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/bean/question/Question.ets" @@ -0,0 +1,17 @@ +export default class Question { + id: number + question: string + options: QuestionOptions[] + answerIndex: number + answerNote?: string +} + +export class QuestionOptions { + option: string + selectNum: number + + constructor(option: string, selectNum: number) { + this.option = option + this.selectNum = selectNum + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/Constants.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/Constants.ets" new file mode 100644 index 0000000000000000000000000000000000000000..8018ea9ed3daaaf86e6e9dc4ac7b381fa0e82fbb --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/Constants.ets" @@ -0,0 +1,242 @@ +/** + * The font weight of application. + */ +enum AppFontWeight { + BOLD = '400', + BOLDER = '500', +}; + +/** + * The font size of application. + */ +enum AppFontSize { + S_SMALLER = 12, + SMALLER = 13, + SMALL = 14, + MIDDLE = 16, + LARGE = 20, + LARGER = 35, +}; + +export { AppFontSize, AppFontWeight }; + +/** + * The percentage of 100. + */ +export const PERCENTAGE_100 = '100%'; + +export const PERCENTAGE_90 = '90%'; + +export const PERCENTAGE_80 = '80%'; +export const PERCENTAGE_70 = '70%'; +export const PERCENTAGE_60 = '60%'; +/** + * The percentage of 50. + */ +export const PERCENTAGE_50 = '50%'; +export const PERCENTAGE_40 = '40%'; + +export const PERCENTAGE_30 = '30%'; +/** + * The percentage of 20. + */ +export const PERCENTAGE_20 = '20%'; +export const PERCENTAGE_15 = '15%'; +export const PERCENTAGE_10 = '10%'; + + +/** + * The style of CardComponent. + */ +export const CardStyle = { + /** + * The horizontal margin of CardComponent. + */ + CARD_MARGIN_HORIZONTAL: 16, + + /** + * The top margin of CardComponent. + */ + CARD_MARGIN_TOP: 10, + + /** + * The vertical padding of CardComponent. + */ + CARD_PADDING_VERTICAL: 10, + + /** + * The horizontal padding of CardComponent. + */ + CARD_PADDING_HORIZONTAL: 16, + + /** + * The border radius of CardComponent. + */ + CARD_RADIUS: 18, +}; + +/** + * The style of BalanceComponent. + */ +export const BalanceStyle = { + /** + * The layout weight of BalanceComponent. + */ + LAYOUT_WEIGHT: 1, +}; + +/** + * The style of ToolBarComponent. + */ +export const ToolBarStyle = { + /** + * The bottom margin. + */ + MARGIN_BOTTOM: 4, + + /** + * The size of image. + */ + IMAGE_SIZE: 24, + + /** + * The weight of layout. + */ + LAYOUT_WEIGHT: '25%', + + /** + * The height of divider. + */ + DIVIDER_HEIGHT: 0.5, + + /** + * The opacity of divider. + */ + DIVIDER_OPACITY: 0.05 +}; + +/** + * The style of NavPage. + */ +export const NavPageStyle = { + /** + * The height of Tabs. + */ + BAR_HEIGHT: 0, + + /** + * The default position of Tabs. + */ + POSITION_INITIAL: 0, +}; + +/** + * The style of HomePage. + */ +export const HomePageStyle = { + /** + * The vertical padding. + */ + PADDING_VERTICAL: 8, + + /** + * The horizontal padding. + */ + PADDING_HORIZONTAL: 16, + + /** + * The height of blank. + */ + BLANK_HEIGHT: 15, +}; + +/** + * The style of DetailsPage. + */ +export const DetailsPageStyle = { + /** + * The size of top image. + */ + TOP_IMAGE_SIZE: 32, + + /** + * The margin of top. + */ + MARGIN_TOP_LAYOUT: 16, + + /** + * The top margin of title. + */ + TITLE_MARGIN_TOP: 4, + + /** + * The bottom margin of title. + */ + TITLE_MARGIN_BOTTOM: 10, + + /** + * The height of divider. + */ + DIVIDER_HEIGHT: 0.25, + + /** + * The left margin of divider. + */ + DIVIDER_MARGIN_LEFT: '12%', + + /** + * The top margin of divider. + */ + DIVIDER_MARGIN_TOP: 10, + + /** + * The bottom margin of divider. + */ + DIVIDER_MARGIN_BOTTOM: 18, + + /** + * The top margin of comment list. + */ + COMMENT_LIST_MARGIN_TOP: 10, + + /** + * The height of top layout. + */ + TOP_LAYOUT_HEIGHT: '45%', + + /** + * The height of scroll layout. + */ + SCROLL_LAYOUT_WEIGHT: '93%', + + /** + * The weight of tool bar layout. + */ + TOOLBAR_WEIGHT: '7%', + + /** + * The image size for more action. + */ + IMAGE_SIZE_MORE: 14, +}; + +export const CommonData = { + SELECT_COLOR:$r("app.color.common_select_color"), + UN_SELECT_FONT_COLOR:$r("app.color.common_un_select_font_color"), + GRAY_COLOR:$r("app.color.common_gray_color"), + BACK_COLOR: "#fff6f7fb" +} + + + + + + + + + + + + + + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/DetailsConstants.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/DetailsConstants.ets" new file mode 100644 index 0000000000000000000000000000000000000000..b74ea7df62325294b05d157013742e4d919ddbe2 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/DetailsConstants.ets" @@ -0,0 +1,366 @@ +/** + * The constant of GoodsTitleComponent. + */ +export const GoodsTitle = { + /** + * The max lines of title text. + */ + MAX_LINE: 2, + /** + * The line height of title text. + */ + LINE_HEIGHT: 20, +}; + +/** + * The constant of PanelComponent. + */ +export const ActionPanel = { + + /** + * The image height of PanelComponent. + */ + IMAGE_HEIGHT: 15, + + /** + * The blank width of PanelComponent. + */ + BLANK_WIDTH: 2, +}; + +/** + * The constant of AddressComponent. + */ +export const AddressPicker = { + + /** + * The size of image to show loaction. + */ + IMAGE_SIZE_LOCATION: 18, + + /** + * The image size for more operations. + */ + IMAGE_SIZE_MORE: 14, + + /** + * The max lines. + */ + MAX_LINES: 1, + + /** + * The layout weight of left. + */ + LAYOUT_WEIGHT_LEFT: '12%', + + /** + * The layout weight of center. + */ + LAYOUT_WEIGHT_CENTER: '80%', + + /** + * The layout weight of right. + */ + LAYOUT_WEIGHT_RIGHT: '8%', + + /** + * The margin of right image. + */ + MARGIN_RIGHT_IMAGE: '2%', +}; + +/** + * The constant of CommentsComponent. + */ +export const CommentList = { + + /** + * The space of List. + */ + SPACE: 5, + + /** + * The image size of head portrait. + */ + IMAGE_SIZE_HEAD_PORTRAIT: 30, + + /** + * The margin of head portrait. + */ + MARGIN_HEAD_PORTRAIT: 8, + + /** + * The line height of phone number text. + */ + LINE_HEIGHT_PHONE: 20, + + /** + * The blank height of phone number text. + */ + BLANK_HEIGHT_PHONE: 2, + + /** + * The width of blank. + */ + MARK_BLANK_WIDTH: 2, + + /** + * The width of image. + */ + IMAGE_MARK_WIDTH: 10, + + GOOD_IMAGE_MARK_WIDTH: 70, + + /** + * The max lines. + */ + COMMENT_MAX_LINES: 2, + + /** + * The line height. + */ + COMMENT_LINE_HEIGHT: 20, + + /** + * The margin of text. + */ + MARGIN_TEXT: 5, + + /** + * The height of List. + */ + HEIGHT: '70%', +}; + +/** + * The constant of CommentsHeaderComponent. + */ +export const CommentHeader = { + + /** + * The layout weight. + */ + LAYOUT_WEIGHT: '50%', + + /** + * The arrow text. + */ + ARROW: ' >', + + /** + * The line height. + */ + LINE_HEIGHT: 20, +}; + +/** + * The constant of BottomBarComponent. + */ +export const BottomBar = { + + /** + * The height of divider. + */ + DIVIDER_HEIGHT: 0.5, + + /** + * The line height of text. + */ + TEXT_LINE_HEIGHT: 20, + + /** + * The width of container. + */ + CONTAINER_SIZE_WIDTH: 195, + + /** + * The height of container. + */ + CONTAINER_SIZE_HEIGHT: 30, + + /** + * The padding of right. + */ + BAR_PADDING_RIGHT: 12, + + /** + * The padding of top. + */ + BAR_PADDING_TOP: 9, + + /** + * The padding of bottom. + */ + BAR_PADDING_BOTTOM: 7, + + /** + * The width of text. + */ + TEXT_WIDTH: '50%', +}; + +/** + * The constant of PickerComponent. + */ +export const GoodsPicker = { + + /** + * The line height of GoodsPicker text. + */ + LINE_HEIGHT_TEXT_SELECTED: 25, + + /** + * The max lines. + */ + MAX_LINES: 2, + + /** + * The lines height of description text. + */ + LINE_HEIGHT_DESCRIPTION: 25, + + /** + * The left margin of description text. + */ + MARGIN_LEFT_DESCRIPTION: 15, + + /** + * The left weight of layout. + */ + LAYOUT_WEIGHT_LEFT: '10%', + + /** + * The center weight of layout. + */ + LAYOUT_WEIGHT_CENTER: '80%', + + /** + * The right weight of layout. + */ + LAYOUT_WEIGHT_RIGHT: '10%', +}; + +/** + * The constant of PreviewerComponent. + */ +export const GoodsPreviewer = { + /** + * The bottom padding of image. + */ + PADDING_IMAGE_BOTTOM: 40, + + /** + * The top padding of image. + */ + PADDING_IMAGE_TOP: 20, + + /** + * The text of indicator. + */ + INDICATOR_TEXT: '1/4', + + /** + * The right margin of indicator. + */ + INDICATOR_MARGIN_RIGHT: 24, + + /** + * The bottom margin of indicator. + */ + INDICATOR_MARGIN_BOTTOM: 17, + + /** + * The horizontal padding of indicator. + */ + INDICATOR_PADDING_HORIZONTAL: 10, + + /** + * The top padding of indicator. + */ + INDICATOR_PADDING_TOP: 3, + + /** + * The bottom padding of indicator. + */ + INDICATOR_PADDING_BOTTOM: 2, + + /** + * The border radius. + */ + BORDER_RADIUS: 9, + + /** + * The location text. + */ + LOCATION: "86%", + + /** + * The zIndex of layout. + */ + INDEX: 2, +}; + +/** + * The constant of ServiceItemComponent. + */ +export const GoodsServiceItem = { + /** + * The max lines of text. + */ + MAX_LINES: 1, + + /** + * The size of service image. + */ + IMAGE_SIZE_SERVICE: 18, + + /** + * The size of more action image. + */ + IMAGE_SIZE_MORE: 14, + + /** + * The layout weight of left. + */ + LAYOUT_WEIGHT_LEFT: '12%', + + /** + * The layout weight of center. + */ + LAYOUT_WEIGHT_CENTER: '80%', + + /** + * The layout weight of right. + */ + LAYOUT_WEIGHT_RIGHT: '8%', + + /** + * The right margin of image. + */ + MARGIN_RIGHT_IMAGE: '2%', +}; + +/** + * The constant of ServicesComponent. + */ +export const GoodsService = { + /** + * The space of List. + */ + SPACE: 10, + + /** + * The height of List. + */ + LIST_HEIGHT: 94, +}; + + + + + + + + + + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/HomeConstants.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/HomeConstants.ets" new file mode 100644 index 0000000000000000000000000000000000000000..022a0372312c050150b4e5186a7639ecf9347e3c --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/common/constants/HomeConstants.ets" @@ -0,0 +1,287 @@ +/** + * The constant of BannerComponent. + */ +export const Banner = { + /** + * The size of indicator. + */ + INDICATOR_SIZE: 12, + + /** + * The width of banner. + */ + WIDTH: '100%', + + /** + * The space of column. + */ + SPACE: 5, + + /** + * The cache count of Swiper. + */ + CACHE_COUNT: 2, + + /** + * The default index of Swiper. + */ + POSITION: 1, + + /** + * The interval time of Swiper. + */ + TIME: 4000, + + /** + * The duration of Swiper. + */ + DURATION: 1000, + + /** + * The item space of Swiper. + */ + ITEM_SPACE: 0 +}; + +/** + * The constant of GoodsComponent. + */ +export const GoodsList = { + /** + * The padding of grid. + */ + GRID_PADDING: 12, + + /** + * The columnsGap of grid. + */ + SPACE: 8, + + + /** + * The layout direction of grid. + */ + HORIZONTAL: 0, + + /** + * The columns template of grid. + */ + GRID_STYLE: '1fr 1fr', +}; + +/** + * The constant of GoodsItemComponent. + */ +export const GoodsListItem = { + /** + * The container height of goods name. + */ + CONTAINER_GOODS_NAME_HEIGHT: 40, + + /** + * The max line of goods name. + */ + MAX_LINE_GOODS_NAME: 2, + + MAX_LINE_GOODS_NAME_4: 4, + + /** + * The margin of goods discounts. + */ + MARGIN_DISCOUNTS: 5, + + /** + * The size of goods image. + */ + GOODS_IMAGE_SIZE: 160, + + /** + * The top margin of goods image. + */ + GOODS_IMAGE_MARGIN_TOP: 10, + + /** + * The border radius of goods label. + */ + BORDER_RADIUS_LABEL: 5, + + /** + * The verical padding of goods label. + */ + PADDING_LABEL_VERTICAL: 8, + + /** + * The horizontal padding of goods label. + */ + PADDING_LABEL_HORIZONTAL: 2, + + /** + * The top margin of goods label container. + */ + CONTAINER_LABEL_MARGIN_TOP: 6, + + /** + * The bottom margin of goods label container. + */ + CONTAINER_LABEL_MARGIN_BOTTOM: 12, + + /** + * The top margin of text container. + */ + TEXT_LAYER_MARGIN_TOP: 5, + + TEXT_LAYER_MARGIN_BOTTOM: 5, + + /** + * The width of text container. + */ + TEXT_LAYER_WIDTH: "98%", + + /** + * The horizontal padding of item. + */ + ITEM_PADDING_HORIZONTAL: 5, + + /** + * The width of border. + */ + BORDER_WIDTH: 1, + + /** + * The value of border radius. + */ + BORDER_RADIUS: 10, +}; + +/** + * The constant of TabsComponent. + */ +export const GoodsTabs = { + /** + * The height of GoodsTabs. + */ + BAR_HEIGHT: 35, + + /** + * The default index of GoodsTabs. + */ + TABVIEW_POSITION_INDEX_PAGE: 0, + + /** + * The width of image. + */ + IMAGE_SIZE_WIDTH: 12, + + /** + * The height of image. + */ + IMAGE_SIZE_HEIGHT: 16, + + + /** + * The width of tab. + */ + TAB_WIDTH: '90%', + + /** + * The animation duration of Tabs. + */ + TIME: 400, + + /** + * The blank width of Tabs setting. + */ + SETTING_BLANK_WIDTH: 4, + + /** + * The layout weight of Tabs setting. + */ + SETTING_LAYOUT: '10%', + + /** + * The padding of right. + */ + PADDING_RIGHT: '9%', +}; + +/** + * The constant of MenusComponent. + */ +export const Menus = { + /** + * The vertical padding of container. + */ + CONTAINER_PADDING_VERTICAL: 12, + + /** + * The vertical padding of item. + */ + ITEM_PADDING_VERTICAL: 16, + + /** + * The weight of layout. + */ + LAYOUT_WEIGHT: '25%', +}; + +/** + * The constant of SearchComponent. + */ +export const SearchBar = { + /** + * The width of layout. + */ + WEIGHT: '75%', + + /** + * The size of image. + */ + IMAGE_SIZE: 20, + + /** + * The height of SearchBar. + */ + BAR_HEIGHT: 40, + + /** + * The right margin of input. + */ + TEXT_INPUT_MARGIN_RIGHT: 20, + + /** + * The left padding of container. + */ + CONTAINER_PADDING_LEFT: 10, + + /** + * The border radius. + */ + BORDER_RADIUS: 36, +}; + +/** + * The constant of TopBarComponent. + */ +export const TopBar = { + /** + * The size of image. + */ + IMAGE_SIZE: 40, + + /** + * The height of BalanceComponent. + */ + HEIGHT: '4%', +}; + + + + + + + + + + + + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/compareability/CompareAbility.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/compareability/CompareAbility.ts" new file mode 100644 index 0000000000000000000000000000000000000000..e7287cc03afbab786a8802bb65265a5369ae5f5e --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/compareability/CompareAbility.ts" @@ -0,0 +1,51 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import Window from '@ohos.window' + +export default class CompareAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/ComparePage', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + 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.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/entryability/EntryAbility.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/entryability/EntryAbility.ts" new file mode 100644 index 0000000000000000000000000000000000000000..25b37870a06a51f34b9053d1f9373b06ef8595b6 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/entryability/EntryAbility.ts" @@ -0,0 +1,54 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import Window from '@ohos.window' + +const TAG: string = 'EntryAbility'; +const ENTRY_ABILITY_DOMAIN = 0x00001; + +export default class EntryAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.INFO); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onCreate'); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.INFO); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.INFO); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/NavPage', (err, data) => { + if (err.code) { + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.ERROR); + hilog.error(ENTRY_ABILITY_DOMAIN, TAG, 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.INFO); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.INFO); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.INFO); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(ENTRY_ABILITY_DOMAIN, TAG, hilog.LogLevel.INFO); + hilog.info(ENTRY_ABILITY_DOMAIN, TAG, '%{public}s', 'Ability onBackground'); + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/fooddetailability/FoodDetailAbility.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/fooddetailability/FoodDetailAbility.ts" new file mode 100644 index 0000000000000000000000000000000000000000..f98ad1b530e118b47ebc8add0fc47acfad5e5b43 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/fooddetailability/FoodDetailAbility.ts" @@ -0,0 +1,51 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import Window from '@ohos.window' + +export default class FoodDetailAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/FoodDetailPage', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + 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.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/foodlistability/FoodListAbility.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/foodlistability/FoodListAbility.ts" new file mode 100644 index 0000000000000000000000000000000000000000..f61558ba6b166b0e80fa402632c4315aec6a38b4 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/foodlistability/FoodListAbility.ts" @@ -0,0 +1,51 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import Window from '@ohos.window' + +export default class FoodListAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/FirstTagPage', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + 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.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/DataModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/DataModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..58683c368d7e2284f6e78adc9dc43f94f73afb66 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/DataModel.ets" @@ -0,0 +1,223 @@ +import BannerData from '../common/bean/BannerData'; +import MenuData from '../common/bean/MenuData'; +import GoodsData from '../common/bean/GoodsData'; +import ToolBarData from '../common/bean/ToolBarData'; +import GoodsServiceData from '../common/bean/GoodsServiceData'; + +/* + * The DataModel file instead of network data. + */ +export default class DataModel { + public static readonly BANNER: BannerData[] = [ + { + imgSrc: $rawfile('index/banner1.png') + }, + { + imgSrc: $rawfile('index/banner2.png') + }, + { + imgSrc: $rawfile('index/banner3.png') + } + ] + public static readonly TAB_VIEW_MENU: Resource[] = [ + $r('app.string.goods_type_1'), + $r('app.string.goods_type_2'), + $r('app.string.goods_type_3'), + $r('app.string.goods_type_4'), + $r('app.string.goods_type_5'), + ]; + public static readonly HOME_MENU: MenuData[] = [ + { + menuName: $r('app.string.home_menu_all'), + menuContent: $r('app.string.home_menu_all_content'), + fontWeight: '500', + fontColor: '#FFE92F4F' + }, + { + menuName: $r('app.string.home_menu_select'), + menuContent: $r('app.string.home_menu_select_content'), + fontWeight: '400', + fontColor: '#FF000000' + }, + { + menuName: $r('app.string.home_menu_new'), + menuContent: $r('app.string.home_menu_new_content'), + fontWeight: '400', + fontColor: '#FF000000', + }, + { + menuName: $r('app.string.home_menu_discounts'), + menuContent: $r('app.string.home_menu_discounts_content'), + fontWeight: '400', + fontColor: '#FF000000' + } + ]; + public static readonly GOOD_LIST: GoodsData[] = [ + { + id: 1, + goodsName: $r('app.string.goods_list_item_1'), + price: 89, + originalPrice: 1000, + discounts: $r('app.string.goods_list_item_1_save'), + label: $r('app.string.goods_list_activity_new'), + goodsImg: $rawfile('index/1.jpg'), + goodsDescription: $r('app.string.goods_list_item_1_desc'), + goodsType: 1, + commentCount: 5600, + }, + { + id: 2, + goodsName: $r('app.string.goods_list_item_2'), + price: 189, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/2.jpg'), + goodsDescription: $r('app.string.goods_list_item_2_desc'), + goodsType: 1, + commentCount: 500, + }, + { + id: 3, + goodsName: $r('app.string.goods_list_item_3'), + price: 299, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/3.jpg'), + goodsDescription: $r('app.string.goods_list_item_3_desc'), + goodsType: 1, + commentCount: 1000, + }, + { + id: 4, + goodsName: $r('app.string.goods_list_item_4'), + price: 199, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/4.jpg'), + goodsDescription: $r('app.string.goods_list_item_4_desc'), + goodsType: 1, + commentCount: 2400, + }, + { + id: 5, + goodsName: $r('app.string.goods_list_item_5'), + price: 134, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/5.jpg'), + goodsDescription: $r('app.string.goods_list_item_5_desc'), + goodsType: 4, + commentCount: 1100, + }, + { + id: 6, + goodsName: $r('app.string.goods_list_item_7'), + price: 200, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/7.jpg'), + goodsDescription: $r('app.string.goods_list_item_7_desc'), + goodsType: 3, + commentCount: 2100, + }, + { + id: 7, + goodsName: $r('app.string.goods_list_item_7'), + price: 200, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/7.jpg'), + goodsDescription: $r('app.string.goods_list_item_7_desc'), + goodsType: 3, + commentCount: 2100, + }, + { + id: 8, + goodsName: $r('app.string.goods_list_item_8'), + price: 5555, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/6.jpg'), + goodsDescription: $r('app.string.goods_list_item_8_desc'), + goodsType: 5, + commentCount: 66666, + }, + { + id: 9, + goodsName: $r('app.string.goods_list_item_9'), + price: 6666, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/9.jpg'), + goodsDescription: $r('app.string.goods_list_item_9_desc'), + goodsType: 6, + commentCount: 66666, + }, + { + id: 10, + goodsName: $r('app.string.goods_list_item_10'), + price: 22, + originalPrice: 0, + discounts: $r('app.string.goods_list_item_2_save'), + label: $r('app.string.goods_list_activity_time'), + goodsImg: $rawfile('index/10.jpg'), + goodsDescription: $r('app.string.goods_list_item_10_desc'), + goodsType: 2, + commentCount: 10, + } + ]; + public static readonly TOOL_BAR: ToolBarData[] = [{ + num: 0, + text: $r('app.string.nav_index'), + icon: $rawfile('index/home.png'), + icon_after: $rawfile('index/home_selected.png'), + }, + { + num: 1, + text: $r('app.string.nav_shop'), + icon: $rawfile('index/shang_cheng.png'), + icon_after: $rawfile('index/shang_cheng_select.png'), + }, + { + num: 2, + text: $r('app.string.nav_shopping_cart'), + icon: $rawfile('index/shopping_cart.png'), + icon_after: $rawfile('index/shopping_cart_selected.png'), + }, + { + num: 3, + text: $r('app.string.nav_mine'), + icon: $rawfile('index/mine.png'), + icon_after: $rawfile('index/mine_selected.png'), + } + ]; + public static readonly GOOD_SERVICE: GoodsServiceData[] = [ + { + id: 1, + name: $r('app.string.goods_service_1_name'), + description: $r('app.string.goods_service_1_desc'), + isShowActionMore: false + }, + { + id: 2, + name: $r('app.string.goods_service_2_name'), + description: $r('app.string.goods_service_2_desc'), + isShowActionMore: false + }, + { + id: 3, + name: null, + description: $r('app.string.goods_service_3_desc'), + isShowActionMore: false + } + ]; +} + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/EnumList.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/EnumList.ets" new file mode 100644 index 0000000000000000000000000000000000000000..f584b6bed4e2a7eb87591fa73f65d9d6bd7bf6a0 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/EnumList.ets" @@ -0,0 +1,23 @@ +export enum NutrientDefineEnum { + 热量, + 蛋白质, + 脂肪, + 碳水化合物, + 膳食纤维, + 维生素A, + 维生素C, + 维生素E, + 胡萝卜素, + 维生素B1, + 维生素B2 +} +export enum FirstTagEnum { + 热门, + 增肌, + 其他 +} +export enum SecondTagEnum { + 高蛋白主食类, + 高蛋白海鲜类, + 低热量麦片 +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/FoodDataModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/FoodDataModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..7d0af445e9305a92a6a5f6aa52b0f7e10366e04d --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/FoodDataModel.ets" @@ -0,0 +1,276 @@ +import { SecondTagEnum } from './EnumList'; +import { FirstTagEnum } from './EnumList'; +import { NutrientDefineEnum } from './EnumList'; +import { NutrientContent } from '../common/bean/food/FoodData'; +import NutrientDefineDataModel from './NutrientDefineDataModel'; +import FoodData from '../common/bean/food/FoodData'; +import { EatLevel } from '../common/bean/food/FoodData'; +import { FirstTag, SecondTag } from '../common/bean/food/Tag'; + +export default class FoodDataModel { + public static readonly FIRST_TAG: FirstTag[] = [ + { + tagId: 1, + tagName: '热门' + }, + { + tagId: 2, + tagName: '增肌' + }, + { + tagId: 3, + tagName: '其他' + } + ] + public static readonly SECOND_TAG: SecondTag[] = [ + { + tagId: 1, + tagName: '高蛋白—主食类', + image: $rawfile('secondtagimage/zhu_shi.png'), + desc: '高蛋白饮食会增加饱腹感,促进身体新陈代谢,提高热量消耗效率,同时蛋白质为肌肉生长必需成分,摄取充足的高蛋白还能有助增肌。', + firstTag: [FoodDataModel.FIRST_TAG[FirstTagEnum.热门], FoodDataModel.FIRST_TAG[FirstTagEnum.增肌]], + nutrientDefine: NutrientDefineEnum.蛋白质 + }, + { + tagId: 2, + tagName: '高蛋白—海鲜类', + image: $rawfile('secondtagimage/hai_xian.png'), + desc: '高蛋白饮食会增加饱腹感,促进身体新陈代谢,提高热量消耗效率,同时蛋白质为肌肉生长必需成分,摄取充足的高蛋白还能有助增肌。', + firstTag: [FoodDataModel.FIRST_TAG[FirstTagEnum.热门], FoodDataModel.FIRST_TAG[FirstTagEnum.增肌]], + nutrientDefine: NutrientDefineEnum.蛋白质 + }, + { + tagId: 3, + tagName: '低热量—麦片', + image: $rawfile('secondtagimage/mai_pian.png'), + desc: '吃腻了燕麦片,来点酥脆谷物换个口味吧~燕麦脆类的产品通常会加入果干和坚果,满满一碗更丰富~当然相对而言热量也会更高哦。', + firstTag: [FoodDataModel.FIRST_TAG[FirstTagEnum.热门], FoodDataModel.FIRST_TAG[FirstTagEnum.其他]], + nutrientDefine: NutrientDefineEnum.碳水化合物 + }, + { + tagId: 4, + tagName: '高蛋白—蔬菜菌藻类', + image: $rawfile('secondtagimage/shu_cai.png'), + desc: '高蛋白饮食会增加饱腹感,促进身体新陈代谢,提高热量消耗效率,同时蛋白质为肌肉生长必需成分,摄取充足的高蛋白还能有助增肌。', + firstTag: [FoodDataModel.FIRST_TAG[FirstTagEnum.增肌]], + nutrientDefine: NutrientDefineEnum.蛋白质 + }, + { + tagId: 5, + tagName: '高蛋白—豆类', + image: $rawfile('secondtagimage/dou_lei.png'), + desc: '高蛋白饮食会增加饱腹感,促进身体新陈代谢,提高热量消耗效率,同时蛋白质为肌肉生长必需成分,摄取充足的高蛋白还能有助增肌。', + firstTag: [FoodDataModel.FIRST_TAG[FirstTagEnum.增肌]], + nutrientDefine: NutrientDefineEnum.蛋白质 + } + ] + public static readonly EAT_LEVEL: EatLevel[] = [ + { + level: 1, + title: '绿灯食物:较推荐', + color: Color.Green + }, + { + level: 2, + title: '黄灯食物:适量吃', + color: Color.Yellow + }, + { + level: 3, + title: '红灯食物:限量吃', + color: Color.Red + } + ]; + public static readonly FOOD_DATA: FoodData[] = [ + { + foodId: 1, + foodName: '高蛋白小酥鱼', + foodImage: $rawfile('food/xiao_yu.png'), + like: 2234, + eatLevel: FoodDataModel.EAT_LEVEL[0], + descItem: ['高蛋白、高钙', '零食、脂肪偏高'], + heat: 506, + addPowerPercent: { + p: 70, f: 23, c: 7 + }, + firstTag: FoodDataModel.FIRST_TAG[FirstTagEnum.热门], + secondTag: FoodDataModel.SECOND_TAG[SecondTagEnum.高蛋白主食类], + nutrientContent: [ + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.热量], 56.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.蛋白质], 21.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.脂肪], 2.1), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.碳水化合物], 3.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.膳食纤维], 1.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素A], 1.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素C], 322.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素E], 0.5), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.胡萝卜素], 2.23), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B1], 1.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B2], 1.05), + ] + }, + { + foodId: 2, + foodName: '鸡蛋', + foodImage: $rawfile('food/ji_dan.png'), + like: 144, + eatLevel: FoodDataModel.EAT_LEVEL[0], + descItem: ['脂肪较低、热量较低', ''], + heat: 662, + addPowerPercent: { + p: 72, f: 11, c: 17 + }, + firstTag: FoodDataModel.FIRST_TAG[FirstTagEnum.热门], + secondTag: FoodDataModel.SECOND_TAG[SecondTagEnum.高蛋白主食类], + nutrientContent: [ + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.热量], 62.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.蛋白质], 26.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.脂肪], 1.1), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.碳水化合物], 7.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.膳食纤维], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素A], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素C], 310.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素E], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.胡萝卜素], 1.23), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B1], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B2], 0.05), + ] + }, + { + foodId: 3, + foodName: '大龙虾', + foodImage: $rawfile('food/long_xia.png'), + like: 5234, + eatLevel: FoodDataModel.EAT_LEVEL[0], + descItem: ['脂肪较低、热量较低', ''], + heat: 678, + addPowerPercent: { + p: 85, f: 11, c: 4 + }, + firstTag: FoodDataModel.FIRST_TAG[FirstTagEnum.热门], + secondTag: FoodDataModel.SECOND_TAG[SecondTagEnum.高蛋白海鲜类], + nutrientContent: [ + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.热量], 397.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.蛋白质], 8.40), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.脂肪], 9.1), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.碳水化合物], 69.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.膳食纤维], 9.5), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素A], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素C], 310.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素E], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.胡萝卜素], 1.23), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B1], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B2], 0.05), + ] + }, + { + foodId: 4, + foodName: '大闸蟹', + foodImage: $rawfile('food/pang_xie.png'), + like: 234, + eatLevel: FoodDataModel.EAT_LEVEL[0], + descItem: ['脂肪较低、热量较低', ''], + heat: 642, + addPowerPercent: { + p: 82, f: 11, c: 2 + }, + firstTag: FoodDataModel.FIRST_TAG[FirstTagEnum.热门], + secondTag: FoodDataModel.SECOND_TAG[SecondTagEnum.高蛋白海鲜类], + nutrientContent: [ + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.热量], 330.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.蛋白质], 6.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.脂肪], 10.1), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.碳水化合物], 9.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.膳食纤维], 1.5), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素A], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素C], 310.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素E], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.胡萝卜素], 1.23), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B1], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B2], 0.05), + ] + }, + { + foodId: 5, + foodName: '麦片', + foodImage: $rawfile('food/mai_pian.png'), + like: 34, + eatLevel: FoodDataModel.EAT_LEVEL[0], + descItem: ['脂肪较低、低钠', '调制谷物'], + heat: 1442, + addPowerPercent: { + p: 9, f: 23, c: 68 + }, + firstTag: FoodDataModel.FIRST_TAG[FirstTagEnum.热门], + secondTag: FoodDataModel.SECOND_TAG[SecondTagEnum.低热量麦片], + nutrientContent: [ + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.热量], 2.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.蛋白质], 8.8), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.脂肪], 9.1), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.碳水化合物], 56.60), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.膳食纤维], 13.5), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素A], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素C], 310.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素E], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.胡萝卜素], 1.23), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B1], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B2], 0.05), + ] + }, + { + foodId: 6, + foodName: '鱼豆腐', + foodImage: $rawfile('food/dou_fu.png'), + like: 4, + eatLevel: FoodDataModel.EAT_LEVEL[0], + descItem: ['大豆蛋白、高蛋白、低钠', '脂肪偏高'], + heat: 1700, + addPowerPercent: { + p: 43, f: 50, c: 7 + }, + firstTag: FoodDataModel.FIRST_TAG[FirstTagEnum.热门], + secondTag: FoodDataModel.SECOND_TAG[SecondTagEnum.高蛋白主食类], + nutrientContent: [ + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.热量], 486.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.蛋白质], 54.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.脂肪], 27.1), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.碳水化合物], 9.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.膳食纤维],0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素A], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素C], 310.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素E], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.胡萝卜素], 1.23), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B1], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B2], 0.05), + ] + }, + { + foodId: 7, + foodName: '扁豆', + foodImage: $rawfile('food/bian_dou.png'), + like: 4, + eatLevel: FoodDataModel.EAT_LEVEL[0], + descItem: ['谷薯杂豆、热量较低', ''], + heat: 897, + addPowerPercent: { + p: 24, f: 4, c: 72 + }, + firstTag: FoodDataModel.FIRST_TAG[FirstTagEnum.热门], + secondTag: FoodDataModel.SECOND_TAG[SecondTagEnum.高蛋白主食类], + nutrientContent: [ + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.热量], 2.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.蛋白质], 18.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.脂肪], 3.1), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.碳水化合物], 55.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.膳食纤维],13.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素A], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素C], 310.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素E], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.胡萝卜素], 1.23), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B1], 0.0), + new NutrientContent(NutrientDefineDataModel.NUTRIENT_DEFINE[NutrientDefineEnum.维生素B2], 0.05), + ] + }, + ]; +} + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/MenuBtnDataModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/MenuBtnDataModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..179f2298e23f3a294cbe3c147de5f438b67d5dff --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/MenuBtnDataModel.ets" @@ -0,0 +1,47 @@ +import MenuBtnData from '../common/bean/MenuBtnData'; +export default class MenuBtnDataModel { + public static readonly MENU_BTN_DATA: MenuBtnData[] = [ + { + name: '食物榜单', + image: $rawfile('home/1.png'), + url:'pages/FirstTagPage' + }, + { + name: '食物对比', + image: $rawfile('home/2.png'), + url:'pages/ComparePage' + }, + { + name: '食谱库', + image: $rawfile('home/3.png'), + }, + { + name: '查奶茶', + image: $rawfile('home/4.png'), + }, + { + name: '活动中心', + image: $rawfile('home/5.png'), + }, + { + name: '配料解读', + image: $rawfile('home/6.png'), + }, + { + name: '餐前拍一拍', + image: $rawfile('home/7.png'), + }, + { + name: '营养课程', + image: $rawfile('home/8.png'), + }, + { + name: '精品食谱', + image: $rawfile('home/9.png'), + }, + { + name: '用户故事', + image: $rawfile('home/10.png'), + }, + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/NutrientDefineDataModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/NutrientDefineDataModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..9f8749f33a3e4f73d9a383e38b01ba49117a4ba0 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/NutrientDefineDataModel.ets" @@ -0,0 +1,39 @@ +import NutrientDefine from '../common/bean/food/NutrientDefine'; + +export default class NutrientDefineDataModel { + public static readonly NUTRIENT_DEFINE: NutrientDefine[] = [ + { + name: '热量', unit: '千卡' + }, + { + name: '蛋白质', unit: '克' + }, + { + name: '脂肪', unit: '克' + }, + { + name: '碳水化合物', unit: '克' + }, + { + name: '膳食纤维', unit: '克' + }, + { + name: '维生素A', unit: '微克' + }, + { + name: '维生素C', unit: '微克' + }, + { + name: '维生素E', unit: '微克' + }, + { + name: '胡萝卜素', unit: '微克' + }, + { + name: '维生素B1', unit: '微克' + }, + { + name: '维生素B2', unit: '微克' + }, + ] +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/QuestionDataModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/QuestionDataModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..633331fa8c06f17564fdf3b49006d4c98d72c9a0 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/model/QuestionDataModel.ets" @@ -0,0 +1,64 @@ +import { QuestionOptions } from '../common/bean/question/Question'; +import Question from '../common/bean/question/Question'; + +export default class QuestionDataModel { + public static readonly QUESTION: Question[] = [ + { + id: 1, + question: '夜宵易长胖,减肥最好睡前多久不吃东西?', + options: [new QuestionOptions('睡前4小时', 2029), new QuestionOptions('睡前5小时', 12029), new QuestionOptions('睡前7小时', 29)], + answerIndex: 0, + answerNote: '睡前4小时。不想长肉肉,建议你最好睡前4小时不吃东西,睡前1小时一定别吃啦!研究显示平均每晚8点以后摄入热量的比例每增加10%,体重指数就会增加0.52kg/m2,腰围增粗1.73 cm。尤其是与睡前4小时进食相比,睡前1小时进食人群的血糖更不易保持平稳,更容易国积脂肪哦!减肥人们忍一忍,少吃夜宵少长胖!' + }, + { + id: 2, + question: '暖冬喝热饮,哪种最低卡?', + options: [new QuestionOptions('热红茶', 12029), new QuestionOptions('红枣桂圆茶', 1029), new QuestionOptions('蜂蜜柚子茶', 129)], + answerIndex: 0, + answerNote: '每一杯(300ml)热红茶、红枣桂圆茶、蜂蜜柚子茶的热量分别为3kcal、78kcal、174kcal。红茶不仅0脂超低卡,还有茶碱和咖啡因两大成分为你消肿又提神。气温骤降来杯红茶,暖身暖胃,精力满满不水肿!' + }, + { + id: 3, + question: '高卡蔬菜长肉能力强,猜一猜下列哪种蔬菜是热量刺客?', + options: [new QuestionOptions('蒜苔', 137800), new QuestionOptions('胡萝卜', 25029), new QuestionOptions('西蓝花', 12411)], + answerIndex: 0, + answerNote: '正确答案:蒜苔。每100g蒜苔、胡萝卜、西兰花热量分别为66kcal、32kcal、27kcal。知道胡萝卜热量、淀粉含量高,但是不是没想到蒜苔可比它更高卡!日常吃多了它们,主食就要少吃点啦!热量刺客退退退,适量食用少长胖~' + }, + { + id: 4, + question: '轻卡夜宵多吃也能少长肉!猜一猜夜宵可以吃多少小龙虾?', + options: [new QuestionOptions('二两', 37800), new QuestionOptions('半斤', 15029), new QuestionOptions('一斤', 2411)], + answerIndex: 2, + answerNote: '正确答案:一斤。小龙虾虽然体积大,却是低脂、低卡、高蛋白的营养好肉。每一只的热量约为9kcal,一斤带壳小龙虾本身的热量也只有约144kcal,可以说是非常低啦!热量这方面别担心,接下来就看钱包的了!' + }, + { + id: 5, + question: '冲淡胃酸、影响消化?吃饭时可以喝水吗?', + options: [new QuestionOptions('可以', 77800), new QuestionOptions('不可以', 25029)], + answerIndex:0, + answerNote: '正确答案:可以。别担心啦,我们的胃可是相当智能哦!当胃中的消化液披进食的食物稀释时,它就会自动增加胃液的分泌,从而保证能正常消化食物。就算吃饭时喝了点水,轻微稀释了消化液,也非常短暂,不至于把胃酸稀释到不能正常消化食物的程度。所以只要你的消化功能正常,都不必担心吃饭时饮水会对食物消化产生严重影响哦,放松心情,大胆干饭吧!' + }, + { + id: 6, + question: '睡觉时间不正确,让你长肉静悄悄!猜一猜几点睡觉最容易长胖?', + options: [new QuestionOptions('晚上8点-10点', 3780), new QuestionOptions('晚上10点-凌晨2点', 25029), new QuestionOptions('凌晨2点-6点', 82411)], + answerIndex:2, + answerNote: '正确答案:凌晨2点-6点。最新研究显示,第一胖的入睡时间是:凌晨2点-6点;第二胖的入睡时间是:晚上10点-凌晨2点。与晚上8点-10点睡觉相比,晚上10点-凌晨2点睡觉全身肥胖和腹型肥胖的风险均增加20%;而凌晨2点-6点睡觉全身肥胖和腹型肥胖的风险分别增加35%和38%!你一般晚上几点睡,是不是最容易长肉的时间呢?' + }, + { + id: 7, + question: '牛奶助减重,但也要喝对时间!猜一猜什么时候喝牛奶最有助减肥?', + options: [new QuestionOptions('饭后', 13800), new QuestionOptions('运动后', 75029), new QuestionOptions('睡前', 52411)], + answerIndex:1, + answerNote: '正确答案:运动后。一般人群饭前、饭中喝牛奶可以获得由水分与蛋白质带来的双重饱腹感,更有助控卡减食量;而有运动习惯的人群运动后喝牛奶还可以促进肌肉合成,并且有效抑制运动后一餐的食欲,帮助减重。但在饭后已经比较饱足的情况下喝牛奶,反而会带来较大的热量负担,增加长胖风险。睡前饮用牛奶也并不能助眠,反而可能加速夜间脂肪囤积哦!' + }, + { + id: 8, + question: '助减重、增营养,什么时候吃苹果最减肥?', + options: [new QuestionOptions('加餐前', 78700), new QuestionOptions('晚饭后', 25029)], + answerIndex:0, + answerNote: '正确答案:加餐时。传闻"早上金苹果,中午银苹果,晚上毒苹果”全都不靠谱,营养吸收与吃饭时间关系不大,想要饱腹控卡助减重,最推荐你将苹果加餐时吃!据测定,苹果的饱腹感大概是白面包的两倍哦。加餐时吃,饱腹感超强,让你减重也不饿肚子!但如果饭后吃就会带来额外的热量负担啦,反而更有可能让我们长肉....' + }, + + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/ComparePage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/ComparePage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..d3b0a45c06b138533d2cf22fe12022032ad46cfe --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/ComparePage.ets" @@ -0,0 +1,129 @@ +import { PERCENTAGE_15 } from '../common/constants/Constants'; +import { PERCENTAGE_30 } from '../common/constants/Constants'; +import NutrientDefine from '../common/bean/food/NutrientDefine'; +import NutrientDefineDataModel from '../model/NutrientDefineDataModel'; +import { NutrientDefineEnum } from '../model/EnumList'; +import CompareTableItemComponent from '../view/foodcompare/CompareTableItemComponent'; +import CardComponent from '../view/CardComponent'; +import { CommonData } from '../common/constants/Constants'; +import FoodDetailsViewModel from '../viewmodel/food/FoodDetailsViewModel'; +import FoodData from '../common/bean/food/FoodData'; +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import TopBarComponent from '../view/TopBarComponent'; + +let totalFoods = FoodDetailsViewModel.loadAllDetails() + +@Entry +@Component +struct ComparePage { + pageName: string = '对比详情' + @State leftFood: FoodData = new FoodData() + @State rightFood: FoodData = new FoodData() + + build() { + Column() { + TopBarComponent({ pageName: this.pageName }) + this.Content() + }.width(PERCENTAGE_100).height(PERCENTAGE_100) + } + + @Builder Content() { + Column() { + this.Compare() + this.Table(this.leftFood, this.rightFood) + }.width(PERCENTAGE_100).backgroundColor(CommonData.BACK_COLOR) + } + @Builder Table(leftFood, rightFood) { + CardComponent() { + Column() { + Text(`营养元素`).fontSize(16).fontWeight(FontWeight.Bold) + }.width(PERCENTAGE_100).margin(15) + + if ((leftFood.foodId > 0 && rightFood.foodId > 0) || (leftFood.foodId > 0 || rightFood.foodId > 0)) { + ForEach(NutrientDefineDataModel.NUTRIENT_DEFINE, (item: NutrientDefine) => { + CompareTableItemComponent({ + leftShow: leftFood.foodName != null, + rightShow: rightFood.foodName != null, + nutrientDefine: item, + leftWeight: leftFood?.nutrientContent?.[NutrientDefineEnum[item.name]]?.v, + rightWeight: rightFood?.nutrientContent?.[NutrientDefineEnum[item.name]]?.v, + }) + }) + } else { + Text('点击加号,添加一个食物').fontSize(12).fontColor(CommonData.UN_SELECT_FONT_COLOR) + } + } + } + @Builder Compare() { + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + FoodHead({ foodDetail: $leftFood }) + Column() { + Image($rawfile('index/vs.png')).width(50).height(50) + }.width(PERCENTAGE_30) + + FoodHead({ foodDetail: $rightFood }) + }.width(PERCENTAGE_100) + }.height(PERCENTAGE_15).margin(15).justifyContent(FlexAlign.Center) + } +} + +@Component +struct FoodHead { + @Link foodDetail: FoodData + + build() { + Column() { + Stack() { + Row() { + if (this.foodDetail.foodImage == null) { + Image($rawfile('index/select_add.png')).width(20).height(20) + } else { + Image(this.foodDetail.foodImage).width(70).height(70).borderRadius(15) + } + } + .width(75) + .height(75) + .backgroundColor(this.foodDetail.foodImage == null ? Color.White : Color.Transparent) + .border({ width: 4, color: Color.White, radius: 15 }) + .justifyContent(FlexAlign.Center) + .onClick(() => { + console.warn("点击选择物品") + // 弹出窗口 + this.handleOpenSelectFoodView() + }) + + Row() { + Image($rawfile('index/select_error.png')).width(20).height(20) + } + .margin({ left: 68, bottom: 68 }) + .justifyContent(FlexAlign.Center) + .visibility(this.foodDetail.foodImage == null ? Visibility.Hidden : Visibility.Visible) + .onClick(() => { + console.warn("点击取消物品") + this.foodDetail = new FoodData() + }) + } + + Text(this.foodDetail.foodName).fontSize(14) + }.width(PERCENTAGE_30) + + } + + handleOpenSelectFoodView() { + let sheets: Array = totalFoods.map(f => { + return { + title: f.foodName, + action: () => { + this.foodDetail = f + console.log(JSON.stringify(this.foodDetail)) + } + } + }) + ActionSheet.show({ + title: '选择食物', + message: '', + sheets: sheets + }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/DetailsPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/DetailsPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..db70d612def997ec9da49d68550b8cafae5911e6 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/DetailsPage.ets" @@ -0,0 +1,167 @@ +import { AppFontSize } from '../common/constants/Constants'; +import RagRowComponent from '../view/details/TagRowComponent'; +import router from '@ohos.router'; +import { DetailsPageStyle, PERCENTAGE_100 } from '../common/constants/Constants'; +import AddressComponent from '../view/details/AddressComponent'; +import PickerComponent from '../view/details/PickerComponent'; +import PriceComponent from '../view/details/PriceComponent'; +import GoodsTitleComponent from '../view/details/GoodsTitleComponent'; +import PanelComponent from '../view/details/PanelComponent'; +import CommentsComponent from '../view/details/CommentsComponent'; +import CommentsHeaderComponent from '../view/details/CommentsHeaderComponent'; +import BottomBarComponent from '../view/details/BottomBarComponent'; +import ServicesComponent from '../view/details/ServicesComponent'; +import BalanceComponent from '../view/BalanceComponent'; +import CardComponent from '../view/CardComponent'; +import PreviewerComponent from '../view/details/PreviewerComponent'; +import GoodsData from '../common/bean/GoodsData'; +import DetailsViewModel from '../viewmodel/DetailsViewModel'; + +let viewModel: DetailsViewModel = new DetailsViewModel(); +//let id = 1; +let id = router.getParams()['id'] +let fromShoppingCart = router.getParams()?.['fromShoppingCart'] // 是否从这里打开的 +console.log(fromShoppingCart) + +@Extend(Image) function setTopImageStyle () { + .width(DetailsPageStyle.TOP_IMAGE_SIZE) + .height(DetailsPageStyle.TOP_IMAGE_SIZE) +} + +@Entry +@Component +struct DetailsPage { + private goodsDetail: GoodsData; + @Provide("idsInCart") goodIds: number[] = AppStorage.Get('shoppingCart').split(",") + .filter(v => v) + .map(v => parseInt(v)) + + aboutToAppear() { + this.goodsDetail = viewModel.loadDetail([id]); + } + + build() { + Column() { + Stack({ alignContent: Alignment.Top }) { + Scroll() { + Column() { + PreviewerComponent({ goodsImg: this.goodsDetail.goodsImg }) + + this.CardsLayout() + }.width(PERCENTAGE_100) + } + .backgroundColor($r('app.color.background')) + + this.TopBarLayout() + + } + .height(DetailsPageStyle.SCROLL_LAYOUT_WEIGHT) + .backgroundColor($r('app.color.background1')) + + + BottomBarComponent({ goodsDetail: this.goodsDetail }) + .height(DetailsPageStyle.TOOLBAR_WEIGHT) + } + .height(PERCENTAGE_100) + .width(PERCENTAGE_100) + } + + @Builder BackLayout() { + Image($rawfile('detail/detail_back.png')) + .setTopImageStyle() + .onClick(() => { + if (fromShoppingCart) { + router.back() + } else { + router.replace({ + url: "pages/NavPage" + }) + } + }) + } + + @Builder ShareLayout() { + Image($rawfile('detail/detail_share.png')).setTopImageStyle() + } + + @Builder TopBarLayout() { + BalanceComponent({ left: this.BackLayout(), right: this.ShareLayout() }) + .width(PERCENTAGE_100) + } + + @Builder MoreActionBuilder() { + Image($rawfile('detail/detail_pick_up_more.png')) + .objectFit(ImageFit.Contain) + .height(DetailsPageStyle.IMAGE_SIZE_MORE) + .width(DetailsPageStyle.IMAGE_SIZE_MORE) + } + + @Builder CardsLayout() { + CardComponent({ paddingValue: {}, colorValue: Color.Red }) { + PriceComponent({ price: this.goodsDetail.price, colorValue: Color.White }) + CardComponent({ paddingValue: { + top: 5, + bottom: 10, + left: 5, + right: 5 + }, marginValue: {} }) { + Row({ space: 5 }) { + RagRowComponent({ content: "立减6" }) + RagRowComponent({ content: "多买更划算" }) + } + .width(PERCENTAGE_100) + + GoodsTitleComponent({ title: this.goodsDetail.goodsName }) + .margin({ top: DetailsPageStyle.TITLE_MARGIN_TOP, + bottom: DetailsPageStyle.TITLE_MARGIN_BOTTOM }) + + Row() { + Text("绿色产品 放心购") + .fontSize(AppFontSize.S_SMALLER) + .fontColor(Color.Gray) + } + .width(PERCENTAGE_100) + .margin({ top: DetailsPageStyle.TITLE_MARGIN_TOP, + bottom: DetailsPageStyle.TITLE_MARGIN_BOTTOM }) + + PanelComponent() + } + } + + CardComponent({ paddingValue: { + top: 5, + bottom: 10, + left: 5, + right: 5 + } }) { + PickerComponent({ goodsDescription: this.goodsDetail.goodsDescription, + actionMoreBuilder: this.MoreActionBuilder }) + .margin({ top: DetailsPageStyle.DIVIDER_MARGIN_TOP }) + AddressComponent() + .margin({ top: DetailsPageStyle.DIVIDER_MARGIN_TOP }) + ServicesComponent() + .margin({ top: DetailsPageStyle.DIVIDER_MARGIN_TOP }) + } + + CardComponent({ paddingValue: { + top: 5, + bottom: 5, + left: 5, + right: 5 + } }) { + CommentsHeaderComponent({ commonCount: this.goodsDetail.commentCount }) + + .margin({ top: 5, bottom: 5 }) + Row({ space: 5 }) { + RagRowComponent({ content: "外观漂亮" }) + RagRowComponent({ content: "价格合理" }) + RagRowComponent({ content: "送货速度快" }) + } + .width(PERCENTAGE_100) + + CommentsComponent({ goodImg: this.goodsDetail.goodsImg }) + .padding({ left: 5, right: 5 }) + .margin({ top: 5, bottom: 20 }) + } + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/FirstTagPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/FirstTagPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c9151c651bbcece2d0ecc47d33c305b32f4f221a --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/FirstTagPage.ets" @@ -0,0 +1,111 @@ +import { PERCENTAGE_80 } from '../common/constants/Constants'; +import { PERCENTAGE_20 } from '../common/constants/Constants'; +import TagViewModel from '../viewmodel/food/TagViewModel'; +import TopBarComponent from '../view/TopBarComponent'; +import { SecondTag } from '../common/bean/food/Tag'; +import router from '@ohos.router'; +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import { PERCENTAGE_50 } from '../common/constants/Constants'; +import { ToolBarStyle } from '../common/constants/Constants'; +import { CommonData } from '../common/constants/Constants'; +import { FirstTag } from '../common/bean/food/Tag'; + +let pageName = router.getParams()?.['pageName']??"pageName" + +@Entry +@Component +struct FirstTagPage { + @State firstTagList: FirstTag[] = TagViewModel.loadFirstTags() + private scroller = new Scroller() + @State secondTagList: Array = TagViewModel.loadSecondTags() + .filter(f => f.firstTag.findIndex(t => t.tagId == 1) >= 0) + @State selectedIndex: number = 0 + + build() { + Column() { + TopBarComponent({ pageName: pageName }) + + this.Content() + }.width(PERCENTAGE_100) + .backgroundColor(Color.White) + } + + @Builder Content() { + Row() { + // 左分类 + List() { + ForEach(this.firstTagList, (item: FirstTag, index) => { + ListItem() { + Row() { + Text(item.tagName) + .padding(15) + .fontSize(14) + .textAlign(TextAlign.Center) + .fontColor(this.selectedIndex === index ? CommonData.SELECT_COLOR : CommonData.UN_SELECT_FONT_COLOR) + } + .border({ + width: { left: 2 }, + color: this.selectedIndex === index ? CommonData.SELECT_COLOR : CommonData.GRAY_COLOR + }) + .backgroundColor(this.selectedIndex === index ? Color.White : CommonData.GRAY_COLOR) + }.onClick(() => { + this.selectedIndex = index + this.secondTagList = TagViewModel.loadSecondTags() + .filter(f => f.firstTag.findIndex(t => t.tagId == item.tagId) >= 0) + this.scroller.scrollToIndex(0) + }) + }, (item: FirstTag) => item.tagId.toString()) + }.width(PERCENTAGE_20).height(PERCENTAGE_100) + + // 右分类 + List({ scroller: this.scroller }) { + // 分类列表 + ForEach(this.secondTagList, (item: SecondTag) => { + ListItem() { + FoodItem({ item: item }) + }.onClick(() => { + router.push({ + url: 'pages/SecondTagPage', + params: { + secondTag: item, + pageName: pageName + } + }) + }) + }, (item: SecondTag) => item.tagId.toString()) + }.width(PERCENTAGE_80).height(PERCENTAGE_100) + + }.width(PERCENTAGE_100).height(PERCENTAGE_100) + .alignItems(VerticalAlign.Top) + } +} + +@Component +struct FoodItem { + item: SecondTag + + build() { + Column() { + Row() { + Row() { + Image(this.item.image).width(40).height(40).margin(3).borderRadius(5) + Text(this.item.tagName).fontSize(15).fontWeight(FontWeight.Bolder) + }.width(PERCENTAGE_50) + .justifyContent(FlexAlign.Start) + + Row() { + Image($rawfile('index/you_jian_tou.png')) + .width(20) + .height(20) + }.width(PERCENTAGE_50).padding(5) + .justifyContent(FlexAlign.End) + }.width(PERCENTAGE_100).alignItems(VerticalAlign.Center) + + Divider() + .backgroundColor(Color.Black) + .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + .margin({ top: 5, bottom: 5 }) + }.width(PERCENTAGE_100).margin({ bottom: 5 }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/FoodDetailPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/FoodDetailPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c12117e733fdffd145808eb4f8ee16849918c021 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/FoodDetailPage.ets" @@ -0,0 +1,121 @@ +import CompositionView from '../view/fooddetail/CompositionView'; +import { showToast } from '../common/TipsUtils'; +import RecordView from '../view/fooddetail/RecordView'; +import { DetailsPageStyle } from '../common/constants/Constants'; +import RankView from '../view/fooddetail/RankView'; +import { PERCENTAGE_15 } from '../common/constants/Constants'; +import { PERCENTAGE_50 } from '../common/constants/Constants'; +import { PERCENTAGE_70 } from '../common/constants/Constants'; +import { PERCENTAGE_10 } from '../common/constants/Constants'; +import { PERCENTAGE_20 } from '../common/constants/Constants'; +import { PERCENTAGE_80 } from '../common/constants/Constants'; +import FoodDataModel from '../model/FoodDataModel'; +import { AppFontSize } from '../common/constants/Constants'; +import { AppFontWeight } from '../common/constants/Constants'; +import ToolBarComponent from '../view/ToolBarComponent'; +import { NavPageStyle } from '../common/constants/Constants'; +import FoodDetailTabsComponent from '../view/fooddetail/FoodDetailTabsComponent'; +import TabsComponent from '../view/shop/TabsComponent'; +import { PERCENTAGE_30 } from '../common/constants/Constants'; +import { ToolBarStyle } from '../common/constants/Constants'; +import { PERCENTAGE_90 } from '../common/constants/Constants'; +import { CommonData } from '../common/constants/Constants'; +import CardComponent from '../view/CardComponent'; +import TopBarComponent from '../view/TopBarComponent'; +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import FoodData from '../common/bean/food/FoodData'; +import router from '@ohos.router'; + +let foodDetail: FoodData = router.getParams()?.['foodDetail'] +//let foodDetail: FoodData = FoodDataModel.FOOD_DATA[0] + +@Extend(Navigation) function setNavStyle () { + .hideTitleBar(true) + .width(PERCENTAGE_100) + .height(PERCENTAGE_100) +} + +@Extend(Tabs) function setTabStyle () { + .barHeight(NavPageStyle.BAR_HEIGHT) + .scrollable(false) +} + +@Entry +@Component +struct FoodDetailPage { + pageName = '食物详情' + tabs = ['营养档案', '食物排行', '配料成分'] + @State currentPosition: number = 0 + private controller: TabsController = new TabsController(); + @State navCurrentPosition: number = NavPageStyle.POSITION_INITIAL; + + build() { + Column() { + TopBarComponent({ pageName: this.pageName }) + Scroll() { + this.Content() + } + .scrollBarWidth(0) + }.width(PERCENTAGE_100) + } + + @Builder Content() { + Column() { + Row() { + Row() { + Image(foodDetail.foodImage).width(50).height(50).margin(15).borderRadius(10) + Text(foodDetail.foodName) + .fontSize(18) + .fontWeight(FontWeight.Bold) + .maxLines(2) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .width(PERCENTAGE_70) + }.width(PERCENTAGE_70).height(PERCENTAGE_100) + + Button(`点赞(${foodDetail.like})`) + .fontColor(Color.Black) + .fontSize(11) + .fontWeight(FontWeight.Medium) + .size({ width: 90, height: 30 }) + .backgroundColor(CommonData.BACK_COLOR) + }.width(PERCENTAGE_100).height(PERCENTAGE_15).backgroundColor(Color.White) + + FoodDetailTabsComponent({ tabMenus: this.tabs, currentPosition: $navCurrentPosition }) + + this.MenuContent() + } + .backgroundColor(CommonData.BACK_COLOR) + } + + @Builder MenuContent() { + Column() { + if (this.navCurrentPosition === 0) { + RecordView({ foodDetail: foodDetail }) + } else if (this.navCurrentPosition === 1) { + RankView() + } else if (this.navCurrentPosition === 2) { + CompositionView() + } + }.width(PERCENTAGE_100) + } + + @Builder ToolBarBuilder() { + Row() { + ForEach(this.tabs, (item: string, index) => { + Column() { + Row() { + Text(item) + .fontColor(this.navCurrentPosition === index ? $r('app.color.index_navigation_selected_text') : $r('app.color.text')) + .fontWeight(AppFontWeight.BOLDER) + .fontSize(AppFontSize.SMALLER) + .textAlign(TextAlign.Center) + } + } + .onClick(() => { + this.navCurrentPosition = index + this.controller.changeIndex(this.navCurrentPosition) + }) + }, (item: string) => item) + }.width(PERCENTAGE_100).height(PERCENTAGE_20).backgroundColor(Color.White) + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/NavPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/NavPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..e7b7d115035c543f9632487fb4b3ee7c232afd5c --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/NavPage.ets" @@ -0,0 +1,83 @@ +import router from '@ohos.router'; +import MyPage from '../view/my/MyPage'; +import HomeView from '../view/home/HomeView'; +import ShopView from '../view/shop/ShopView'; +import NavViewModel from '../viewmodel/NavViewModel'; +import ToolBarData from '../common/bean/ToolBarData'; +import ToolBarComponent from '../view/ToolBarComponent'; +import ShoppingCartPage from '../view/shoppingcart/ShoppingCartPage'; +import { NavPageStyle, PERCENTAGE_100 } from '../common/constants/Constants'; + +const HOME: number = 0; +const SHOP: number = 1; +const CART: number = 2; +const MY: number = 3; +let viewModel: NavViewModel = new NavViewModel(); +let navIndex = router.getParams()?.['navIndex'] // 跳转到哪个页面 + +@Extend(Navigation) function setNavStyle () { + .hideTitleBar(true) + .width(PERCENTAGE_100) + .height(PERCENTAGE_100) +} + +@Extend(Tabs) function setTabStyle () { + .barHeight(NavPageStyle.BAR_HEIGHT) + .scrollable(false) +} + +@Entry +@Component +struct NavPage { + @State toolBarConfigs: ToolBarData[] = []; + @State navCurrentPosition: number = NavPageStyle.POSITION_INITIAL; + @StorageLink('shoppingCart') goodIdStr: string = "" + @Provide("idsInCart") goodIds: number[] = AppStorage.Get('shoppingCart').split(",") + .filter(v => v) + .map(v => parseInt(v)) + private controller: TabsController = new TabsController(); + + aboutToAppear() { + this.toolBarConfigs = viewModel.loadNavigationTab(); + } + + onPageShow() { + let str = AppStorage.Get('shoppingCart') + this.goodIds = str.split(",").filter(v => v).map(v => parseInt(v)) + if (navIndex) { + console.log(navIndex) + this.navCurrentPosition = navIndex + this.controller.changeIndex(navIndex) + } + } + + build() { + Navigation() { + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { + ForEach(this.toolBarConfigs, (item: ToolBarData, index) => { + TabContent() { + if (index === HOME) { + HomeView() + } else if (index === SHOP) { + ShopView() + } else if (index === CART) { + ShoppingCartPage() + } else if (index === MY) { + MyPage() + } + } + }, item => item.toString()) + }.setTabStyle() + } + .toolBar(this.ToolBarBuilder()) + .setNavStyle() + } + + @Builder ToolBarBuilder() { + ToolBarComponent({ + controller: this.controller, + toolBarConfigs: this.toolBarConfigs, + navCurrentPosition: $navCurrentPosition + }) + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/QuestionPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/QuestionPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..aa8b2a411f285effa1ef4209a4358a14c22e70a8 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/QuestionPage.ets" @@ -0,0 +1,143 @@ +import { PERCENTAGE_30 } from '../common/constants/Constants'; +import { PERCENTAGE_90 } from '../common/constants/Constants'; +import { PERCENTAGE_70 } from '../common/constants/Constants'; +import TimeUtils from '../common/TimeUtils'; +import QuestionDataViewModel from '../viewmodel/question/QuestionDataViewModel'; +import { CommonData } from '../common/constants/Constants'; +import { QuestionOptions } from '../common/bean/question/Question'; +import Question from '../common/bean/question/Question'; +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import TopBarComponent from '../view/TopBarComponent'; + +class Answer { + id: number + selectIndex: number + time: number + + constructor(id: number, selectIndex: number, time: number) { + this.id = id + this.selectIndex = selectIndex + this.time = time + } +} + +let KEY = 'answer' + +@Extend(Image) function selectCss () { + .width(20) + .height(20) + .objectFit(ImageFit.Contain) + .margin(5) +} + +@Entry +@Component +struct QuestionPage { + pageName: string = '每日一答' + question: Question + @State todayAnswer: boolean = false + @State selectIndex: number = -1 + + aboutToAppear() { + // 判断今天答了没,id和answerIndex,今天0点时间戳 + if (AppStorage.Has(KEY)) { + let answer = AppStorage.Get(KEY) + console.warn(JSON.stringify(answer)) + if (TimeUtils.getToday0Point().getTime() <= answer.time) { + let id = answer.id + this.question = QuestionDataViewModel.getQuestion(id) + this.selectIndex = answer.selectIndex + this.todayAnswer = true + return + } + } + this.question = QuestionDataViewModel.randomQuestion() + } + + build() { + Column() { + TopBarComponent({ pageName: this.pageName }) + this.Content(this.question) + }.width(PERCENTAGE_100).height(PERCENTAGE_100) + .backgroundColor(Color.White) + } + + @Builder Content(question: Question) { + Column() { + Text(question.question).fontSize(18).fontWeight(FontWeight.Medium).margin({ bottom: 30 }) + this.Options(question.options) + if (this.todayAnswer) { + Text(this.isSuccess(this.selectIndex) ? '回答正确' : '回答错误') + .fontSize(13) + .fontWeight(FontWeight.Medium) + .fontColor(this.isSuccess(this.selectIndex) ? CommonData.SELECT_COLOR : "#fff46964") + .margin({ top: 10, bottom: 10 }) + if (question.answerNote) { + Note({ note: question.answerNote }) + } + } + } + .width(PERCENTAGE_100).padding(13) + } + + @Builder + Options(options: QuestionOptions[]) { + ForEach(options, (item: QuestionOptions, index: number) => { + Column() { + Row() { + Row() { + Text(item.option) + .fontSize(13) + .fontColor(this.todayAnswer ? (this.isSuccess(index) ? CommonData.SELECT_COLOR : "#fff46964") : Color.Black) + .padding({ left: 10 }) + }.width(PERCENTAGE_70).height(PERCENTAGE_100).justifyContent(FlexAlign.Start) + + Row() { + Text(`${item.selectNum} 人`) + .fontSize(13) + .fontColor(this.todayAnswer ? (this.isSuccess(index) ? CommonData.SELECT_COLOR : "#fff46964") : Color.Black) + .visibility(this.todayAnswer ? Visibility.Visible : Visibility.Hidden) + if (!this.todayAnswer) { + Image($rawfile('index/select_bg.png')).selectCss() + } else { + Image(this.isSuccess(index) ? $rawfile('index/select_success.png') : $rawfile('index/select_error.png')) + .selectCss() + } + }.width(PERCENTAGE_30).height(PERCENTAGE_100).justifyContent(FlexAlign.End) + } + } + .backgroundColor(this.todayAnswer ? (this.question.answerIndex == index ? "#ffd0f3ed" : "#ffffd2cf") : CommonData.BACK_COLOR) + .borderRadius(10) + .width(PERCENTAGE_100) + .height("5%") + .justifyContent(FlexAlign.Center) + .margin(4) + .onClick(() => { + if (this.todayAnswer) { + return + } + this.selectIndex = index + this.todayAnswer = true + let time = TimeUtils.getToday0Point().getTime() + let id = this.question.id + AppStorage.SetOrCreate(KEY, new Answer(id, index, time)) + }) + }, (item: QuestionOptions) => item.option) + } + + isSuccess(index: number) { + return this.question.answerIndex == index + } +} + +@Component +struct Note { + note: string + + build() { + Column() { + Text('答案解析').fontSize(13).fontWeight(FontWeight.Medium).margin({ bottom: 10 }) + Text(this.note).fontSize(12).fontColor(CommonData.UN_SELECT_FONT_COLOR) + }.backgroundColor(CommonData.BACK_COLOR).width(PERCENTAGE_100).padding(10).alignItems(HorizontalAlign.Start) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/SecondTagPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/SecondTagPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..531c69c9307573be3c345b28ec3b1afa8f938cf8 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/SecondTagPage.ets" @@ -0,0 +1,111 @@ +import NutrientDefineDataModel from '../model/NutrientDefineDataModel'; +import { NutrientDefineEnum } from '../model/EnumList'; +import { PERCENTAGE_70 } from '../common/constants/Constants'; +import { PERCENTAGE_80 } from '../common/constants/Constants'; +import FoodData from '../common/bean/food/FoodData'; +import FoodDetailsViewModel from '../viewmodel/food/FoodDetailsViewModel'; +import { DetailsPageStyle } from '../common/constants/Constants'; +import { CommonData } from '../common/constants/Constants'; +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import { SecondTag } from '../common/bean/food/Tag'; +import router from '@ohos.router'; +import TopBarComponent from '../view/TopBarComponent'; + +let pageName: string = router.getParams()?.['pageName']??"pageName" +let secondTag: SecondTag = router.getParams()?.['secondTag'] + +@Entry +@Component +struct SecondTagPage { + foodDataList = FoodDetailsViewModel.loadAllDetails().filter(f => f.secondTag.tagId == secondTag.tagId) + + build() { + Column() { + TopBarComponent({ pageName: pageName }) + this.Content() + }.width(PERCENTAGE_100) + .backgroundColor(Color.White) + } + + @Builder Content() { + Scroll() { + Column() { + TopTipComponent({ tagName: secondTag.tagName, desc: secondTag.desc }) + List() { + ForEach(this.foodDataList, (item: FoodData, index: number) => { + ListItem() { + FoodItem({ index: index + 1, foodData: item }) + }.onClick(() => { + router.push({ + url: 'pages/FoodDetailPage', + params: { + foodDetail: item + } + }) + }) + }, (item: FoodData) => item.foodId.toString()) + }.width(PERCENTAGE_100).height(PERCENTAGE_70).margin({ top: 20 }) + + }.width(PERCENTAGE_100).height(PERCENTAGE_100) + } + .height(DetailsPageStyle.SCROLL_LAYOUT_WEIGHT) + } +} + +@Component +struct TopTipComponent { + tagName: string + desc: string + + build() { + Column() { + Text(this.tagName).fontSize(20).margin(3).fontWeight(FontWeight.Bolder).margin({ top: 20 }) + Text(this.desc).fontSize(13).fontColor(CommonData.UN_SELECT_FONT_COLOR).margin({ top: 10, bottom: 10 }) + } + .padding(10) + .width(PERCENTAGE_100) + .backgroundColor(Color.White) + .alignItems(HorizontalAlign.Start) + .shadow({ + radius: 5, + color: "#fff8f6f6", + offsetX: 0, + offsetY: 30 + }) + } +} + +@Component +struct FoodItem { + index: number + foodData: FoodData + desc: string + + build() { + Row() { + Stack() { + Image(this.foodData.foodImage).width(50).height(50).margin({ bottom: 5 }).borderRadius(15) + Row() { + Text(this.index.toString()).fontSize(12).fontColor(Color.White).fontWeight(FontWeight.Bold) + } + .width(15) + .height(15) + .backgroundColor("#fffdd039") + .border({ radius: { topLeft: 10, bottomRight: 10 } }) + .margin({ right: 36, bottom: 40 }) + .justifyContent(FlexAlign.Center) + } + + Column() { + Text(this.foodData.foodName).fontSize(14).fontWeight(FontWeight.Bold) + Text() { + Span(`${NutrientDefineDataModel.NUTRIENT_DEFINE[this.foodData.secondTag.nutrientDefine].name}:`).fontColor(CommonData.UN_SELECT_FONT_COLOR).fontSize(12) + Span(`${this.foodData.nutrientContent[this.foodData.secondTag.nutrientDefine].v}`).fontColor(Color.Red).fontSize(12) + Span(` ${NutrientDefineDataModel.NUTRIENT_DEFINE[this.foodData.secondTag.nutrientDefine].unit} / 100${NutrientDefineDataModel.NUTRIENT_DEFINE[this.foodData.secondTag.nutrientDefine].unit}`) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + .fontSize(12) + }.margin({ top: 4, bottom: 4 }) + }.padding(3).width(PERCENTAGE_80).alignItems(HorizontalAlign.Start).margin({ left: 5 }) + }.padding(10) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/WaterRecordPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/WaterRecordPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..b1e422293a36b0fdd568a09dbd9d5cf0e2e6ae91 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/pages/WaterRecordPage.ets" @@ -0,0 +1,206 @@ +import { CommonData } from '../common/constants/Constants'; +import TimeUtils from '../common/TimeUtils'; +import { PERCENTAGE_40 } from '../common/constants/Constants'; +import { PERCENTAGE_60 } from '../common/constants/Constants'; +import { PERCENTAGE_90 } from '../common/constants/Constants'; +import { PERCENTAGE_30 } from '../common/constants/Constants'; +import { PERCENTAGE_70 } from '../common/constants/Constants'; +import { PERCENTAGE_10 } from '../common/constants/Constants'; +import { PERCENTAGE_50 } from '../common/constants/Constants'; +import { PERCENTAGE_20 } from '../common/constants/Constants'; +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import TopBarComponent from '../view/TopBarComponent'; + +let waterColor = "#ff60c8fb" +let KEY = 'water' + +class WaterRecord { + target: number + curMl: number + curAddOnce: number = 200 + time: number = 2 + timeMills: number + + constructor(target: number, curMl: number, curAddOnce: number, time: number, timeMills: number) { + this.target = target + this.curMl = curMl + this.curAddOnce = curAddOnce + this.time = time + this.timeMills = timeMills + } +} + +@Entry +@Component +struct WaterRecordPage { + pageName: string = '喝水记录' + @State target: number = 1600 + @State curMl: number = 0 + curAddOnce: number = 0 + time: number = 0 + counter = null + + aboutToAppear() { + let record: WaterRecord + if (AppStorage.Has(KEY)) { + record = AppStorage.Get(KEY) + console.warn(JSON.stringify(record)) + let curTimeMills = TimeUtils.getToday0Point().getTime() + if (curTimeMills > record.timeMills) { + // 跨天了,重置 + record = this.resetRecord() + } + } else { + record = this.resetRecord() + } + this.target = record.target + this.curMl = record.curMl + this.curAddOnce = record.curAddOnce + this.time = record.time + } + + resetRecord() { + let record = new WaterRecord(1600, 0, 300, 0, TimeUtils.getToday0Point().getTime()) + AppStorage.SetOrCreate(KEY, record) + return record + } + + build() { + Column() { + TopBarComponent({ pageName: this.pageName }) + + this.Content() + }.width(PERCENTAGE_100) + .backgroundColor(Color.White) + } + + getTodayRecordMl() { + return Math.min(this.target, this.time * this.curAddOnce) + } + + @Builder Content() { + this.Top() + this.Center() + this.WaterInput() + Button('记录喝水') + .width(150) + .height(40) + .backgroundColor(waterColor) + .margin(20) + .onClick(() => { + if (this.getTodayRecordMl() >= this.target) { + return + } + this.time++ + let record = new WaterRecord(this.target, this.curAddOnce * this.time, this.curAddOnce, this.time, TimeUtils.getToday0Point() + .getTime()) + AppStorage.SetOrCreate(KEY, record) + + this.counter = setInterval(() => { + if (this.curMl >= this.getTodayRecordMl()) { + clearInterval(this.counter) + return + } + this.curMl = Math.min(this.getTodayRecordMl(), this.curMl + Math.ceil(Math.random() * 20)) + }, 10) + }) + } + + @Builder Top() { + Row() { + Row() { + Text(this.target.toString()) + .fontColor(waterColor) + .fontWeight(FontWeight.Bold) + .fontSize(26) + .width(PERCENTAGE_60) + .textAlign(TextAlign.Center) + + Text("目标ml") + .fontColor(waterColor) + .fontWeight(FontWeight.Medium) + .fontSize(16) + .width(PERCENTAGE_40) + .textAlign(TextAlign.Center) + .margin({ top: 8 }) + }.height(PERCENTAGE_100).width(PERCENTAGE_50) + + Divider().vertical(true).color(waterColor).strokeWidth(1) + Row() { + Text(`今天喝水 ${this.time}次`).fontSize(13).fontWeight(FontWeight.Medium).textAlign(TextAlign.Center) + }.height(PERCENTAGE_100).width(PERCENTAGE_50).alignItems(VerticalAlign.Center).padding(10) + } + .height("5%") + .width(PERCENTAGE_90) + .margin(10) + .backgroundColor("#ffeffafc") + .borderRadius(10) + + Row() { + Row() { + Text(`${this.curMl}`) + .fontColor(waterColor) + .fontWeight(FontWeight.Bold) + .fontSize(26) + .width(PERCENTAGE_60) + .textAlign(TextAlign.Center) + + Text("ml") + .fontColor(waterColor) + .fontWeight(FontWeight.Medium) + .fontSize(16) + .width(PERCENTAGE_40) + .textAlign(TextAlign.Center) + .margin({ top: 8 }) + }.height(PERCENTAGE_100).width(PERCENTAGE_50) + + Divider().vertical(true).color(waterColor).strokeWidth(1) + Row() { + Text(`进度 ${((this.curMl / this.target) * 100).toFixed(2)}%,剩余${this.target - this.curMl}ml`) + .fontSize(13) + .fontWeight(FontWeight.Medium) + .maxLines(2) + }.height(PERCENTAGE_100).width(PERCENTAGE_50).alignItems(VerticalAlign.Center).padding({ left: 10 }) + } + .height("5%") + .width(PERCENTAGE_90) + .margin(10) + .backgroundColor("#ffeffafc") + .borderRadius(10) + + Text('今日完成目标') + .fontColor(Color.Red) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .visibility(this.curMl >= this.target ? Visibility.Visible : Visibility.Hidden) + } + + @Builder Center() { + Stack({ alignContent: Alignment.Bottom }) { + Row() { + Row().width(PERCENTAGE_100).backgroundColor("#ffd1e4f2").height(`${((this.curMl / this.target) * 100)}%`) + }.width(200).height(230).margin({ bottom: 95 }).alignItems(VerticalAlign.Bottom) + + Image($rawfile('water/water_cup.png')) + .objectFit(ImageFit.Contain) + .width(200) + .height(400) + }.margin(20) + } + + @Builder WaterInput() { + Row() { + Text('本次记录:').fontSize(18) + TextInput({ text: this.curAddOnce.toString() }) + .backgroundColor(CommonData.BACK_COLOR) + .width(80) + .onChange(value => this.curAddOnce = parseInt(value)) + Text('ml').fontSize(20) + } + .height("5%") + .width(PERCENTAGE_70) + .backgroundColor(CommonData.BACK_COLOR) + .borderRadius(10) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/questionability/QuestionAbility.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/questionability/QuestionAbility.ts" new file mode 100644 index 0000000000000000000000000000000000000000..789beff94e095c94985a341b25de59aa25c4daf4 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/questionability/QuestionAbility.ts" @@ -0,0 +1,51 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import Window from '@ohos.window' + +export default class QuestionAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/QuestionPage', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + 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.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/secondtagpage/SecondTagPage.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/secondtagpage/SecondTagPage.ts" new file mode 100644 index 0000000000000000000000000000000000000000..dbffa76eab694d6b5fd0b60a8e9eed38fba1eb3a --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/secondtagpage/SecondTagPage.ts" @@ -0,0 +1,51 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import Window from '@ohos.window' + +export default class SecondTagPage extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/SecondTagPage', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + 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.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/BalanceComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/BalanceComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c79f8a59ac26ababf8fdad0ca81de21e6690719f --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/BalanceComponent.ets" @@ -0,0 +1,30 @@ +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import { PERCENTAGE_10 } from '../common/constants/Constants'; +import { BalanceStyle } from '../common/constants/Constants'; + +@Component +export default struct BalanceComponent { + @BuilderParam right: any; + pageName: string; + @BuilderParam left: any; + + build() { + Row() { + Row() { + this.left() + } + .align(Alignment.Start) + + if (this.pageName) { + Row() { + Text(this.pageName) + .fontSize(20) + }.layoutWeight(BalanceStyle.LAYOUT_WEIGHT).padding({ left: 25 }).alignItems(VerticalAlign.Center) + } + Row() { + this.right() + }.layoutWeight(BalanceStyle.LAYOUT_WEIGHT) + .justifyContent(FlexAlign.End) + }.backgroundColor("#4dffffff").width(PERCENTAGE_100).alignItems(VerticalAlign.Center).padding(16) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/CardComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/CardComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c843f1c4322d26273c74a882da3743b4857f913d --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/CardComponent.ets" @@ -0,0 +1,39 @@ +import { CardStyle } from '../common/constants/Constants'; + +/* + * CardComponent is a container with round corner. + */ +@Component +export default struct CardComponent { + @BuilderParam children: () => void; + paddingValue: Padding | Length; + marginValue: Margin | Length; + colorValue: ResourceColor; + radiusValue: Length; + + build() { + Column() { + this.children() + } + .padding(this.paddingValue??{ + top: CardStyle.CARD_PADDING_VERTICAL, + bottom: CardStyle.CARD_PADDING_VERTICAL, + left: CardStyle.CARD_PADDING_HORIZONTAL, + right: CardStyle.CARD_PADDING_HORIZONTAL + }) + .margin(this.marginValue??{ + top: CardStyle.CARD_MARGIN_TOP, + left: CardStyle.CARD_MARGIN_HORIZONTAL, + right: CardStyle.CARD_MARGIN_HORIZONTAL + }) + .backgroundColor(this.colorValue??$r('app.color.background1')) + .borderRadius(this.radiusValue??CardStyle.CARD_RADIUS) + .borderRadius(10) + .shadow({ + radius: 5, + color: Color.Gray, + offsetX: 0, + offsetY: 5 + }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/NumberPicker.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/NumberPicker.ets" new file mode 100644 index 0000000000000000000000000000000000000000..9d620201090ff2b452c4a4450b2bb3812d2cd5e1 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/NumberPicker.ets" @@ -0,0 +1,75 @@ +import { AppFontSize } from '../common/constants/Constants'; +@Extend(Row) function setNumberPickerRow () { + .width(20) + .height(20) + .justifyContent(FlexAlign.Center) + .padding({ top: 3, left: 3, right: 3, bottom: 3 }) +} + +@Component +export default struct NumberPicker { + @Link number: number + numberChange: (oldValue: number, newValue: number) => void + + build() { + Column() { + Row() { + Row() { + // - + Text('-') + .fontColor(this.number <= 1 ? Color.Gray : Color.Black) + .fontSize(AppFontSize.MIDDLE) + .lineHeight(14) + } + .setNumberPickerRow() + .onClick(() => { + if (this.number > 1) { + this.number--; + this.numberChange(this.number + 1, this.number) + } + }) + .border({ + radius: { + topLeft: 10, + bottomLeft: 10 + }, + color: "#ffb3b3b3", + width: 1 + }) + + Row() { + // number + Text(this.number.toString()) + .fontColor(Color.Black) + .fontSize(AppFontSize.S_SMALLER) + }.setNumberPickerRow() + .border({ + color: "#ffb3b3b3", + width: { top: 1, bottom: 1 } + }) + + Row() { + // + + Text('+') + .fontColor(Color.Black) + .fontSize(AppFontSize.MIDDLE) + .lineHeight(14) + }.setNumberPickerRow() + .border({ + radius: { + topRight: 10, + bottomRight: 10 + }, + color: "#ffb3b3b3", + width: 1 + }) + .onClick(() => { + if (this.number < 99) { + this.number++; + this.numberChange(this.number, this.number + 1) + } + }) + } + } + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/ToolBarComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/ToolBarComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..43a6b851c6f60a45b314917182ec808ed94b440f --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/ToolBarComponent.ets" @@ -0,0 +1,65 @@ +import { CommonData } from '../common/constants/Constants'; +import router from '@ohos.router'; +import ShoppingCartViewModel from '../viewmodel/ShoppingCartViewModel'; +import GoodsData from '../common/bean/GoodsData'; +import ToolBarData from '../common/bean/ToolBarData'; +import { AppFontSize, AppFontWeight, PERCENTAGE_100, ToolBarStyle } from '../common/constants/Constants'; + +let vm = new ShoppingCartViewModel() + +@Component +export default struct ToolBarComponent { + @Link navCurrentPosition: number; + toolBarConfigs: ToolBarData[]; + controller: TabsController; + @Consume("idsInCart") @Watch("onGoodIdsChange") idsInCart: number[]; + @State goodsItems: GoodsData[] = [] + + aboutToAppear() { + this.goodsItems = vm.getGoodsItems(Array.from(new Set(this.idsInCart))) + } + + onGoodIdsChange() { + this.goodsItems = vm.getGoodsItems(Array.from(new Set(this.idsInCart))) + } + + build() { + Column() { + Divider() + .backgroundColor(Color.Black) + // .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + Row() { + ForEach(this.toolBarConfigs, (item, index) => { + Column() { + Image(this.navCurrentPosition === index ? item?.icon_after : item?.icon) + .height(ToolBarStyle.IMAGE_SIZE) + .margin({ bottom: ToolBarStyle.MARGIN_BOTTOM }) + .objectFit(ImageFit.Contain) + Row() { + Text(item?.text) + .fontColor(this.navCurrentPosition === index ? CommonData.SELECT_COLOR : $r('app.color.text')) + .fontWeight(AppFontWeight.BOLDER) + .fontSize(AppFontSize.SMALLER) + .textAlign(TextAlign.Center) + Text(`${index === 2 ? (this.goodsItems.length > 0 ? `(${this.goodsItems.length})` : "") : ""}`) + .fontColor(this.navCurrentPosition === index ? CommonData.SELECT_COLOR : $r('app.color.text')) + .fontWeight(AppFontWeight.BOLDER) + .fontSize(AppFontSize.SMALLER) + .textAlign(TextAlign.Center) + } + } + .width(ToolBarStyle.LAYOUT_WEIGHT) + .onClick(() => { + router.clear() + this.navCurrentPosition = item.num + this.controller.changeIndex(this.navCurrentPosition) + }) + }) + } + } + .backgroundColor(Color.White) + .height("80%") + } +} + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/TopBarComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/TopBarComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..13479015ae0b739d6e0bf1320f4afb2a01b2f35c --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/TopBarComponent.ets" @@ -0,0 +1,35 @@ +import { PERCENTAGE_100 } from '../common/constants/Constants'; +import BalanceComponent from './BalanceComponent'; +import router from '@ohos.router'; +import { DetailsPageStyle } from '../common/constants/Constants'; + +@Extend(Image) function setTopImageStyle () { + .width(25) + .height(25) +} + +@Component +export default struct TopBarComponent { + pageName: string; + + build() { + this.TopBarLayout() + } + + @Builder BackLayout() { + Image($rawfile('detail/detail_back.png')) + .setTopImageStyle() + .onClick(() => { + router.back() + }) + } + + @Builder ShareLayout() { + Image($rawfile('detail/detail_share.png')).setTopImageStyle() + } + + @Builder TopBarLayout() { + BalanceComponent({ left: this.BackLayout(),pageName:this.pageName, right: this.ShareLayout() }) + .width(PERCENTAGE_100) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/AddressComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/AddressComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..795a2f8a594b53b2ca756cd990539e86c16ce297 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/AddressComponent.ets" @@ -0,0 +1,48 @@ +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { AddressPicker } from '../../common/constants/DetailsConstants'; + +@Component +export default struct AddressComponent { + build() { + Row() { + Column() { + Text($r('app.string.detail_address_text')) + .maxLines(AddressPicker.MAX_LINES) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .fontColor(Color.Gray) + .fontWeight(AppFontWeight.BOLDER) + } + .width(AddressPicker.LAYOUT_WEIGHT_LEFT) + .alignItems(HorizontalAlign.Start) + + Row() { + Image($rawfile('detail/detail_location.png')) + .objectFit(ImageFit.Contain) + .height(AddressPicker.IMAGE_SIZE_LOCATION) + .width(AddressPicker.IMAGE_SIZE_LOCATION) + .margin({ right: AddressPicker.MARGIN_RIGHT_IMAGE }) + Text($r('app.string.detail_address_holder_text')) + .maxLines(AddressPicker.MAX_LINES) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALL) + .fontColor(Color.Black) + .fontWeight(AppFontWeight.BOLD) + } + .justifyContent(FlexAlign.Start) + .width(AddressPicker.LAYOUT_WEIGHT_CENTER) + + Row() { + Image($rawfile('detail/detail_pick_up_more.png')) + .objectFit(ImageFit.Contain) + .height(AddressPicker.IMAGE_SIZE_MORE) + .width(AddressPicker.IMAGE_SIZE_MORE) + } + .width(AddressPicker.LAYOUT_WEIGHT_RIGHT) + .justifyContent(FlexAlign.End) + } + .width(PERCENTAGE_100) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/BottomBarComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/BottomBarComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..a5f2675ff500e37d43c502b694a32198a1b30f27 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/BottomBarComponent.ets" @@ -0,0 +1,152 @@ +import router from '@ohos.router'; +import ShoppingCartViewModel from '../../viewmodel/ShoppingCartViewModel'; +import { AppFontSize, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { BottomBar } from '../../common/constants/DetailsConstants'; +import prompt from '@ohos.prompt'; +import GoodsData from '../../common/bean/GoodsData'; + +@Extend(Text) function setTextStyle () { + .lineHeight(BottomBar.TEXT_LINE_HEIGHT) + .textAlign(TextAlign.Center) + .fontColor($r('app.color.background')) + .fontSize(AppFontSize.SMALLER) +} + +let vm = new ShoppingCartViewModel() + +@Component +export default struct BottomBarComponent { + private barHeight: Length; + private goodsDetail: GoodsData; + @Consume("idsInCart") @Watch("onGoodIdsChange") idsInCart: number[]; + @State num: number = 0 + + aboutToAppear() { + this.num = vm.getGoodsItems(Array.from(new Set(this.idsInCart))).length + } + + onGoodIdsChange() { + this.num = vm.getGoodsItems(Array.from(new Set(this.idsInCart))).length + } + + build() { + Column() { + Divider() + .height(BottomBar.DIVIDER_HEIGHT) + .backgroundColor($r('app.color.navigation_line')) + Row() { + Row() { + this.btnItem("店铺", $rawfile("index/dianpu.png")) + this.btnItem("客服", $rawfile("index/kefu.png")) + this.btnItem("购物车", $rawfile("index/cart.png")) + } + .width("40%") + // .backgroundColor(Color.Gray) + Row() { + Row() { + Text($r('app.string.put_in_shopping_cart')) + .setTextStyle() + .onClick(() => { + let str = AppStorage.Get('shoppingCart') + let arr: number[] = str?.split(",").filter(v => v).map(v => parseInt(v))??[] + if (!arr.find(id => id == this.goodsDetail.id)) { + this.num++ + } + arr.push(this.goodsDetail.id) + AppStorage.Set('shoppingCart', arr.join(",")) + + prompt.showToast({ + message: '成功加入购物车!', + duration: 2000, + }) + }) + } + .width(90) + .height(BottomBar.CONTAINER_SIZE_HEIGHT) + .linearGradient({ + direction: GradientDirection.Right, + colors: [[0xFEA803, 0.1], [0xFFB901, 0.7]] + }) + .justifyContent(FlexAlign.Center) + .borderRadius(20) + + Row() { + Text($r('app.string.buy_now')) + .setTextStyle() + .onClick(() => { + prompt.showToast({ + message: '购买成功!', + duration: 2000, + }) + }) + } + .width(90) + .height(BottomBar.CONTAINER_SIZE_HEIGHT) + .linearGradient({ + direction: GradientDirection.Right, + colors: [[0xF20400, 0.1], [0xFF4614, 0.7]] + }) + .justifyContent(FlexAlign.Center) + .borderRadius(20) + .margin({ left: 10 }) + } + .width(BottomBar.CONTAINER_SIZE_WIDTH) + .height(BottomBar.CONTAINER_SIZE_HEIGHT) + .backgroundImageSize(ImageSize.Cover) + } + .padding({ + top: BottomBar.BAR_PADDING_TOP, + bottom: BottomBar.BAR_PADDING_BOTTOM, + right: BottomBar.BAR_PADDING_RIGHT + }) + .width(PERCENTAGE_100) + .height(this.barHeight) + .backgroundColor($r('app.color.bottom_navigation')) + // .justifyContent(FlexAlign.End) + } + } + + @Builder btnItem(name: string, image: Resource) { + Column() { + Stack() { + Row() { + Text(this.num.toString()) + .fontSize(8) + .fontColor(Color.Red) + } + .border({ + color: Color.Red, + radius: 15, + width: 1 + }) + .size({ width: 12, height: 12 }) + .margin({ left: 23, bottom: 20 }) + .justifyContent(FlexAlign.Center) + .visibility(name === "购物车" ? Visibility.Visible : Visibility.Hidden) + + Image(image) + .objectFit(ImageFit.Contain) + .height(20) + .width(20) + .margin({ bottom: 5 }) + } + + Text(name) + .fontSize(9) + .fontColor(Color.Gray) + } + .width("30%") + .justifyContent(FlexAlign.Center) + .onClick(() => { + if (name !== "购物车") { + return + } + router.push({ + url: "pages/NavPage", + params: { + navIndex: 2 + } + }) + }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/CommentsComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/CommentsComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..738c66560eee2563dbf8c54da5bc254ae44457f0 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/CommentsComponent.ets" @@ -0,0 +1,121 @@ +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { CommentList } from '../../common/constants/DetailsConstants'; + +@Extend(Image) function setImageStyle () { + .objectFit(ImageFit.Contain) + .size({ width: CommentList.IMAGE_MARK_WIDTH }) +} + +@Extend(Image) function setGoodsImageStyle (need: boolean, setup?: number) { + .border({ + radius: { + topLeft: need && setup === 0 ? 5 : 0, + bottomLeft: need && setup === 0 ? 5 : 0, + topRight: need && setup === 1 ? 5 : 0, + bottomRight: need && setup === 1 ? 5 : 0, + } + }) + .objectFit(ImageFit.Contain) + .size({ width: CommentList.GOOD_IMAGE_MARK_WIDTH }) + .margin({ right: 6 }) +} + +@Component +export default struct CommentsComponent { + goodImg: Resource + + build() { + List({ space: CommentList.SPACE }) { + ListItem() { + this.CommentItem() + } + + ListItem() { + this.CommentItem() + } + + ListItem() { + this.CommentItem() + } + } + .height(CommentList.HEIGHT) + .width(PERCENTAGE_100) + .backgroundColor(Color.White) + .edgeEffect(EdgeEffect.None) + } + + @Builder CommentItem() { + Column() { + Row() { + Image($rawfile('detail/head_portrait.png')) + .objectFit(ImageFit.Contain) + .size({ width: CommentList.IMAGE_SIZE_HEAD_PORTRAIT }) + .margin({ right: CommentList.MARGIN_HEAD_PORTRAIT }) + Column() { + Text(`商城用户${this.randomNum(100, 9999)}`) + .lineHeight(CommentList.LINE_HEIGHT_PHONE) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.S_SMALLER) + .fontWeight(AppFontWeight.BOLDER) + .fontColor(Color.Gray) + Blank() + .height(CommentList.BLANK_HEIGHT_PHONE) + Row() { + Image($rawfile('detail/detail_comment_mark.png')) + .setImageStyle() + Blank().width(CommentList.MARK_BLANK_WIDTH) + Image($rawfile('detail/detail_comment_mark.png')) + .setImageStyle() + Blank().width(CommentList.MARK_BLANK_WIDTH) + Image($rawfile('detail/detail_comment_mark.png')) + .setImageStyle() + Blank().width(CommentList.MARK_BLANK_WIDTH) + Image($rawfile('detail/detail_comment_mark.png')) + .setImageStyle() + Blank().width(CommentList.MARK_BLANK_WIDTH) + Image($rawfile('detail/detail_comment_mark.png')) + .setImageStyle() + } + } + .width(PERCENTAGE_100) + .alignItems(HorizontalAlign.Start) + } + + Text($r('app.string.detail_comment')) + .maxLines(CommentList.COMMENT_MAX_LINES) + .lineHeight(CommentList.COMMENT_LINE_HEIGHT) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .fontWeight(AppFontWeight.BOLD) + .margin({ top: CommentList.MARGIN_TEXT, bottom: CommentList.MARGIN_TEXT }) + + Row() { + Image(this.goodImg).setGoodsImageStyle(true, 0) + + Image(this.goodImg).setGoodsImageStyle(false) + Image(this.goodImg).setGoodsImageStyle(false) + Image(this.goodImg).setGoodsImageStyle(true, 1) + } + .alignItems(VerticalAlign.Center) + } + .alignItems(HorizontalAlign.Start) + .width(PERCENTAGE_100) + .margin({ bottom: 10 }) + } + + randomNum(minNum: number, maxNum: number) { + switch (arguments.length) { + case 1: + return Math.ceil(Math.random() * minNum + 1); + break; + case 2: + return Math.ceil(Math.random() * (maxNum - minNum) + minNum); + break; + default: + return 0; + break; + } + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/CommentsHeaderComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/CommentsHeaderComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..d9024856f4d2a05a8982369c9ae2ca62b1b794ea --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/CommentsHeaderComponent.ets" @@ -0,0 +1,48 @@ +import { AppFontSize, AppFontWeight } from '../../common/constants/Constants'; +import { CommentHeader } from '../../common/constants/DetailsConstants'; + +@Component +export default struct CommentsHeaderComponent { + commonCount:number + + build() { + Row() { + Text(){ + Span($r('app.string.detail_comment_header_left')) + .fontSize(AppFontSize.MIDDLE) + .fontColor($r('app.color.text')) + Span(`(${this.commonCount}+)`) + .fontSize(AppFontSize.S_SMALLER) + .fontColor($r('app.color.description')) + } + .lineHeight(CommentHeader.LINE_HEIGHT) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontWeight(AppFontWeight.BOLDER) + .width(CommentHeader.LAYOUT_WEIGHT) + .textAlign(TextAlign.Start) + Row() { + Text() { + Span($r('app.string.detail_comment_header_right')) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALL) + .fontColor($r('app.color.commentRate')) + .fontWeight(AppFontWeight.BOLD) + Span($r('app.string.commentRatio')) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .fontColor(Color.Red) + .fontWeight(AppFontWeight.BOLD) + Span(CommentHeader.ARROW) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.MIDDLE) + .decoration({ type: TextDecorationType.None, color: Color.Red }) + .fontColor($r('app.color.commentRate')) + .fontWeight(AppFontWeight.BOLD) + } + .width(CommentHeader.LAYOUT_WEIGHT) + .textAlign(TextAlign.End) + } + } + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/GoodsTitleComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/GoodsTitleComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..daf88946f2a2a9371b5a48a80ee81b17b5403972 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/GoodsTitleComponent.ets" @@ -0,0 +1,23 @@ +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { GoodsTitle } from '../../common/constants/DetailsConstants'; + +@Component +export default struct GoodsTitleComponent { + private title: Resource + + build() { + Column() { + Text(this.title) + .maxLines(GoodsTitle.MAX_LINE) + .lineHeight(GoodsTitle.LINE_HEIGHT) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALL) + .textAlign(TextAlign.Start) + .fontColor($r('app.color.text')) + .fontWeight(AppFontWeight.BOLD) + } + .width(PERCENTAGE_100) + .alignItems(HorizontalAlign.Start) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PanelComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PanelComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..67cd4a1ff3b144761ccd27b97906a87bc9b386e4 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PanelComponent.ets" @@ -0,0 +1,45 @@ +import { AppFontSize, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { ActionPanel } from '../../common/constants/DetailsConstants'; + +@Component +export default struct PanelComponent { + @Styles globalSize() { + .size({ width: ActionPanel.IMAGE_HEIGHT }) + } + + build() { + Row() { + Row() { + Image($rawfile('detail/detail_action_share_to.png')) + .globalSize() + Blank() + .width(ActionPanel.BLANK_WIDTH) + Text($r('app.string.detail_enjoy')) + .fontSize(AppFontSize.S_SMALLER) + .fontColor($r('app.color.text')) + }.alignItems(VerticalAlign.Bottom) + + Row() { + Image($rawfile('detail/detail_action_add_to_favorites.png')) + .globalSize() + Blank() + .width(ActionPanel.BLANK_WIDTH) + Text($r('app.string.detail_collection')) + .fontSize(AppFontSize.S_SMALLER) + .fontColor($r('app.color.text')) + }.alignItems(VerticalAlign.Bottom) + + Row() { + Image($rawfile('detail/detail_action_price_notify.png')) + .globalSize() + Blank() + .width(ActionPanel.BLANK_WIDTH) + Text($r('app.string.detail_price_notify')) + .fontSize(AppFontSize.S_SMALLER) + .fontColor($r('app.color.text')) + }.alignItems(VerticalAlign.Bottom) + } + .width(PERCENTAGE_100) + .justifyContent(FlexAlign.SpaceAround) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PickerComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PickerComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..f76fc4c98fe356ea98d6220c186b1e54cdb81047 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PickerComponent.ets" @@ -0,0 +1,44 @@ +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { GoodsPicker } from '../../common/constants/DetailsConstants'; + +@Component +export default struct PickerComponent { + private goodsDescription: string | Resource + @BuilderParam actionMoreBuilder: () => void; + + build() { + Row() { + Text($r('app.string.detail_goods_picker_left_text')) + .maxLines(GoodsPicker.MAX_LINES) + .lineHeight(GoodsPicker.LINE_HEIGHT_TEXT_SELECTED) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .fontColor(Color.Gray) + .fontWeight(AppFontWeight.BOLDER) + .width(GoodsPicker.LAYOUT_WEIGHT_LEFT) + + Row() { + Text(this.goodsDescription) + .maxLines(GoodsPicker.MAX_LINES) + .lineHeight(GoodsPicker.LINE_HEIGHT_DESCRIPTION) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALL) + .fontColor($r('app.color.text')) + .fontWeight(AppFontWeight.BOLD) + .padding({ left: GoodsPicker.MARGIN_LEFT_DESCRIPTION }) + } + .width(GoodsPicker.LAYOUT_WEIGHT_CENTER) + .justifyContent(FlexAlign.Start) + + Row() { + this.actionMoreBuilder() + } + .width(GoodsPicker.LAYOUT_WEIGHT_RIGHT) + .justifyContent(FlexAlign.End) + + } + .width(PERCENTAGE_100) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PreviewerComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PreviewerComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..acd0a4e92949f35707634615352c7c0305a8bf56 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PreviewerComponent.ets" @@ -0,0 +1,42 @@ +import { PERCENTAGE_50 } from '../../common/constants/Constants'; +import { PERCENTAGE_30 } from '../../common/constants/Constants'; +import { AppFontSize, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { GoodsPreviewer } from '../../common/constants/DetailsConstants'; + +@Component +export default struct PreviewerComponent { + goodsImg: string | Resource; + + build() { + Column() { + Row() { + Image(this.goodsImg) + .height(PERCENTAGE_100) + .width(PERCENTAGE_100) + .objectFit(ImageFit.Cover) + } + .width(PERCENTAGE_100) + .height("45%") + + Row() { + Text(GoodsPreviewer.INDICATOR_TEXT) + .fontColor(Color.White) + .fontSize(AppFontSize.SMALLER) + } + .zIndex(GoodsPreviewer.INDEX) + .alignSelf(ItemAlign.End) + .position({ x: GoodsPreviewer.LOCATION, + y: "41%" }) + .backgroundColor($r('app.color.detail_goods_previewer_indicator')) + .borderRadius(GoodsPreviewer.BORDER_RADIUS) + .padding({ + top: GoodsPreviewer.INDICATOR_PADDING_TOP, + bottom: GoodsPreviewer.INDICATOR_PADDING_BOTTOM, + right: GoodsPreviewer.INDICATOR_PADDING_HORIZONTAL, + left: GoodsPreviewer.INDICATOR_PADDING_HORIZONTAL + }) + .margin({ bottom: GoodsPreviewer.INDICATOR_MARGIN_BOTTOM, + right: GoodsPreviewer.INDICATOR_MARGIN_RIGHT }) + } + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PriceComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PriceComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..9ae5a375152c2b2a9ab33d1136d8dabd8a87ac47 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/PriceComponent.ets" @@ -0,0 +1,52 @@ +import { PERCENTAGE_70 } from '../../common/constants/Constants'; +import { PERCENTAGE_30 } from '../../common/constants/Constants'; +import { PERCENTAGE_80 } from '../../common/constants/Constants'; +import { PERCENTAGE_90 } from '../../common/constants/Constants'; +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; + +@Component +export default struct PriceComponent { + private price: number + colorValue: ResourceColor; + + build() { + Row() { + Row() { + Column() { + Text() { + Span($r('app.string.detail_price_symbol')) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALL) + .decoration({ type: TextDecorationType.None }) + .fontColor(this.colorValue??Color.Red) + .fontWeight(AppFontWeight.BOLD) + Span(`${this.price.toString()}.00`) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.LARGE) + .decoration({ type: TextDecorationType.None, color: Color.Red }) + .fontColor(this.colorValue??Color.Red) + .fontWeight(AppFontWeight.BOLDER) + } + } + .alignItems(HorizontalAlign.Start) + .width(PERCENTAGE_100) + .padding({ left: 10 }) + } + .width(PERCENTAGE_30) + + Row() { + Column() { + Text("逛好物 超实在") + .fontSize(AppFontSize.SMALLER) + .fontColor(this.colorValue??Color.Red) + } + .padding({ right: 20 }) + .margin({ top: 12 }) + } + .height(PERCENTAGE_100) + .width(PERCENTAGE_70) + .justifyContent(FlexAlign.End) + } + .height("7%") + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/ServiceItemComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/ServiceItemComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..9bf649686211c38d63e0a8076320771ec97668e6 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/ServiceItemComponent.ets" @@ -0,0 +1,61 @@ +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { GoodsServiceItem } from '../../common/constants/DetailsConstants'; + +@Component +export default struct ServiceItemComponent { + serviceName: string; + @Prop description: string; + isShowActionMore: boolean; + + build() { + Row() { + Column() { + Text(this.serviceName??'') + .maxLines(GoodsServiceItem.MAX_LINES) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .fontColor(Color.Gray) + .fontWeight(AppFontWeight.BOLDER) + + } + .width(GoodsServiceItem.LAYOUT_WEIGHT_LEFT) + .alignItems(HorizontalAlign.Start) + + Row() { + Image($rawfile('detail/detail_services.png')) + .objectFit(ImageFit.Contain) + .height(GoodsServiceItem.IMAGE_SIZE_SERVICE) + .width(GoodsServiceItem.IMAGE_SIZE_SERVICE) + .margin({ right: GoodsServiceItem.MARGIN_RIGHT_IMAGE }) + Text(this.description??'') + .maxLines(GoodsServiceItem.MAX_LINES) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALL) + .fontColor($r('app.color.text')) + .fontWeight(AppFontWeight.BOLDER) + + } + .justifyContent(FlexAlign.Start) + .width(GoodsServiceItem.LAYOUT_WEIGHT_CENTER) + + Row() { + if (this.isShowActionMore) { + Image($rawfile('detail/detail_pick_up_more.png')) + .objectFit(ImageFit.Contain) + .height(GoodsServiceItem.IMAGE_SIZE_MORE) + .width(GoodsServiceItem.IMAGE_SIZE_MORE) + } else { + Row() { + } + .height(GoodsServiceItem.IMAGE_SIZE_MORE) + .width(GoodsServiceItem.IMAGE_SIZE_MORE) + } + } + .width(GoodsServiceItem.LAYOUT_WEIGHT_RIGHT) + .justifyContent(FlexAlign.End) + } + .width(PERCENTAGE_100) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/ServicesComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/ServicesComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..d64dafa3cec3a7bf933624c5014f721cbc9874ba --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/ServicesComponent.ets" @@ -0,0 +1,34 @@ +import ServiceItemComponent from './ServiceItemComponent'; +import ServicesViewModel from '../../viewmodel/ServicesViewModel'; +import GoodsServiceData from '../../common/bean/GoodsServiceData'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; +import { GoodsService } from '../../common/constants/DetailsConstants'; + +let viewModel: ServicesViewModel = new ServicesViewModel(); +let goodsServiceList: GoodsServiceData[]; + +@Component +export default struct ServicesComponent { + aboutToAppear() { + goodsServiceList = viewModel.loadGoodsService(); + } + + build() { + List({ space: GoodsService.SPACE }) { + ForEach(goodsServiceList, (item) => { + ListItem() { + ServiceItemComponent({ + serviceName: item?.name, + description: item?.description, + isShowActionMore: item?.isShowActionMore + }) + } + }, (item) => (item?.id).toString()) + + } + .width(PERCENTAGE_100) + .height(GoodsService.LIST_HEIGHT) + .backgroundColor(Color.White) + .edgeEffect(EdgeEffect.None) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/TagRowComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/TagRowComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..523246865ed0cccf9cf85c890c0a61fa00fdcd6b --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/details/TagRowComponent.ets" @@ -0,0 +1,19 @@ +import { AppFontSize } from '../../common/constants/Constants'; + +@Component +export default struct RagRowComponent { + content: string; + + build() { + Row() { + Text(this.content) + .fontSize(AppFontSize.SMALLER) + .lineHeight(20) + .fontColor(Color.Red) + } + .backgroundColor("#fffff1f1") + .padding({ left: 5, right: 5 }) + .margin({ top: 3, left: 2, right: 2, bottom: 3 }) + .borderRadius(5) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/foodcompare/CompareTableItemComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/foodcompare/CompareTableItemComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..e0cb3328d2f51edfe429bb726103abdef6135430 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/foodcompare/CompareTableItemComponent.ets" @@ -0,0 +1,45 @@ +import NutrientDefine from '../../common/bean/food/NutrientDefine'; +import { CommonData } from '../../common/constants/Constants'; +import { ToolBarStyle } from '../../common/constants/Constants'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; + +@Extend(Text) function setTableTopItemText (textAlign: TextAlign=TextAlign.Start, color: ResourceColor=CommonData.UN_SELECT_FONT_COLOR) { + .textAlign(textAlign) + .fontColor(color) + .fontSize(13) + .fontWeight(FontWeight.Medium) + .margin({ bottom: 7 }) +} + +@Component +export default struct CompareTableItemComponent { + leftShow: boolean + rightShow: boolean + nutrientDefine: NutrientDefine + leftWeight: number = 0 + rightWeight: number = 0 + + build() { + Column() { + Row() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text(`${this.leftWeight.toFixed(1)}${this.nutrientDefine.unit}`) + .width('30%') + .setTableTopItemText() + .visibility(this.leftShow ? Visibility.Visible : Visibility.Hidden) + Text(`${this.nutrientDefine.name}`).width('38%').setTableTopItemText(TextAlign.Center) +// .visibility(this.leftShow||this.rightShow ? Visibility.Visible : Visibility.Hidden) + Text(`${this.rightWeight.toFixed(1)}${this.nutrientDefine.unit}`) + .width('30%') + .setTableTopItemText(TextAlign.End) + .visibility(this.rightShow ? Visibility.Visible : Visibility.Hidden) + }.width(PERCENTAGE_100) + }.width(PERCENTAGE_100) + + Divider() + .backgroundColor(Color.Black) + .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + }.margin({ top: 5, bottom: 10 }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/CompositionView.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/CompositionView.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c2fcca664fc3a0432701e58e315dc2a4d831163e --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/CompositionView.ets" @@ -0,0 +1,12 @@ +@Entry +@Component +export default struct CompositionView { + + build() { + Row() { + Column() { + } + .width('100%') + }.height('100%') + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/FoodDetailTabsComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/FoodDetailTabsComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..faa15061353ca4eb2f6978a16188e2cef6df9385 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/FoodDetailTabsComponent.ets" @@ -0,0 +1,55 @@ +import { showToast } from '../../common/TipsUtils'; +import { CommonData } from '../../common/constants/Constants'; +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { GoodsTabs } from '../../common/constants/HomeConstants'; + +@Component +export default struct FoodDetailTabsComponent { + private tabMenus: string[]; + @Link currentPosition: number; + + build() { + Column() { + Row() { + Tabs({ barPosition: BarPosition.Start, }) { + ForEach(this.tabMenus, (item, index) => { + TabContent() { + }.tabBar(this.TabBuilder(index)) + }) + } + .vertical(false) + .scrollable(true) + .barHeight(PERCENTAGE_100) + .barMode(BarMode.Fixed) + .animationDuration(GoodsTabs.TIME) + .width(PERCENTAGE_100) + } + .width(PERCENTAGE_100) + .height(GoodsTabs.BAR_HEIGHT) + .backgroundColor(Color.White) + + }.width(PERCENTAGE_100) + } + + @Builder TabBuilder(position: number) { + Row() { + Text(this.tabMenus[position]) + .fontColor(this.isIndexPageWithinTabs(position) ? Color.Black : CommonData.UN_SELECT_FONT_COLOR) + .fontWeight(this.isIndexPageWithinTabs(position) ? FontWeight.Bold : FontWeight.Normal) + .fontSize(AppFontSize.MIDDLE) + } + .height(PERCENTAGE_100).width(PERCENTAGE_100) + .justifyContent(FlexAlign.Center) + .onClick((e) => { + this.currentPosition = position; + if (position != 0) { + console.info(position.toString()) + showToast('暂未支持') + } + }) + } + + isIndexPageWithinTabs(position): boolean { + return this.currentPosition === position; + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/RankView.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/RankView.ets" new file mode 100644 index 0000000000000000000000000000000000000000..6d6f7d377744652bcb3a653c9806af1e691a3176 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/RankView.ets" @@ -0,0 +1,12 @@ +@Entry +@Component +export default struct RankView { + + build() { + Row() { + Column() { + } + .width('100%') + }.height('100%') + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/RecordView.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/RecordView.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c0c93ba4086ccb7582cce5568d233ec61438c288 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/fooddetail/RecordView.ets" @@ -0,0 +1,243 @@ +import { CardStyle } from '../../common/constants/Constants'; +import { NutrientContent } from '../../common/bean/food/FoodData'; +import { PERCENTAGE_80 } from '../../common/constants/Constants'; +import { PERCENTAGE_60 } from '../../common/constants/Constants'; +import { PERCENTAGE_20 } from '../../common/constants/Constants'; +import { PERCENTAGE_50 } from '../../common/constants/Constants'; +import { PERCENTAGE_15 } from '../../common/constants/Constants'; +import { PERCENTAGE_10 } from '../../common/constants/Constants'; +import { PERCENTAGE_70 } from '../../common/constants/Constants'; +import CardComponent from '../CardComponent'; +import { PERCENTAGE_30 } from '../../common/constants/Constants'; +import { ToolBarStyle } from '../../common/constants/Constants'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; +import { PERCENTAGE_90 } from '../../common/constants/Constants'; +import { CommonData } from '../../common/constants/Constants'; +import FoodData from '../../common/bean/food/FoodData'; + +@Component +export default struct RecordView { + foodDetail: FoodData + + aboutToAppear() { + console.warn(JSON.stringify(this.foodDetail.eatLevel)) + } + + build() { + Column() { + CardComponent() { + TipsData({ foodDetail: this.foodDetail }) + } + + CardComponent({ marginValue: { + top: CardStyle.CARD_MARGIN_TOP, + left: CardStyle.CARD_MARGIN_HORIZONTAL, + right: CardStyle.CARD_MARGIN_HORIZONTAL, + bottom: 50 + } }) { + this.Composition() + } + + }.width(PERCENTAGE_100) + } + + @Builder Composition() { + Column() { + Column() { + Text('热量和营养成分').fontSize(15).fontWeight(FontWeight.Bold) + }.width(PERCENTAGE_100).alignItems(HorizontalAlign.Start).margin(10) + + Row() { + Column() { + Column() { + Text('热量:') + .fontSize(13) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + .fontWeight(FontWeight.Medium) + .margin({ left: 10 }) + } + .width(PERCENTAGE_100) + .height(PERCENTAGE_20) + .justifyContent(FlexAlign.Start) + .alignItems(HorizontalAlign.Start) + .padding({ top: 10 }) + + Column() { + Text(this.foodDetail.heat.toString()).fontSize(20).fontWeight(FontWeight.Medium).margin({ bottom: 10 }) + Row() { + Text('千焦').fontSize(11).fontColor(Color.White).fontWeight(FontWeight.Bold) + } + .backgroundColor(CommonData.SELECT_COLOR) + .width(35) + .height(15) + .borderRadius(10) + .justifyContent(FlexAlign.Center) + }.padding(10).height(PERCENTAGE_80).justifyContent(FlexAlign.Center) + }.width(PERCENTAGE_50).height(PERCENTAGE_100).justifyContent(FlexAlign.Center) + + Divider().vertical(true).height(PERCENTAGE_50).color(CommonData.UN_SELECT_FONT_COLOR) + Column() { + Column() { + Text('供能比:') + .fontSize(13) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + .fontWeight(FontWeight.Medium) + .margin({ left: 10 }) + } + .width(PERCENTAGE_100) + .height(PERCENTAGE_20) + .justifyContent(FlexAlign.Start) + .alignItems(HorizontalAlign.Start) + .padding({ top: 10 }) + + Column() { + Row() { + powerItem({ name: '蛋白质', value: this.foodDetail.addPowerPercent.p, color: "#fff4c79c" }) + powerItem({ name: '脂肪', value: this.foodDetail.addPowerPercent.f, color: "#ffef8e8b" }) + powerItem({ name: '碳水', value: this.foodDetail.addPowerPercent.c, color: "#ffa9abfe" }) + } + }.padding(10).height(PERCENTAGE_80).justifyContent(FlexAlign.Center) + }.width(PERCENTAGE_50).height(PERCENTAGE_100) + } + .width(PERCENTAGE_100) + .height(PERCENTAGE_20) + .backgroundColor(CommonData.BACK_COLOR) + .borderRadius(10) + .margin({ bottom: 15 }) + + this.ElementTable() + Button(`更多营养素`) + .fontColor(Color.Black) + .fontSize(11) + .fontWeight(FontWeight.Medium) + .size({ width: 90, height: 30 }) + .backgroundColor(Color.White) + .borderWidth(1) + .borderRadius(10) + .borderColor(CommonData.UN_SELECT_FONT_COLOR) + } + } + + @Builder ElementTable() { + Column() { + Row() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('营养元素') + .width('38%') + .setTableTopItemText(CommonData.UN_SELECT_FONT_COLOR) + Text('含量') + .width('31%') + .setTableTopItemText(CommonData.UN_SELECT_FONT_COLOR) + Text('NRV%') + .width('31%') + .setTableTopItemText(CommonData.UN_SELECT_FONT_COLOR) + }.width(PERCENTAGE_100) + }.width(PERCENTAGE_100) + + Divider() + .backgroundColor(Color.Black) + .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + .margin({ top: 5, bottom: 5 }) + + ForEach(this.foodDetail.nutrientContent, (item: NutrientContent) => { + if (item.nd.name != '热量') { + TableItem({ type: item.nd.name, weight: item.v, unit: item.nd.unit, nrv: (Math.random() * 100) }) + } + }, (item: NutrientContent) => item.nd.name) + } + } +} + +@Component +struct TipsData { + foodDetail: FoodData + + build() { + Column() { + Row() { + Row() { + } + .width(10) + .height(10) + .backgroundColor(this.foodDetail.eatLevel.color) + .borderRadius(5) + .margin(8) + + Text(this.foodDetail.eatLevel.title).fontSize(17).fontWeight(FontWeight.Medium) + }.width(PERCENTAGE_100).height(PERCENTAGE_30).margin({ bottom: 5 }) + + Column() { + Row() { + Image($rawfile('detail/fang_hu.png')).width(23).height(23).objectFit(ImageFit.Contain).margin(5) + Text(this.foodDetail.descItem[0]??"--") + .fontSize(14) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + }.width(PERCENTAGE_100).height(PERCENTAGE_50).padding(7).justifyContent(FlexAlign.Start) + + Row() { + Image($rawfile('detail/zhu_yi.png')).width(20).height(20).objectFit(ImageFit.Contain).margin(5) + Text(this.foodDetail.descItem[1]??"--") + .fontSize(14) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + }.width(PERCENTAGE_100).height(PERCENTAGE_50).padding(7).justifyContent(FlexAlign.Start) + }.width(PERCENTAGE_100).height(PERCENTAGE_60).backgroundColor(CommonData.BACK_COLOR).borderRadius(8) + } + .width(PERCENTAGE_100) + .height(PERCENTAGE_20) + } +} + +@Component +struct powerItem { + name: string + value: number + color: Color | string + + build() { + Column() { + Progress({ value: this.value, type: ProgressType.Ring }) + .color(this.color) + .width(30) + .margin({ bottom: 3 }) + .style({ strokeWidth: 6 }) + Text(this.name).fontSize(10).fontColor(CommonData.UN_SELECT_FONT_COLOR).maxLines(2) + Text(`${this.value}%`).fontSize(10).fontColor(CommonData.UN_SELECT_FONT_COLOR).maxLines(2) + }.width(PERCENTAGE_30).margin(2) + } +} + +@Extend(Text) function setTableTopItemText (color?: ResourceColor) { + .textAlign(TextAlign.Start) + .fontColor(color != null ? color : Color.Black) + .setTableItemText() +} + +@Extend(Text) function setTableItemText () { + .fontSize(13).fontWeight(FontWeight.Medium).margin({ bottom: 7 }) +} + +@Component +struct TableItem { + type: string + weight: number + unit: string + nrv: number + + build() { + Column() { + Row() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text(this.type).width('38%').setTableTopItemText() + Text(`${this.weight}${this.unit}`).width('31%').setTableTopItemText() + Text(`${this.nrv.toFixed(1)}%`).width('31%').setTableTopItemText().textAlign(TextAlign.End) + }.width(PERCENTAGE_100) + }.width(PERCENTAGE_100) + + Divider() + .backgroundColor(Color.Black) + .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + }.margin({ top: 5, bottom: 10 }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/home/HomeView.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/home/HomeView.ets" new file mode 100644 index 0000000000000000000000000000000000000000..f50fa0919cb1684d7a1a8575e4b8cdcc733cc998 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/home/HomeView.ets" @@ -0,0 +1,130 @@ +import { showToast } from '../../common/TipsUtils'; +import { PERCENTAGE_90 } from '../../common/constants/Constants'; +import { PERCENTAGE_15 } from '../../common/constants/Constants'; +import { PERCENTAGE_20 } from '../../common/constants/Constants'; +import { CommonData } from '../../common/constants/Constants'; +import { PERCENTAGE_10 } from '../../common/constants/Constants'; +import { PERCENTAGE_30 } from '../../common/constants/Constants'; +import router from '@ohos.router'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; +import MenuBtnDataViewModel from '../../viewmodel/food/MenuBtnDataViewModel'; +import { ToolBarStyle } from '../../common/constants/Constants'; +import MenuBtnData from '../../common/bean/MenuBtnData'; + +@Component +export default struct HomeView { + @State message: string = 'Ark健康饮食' + + build() { + Column() { + this.Title() + this.FlexBtn() + this.AnswerQuestion() + + this.WaterRecord() + + } + .height(PERCENTAGE_100) + .width(PERCENTAGE_100) + } + + @Builder Title() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold).margin(10) + Divider() + .backgroundColor(Color.Black) + .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + .margin({ top: 3, bottom: 3 }) + }.width(PERCENTAGE_100).height(100).alignItems(HorizontalAlign.Start) + } + + @Builder FlexBtn() { + Flex({ wrap: FlexWrap.Wrap, direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + ForEach(MenuBtnDataViewModel.loadDataList(), (item: MenuBtnData) => { + MenuBtnItem({ btnData: item }) + }, (item: MenuBtnData) => item.name) + } + .width(PERCENTAGE_100) + } + + @Builder AnswerQuestion() { + Column() { + Text("每日一答") + .fontWeight(FontWeight.Medium) + .fontSize(25) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + .margin({ left: 15 }) + } + .width(PERCENTAGE_90) + .height(PERCENTAGE_15) + .alignItems(HorizontalAlign.Start) + .justifyContent(FlexAlign.Center) + .margin({ top: 15, bottom: 15 }) + .borderRadius(25) + .backgroundImage($rawfile('food/question_bg.jpg')) + .padding(5) + .onClick(() => { + router.push({ + url: "pages/QuestionPage" + }) + }) + } + + @Builder WaterRecord() { + Column() { + Text("喝水记录") + .fontWeight(FontWeight.Medium) + .fontSize(25) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + .margin({ left: 15 }) + } + .width(PERCENTAGE_90) + .height(PERCENTAGE_15) + .alignItems(HorizontalAlign.Start) + .justifyContent(FlexAlign.Center) + .margin({ top: 15, bottom: 15 }) + .borderRadius(25) + .backgroundColor("#ff60c8fb") + .padding(5) + .onClick(() => { + router.push({ + url: "pages/WaterRecordPage" + }) + }) + } +} + +@Component +struct MenuBtnItem { + btnData: MenuBtnData + + build() { + Column() { + Image(this.btnData.image) + .width(50) + .height(50) + .margin({ bottom: 5 }) + .borderRadius(15) + Text(this.btnData.name) + .fontSize(11).fontWeight(FontWeight.Bold) + } + .width("17%") + .height(PERCENTAGE_10) + .margin({ left: 5, right: 5 }) + .onClick(() => { + if (!this.btnData.url) { + showToast('暂未支持') + return + } + router.push({ + url: this.btnData.url, + params: { + pageName: this.btnData.name + } + }) + }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/my/MyListComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/my/MyListComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..01a596eda62439393ca55375f3b3341be3abc794 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/my/MyListComponent.ets" @@ -0,0 +1,46 @@ +import { AppFontSize, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { ActionPanel } from '../../common/constants/DetailsConstants'; + +@Component +export default struct MyListComponent { + @Styles globalSize() { + .size({ width: ActionPanel.IMAGE_HEIGHT,height: ActionPanel.IMAGE_HEIGHT }) + } + + build() { + Row() { + Row() { + Image($rawfile('index/shou_cang.png')) + .globalSize() + + Blank() + .width(ActionPanel.BLANK_WIDTH) + Text(`商品收藏7`) + .fontSize(AppFontSize.S_SMALLER) + .fontColor($r('app.color.text')) + }.alignItems(VerticalAlign.Bottom) + + Row() { + Image($rawfile('index/dian_pu.png')) + .globalSize() + Blank() + .width(ActionPanel.BLANK_WIDTH) + Text("店铺关注11") + .fontSize(AppFontSize.S_SMALLER) + .fontColor($r('app.color.text')) + }.alignItems(VerticalAlign.Bottom) + + Row() { + Image($rawfile('index/liu_lan_ji_lu.png')) + .globalSize() + Blank() + .width(ActionPanel.BLANK_WIDTH) + Text("浏览记录30") + .fontSize(AppFontSize.S_SMALLER) + .fontColor($r('app.color.text')) + }.alignItems(VerticalAlign.Bottom) + } + .width(PERCENTAGE_100) + .justifyContent(FlexAlign.SpaceAround) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/my/MyPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/my/MyPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..d400cc24393134f605b539adecc22d5aa6a683da --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/my/MyPage.ets" @@ -0,0 +1,156 @@ +import { CommonData } from '../../common/constants/Constants'; +import { DetailsPageStyle } from '../../common/constants/Constants'; +import { PERCENTAGE_50 } from '../../common/constants/Constants'; +import { ToolBarStyle } from '../../common/constants/Constants'; +import MyListComponent from './MyListComponent'; +import CardComponent from '../CardComponent'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; +import { AppFontSize } from '../../common/constants/Constants'; + +@Component +export default struct MyPage { + @Styles globalSize() { + .size({ width: 20 }) + } + + build() { + Column() { + Row() { + Text("我的").fontSize(AppFontSize.LARGE) + } + .width(PERCENTAGE_100) + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + .margin({ top: 5, bottom: 5 }) + + Scroll() { + Column() { + Row() { + Image($rawfile('index/icon-user.jpg')) + .margin({ left: 20 }) + .objectFit(ImageFit.Cover) + .height(50) + .width(50) + .renderMode(ImageRenderMode.Original) + .margin({ left: 15, right: 10 }) + .borderRadius(35) + + Column() { + Text('唐家四少官微') + .fontSize(AppFontSize.MIDDLE) + Text('ID:88888888') + .fontSize(AppFontSize.S_SMALLER) + } + .height(60) + .margin({ top: 10 }) + .alignItems(HorizontalAlign.Start) + } + + CardComponent({ marginValue: { left: 10, right: 10, bottom: 12 } }) { + MyListComponent() + Divider() + .backgroundColor(Color.Black) + .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + .margin({ top: 5, bottom: 5 }) + + Row() { + this.btnItem("待付款", $rawfile("index/dai_fu_kuan.png")) + this.btnItem("待收货", $rawfile("index/dai_shou_huo.png")) + this.btnItem("待评价", $rawfile("index/dai_ping_jia.png")) + this.btnItem("退款/售后", $rawfile("index/tui_kuan.png")) + } + .width(PERCENTAGE_100) + .justifyContent(FlexAlign.Start) + .margin({ top: 5, bottom: 5 }) + } + + CardComponent({ marginValue: { left: 10, right: 10, bottom: 12 } }) { + this.SetupItem("地址管理") + this.SetupItem("账号与安全") + this.SetupItem("设置字体大小") + this.SetupItem("支付设置") + this.SetupItem("发票抬头管理") + this.SetupItem("我的档案") + this.SetupItem("通用") + this.SetupItem("长辈版", false) + } + + CardComponent({ marginValue: { left: 10, right: 10, bottom: 12 } }) { + this.SetupItem("健康饮食商城会员") + this.SetupItem("家庭号设置") + this.SetupItem("功能反馈") + this.SetupItem("关于健康饮食商城APP") + this.SetupItem("隐私政策简要版") + this.SetupItem("个人信息收集清淡") + this.SetupItem("应用权限说明", false) + } + } + .alignItems(HorizontalAlign.Start) + } + .scrollBarWidth(0) + .height(DetailsPageStyle.SCROLL_LAYOUT_WEIGHT) + } + .width(PERCENTAGE_100) + .flexGrow(1).backgroundColor(CommonData.BACK_COLOR) + } + + @Builder btnItem(name: string, image: Resource) { + Column() { + Stack() { + Row() { + Text("2") + .fontSize(8) + .fontColor(Color.White) + } + .backgroundColor(Color.Red) + .borderRadius(15) + .size({ width: 12, height: 12 }) + .margin({ left: 30, bottom: 22 }) + .justifyContent(FlexAlign.Center) + + Image(image) + .objectFit(ImageFit.Contain) + .height(30) + .width(30) + .margin({ bottom: 5 }) + } + + Text(name) + .fontSize(9) + .fontColor(Color.Black) + } + .margin({ right: 15 }) + .justifyContent(FlexAlign.Center) + } + + @Builder SetupItem(name: string, isShowDivider?: boolean) { + Column() { + Row() { + Row() { + Text(name) + .fontSize(AppFontSize.SMALLER) + .fontColor(Color.Black) + }.width(PERCENTAGE_50) + .justifyContent(FlexAlign.Start) + + Row() { + Image($rawfile('index/you_jian_tou.png')) + .width(15) + .height(15) + }.width(PERCENTAGE_50) + .justifyContent(FlexAlign.End) + } + .width(PERCENTAGE_100) + + Divider() + .backgroundColor(Color.Black) + .height(ToolBarStyle.DIVIDER_HEIGHT) + .opacity(ToolBarStyle.DIVIDER_OPACITY) + .margin({ top: 10, bottom: 10 }) + .visibility(isShowDivider ? Visibility.Visible : Visibility.Hidden) + } + + } +} + diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/BannerComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/BannerComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..af10d72c5a0f90d7ae7481b000235a58e06766ff --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/BannerComponent.ets" @@ -0,0 +1,39 @@ +import BannerData from '../../common/bean/BannerData'; +import { Banner } from '../../common/constants/HomeConstants'; +import { PERCENTAGE_100, PERCENTAGE_20 } from '../../common/constants/Constants'; + +@Component +export default struct BannerComponent { + bannerList: BannerData[]; + + build() { + Column({ space: Banner.SPACE }) { + Swiper() { + ForEach(this.bannerList, (item) => { + Image(item.imgSrc) + .width(PERCENTAGE_100) + .objectFit(ImageFit.Contain) + }) + } + .cachedCount(Banner.CACHE_COUNT) + .index(Banner.POSITION) + .autoPlay(true) + .interval(Banner.TIME) + .indicator(true) + .loop(true) + .duration(Banner.DURATION) + .vertical(false) + .itemSpace(Banner.ITEM_SPACE) + .indicatorStyle({ + size: Banner.INDICATOR_SIZE, + color: $r('app.color.background'), + selectedColor: $r('app.color.homepage_indicator_selected') + }) + .curve(Curve.Linear) + } + .width(Banner.WIDTH) + .height(PERCENTAGE_20) + .borderRadius(10) + .backgroundColor($r("app.color.shopping_cart_bg")) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/GoodsComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/GoodsComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..9cc007b28acaa63370046c5a578916083becd766 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/GoodsComponent.ets" @@ -0,0 +1,49 @@ +import router from '@ohos.router'; +import GoodsItemComponent from './GoodsItemComponent'; +import { GoodsList } from '../../common/constants/HomeConstants'; +import GoodsData from '../../common/bean/GoodsData'; +import { PERCENTAGE_100, PERCENTAGE_50 } from '../../common/constants/Constants'; + +@Component +export default struct GoodsComponent { + private goodsList: GoodsData[]; + @State filterGoodsList: GoodsData[] = []; + @Link @Watch("onChanged") currentGoodsType: number; + + onChanged(propName: string) { + this.updateGoodsList() + } + + updateGoodsList() { + this.filterGoodsList = this.goodsList.filter(v => v.goodsType == this.currentGoodsType) + } + + aboutToAppear() { + this.updateGoodsList() + } + + build() { + Grid() { + ForEach(this.filterGoodsList, (item: GoodsData, index) => { + GridItem() { + GoodsItemComponent({ config: item }) + }.onClick(() => { + router.push({ + url: 'pages/DetailsPage', + params: { + id: item.id, + }, + }) + }) + }) + } + .columnsTemplate(GoodsList.GRID_STYLE) + .columnsGap(GoodsList.SPACE) + .rowsGap(GoodsList.SPACE) + .layoutDirection(GoodsList.HORIZONTAL) + .padding({ left: GoodsList.GRID_PADDING, + right: GoodsList.GRID_PADDING }) + .width(PERCENTAGE_100) + .height("65%") + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/GoodsItemComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/GoodsItemComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..d34bff9a3b15ddb3011198d85cdc1e9ad7790ecb --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/GoodsItemComponent.ets" @@ -0,0 +1,74 @@ +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import GoodsData from '../../common/bean/GoodsData'; +import { GoodsListItem } from '../../common/constants/HomeConstants'; + +@Component +export default struct GoodsItemComponent { + @ObjectLink config: GoodsData; + + build() { + Column() { + Image(this.config?.goodsImg) + .width(GoodsListItem.GOODS_IMAGE_SIZE) + .height(GoodsListItem.GOODS_IMAGE_SIZE) + .border({ + radius: 5 + }) + Column() { + Row() { + Text(this.config?.goodsName) + .fontSize(AppFontSize.SMALLER) + .fontWeight(AppFontWeight.BOLD) + .maxLines(GoodsListItem.MAX_LINE_GOODS_NAME) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + } + .height(GoodsListItem.CONTAINER_GOODS_NAME_HEIGHT) + .alignItems(VerticalAlign.Top) + + Text() { + Span($r('app.string.detail_price_symbol')) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .fontColor(Color.Red) + .fontWeight(AppFontWeight.BOLD) + Span(this.config?.price.toString()+".00") + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.MIDDLE) + .fontColor(Color.Red) + .fontWeight(AppFontWeight.BOLD) + if (this.config?.originalPrice !== 0) { + Span($r('app.string.detail_price_symbol')) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .fontColor($r('app.color.description')) + .fontWeight(AppFontWeight.BOLD) + Span(this.config?.originalPrice.toString()) + .textCase(TextCase.UpperCase) + .fontSize(AppFontSize.SMALLER) + .decoration({ type: TextDecorationType.LineThrough, color: $r('app.color.description') }) + .fontColor($r('app.color.description')) + .fontWeight(AppFontWeight.BOLD) + } + } + + Text(`${this.config?.commentCount}+条评价`) + .fontSize(AppFontSize.SMALLER) + .margin({ bottom: GoodsListItem.MARGIN_DISCOUNTS }) + .fontWeight(AppFontWeight.BOLD) + .fontColor($r('app.color.description')) + } + .width(GoodsListItem.TEXT_LAYER_WIDTH) + .alignItems(HorizontalAlign.Start) + .margin({ top: GoodsListItem.TEXT_LAYER_MARGIN_TOP, bottom: GoodsListItem.TEXT_LAYER_MARGIN_BOTTOM }) + .padding({ left: GoodsListItem.ITEM_PADDING_HORIZONTAL, + right: GoodsListItem.ITEM_PADDING_HORIZONTAL }) + } + .width(PERCENTAGE_100) + .border({ + width: GoodsListItem.BORDER_WIDTH, + color: Color.White, + radius: GoodsListItem.BORDER_RADIUS + }) + .backgroundColor(Color.White) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/MenusComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/MenusComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..635e6193042c2668d122d15531187e3edd19e956 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/MenusComponent.ets" @@ -0,0 +1,31 @@ +import { AppFontSize } from '../../common/constants/Constants'; +import MenuData from '../../common/bean/MenuData'; +import { Menus } from '../../common/constants/HomeConstants'; + +@Component +export default struct MenusComponent { + menus: MenuData[]; + + build() { + Row() { + ForEach(this.menus, (item) => { + Column() { + Text(item?.menuName) + .fontColor(item?.fontColor) + .fontSize(AppFontSize.MIDDLE) + .fontWeight(item?.fontWeight) + Text(item?.menuContent) + .fontColor(item?.fontColor) + .fontSize(AppFontSize.SMALL) + .fontWeight(item?.fontWeight) + } + .width(Menus.LAYOUT_WEIGHT) + .padding({ top: Menus.ITEM_PADDING_VERTICAL, + bottom: Menus.ITEM_PADDING_VERTICAL }) + }) + } + .justifyContent(FlexAlign.Center) + .padding({ top: Menus.CONTAINER_PADDING_VERTICAL, + bottom: Menus.CONTAINER_PADDING_VERTICAL }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/SearchComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/SearchComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c8793b717543a0b9062b680f24b63480902e6c5f --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/SearchComponent.ets" @@ -0,0 +1,40 @@ +import { TopBar } from '../../common/constants/HomeConstants'; +import { AppFontSize, AppFontWeight } from '../../common/constants/Constants'; +import { SearchBar } from '../../common/constants/HomeConstants'; + +@Component +export default struct SearchComponent { + build() { + Row() { + Row() { + Image($rawfile('index/search.png')) + .width(SearchBar.IMAGE_SIZE) + .height(SearchBar.IMAGE_SIZE) + } + + TextInput({ placeholder: $r('app.string.homepage_search_hot_word') }) + .placeholderColor($r('app.color.index_search_hot_word')) + .placeholderFont({ size: AppFontSize.SMALL, weight: AppFontWeight.BOLD, }) + .width(SearchBar.WEIGHT) + .margin({ right: SearchBar.TEXT_INPUT_MARGIN_RIGHT }) + .backgroundColor($r('app.color.background')) + .fontSize(AppFontSize.SMALL) + .fontWeight(FontWeight.Bold) + .fontStyle(FontStyle.Normal) + .width("65%") + + this.QRCodeLayout() + } + .padding({ left: SearchBar.CONTAINER_PADDING_LEFT }) + .borderRadius(SearchBar.BORDER_RADIUS) + .backgroundColor($r('app.color.background')) + .width(SearchBar.WEIGHT) + .height(SearchBar.BAR_HEIGHT) + } + + @Builder QRCodeLayout() { + Image($rawfile('index/qrcode.png')) + .size({ width: TopBar.IMAGE_SIZE }) + .objectFit(ImageFit.Contain) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/ShopView.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/ShopView.ets" new file mode 100644 index 0000000000000000000000000000000000000000..3833bf90bb648fa2f74dfdbc94fca2efa3bbd08f --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/ShopView.ets" @@ -0,0 +1,59 @@ +import BannerData from '../../common/bean/BannerData'; +import BannerComponent from './BannerComponent'; +import { GoodsListItem } from '../../common/constants/HomeConstants'; +import HomeViewModel from '../../viewmodel/HomeViewModel'; +import TopBarComponent from './TopBarComponent'; +import TabsComponent from './TabsComponent'; +import GoodsComponent from './GoodsComponent'; +import GoodsData from '../../common/bean/GoodsData'; +import { HomePageStyle, PERCENTAGE_100 } from '../../common/constants/Constants'; + +let viewModel: HomeViewModel = new HomeViewModel(); + +@Component +export default struct ShopView { + @State tabMenus: Resource[] = []; + @State goodsList: GoodsData[] = []; + @State currentGoodsType: number = 1; + @State bannerList: BannerData[] = []; + + aboutToAppear() { + this.goodsList = viewModel.getGoodsList(); + this.tabMenus = viewModel.loadTabViewMenu(); + this.bannerList = viewModel.loadBanner(); + } + + build() { + Column() { + Column() { + Blank().height(HomePageStyle.BLANK_HEIGHT) + TopBarComponent() + .padding({ + bottom: HomePageStyle.PADDING_VERTICAL, + left: HomePageStyle.PADDING_VERTICAL, + right: HomePageStyle.PADDING_VERTICAL, + }) + + TabsComponent({ tabMenus: this.tabMenus, currentGoodsType: $currentGoodsType }) + Column() { + BannerComponent({ bannerList: this.bannerList }) + Text("———————————— 我是分割线 ————————————") + .fontColor(Color.Gray) + .fontSize(10) + .margin({ top: 5, bottom: 5 }) + GoodsComponent({ goodsList: this.goodsList, currentGoodsType: $currentGoodsType}) + } + .width(PERCENTAGE_100) + .height(PERCENTAGE_100) + .border({ + width: GoodsListItem.BORDER_WIDTH, + color: Color.White, + radius: GoodsListItem.BORDER_RADIUS + }) + .backgroundColor($r("app.color.shopping_cart_bg")) + }.width(PERCENTAGE_100) + } + .height(PERCENTAGE_100) + .backgroundImageSize(ImageSize.Cover) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/TabsComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/TabsComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..561555bef8b94b1a5188b0045d0a27f9e3928957 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/TabsComponent.ets" @@ -0,0 +1,64 @@ +import { CommonData } from '../../common/constants/Constants'; +import { AppFontSize, AppFontWeight, PERCENTAGE_100 } from '../../common/constants/Constants'; +import { GoodsTabs } from '../../common/constants/HomeConstants'; + +@Component +export default struct TabsComponent { + private tabMenus: Resource[]; + @Link currentGoodsType: number; + + build() { + Row() { + Tabs({ barPosition: BarPosition.Start, }) { + ForEach(this.tabMenus, (item, index) => { + TabContent() { + } + .tabBar(this.TabBuilder(index)) + + }) + } + .vertical(false) + .scrollable(true) + .barMode(BarMode.Scrollable) + .barHeight(PERCENTAGE_100) + .animationDuration(GoodsTabs.TIME) + .width(GoodsTabs.TAB_WIDTH) + + Row() { + Image($rawfile('index/tab_menu_setting.png')) + .width(GoodsTabs.IMAGE_SIZE_WIDTH) + .height(GoodsTabs.IMAGE_SIZE_HEIGHT) + Blank() + .width(GoodsTabs.SETTING_BLANK_WIDTH) + Text($r('app.string.homepage_tab_more')) + .fontSize(AppFontSize.MIDDLE) + .fontColor(CommonData.UN_SELECT_FONT_COLOR) + .fontWeight(AppFontWeight.BOLD) + } + .width(GoodsTabs.SETTING_LAYOUT) + .height(PERCENTAGE_100) + } + .width(PERCENTAGE_100) + .padding({ right: GoodsTabs.PADDING_RIGHT }) + .height(GoodsTabs.BAR_HEIGHT) + } + + @Builder TabBuilder(position: number) { + Column() { + Text(this.tabMenus[position]) + .fontColor(this.isIndexPageWithinTabs(position) ? CommonData.SELECT_COLOR : CommonData.UN_SELECT_FONT_COLOR) + .fontWeight(this.isIndexPageWithinTabs(position) ? FontWeight.Bolder : FontWeight.Normal) + .fontSize(AppFontSize.MIDDLE) + } + .height(PERCENTAGE_100) + .justifyContent(FlexAlign.Center) + .align(Alignment.Start) + .onClick((e) => { + this.currentGoodsType = position + 1; + }) + } + + isIndexPageWithinTabs(position): boolean { + return this.currentGoodsType === position+1; + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/TopBarComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/TopBarComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..15fc8db0cc9e9018a91cfc19e3409237a59c5c0d --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shop/TopBarComponent.ets" @@ -0,0 +1,45 @@ +import { BalanceStyle } from '../../common/constants/Constants'; +import SearchComponent from './SearchComponent'; +import BalanceComponent from '../BalanceComponent'; +import { TopBar } from '../../common/constants/HomeConstants'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; + +@Component +export default struct TopBarComponent { + build() { + Row() { + Row() { + this.LogoLayout() + } +// .layoutWeight(BalanceStyle.LAYOUT_WEIGHT) + .align(Alignment.Start) + + Row() { + SearchComponent() + } +// .layoutWeight(BalanceStyle.LAYOUT_WEIGHT) + .align(Alignment.Center) + + Row() { + this.ChatLayout() + } +// .layoutWeight(BalanceStyle.LAYOUT_WEIGHT) + .justifyContent(FlexAlign.End) + + } + .width(PERCENTAGE_100) + .height(TopBar.HEIGHT) + } + + @Builder LogoLayout() { + Image($rawfile('index/icon.png')) + .size({ width: TopBar.IMAGE_SIZE }) + .objectFit(ImageFit.Contain) + } + + @Builder ChatLayout() { + Image($rawfile('index/chat.png')) + .size({ width: TopBar.IMAGE_SIZE }) + .objectFit(ImageFit.Contain) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shoppingcart/CartRowComponent.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shoppingcart/CartRowComponent.ets" new file mode 100644 index 0000000000000000000000000000000000000000..0c3046b151debafe8fe734e1556455a71d10d354 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shoppingcart/CartRowComponent.ets" @@ -0,0 +1,19 @@ +import { GoodsListItem } from '../../common/constants/HomeConstants'; + +@Component +export default struct CartRowComponent { + @BuilderParam data: any; + + build() { + Row() { + this.data() + } + .backgroundColor(Color.White) + .padding({ left: 3, right: 3 }) + .margin({ top: 3, bottom: 3 }) + .border({ + width: GoodsListItem.BORDER_WIDTH, + color: Color.Red, + }) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shoppingcart/ShoppingCartPage.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shoppingcart/ShoppingCartPage.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c00720f56cf9e8622416e2cb4438c6dd6f7c602b --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/view/shoppingcart/ShoppingCartPage.ets" @@ -0,0 +1,418 @@ +import { CommonData } from '../../common/constants/Constants'; +import NumberPicker from '../NumberPicker'; +import { AppFontSize } from '../../common/constants/Constants'; +import { BalanceStyle } from '../../common/constants/Constants'; +import router from '@ohos.router'; +import CartRowComponent from './CartRowComponent'; +import { HomePageStyle } from '../../common/constants/Constants'; +import ShoppingCartViewModel from '../../viewmodel/ShoppingCartViewModel'; +import { GoodsListItem } from '../../common/constants/HomeConstants'; +import { PERCENTAGE_100 } from '../../common/constants/Constants'; +import GoodsData from '../../common/bean/GoodsData'; +import prompt from '@ohos.prompt' + +let selectIds: Set = new Set() +let vm = new ShoppingCartViewModel() + +@Component +export default struct ShoppingCartPage { + @Consume("idsInCart") @Watch("onGoodIdsChange") idsInCart: number[]; + @Provide totalPrice: number = 0 + @Provide goodsItems: GoodsData[] = [] + @Provide toggleType: number = 0 // 0 结算状态 1 编辑状态 + @Provide isSelectAll: boolean = false + @Provide btnName: string = '编辑' + + aboutToAppear() { + this.goodsItems = vm.getGoodsItems(Array.from(new Set(this.idsInCart))) + } + + onGoodIdsChange() { + this.goodsItems = vm.getGoodsItems(Array.from(new Set(this.idsInCart))) + } + + @Builder CartLayout() { + Text(`购物车(${this.goodsItems.length})`) + .fontSize(20) + .align(Alignment.Center) + .margin({ left: 10 }) + } + + build() { + Column() { + Column() { + Row() { + Row() { + this.CartLayout() + } + .align(Alignment.Start) + + Row() { + Text(this.toggleType === 1 ? "完成" : "编辑") + .fontColor(CommonData.SELECT_COLOR) + .fontSize(15) + .onClick(() => { + if (this.toggleType === 0) { + this.toggleType = 1 + } else { + this.toggleType = 0 + } + console.warn(this.toggleType.toString()) + }) + .margin({ right: 10 }) + Image($rawfile('index/gengduo.png')) + .objectFit(ImageFit.ScaleDown) + .height(20) + .width(20) + .renderMode(ImageRenderMode.Original) + } + .layoutWeight(BalanceStyle.LAYOUT_WEIGHT) + .alignItems(VerticalAlign.Bottom) + .justifyContent(FlexAlign.End) + + }.padding({ + left: HomePageStyle.PADDING_VERTICAL, + right: HomePageStyle.PADDING_VERTICAL, + }) + } + .alignItems(HorizontalAlign.Start) + .width(PERCENTAGE_100) + .height(30) + .margin({ top: 10, bottom: 10 }) + + ShopCartList(); + ShopCartBottom() + } + .alignItems(HorizontalAlign.Start) + } +} + +@Component +struct ShopCartList { + @Consume goodsItems: GoodsData[] + @Consume("idsInCart") idsInCart: number[] + @Consume toggleType: number + + build() { + Column() { + List() { + ForEach(this.goodsItems, item => { + ListItem() { + ShopCartListItem({ goodsItem: item }) + }.onClick(() => { + if (this.toggleType === 1) { + return + } + router.push({ + url: 'pages/DetailsPage', + params: { + id: item.id, + fromShoppingCart: true + }, + }) + }) + }, item => item.id.toString()) + } + .height(PERCENTAGE_100) + .width(PERCENTAGE_100) + .align(Alignment.Top) + .margin({ top: 5 }) + .padding({ left: GoodsListItem.ITEM_PADDING_HORIZONTAL, + right: GoodsListItem.ITEM_PADDING_HORIZONTAL }) + } + .height("88%") + .backgroundColor($r("app.color.shopping_cart_bg")) + } +} + +@Component +struct ShopCartListItem { + @Consume totalPrice: number + @Consume toggleType: number + @Consume isSelectAll: boolean + @Consume("idsInCart") idsInCart: number[] + @State count: number = 0 + isOn: boolean = false + goodsItem: GoodsData + + aboutToAppear() { + this.count = this.idsInCart.filter(v => v == this.goodsItem.id).length + } + + numberChange(oldValue: number, newValue: number) { + if (oldValue < newValue) { + //++ + let goodIds: number[] = AppStorage.Get('shoppingCart').split(",").filter(v => v).map(v => parseInt(v)) + goodIds.push(this.goodsItem.id) + AppStorage.Set('shoppingCart', goodIds.join(",")) + if (this.isOn) { + this.totalPrice += this.goodsItem.price + } + } else { + //-- + let goodIds: number[] = AppStorage.Get('shoppingCart').split(",").filter(v => v).map(v => parseInt(v)) + let i = goodIds.indexOf(this.goodsItem?.id) + if (i !== -1) { + goodIds = goodIds.slice(i, 1) + AppStorage.Set('shoppingCart', goodIds.join(",")) + if (this.isOn) { + this.totalPrice = Math.max(0, this.totalPrice - this.goodsItem.price) + } + } + } + } + + build() { + Row() { + Row() { + Toggle({ type: ToggleType.Checkbox, isOn: this.isSelectAll }) + .width(10) + .height(10) + .selectedColor(Color.Red) + .onChange((isOn: boolean) => { + this.isOn = isOn + if (isOn) { + console.log("isON") + if (this.toggleType === 0) { + this.totalPrice += this.goodsItem.price * this.count + } + selectIds.add(this.goodsItem.id) + } else { + if (this.toggleType === 0) { + this.totalPrice = Math.max(0, this.totalPrice - this.goodsItem.price * this.count) + } + selectIds.delete(this.goodsItem.id) + + } + }) + .margin({ bottom: 50 }) + } + .height("100%") + + Row() { + Image(this.goodsItem.goodsImg) + .objectFit(ImageFit.ScaleDown) + .height(100) + .width(100) + .renderMode(ImageRenderMode.Original) + .borderRadius(5) + .margin({ bottom: 50 }) + } + .height("100%") + + Column() { + Row() { + Text(this.goodsItem.goodsName) + .fontSize(15) + .maxLines(GoodsListItem.MAX_LINE_GOODS_NAME) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + } + .width("86%") + + CartRowComponent({ data: this.buildText1() }) + CartRowComponent({ data: this.buildCommonRowText("跨店每满299减50") }) + CartRowComponent({ data: this.buildCommonRowText("30天价保") }) + + Row() { + Text($r('app.string.detail_price_symbol')) + .fontSize(15) + .fontColor(Color.Red) + Text(`${this.goodsItem.price}.00`) + .fontSize(20) + .fontColor(Color.Red) + NumberPicker({ number: $count, numberChange: this.numberChange.bind(this) }) + .margin({ left: 45 }) + } + .alignItems(VerticalAlign.Bottom) + .margin({ top: 10 }) + } + .padding({ left: 10, right: 5 }) + .width("70%") + .alignItems(HorizontalAlign.Start) + .justifyContent(FlexAlign.Start) + } + .height(200) + .margin({ top: 10 }) + .width(PERCENTAGE_100) + .borderRadius(10) + .shadow({ + radius: 5, + color: Color.Gray, + offsetX: 0, + offsetY: 5 + }) + .backgroundColor(Color.White) + } + + @Builder buildText1() { + Text(`6期 `) + .fontSize(12) + .fontColor(Color.Red) + Row() { + Text("分期免息") + .fontSize(12) + .fontColor(Color.White) + } + .linearGradient({ + direction: GradientDirection.Right, + colors: [[0xF20401, 0.0], [0xFF4614, 0.1]] + }) + } + + @Builder buildCommonRowText(content: string) { + Text(content) + .fontSize(12) + .fontColor(Color.Red) + } +} + + +@Extend(Text) function setTextStyle () { + .fontColor(Color.Red) + .fontSize(18) +} + +@Component +struct ShopCartBottom { + @Consume totalPrice: number + @Consume goodsItems: GoodsData[] + @Consume("idsInCart") idsInCart: number[]; + @Consume toggleType: number + @Consume isSelectAll: boolean + + build() { + Row() { + Row() { + Toggle({ type: ToggleType.Checkbox }) + .width(10) + .height(10) + .selectedColor(Color.Red) + .onChange((isOn: boolean) => { + if (isOn) { + if (this.toggleType === 0) { + if (this.idsInCart.length) { + this.totalPrice = this.idsInCart.map(id => this.goodsItems.find(item => item.id == id)?.price) + .reduce((a, b) => a + b) + } else { + this.totalPrice = 0 + } + } + this.isSelectAll = true + this.goodsItems.map(v => v.id).forEach(id => selectIds.add(id)) + } else { + if (this.toggleType === 0) { + this.totalPrice = 0 + } + this.isSelectAll = false + selectIds.clear() + } + }) + Text("全选") + .fontSize(11) + } + .margin({ right: 5 }) + + Row() { + Text('合计: ') + .fontSize(15) + Text($r('app.string.detail_price_symbol')) + .setTextStyle() + Text(`${this.totalPrice}.00`) + .setTextStyle() + .margin({ left: 1 }) + .width(150) + Button() { + Text(`结算(${selectIds.size})`) + .fontColor(Color.White) + .fontSize(12) + } + .backgroundColor(Color.Orange) + .width(80) + .height(30) + .borderRadius(1) + .margin({ right: 5 }) + .onClick(() => { + if (selectIds.size <= 0) { + prompt.showToast({ + message: '您还没有选择宝贝哦!', + duration: 1000, + bottom: 1000 + }) + return; + } + this.removeGoods() + prompt.showToast({ + message: '结算成功', + duration: 1500, + }) + }) + + } + .width("100%") + .height("100%") + .visibility(this.toggleType === 1 ? Visibility.None : Visibility.Visible) + + Row() { + Button() { + Text('删除') + .fontColor(Color.Black) + .fontSize(14) + } + .width(60) + .height(30) + .backgroundColor(Color.White) + .borderRadius(1) + .border({ + color: Color.Gray, + width: 1 + }) + .onClick(() => { + if (selectIds.size <= 0) { + prompt.showToast({ + message: '您还没有选择商品哦!', + duration: 1000, + bottom: 1000 + }) + return; + } + // 确认删除吗 + prompt.showDialog({ + message: `确认要删除这${selectIds.size}种商品吗?`, + buttons: [ + { + text: '取消', + color: '#000000', + }, + { + text: '确认', + color: '#000000', + } + ], + }).then(data => { + if (data.index === 1) { + this.removeGoods() + } + }) + }) + } + .justifyContent(FlexAlign.End) + .width("80%") + .height("100%") + .visibility(this.toggleType === 0 ? Visibility.None : Visibility.Visible) + } + .height("5%") + .width('100%') + .backgroundColor(Color.White) + .alignItems(VerticalAlign.Center) + // .justifyContent(FlexAlign.End) + } + + removeGoods() { + this.goodsItems = this.goodsItems.filter(v =>!selectIds.has(v.id)) + this.idsInCart = this.idsInCart.filter(id =>!selectIds.has(id)) + let goodIds: number[] = AppStorage.Get('shoppingCart').split(",").filter(v => v).map(v => parseInt(v)) + AppStorage.Set('shoppingCart', goodIds.filter(v =>!selectIds.has(v)).join(",")) + selectIds = new Set() + this.totalPrice = 0 + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/DetailsViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/DetailsViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..8f7a68463eb17ba2237a3a388cf4f839210f6e2d --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/DetailsViewModel.ets" @@ -0,0 +1,12 @@ +import DataModel from '../model/DataModel'; +import GoodsData from '../common/bean/GoodsData'; + +export default class DetailsViewModel { + public loadDetail(ids: number[]): GoodsData { + return this.loadDetails(ids)[0]; + } + + public loadDetails(ids: number[]): GoodsData[] { + return DataModel.GOOD_LIST.filter(v => ids.includes(v.id)); + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/HomeViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/HomeViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..fbea833e63d2d78feb21cfa900a08d1226a57bb5 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/HomeViewModel.ets" @@ -0,0 +1,37 @@ +import hilog from '@ohos.hilog'; +import DataModel from '../model/DataModel'; +import GoodsData from '../common/bean/GoodsData'; +import BannerData from '../common/bean/BannerData'; +import MenuData from '../common/bean/MenuData'; + +const TAG = 'HomeViewModel'; +const HOME_PAGE_DOMAIN = 0x00004; + +export default class HomeViewModel { + public getGoodsList(): GoodsData[] { + return DataModel.GOOD_LIST; + } + + public loadTabViewMenu(): Resource[] { + return DataModel.TAB_VIEW_MENU; + } + + public loadBanner(): BannerData[] { + return DataModel.BANNER; + } + + public startDetailsAbility(context, id: number): void { + const want = { + bundleName: 'com.example.StageAbilityDemo', + abilityName: 'DetailsAbility', + parameters: { + id: id + } + }; + try { + context.startAbility(want); + } catch (error) { + hilog.error(HOME_PAGE_DOMAIN, TAG, '%{public}s', error); + } + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/NavViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/NavViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..0429f51bf47c599ae58adb5f936f53a03f8125b5 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/NavViewModel.ets" @@ -0,0 +1,8 @@ +import DataModel from '../model/DataModel'; +import ToolBarConfig from '../common/bean/ToolBarData'; + +export default class NavViewModel { + public loadNavigationTab(): ToolBarConfig[] { + return DataModel.TOOL_BAR; + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/ServicesViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/ServicesViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..a476724a5f7554d7ae997312cb7285ba5edb4bb8 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/ServicesViewModel.ets" @@ -0,0 +1,9 @@ +import DataModel from '../model/DataModel'; +import Service from '../common/bean/GoodsServiceData'; + +export default class ServicesViewModel { + // Load the data of goods service for the GoodsServiceList view. + public loadGoodsService(): Service[] { + return DataModel.GOOD_SERVICE; + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/ShoppingCartViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/ShoppingCartViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..3cb6c94218617167d7d75523d5fae9577aec34b9 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/ShoppingCartViewModel.ets" @@ -0,0 +1,42 @@ +import HashMap from '@ohos.util.HashMap'; +import GoodsData from '../common/bean/GoodsData'; +import DetailsViewModel from './DetailsViewModel'; +import hilog from '@ohos.hilog'; + +const TAG = 'HomeViewModel'; +const HOME_PAGE_DOMAIN = 0x00004; +let viewModel: DetailsViewModel = new DetailsViewModel(); +export default class ShoppingCartViewModel { + public getGoodId2CountMap(ids: number[]): HashMap { + let map = new HashMap(); + ids.forEach(id => { + let count = map.get(id) ||0; + if(!count) { + count = 0 + } + map.set(id, count + 1); + console.warn(`onGoodIdsChange getGoodId2CountMap: ${map.get(id)}`) + }) + return map; + } + + public getGoodsItems(idSet: number[]): GoodsData[] { + return viewModel.loadDetails(idSet) + } + + public startDetailsAbility(context, id: number): void { + const want = { + bundleName: 'com.example.StageAbilityDemo', + abilityName: 'DetailsAbility', + parameters: { + id: id + } + }; + try { + context.startAbility(want); + } catch (error) { + hilog.error(HOME_PAGE_DOMAIN, TAG, '%{public}s', error); + } + } + +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/FoodDetailsViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/FoodDetailsViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..4cf935cca906406693e92e464893578fae45d721 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/FoodDetailsViewModel.ets" @@ -0,0 +1,16 @@ +import FoodData from '../../common/bean/food/FoodData'; +import FoodDataModel from '../../model/FoodDataModel'; + +export default class FoodDetailsViewModel { + public static loadDetail(id: number): FoodData { + return this.loadDetails([id])[0]; + } + + public static loadDetails(ids: number[]): FoodData[] { + return FoodDataModel.FOOD_DATA.filter(v => ids.includes(v.foodId)); + } + + public static loadAllDetails(): FoodData[] { + return FoodDataModel.FOOD_DATA; + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/MenuBtnDataViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/MenuBtnDataViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..3544e2181b997d6263405df11f3592ece79a8cf8 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/MenuBtnDataViewModel.ets" @@ -0,0 +1,7 @@ +import MenuBtnDataModel from '../../model/MenuBtnDataModel'; + +export default class MenuBtnDataViewModel { + public static loadDataList() { + return MenuBtnDataModel.MENU_BTN_DATA + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/TagViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/TagViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..7836fd96411cae382615ccfcafb58c31d749c178 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/food/TagViewModel.ets" @@ -0,0 +1,11 @@ +import FoodDataModel from '../../model/FoodDataModel'; + +export default class TagViewModel { + public static loadFirstTags() { + return FoodDataModel.FIRST_TAG + } + + public static loadSecondTags() { + return FoodDataModel.SECOND_TAG + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/question/NutrientDefineDataViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/question/NutrientDefineDataViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..5e464753e49b14c9d59fd55f509c18deed75df33 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/question/NutrientDefineDataViewModel.ets" @@ -0,0 +1,11 @@ +import { NutrientDefineEnum } from '../../model/EnumList'; +import QuestionDataModel from '../../model/QuestionDataModel'; + +export default class NutrientDefineDataViewModel { + public static loadAllDefine():NutrientDefineEnum[] { + let length = QuestionDataModel.QUESTION.length + let index = Math.floor(Math.random() * length) + return QuestionDataModel.QUESTION[index] + } + +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/question/QuestionDataViewModel.ets" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/question/QuestionDataViewModel.ets" new file mode 100644 index 0000000000000000000000000000000000000000..d3916442651eb56b6f9a0989d58505c9df12aacf --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/viewmodel/question/QuestionDataViewModel.ets" @@ -0,0 +1,13 @@ +import QuestionDataModel from '../../model/QuestionDataModel'; + +export default class QuestionDataViewModel { + public static randomQuestion() { + let length = QuestionDataModel.QUESTION.length + let index = Math.floor(Math.random() * length) + return QuestionDataModel.QUESTION[index] + } + + public static getQuestion(id: number) { + return QuestionDataModel.QUESTION.find(q => q.id == id) + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/waterrecordability/WaterRecordAbility.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/waterrecordability/WaterRecordAbility.ts" new file mode 100644 index 0000000000000000000000000000000000000000..942142a11fb2f564def96fc5d75e4e37ccb214f3 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/ets/waterrecordability/WaterRecordAbility.ts" @@ -0,0 +1,51 @@ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.application.Ability' +import Window from '@ohos.window' + +export default class WaterRecordAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/WaterRecordPage', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + 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.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/module.json5" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/module.json5" new file mode 100644 index 0000000000000000000000000000000000000000..bc2325b64fc1d6076ded4689b49ba7e9f2744b7d --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/module.json5" @@ -0,0 +1,108 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "entryAbility", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "entryAbility", + "srcEntrance": "./ets/entryability/EntryAbility.ts", + "description": "$string:entryAbility_desc", + "icon": "$media:icon", + "label": "$string:entryAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true, + "orientation": "portrait", + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + }, + { + "name": "DetailsAbility", + "srcEntrance": "./ets/DetailsAbility/DetailsAbility.ts", + "description": "$string:details_ability_desc", + "icon": "$media:icon", + "label": "$string:details_ability_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:white", + "orientation": "portrait", + "visible": true + }, + { + "name": "FoodListAbility", + "srcEntrance": "./ets/foodlistability/FoodListAbility.ts", + "description": "$string:FoodListAbility_desc", + "icon": "$media:icon", + "label": "$string:FoodListAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true + }, + { + "name": "SecondTagPage", + "srcEntrance": "./ets/secondtagpage/SecondTagPage.ts", + "description": "$string:SecondTagPage_desc", + "icon": "$media:icon", + "label": "$string:SecondTagPage_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true + }, + { + "name": "FoodDetailAbility", + "srcEntrance": "./ets/fooddetailability/FoodDetailAbility.ts", + "description": "$string:FoodDetailAbility_desc", + "icon": "$media:icon", + "label": "$string:FoodDetailAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true + }, + { + "name": "QuestionAbility", + "srcEntrance": "./ets/questionability/QuestionAbility.ts", + "description": "$string:QuestionAbility_desc", + "icon": "$media:icon", + "label": "$string:QuestionAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true + }, + { + "name": "CompareAbility", + "srcEntrance": "./ets/compareability/CompareAbility.ts", + "description": "$string:CompareAbility_desc", + "icon": "$media:icon", + "label": "$string:CompareAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true + }, + { + "name": "WaterRecordAbility", + "srcEntrance": "./ets/waterrecordability/WaterRecordAbility.ts", + "description": "$string:WaterRecordAbility_desc", + "icon": "$media:icon", + "label": "$string:WaterRecordAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true + } + ] + } +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/element/color.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/element/color.json" new file mode 100644 index 0000000000000000000000000000000000000000..b23da5042338c66051cefc7f89893cdb8200e8b4 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/element/color.json" @@ -0,0 +1,88 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + }, + { + "name": "text", + "value": "#2c2c2c" + }, + { + "name": "description", + "value": "#a3a3a3" + }, + { + "name": "shopping_cart_bg", + "value": "#FFF5F5F5" + }, + { + "name": "border_color", + "value": "#FFFDF2F2" + }, + { + "name": "bottom_navigation", + "value": "#FFF1F3F5" + }, + { + "name": "navigation_line", + "value": "#bac0c6" + }, + { + "name": "background", + "value": "#f1f3f5" + }, + { + "name": "background1", + "value": "#ffffff" + }, + { + "name": "white", + "value": "#FFFFFF" + }, + { + "name": "commentRate", + "value": "#99000000" + }, + { + "name": "detail_bottom_panel_background", + "value": "#FFF1F3F5" + }, + { + "name": "homepage_indicator_selected", + "value": "#F74E42" + }, + { + "name": "homepage_goodsList_activity_background", + "value": "#FA2F22" + }, + { + "name": "index_navigation_selected_text", + "value": "#E92F4F" + }, + { + "name": "detail_goods_previewer_indicator", + "value": "#66000000" + }, + { + "name": "detail_goods_address_line", + "value": "#33000000" + }, + { + "name": "index_search_hot_word", + "value": "#FF000000" + }, + { + "name": "common_un_select_font_color", + "value": "#FF928D8F" + }, + { + "name": "common_select_color", + "value": "#02BD79" + }, + { + "name": "common_gray_color", + "value": "#FFF8F8F8" + } + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/element/string.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..c39a3c5639687baa158ab51bfee7d187602e5887 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/element/string.json" @@ -0,0 +1,372 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "description" + }, + { + "name": "entryAbility_desc", + "value": "description" + }, + { + "name": "entryAbility_label", + "value": "StageAbilityDemo" + }, + { + "name": "details_ability_desc", + "value": "description" + }, + { + "name": "details_ability_label", + "value": "StageAbilityDemoDetail" + }, + { + "name": "put_in_shopping_cart", + "value": "加入购物车" + }, + { + "name": "buy_now", + "value": "立即购买" + }, + { + "name": "homepage_tab_more", + "value": "分类" + }, + { + "name": "homepage_search_hot_word", + "value": "搜索关键词" + }, + { + "name": "detail_comment", + "value": "产品包装非常好看,味道也很不错,绿色产品,放心购买。下次还会回购的!!" + }, + { + "name": "detail_comment_phone", + "value": "188******1765" + }, + { + "name": "detail_comment_header_left", + "value": "评价" + }, + { + "name": "detail_comment_header_right", + "value": "好评度 " + }, + { + "name": "detail_enjoy", + "value": "分享" + }, + { + "name": "detail_collection", + "value": "收藏" + }, + { + "name": "detail_price_notify", + "value": "降价通知" + }, + { + "name": "detail_address_text", + "value": "送至" + }, + { + "name": "detail_address_holder_text", + "value": "广东省广州市天河区朝阳街道凤凰大街五路399号" + }, + { + "name": "detail_goods_picker_left_text", + "value": "选择" + }, + { + "name": "detail_price_symbol", + "value": "¥" + }, + { + "name": "commentRatio", + "value": "99%" + }, + { + "name": "home_tab_index", + "value": "首页" + }, + { + "name": "home_tab_phone", + "value": "手机" + }, + { + "name": "home_tab_food", + "value": "食品" + }, + { + "name": "home_tab_men_clothing", + "value": "男装" + }, + { + "name": "home_tab_fresh_food", + "value": "生鲜" + }, + { + "name": "home_tab_furniture", + "value": "家具" + }, + { + "name": "home_tab_mom_and_infant", + "value": "母婴" + }, + { + "name": "home_tab_kitchen_things", + "value": "厨具" + }, + { + "name": "home_menu_all", + "value": "全部" + }, + { + "name": "home_menu_all_content", + "value": "为你推荐" + }, + { + "name": "home_menu_select", + "value": "精选" + }, + { + "name": "home_menu_select_content", + "value": "发现好货" + }, + { + "name": "home_menu_new", + "value": "新品" + }, + { + "name": "home_menu_new_content", + "value": "新品首发" + }, + { + "name": "home_menu_discounts", + "value": "实惠" + }, + { + "name": "home_menu_discounts_content", + "value": "便宜好货" + }, + { + "name": "goods_list_item_1", + "value": "柔嫩超入味低脂放心吃低脂鸡胸肉(6口味)、轻食蔬菜饼80g/袋" + }, + { + "name": "goods_list_item_2", + "value": " Q弹真有料控卡“自律肠”低脂鸡胸肉肠(玉米风味/土耳其烤肉味/香辣味/原味) 4口味可选" + }, + { + "name": "goods_list_item_3", + "value": "2倍高蛋白重新定义肉脯高蛋白鸡肉脯(香辣味/炭烧味) 90g/袋" + }, + { + "name": "goods_list_item_4", + "value": "慢烤卤味低脂轻负慢卤低脂鸡胸肉干90g/袋" + }, + { + "name": "goods_list_item_5", + "value": "精致控卡早餐自由薄荷生活“7天袋袋餐(早餐自由版) 2557克/盒" + }, + { + "name": "goods_list_item_6", + "value": "明朝那些事儿增补版.全集(2021版)" + }, + { + "name": "goods_list_item_7", + "value": "一次吸到饱减负加活力吸吸冻系列(4口味可选)" + }, + { + "name": "goods_list_item_8", + "value": "鲜牛乳拿铁馆级丝享体验牛乳咖啡拿铁150g(10袋)/盒" + }, + { + "name": "goods_list_item_9", + "value": "华为笔记本电脑MateBook 14s 2022 英特尔Evo 12代酷睿标压i5 16G 1T/14.2英寸90Hz触控/高性能轻薄本 灰" + }, + { + "name": "goods_list_item_10", + "value": "舌里 全麦面包欧包 0脂肪添加 10袋装 无油无蔗糖轻食饱腹手撕早餐休闲零食健身粗粮代餐杂粮800g/箱" + }, + { + "name": "goods_list_item_1_save", + "value": "限时省100" + }, + { + "name": "goods_list_item_2_save", + "value": "限时省100" + }, + { + "name": "goods_list_item_3_save", + "value": "限时省100" + }, + { + "name": "goods_list_item_4_save", + "value": "限时省100" + }, + { + "name": "goods_list_item_1_desc", + "value": "限量超大份·x1" + }, + { + "name": "goods_list_item_2_desc", + "value": "限量血卖·x2" + }, + { + "name": "goods_list_item_3_desc", + "value": "大份鸡胸肉·x1" + }, + { + "name": "goods_list_item_4_desc", + "value": "慢烤卤味·x1" + }, + { + "name": "goods_list_item_5_desc", + "value": "代餐一盒·x1" + }, + { + "name": "goods_list_item_6_desc", + "value": "明朝那些事儿增补版·x1" + }, + { + "name": "goods_list_item_7_desc", + "value": "四种口味·x1" + }, + { + "name": "goods_list_item_8_desc", + "value": "满满一盒·x1" + }, + { + "name": "goods_list_item_9_desc", + "value": "MateBook 14 12代酷睿版·x1" + }, + { + "name": "goods_list_item_10_desc", + "value": "0脂肪全麦黑麦面包1000g/箱·x1" + }, + { + "name": "goods_list_activity_new", + "value": "新品" + }, + { + "name": "goods_list_activity_time", + "value": "限时" + }, + { + "name": "nav_index", + "value": "首页" + }, + { + "name": "nav_shop", + "value": "商城" + }, + { + "name": "nav_new", + "value": "新品" + }, + { + "name": "nav_shopping_cart", + "value": "购物车" + }, + { + "name": "nav_mine", + "value": "我的" + }, + { + "name": "goods_service_1_name", + "value": "运费" + }, + { + "name": "goods_service_2_name", + "value": "服务" + }, + { + "name": "goods_service_1_desc", + "value": "免运费(请以提交订单时为准)" + }, + { + "name": "goods_service_2_desc", + "value": "店铺发货&售后" + }, + { + "name": "goods_service_3_desc", + "value": "7天无理由退货" + }, + { + "name": "goods_type_1", + "value": "解馋肉肉" + }, + { + "name": "goods_type_2", + "value": "烘焙糕点" + }, + { + "name": "goods_type_3", + "value": "甜口加餐" + }, + { + "name": "goods_type_4", + "value": "代餐" + }, + { + "name": "goods_type_5", + "value": "咖啡系列" + }, + { + "name": "FoodListAbility_desc", + "value": "description" + }, + { + "name": "FoodListAbility_label", + "value": "label" + }, + { + "name": "IndexAbility_desc", + "value": "description" + }, + { + "name": "IndexAbility_label", + "value": "label" + }, + { + "name": "SecondTagPage_desc", + "value": "description" + }, + { + "name": "SecondTagPage_label", + "value": "label" + }, + { + "name": "FoodDetailAbility_desc", + "value": "description" + }, + { + "name": "FoodDetailAbility_label", + "value": "label" + }, + { + "name": "QuestionAbility_desc", + "value": "description" + }, + { + "name": "QuestionAbility_label", + "value": "label" + }, + { + "name": "CompareAbility_desc", + "value": "description" + }, + { + "name": "CompareAbility_label", + "value": "label" + }, + { + "name": "WaterRecordAbility_desc", + "value": "description" + }, + { + "name": "WaterRecordAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/media/icon.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/media/icon.png" new file mode 100644 index 0000000000000000000000000000000000000000..523fe863b9bdd8f1d80932ac99757f37e532d485 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/media/icon.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/profile/main_pages.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/profile/main_pages.json" new file mode 100644 index 0000000000000000000000000000000000000000..eef8a12444831a4d097aee3fd9ed4d2d5ba9eb74 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/base/profile/main_pages.json" @@ -0,0 +1,12 @@ +{ + "src": [ + "pages/NavPage", + "pages/DetailsPage", + "pages/FirstTagPage", + "pages/SecondTagPage", + "pages/FoodDetailPage", + "pages/QuestionPage", + "pages/ComparePage", + "pages/WaterRecordPage" + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/en_US/element/string.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/en_US/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..4306e2b41d8c27ffe737d2c03750203a753858d7 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/en_US/element/string.json" @@ -0,0 +1,72 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "FoodListAbility_desc", + "value": "description" + }, + { + "name": "FoodListAbility_label", + "value": "label" + }, + { + "name": "IndexAbility_desc", + "value": "description" + }, + { + "name": "IndexAbility_label", + "value": "label" + }, + { + "name": "SecondTagPage_desc", + "value": "description" + }, + { + "name": "SecondTagPage_label", + "value": "label" + }, + { + "name": "FoodDetailAbility_desc", + "value": "description" + }, + { + "name": "FoodDetailAbility_label", + "value": "label" + }, + { + "name": "QuestionAbility_desc", + "value": "description" + }, + { + "name": "QuestionAbility_label", + "value": "label" + }, + { + "name": "CompareAbility_desc", + "value": "description" + }, + { + "name": "CompareAbility_label", + "value": "label" + }, + { + "name": "WaterRecordAbility_desc", + "value": "description" + }, + { + "name": "WaterRecordAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_add_to_favorites.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_add_to_favorites.png" new file mode 100644 index 0000000000000000000000000000000000000000..4204c86fee65987d487916321d73b6547020dc74 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_add_to_favorites.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_price_notify.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_price_notify.png" new file mode 100644 index 0000000000000000000000000000000000000000..1258b82052ab167c6b3687d4836f753f9f7eba88 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_price_notify.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_share_to.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_share_to.png" new file mode 100644 index 0000000000000000000000000000000000000000..45145c08faa90927943d02a61c68610e5d9015e5 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_action_share_to.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_back.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_back.png" new file mode 100644 index 0000000000000000000000000000000000000000..db285d902756dee6e9e3cf63910b2c99904ca322 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_back.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_bottom_panel_background.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_bottom_panel_background.png" new file mode 100644 index 0000000000000000000000000000000000000000..c7a109ae593e36a580e9b032df911aef60647b17 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_bottom_panel_background.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_comment_mark.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_comment_mark.png" new file mode 100644 index 0000000000000000000000000000000000000000..d03325c540882db483151d9f781f3e81f132b95a Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_comment_mark.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_location.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_location.png" new file mode 100644 index 0000000000000000000000000000000000000000..3d8a576354debe546814be799aac7fb979c13d82 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_location.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_pick_up_more.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_pick_up_more.png" new file mode 100644 index 0000000000000000000000000000000000000000..b0beec435c05f6eb229101f69ceea2244e917f18 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_pick_up_more.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_services.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_services.png" new file mode 100644 index 0000000000000000000000000000000000000000..2852874a9094f1fc5244654dd1cfc9e0a7de1390 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_services.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_share.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_share.png" new file mode 100644 index 0000000000000000000000000000000000000000..12e98e1731436655606f912470c5d2bb5f54a1d2 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/detail_share.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/fang_hu.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/fang_hu.png" new file mode 100644 index 0000000000000000000000000000000000000000..f2366c80494db414fe5cc9c8efcd9b2ff7b17577 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/fang_hu.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/head_portrait.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/head_portrait.png" new file mode 100644 index 0000000000000000000000000000000000000000..e3cc0ba335c5ad58c25c800ca6c6de3e5e215456 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/head_portrait.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/zhu_yi.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/zhu_yi.png" new file mode 100644 index 0000000000000000000000000000000000000000..8f2810e649ce2b36ef4725913354dbadd9bfbbe8 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/detail/zhu_yi.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/bian_dou.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/bian_dou.png" new file mode 100644 index 0000000000000000000000000000000000000000..09fcdc8fb80400a03e0bc4774ee0767b3f28e3cf Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/bian_dou.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/dou_fu.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/dou_fu.png" new file mode 100644 index 0000000000000000000000000000000000000000..6142b6355345d38ebc04d485a5d16e75a11f6180 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/dou_fu.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/ji_dan.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/ji_dan.png" new file mode 100644 index 0000000000000000000000000000000000000000..1ca3f905db9138c96261a264dc75e5ff817f33f4 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/ji_dan.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/long_xia.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/long_xia.png" new file mode 100644 index 0000000000000000000000000000000000000000..d89893f7b37ef762df3333aaa7f3acc3142cfd21 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/long_xia.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/mai_pian.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/mai_pian.png" new file mode 100644 index 0000000000000000000000000000000000000000..6664382cb0acbe3ca46c5c60cbf6cb984455d388 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/mai_pian.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/pang_xie.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/pang_xie.png" new file mode 100644 index 0000000000000000000000000000000000000000..ac791aab6d89e0461be870c56ee915dd79531bb0 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/pang_xie.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/question_bg.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/question_bg.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..2390c8c9d6bd74d754f34917c51b7daccca15404 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/question_bg.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/xiao_yu.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/xiao_yu.png" new file mode 100644 index 0000000000000000000000000000000000000000..44ae72e6009ea05b6523cc43f824d40300ec5ab2 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/food/xiao_yu.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/1.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/1.png" new file mode 100644 index 0000000000000000000000000000000000000000..fad736431c903ad664d413778617f14110462af6 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/1.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/10.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/10.png" new file mode 100644 index 0000000000000000000000000000000000000000..a3054ec7d68d7483f8ff2845d0bc170bc657d789 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/10.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/2.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/2.png" new file mode 100644 index 0000000000000000000000000000000000000000..f66fb2fbec0609d8834b3f5917d79072b8f1a307 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/2.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/3.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/3.png" new file mode 100644 index 0000000000000000000000000000000000000000..6afb53dabffad358a29a9d3086353ec2433e5396 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/3.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/4.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/4.png" new file mode 100644 index 0000000000000000000000000000000000000000..78a29ac1efe743cba43668e56af51dc6bf681a9b Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/4.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/5.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/5.png" new file mode 100644 index 0000000000000000000000000000000000000000..13e53def95537b7bebee902b00487cb91ae32a20 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/5.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/6.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/6.png" new file mode 100644 index 0000000000000000000000000000000000000000..1bb9d66a50eebdb02d38fd4a429ac905933acf07 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/6.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/7.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/7.png" new file mode 100644 index 0000000000000000000000000000000000000000..dabfc1e3f226a9d212c00fbef9a7eab5c7cf7a2d Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/7.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/8.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/8.png" new file mode 100644 index 0000000000000000000000000000000000000000..a540bcbd1736ebe0f0e3e36b152575246262c2a2 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/8.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/9.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/9.png" new file mode 100644 index 0000000000000000000000000000000000000000..9c355eb0c6fa606f32014f538be2e1bac3232a0e Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/home/9.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/1.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/1.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..b7bcbf1c96aa3b9da2fc586f9cfbf941b5e98c15 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/1.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/10.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/10.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..eff6a0d3aad64cc2656840df1cec73beca444ba0 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/10.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/2.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/2.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..3ad751ee7d8452f816f40ca9e283f8f9a517cbe9 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/2.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/3.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/3.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..497940f47efe1f8f731db655075b333f8b5919b1 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/3.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/4.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/4.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..2a596b9184a932d3dcc0b99f13d550b70688cb35 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/4.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/5.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/5.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..dab3bfe35013c0ad56f2c817b2e434e6997bb835 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/5.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/6.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/6.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..666abe05673410db17a4ebbb5391a46b840459a3 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/6.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/6.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/6.png" new file mode 100644 index 0000000000000000000000000000000000000000..a7227700a996702120192aca8ebefbbe2d61452f Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/6.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/7.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/7.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..c6580bd39d81014c799ef6b4052995b135b5c9fe Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/7.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/8.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/8.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..5e2857d13dbf7b55e993135a9c392e372285f1f6 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/8.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/9.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/9.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..ca020ae1aee456f3423a0e986a1e428468583e84 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/9.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner1.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner1.png" new file mode 100644 index 0000000000000000000000000000000000000000..940d7e5521f515a12ac255cbf8280c9d4b141b96 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner1.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner2.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner2.png" new file mode 100644 index 0000000000000000000000000000000000000000..723dfd8e88c246e8817d3ada8611d9e606c1eac9 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner2.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner3.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner3.png" new file mode 100644 index 0000000000000000000000000000000000000000..e7d1575f73515e7828072dbea7ad0e0ae00ba111 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/banner3.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/cart.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/cart.png" new file mode 100644 index 0000000000000000000000000000000000000000..43cec29748149ed9713523ba5053c724fde4290d Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/cart.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/chat.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/chat.png" new file mode 100644 index 0000000000000000000000000000000000000000..9e4a79db2ca355eaeb8c885a7d4bf31d5ac996e2 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/chat.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_fu_kuan.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_fu_kuan.png" new file mode 100644 index 0000000000000000000000000000000000000000..ea241afd39cdfabbccef9fc2af48f40082e40129 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_fu_kuan.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_ping_jia.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_ping_jia.png" new file mode 100644 index 0000000000000000000000000000000000000000..2600794014836d7acb0c31528331bf947cf2119e Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_ping_jia.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_shou_huo.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_shou_huo.png" new file mode 100644 index 0000000000000000000000000000000000000000..577d4259863ec41f85e23d70c7b8f661343316b4 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dai_shou_huo.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dian_pu.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dian_pu.png" new file mode 100644 index 0000000000000000000000000000000000000000..5af3f380804b5063fbf4c3799ed2f82e63a1886e Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dian_pu.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dianpu.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dianpu.png" new file mode 100644 index 0000000000000000000000000000000000000000..4f0c7994b40ca9749c561241c38cd48a2439894f Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/dianpu.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/gengduo.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/gengduo.png" new file mode 100644 index 0000000000000000000000000000000000000000..4ef4ebb7f337262ed77ca1e233441b489ba11583 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/gengduo.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/home.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/home.png" new file mode 100644 index 0000000000000000000000000000000000000000..689e55937a0d30262ac09f2b49e0211d6bc83605 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/home.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/home_selected.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/home_selected.png" new file mode 100644 index 0000000000000000000000000000000000000000..1087898f76752cd40a0cb1971e61e40036ba0a67 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/home_selected.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/icon-user.jpg" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/icon-user.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..3727f6f63f24a209e593ee76e950afb2dd07a18b Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/icon-user.jpg" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/icon.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/icon.png" new file mode 100644 index 0000000000000000000000000000000000000000..d7eedd36553b82437058a1cea21f931098e6e130 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/icon.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/kefu.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/kefu.png" new file mode 100644 index 0000000000000000000000000000000000000000..a3ba80d402aceb6cd7b01f5a78532b67829c2617 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/kefu.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/liu_lan_ji_lu.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/liu_lan_ji_lu.png" new file mode 100644 index 0000000000000000000000000000000000000000..63a6130dfb974c012ec7f0497a0566a04a551bcf Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/liu_lan_ji_lu.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/mine.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/mine.png" new file mode 100644 index 0000000000000000000000000000000000000000..0f2a2c79fec64e431b576e8c60f57f7c868ab087 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/mine.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/mine_selected.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/mine_selected.png" new file mode 100644 index 0000000000000000000000000000000000000000..b4bbcf6c4d339c2bbd3feae9c11d515b23f5cfc0 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/mine_selected.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/news.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/news.png" new file mode 100644 index 0000000000000000000000000000000000000000..761036911a5edd6a9b2c427b953a2315280a18f4 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/news.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/news_selected.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/news_selected.png" new file mode 100644 index 0000000000000000000000000000000000000000..fe2565e772bc6b627811ae4b4672ef56d67ae3fd Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/news_selected.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/qrcode.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/qrcode.png" new file mode 100644 index 0000000000000000000000000000000000000000..f18267aceed622166f8eb533c94ed3704ff780b6 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/qrcode.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/search.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/search.png" new file mode 100644 index 0000000000000000000000000000000000000000..8bc3b1eec293469c3dcadc6dd5a39649b6de1bea Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/search.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_add.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_add.png" new file mode 100644 index 0000000000000000000000000000000000000000..ed2924aa308a151e1c8e79a36c776f741c684985 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_add.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_bg.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_bg.png" new file mode 100644 index 0000000000000000000000000000000000000000..fe3d7c585ea5881e98acb7c414f43466e9340afc Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_bg.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_error.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_error.png" new file mode 100644 index 0000000000000000000000000000000000000000..be17db94fdc0574bba7628fbaf85c6cfc3e17cd4 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_error.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_success.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_success.png" new file mode 100644 index 0000000000000000000000000000000000000000..21532f46b10c350023a828f7221495b39b2c526d Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/select_success.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shang_cheng.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shang_cheng.png" new file mode 100644 index 0000000000000000000000000000000000000000..03b63aba8298b2cad40ef39e18666bb02ad89789 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shang_cheng.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shang_cheng_select.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shang_cheng_select.png" new file mode 100644 index 0000000000000000000000000000000000000000..64ed69fba00faeadeb0050332cf00253db70f302 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shang_cheng_select.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shopping_cart.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shopping_cart.png" new file mode 100644 index 0000000000000000000000000000000000000000..c65f216375fefa82f836a81648b51f8b0e7249d2 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shopping_cart.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shopping_cart_selected.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shopping_cart_selected.png" new file mode 100644 index 0000000000000000000000000000000000000000..35b07a5bac92b793f76a8c4db144cbe4df3f5136 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shopping_cart_selected.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shou_cang.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shou_cang.png" new file mode 100644 index 0000000000000000000000000000000000000000..9d4c0b55ea7098a594d4373e8b77676ba4a1f437 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/shou_cang.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/tab_menu_setting.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/tab_menu_setting.png" new file mode 100644 index 0000000000000000000000000000000000000000..cc5f794d423eb156ec5d4480a09bdf3f201817c5 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/tab_menu_setting.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/tui_kuan.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/tui_kuan.png" new file mode 100644 index 0000000000000000000000000000000000000000..862d2c937539176d3d2dafe2205afcefd6a46bd6 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/tui_kuan.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/vs.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/vs.png" new file mode 100644 index 0000000000000000000000000000000000000000..cf653b1bf6dce6c35aecd4198bde01dd59c787e8 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/vs.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/you_jian_tou.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/you_jian_tou.png" new file mode 100644 index 0000000000000000000000000000000000000000..43c7bf417be3e38cb8feeb8e59b22a9e97a3b032 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/index/you_jian_tou.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/dou_lei.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/dou_lei.png" new file mode 100644 index 0000000000000000000000000000000000000000..643a75f0c0016e4e9e5320d9d0fbfce5948e055a Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/dou_lei.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/hai_xian.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/hai_xian.png" new file mode 100644 index 0000000000000000000000000000000000000000..f478b1491172d6e016d55c70837fdfa846d27309 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/hai_xian.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/mai_pian.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/mai_pian.png" new file mode 100644 index 0000000000000000000000000000000000000000..6664382cb0acbe3ca46c5c60cbf6cb984455d388 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/mai_pian.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/shu_cai.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/shu_cai.png" new file mode 100644 index 0000000000000000000000000000000000000000..e6a2044eb5bae356d3c5e5b0653bfcaf5a068c5a Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/shu_cai.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/zhu_shi.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/zhu_shi.png" new file mode 100644 index 0000000000000000000000000000000000000000..701d970906184122930a66140b3391cd7bfe3206 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/secondtagimage/zhu_shi.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/water/water_cup.png" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/water/water_cup.png" new file mode 100644 index 0000000000000000000000000000000000000000..e32f1bdd6b508cd09bc84da4ff787e9329a50850 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/rawfile/water/water_cup.png" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/zh_CN/element/string.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/zh_CN/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..051141d51f6bf2311e06a627ae48e0fb3211c9b8 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/entry/src/main/resources/zh_CN/element/string.json" @@ -0,0 +1,72 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "FoodListAbility_desc", + "value": "description" + }, + { + "name": "FoodListAbility_label", + "value": "label" + }, + { + "name": "IndexAbility_desc", + "value": "description" + }, + { + "name": "IndexAbility_label", + "value": "label" + }, + { + "name": "SecondTagPage_desc", + "value": "description" + }, + { + "name": "SecondTagPage_label", + "value": "label" + }, + { + "name": "FoodDetailAbility_desc", + "value": "description" + }, + { + "name": "FoodDetailAbility_label", + "value": "label" + }, + { + "name": "QuestionAbility_desc", + "value": "description" + }, + { + "name": "QuestionAbility_label", + "value": "label" + }, + { + "name": "CompareAbility_desc", + "value": "description" + }, + { + "name": "CompareAbility_label", + "value": "label" + }, + { + "name": "WaterRecordAbility_desc", + "value": "description" + }, + { + "name": "WaterRecordAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/hvigorfile.ts" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/hvigorfile.ts" new file mode 100644 index 0000000000000000000000000000000000000000..6478186902c0c1ad7c966a929c7d6b7d8ae7a9f3 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/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 { appTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/1.gif" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/1.gif" new file mode 100644 index 0000000000000000000000000000000000000000..3d94f5dac6cce236b2f82c56874a38844b55935b Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/1.gif" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/hsjl.gif" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/hsjl.gif" new file mode 100644 index 0000000000000000000000000000000000000000..b8a8203c03e12574a15ed83d8deea41d4af7fc54 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/hsjl.gif" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/mrdt.gif" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/mrdt.gif" new file mode 100644 index 0000000000000000000000000000000000000000..777655caf4952096a750c5ef5aebb0dbd9c3b317 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/mrdt.gif" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/shop.gif" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/shop.gif" new file mode 100644 index 0000000000000000000000000000000000000000..449ffdeb049118be0c1d981fd8c0e8870978af44 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/shop.gif" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/swbd.gif" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/swbd.gif" new file mode 100644 index 0000000000000000000000000000000000000000..bffcfc7d744adbaaa276cd6b90cdde9c2b4bb73b Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/swbd.gif" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/swdb.gif" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/swdb.gif" new file mode 100644 index 0000000000000000000000000000000000000000..c6b4fa70f68bf656e2b45acc4204d6e31c80c711 Binary files /dev/null and "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/image/swdb.gif" differ diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/package-lock.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/package-lock.json" new file mode 100644 index 0000000000000000000000000000000000000000..052c5680f12375d4f5d7c0415b3439daee99622d --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/package-lock.json" @@ -0,0 +1,1098 @@ +{ + "name": "arkhealthydietapplication", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ohos/hos-sdkmanager-common": { + "version": "2.0.7", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hos-sdkmanager-common/-/@ohos/hos-sdkmanager-common-2.0.7.tgz", + "integrity": "sha512-1dbZlFPImIatThlZWds8sCe6VMKMWCNqOGhoRoEa8FJACKwlUrTybOjCi+MgR5X+vahQDLtDTvMJoZnfMMig6Q==", + "requires": { + "@ohos/sdkmanager-common": "^2.1.5" + } + }, + "@ohos/hvigor": { + "version": "1.3.1", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor/-/@ohos/hvigor-1.3.1.tgz", + "integrity": "sha512-YxIrzzKOPUrXgAe8isUG5q8CTRsP4TIF4Y4KrCeF+uLhMT2FMsd6LYkVj2X9Ib3+siZA+klIUv1Y+kKXMQ55tg==", + "requires": { + "@ohos/hvigor-base": "1.3.1", + "fs-extra": "10.0.1", + "interpret": "1.4.0", + "liftoff": "4.0.0", + "mute-stdout": "1.0.0", + "pretty-hrtime": "1.0.0", + "typescript": "4.7.4", + "v8flags": "3.2.0", + "yargs": "17.5.1" + } + }, + "@ohos/hvigor-base": { + "version": "1.3.1", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-base/-/@ohos/hvigor-base-1.3.1.tgz", + "integrity": "sha512-0NBF9DGtrdG5YmEXPOgXokgd/ukIF7EDUqYSwYY0utwUJ08A1ukR+V+dcywrczu2erb80NCWbMyCeZOtrGNPMQ==", + "requires": { + "fs-extra": "10.0.1", + "iconv-lite": "0.6.3", + "json5": "2.2.0", + "lodash": "4.17.21", + "log4js": "6.4.1", + "once": "1.4.0", + "pretty-hrtime": "1.0.0" + } + }, + "@ohos/hvigor-ohos-plugin": { + "version": "1.3.1", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-ohos-plugin/-/@ohos/hvigor-ohos-plugin-1.3.1.tgz", + "integrity": "sha512-K6Nk2tXNMTJlNf1Ad6nV3+DIQ7iFhBibrelUfHHWqDVlfFUWMxUtpk1Nvs/5RgKIu6O+BJRWJURDgm7mUooAWA==", + "requires": { + "@ohos/hos-sdkmanager-common": "2.0.7", + "@ohos/hvigor-base": "1.3.1", + "@ohos/sdkmanager-common": "2.1.5", + "adm-zip": "0.5.9", + "ajv": "8.10.0", + "deasync": "0.1.28", + "execa": "5.1.1", + "fast-xml-parser": "4.0.3", + "fs-extra": "10.0.1", + "glob": "7.2.0", + "iconv-lite": "0.6.3", + "json5": "2.2.0", + "lodash": "4.17.21", + "pretty-hrtime": "1.0.3", + "resolve-package-path": "4.0.3" + }, + "dependencies": { + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==" + } + } + }, + "@ohos/hypium": { + "version": "1.0.3", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hypium/-/@ohos/hypium-1.0.3.tgz", + "integrity": "sha512-QKh8ngJk1ySbAiKpSTLP5EJIbT8Oja1zV3zwgLD7U9+KX7w2gjNIk3qoP+d13CwpEfaSR3Lxt3exlQLwWSFx3g==" + }, + "@ohos/sdkmanager-common": { + "version": "2.1.5", + "resolved": "https://repo.harmonyos.com/npm/@ohos/sdkmanager-common/-/@ohos/sdkmanager-common-2.1.5.tgz", + "integrity": "sha512-Ka6DncGdEkZ5A9/8aR0oea/PL6yZtPudXTalAX+oXCLIGUxUu400TBcETFZ4fsIePbxmWyOSQW5T1VqUYYIdOg==", + "requires": { + "axios": "0.24.0", + "jszip": "^3.7.0" + } + }, + "adm-zip": { + "version": "0.5.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/adm-zip/-/adm-zip-0.5.9.tgz", + "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==" + }, + "ajv": { + "version": "8.10.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==" + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" + }, + "axios": { + "version": "0.24.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "requires": { + "follow-redirects": "^1.14.4" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://repo.huaweicloud.com/repository/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "date-format": { + "version": "4.0.14", + "resolved": "https://repo.huaweicloud.com/repository/npm/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==" + }, + "deasync": { + "version": "0.1.28", + "resolved": "https://repo.huaweicloud.com/repository/npm/deasync/-/deasync-0.1.28.tgz", + "integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==", + "requires": { + "bindings": "^1.5.0", + "node-addon-api": "^1.7.1" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "execa": { + "version": "5.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-xml-parser": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/fast-xml-parser/-/fast-xml-parser-4.0.3.tgz", + "integrity": "sha512-xhQbg3a/EYNHwK0cxIG1nZmVkHX/0tWihamn5pU4Mhd9KEVE2ga8ZJiqEUgB2sApElvAATOdMTLjgqIpvYDUkQ==", + "requires": { + "strnum": "^1.0.5" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "findup-sync": { + "version": "5.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fined/-/fined-2.0.0.tgz", + "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + } + }, + "flagged-respawn": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/flagged-respawn/-/flagged-respawn-2.0.0.tgz", + "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==" + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "requires": { + "for-in": "^1.0.1" + } + }, + "fs-extra": { + "version": "10.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://repo.huaweicloud.com/repository/npm/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jszip": { + "version": "3.10.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "lie": { + "version": "3.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "requires": { + "immediate": "~3.0.5" + } + }, + "liftoff": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "requires": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "log4js": { + "version": "6.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/log4js/-/log4js-6.4.1.tgz", + "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", + "requires": { + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stdout": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mute-stdout/-/mute-stdout-1.0.0.tgz", + "integrity": "sha512-MaSQenn0f9oxIjtCufclpV00MuYTiHaXPbdcfPIM+quMqoa8cXywjHHx4LhhIAZlXqPWMdcUpYviajfmHtHRJw==" + }, + "node-addon-api": { + "version": "1.7.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "pako": { + "version": "1.0.11", + "resolved": "https://repo.huaweicloud.com/repository/npm/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pretty-hrtime": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz", + "integrity": "sha512-CU2l5CYUAptUYq/671ajexQfXuxJFwwg0n243Kdkx8bTjeenedsWgu8TGHPm03vLfNtk3aTXgySKPp3Usykudw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "requires": { + "resolve": "^1.20.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-package-path": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-package-path/-/resolve-package-path-4.0.3.tgz", + "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", + "requires": { + "path-root": "^0.1.1" + } + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "streamroller": { + "version": "3.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/streamroller/-/streamroller-3.1.3.tgz", + "integrity": "sha512-CphIJyFx2SALGHeINanjFRKQ4l7x2c+rXYJ4BMq0gd+ZK0gi4VT8b+eHe2wi58x4UayBAKx4xtHpXT/ea1cz8w==", + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + } + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "strnum": { + "version": "1.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "typescript": { + "version": "4.7.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==" + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yargs": { + "version": "17.5.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + } + } +} diff --git "a/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/package.json" "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/package.json" new file mode 100644 index 0000000000000000000000000000000000000000..8f37cf6146141b7e4a7a4d63bbe2da49755e7915 --- /dev/null +++ "b/2022_ArkUI_Bootcamp/15813323130+Ark\345\201\245\345\272\267\351\245\256\351\243\237/package.json" @@ -0,0 +1,17 @@ +{ + "name": "arkhealthydietapplication", + "version": "1.0.0", + "ohos": { + "org": "huawei", + "buildTool": "hvigor", + "directoryLevel": "project" + }, + "description": "example description", + "repository": {}, + "license": "ISC", + "dependencies": { + "@ohos/hypium": "1.0.3", + "@ohos/hvigor": "1.3.1", + "@ohos/hvigor-ohos-plugin": "1.3.1" + } +}