diff --git a/features/my/src/main/ets/pages/Order.ets b/features/my/src/main/ets/pages/Order.ets new file mode 100644 index 0000000000000000000000000000000000000000..a2aa7b63148fd7704b0f46e8499abb85a34e572b --- /dev/null +++ b/features/my/src/main/ets/pages/Order.ets @@ -0,0 +1,112 @@ +@Entry +@Component +export struct Order { + private onBack: () => void = () => {}; + @State fontColor: string = '#182431' + @State selectedFontColor: string = '#007DFF' + @State currentIndex: number = 0 + private controller: TabsController = new TabsController() + + + @Builder + searchHeader(){ + Flex({ alignItems: ItemAlign.Center }) { + Button() { + Image($r('app.media.ic_back')) + .width($r('app.float.vp_twenty')) + .height($r('app.float.vp_twenty')) + .margin({ + left: $r('app.float.title_image_margin_left'), + right: $r('app.float.vp_eighteen'), + top: $r('app.float.vp_sixteen'), + bottom: $r('app.float.vp_sixteen') + }) + } + .backgroundColor('#00000000') + .onClick(() => this.onBack()) + Search({placeholder: '品牌名/商品名/訂單號'}) + .width('75%') + // .textFont({size: 18}) + // Image($r('app.media.sousuo')) + // .width($r('app.float.vp_twenty')) + + Image($r('app.media.kefu')) + .width($r('app.float.vp_twenty')) + .height($r('app.float.vp_twenty')) + .margin({ + left: $r('app.float.title_image_margin_left'), + right: $r('app.float.vp_eighteen'), + top: $r('app.float.vp_sixteen'), + bottom: $r('app.float.vp_sixteen') + }) + } + .backgroundColor('#f1f3f5') + .height($r('app.float.vp_fifty_six')) + .width('100%') + } + + @Builder TabBuilder(index: number, name: string) { + Column() { + Text(name) + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) + .fontSize(16) + .fontWeight(this.currentIndex === index ? 500 : 400) + .lineHeight(22) + .margin({ top: 17, bottom: 7 }) + Divider() + .strokeWidth(2) + .color('#007DFF') + .opacity(this.currentIndex === index ? 1 : 0) + }.width('100%') + } + + @Builder + bannerList(){ + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { + TabContent() { + Column(){ + Image($r('app.media.shennue')).margin('25').height(160) + Text('暂无相关订单') + }.width('100%').height('100%') + }.tabBar(this.TabBuilder(0, '全部')) + + TabContent() { + Column(){ + Image($r('app.media.shennue')).margin('25').height(160) + Text('暂无相关订单') + }.width('100%').height('100%') + }.tabBar(this.TabBuilder(1, '待付款')) + + TabContent() { + Column(){ + Image($r('app.media.shennue')).margin('25').height(160) + Text('暂无相关订单') + }.width('100%').height('100%') + }.tabBar(this.TabBuilder(2, '待发货')) + + TabContent() { + Column(){ + Image($r('app.media.shennue')).margin('25').height(160) + Text('暂无相关订单') + }.width('100%').height('100%') + }.tabBar(this.TabBuilder(3, '待收货')) + } + .vertical(false) + .barMode(BarMode.Fixed) + .barWidth(360) + .barHeight(56) + .animationDuration(400) + .onChange((index: number) => { + this.currentIndex = index + }) + .width(360) + .height(296) + } + + build() { + Column(){ + this.searchHeader() + this.bannerList() + } + } +} \ No newline at end of file diff --git a/features/my/src/main/resources/base/element/color.json b/features/my/src/main/resources/base/element/color.json deleted file mode 100644 index 1bbc9aa9617e97c45440e1d3d66afc1154837012..0000000000000000000000000000000000000000 --- a/features/my/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "white", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/features/my/src/main/resources/base/element/float.json b/features/my/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..fc534b35fa7b6dc2966c84aec32d308a899554c8 --- /dev/null +++ b/features/my/src/main/resources/base/element/float.json @@ -0,0 +1,172 @@ +{ + "float": [ + { + "name": "order_height", + "value": "100vp" + }, + { + "name": "order_item_height", + "value": "46vp" + }, + { + "name": "button_height", + "value": "30vp" + }, + { + "name": "confirm_button_height", + "value": "40vp" + }, + { + "name": "title_image_margin_left", + "value": "26vp" + }, + { + "name": "title_text_margin_left", + "value": "0vp" + }, + { + "name": "border_width", + "value": "0vp" + }, + { + "name": "order_tab_height", + "value": "30vp" + }, + { + "name": "order_tab_bar_height", + "value": "32vp" + }, + { + "name": "order_list_button_height", + "value": "28vp" + }, + { + "name": "order_list_item_height", + "value": "78vp" + }, + { + "name": "pay_image_height", + "value": "36vp" + }, + { + "name": "pay_image_width", + "value": "45vp" + }, + { + "name": "background_image_height", + "value": "132vp" + }, + { + "name": "micro_font_size", + "value": "10fp" + }, + { + "name": "smaller_font_size", + "value": "12fp" + }, + { + "name": "small_font_size", + "value": "14fp" + }, + { + "name": "middle_font_size", + "value": "16fp" + }, + { + "name": "big_font_size", + "value": "18fp" + }, + { + "name": "bigger_font_size", + "value": "20fp" + }, + { + "name": "huge_font_size", + "value": "24fp" + }, + { + "name": "vp_one", + "value": "1vp" + }, + { + "name": "vp_two", + "value": "2vp" + }, + { + "name": "vp_four", + "value": "4vp" + }, + { + "name": "vp_six", + "value": "6vp" + }, + { + "name": "vp_eight", + "value": "8vp" + }, + { + "name": "vp_ten", + "value": "10vp" + }, + { + "name": "vp_twelve", + "value": "12vp" + }, + { + "name": "vp_fourteen", + "value": "14vp" + }, + { + "name": "vp_sixteen", + "value": "16vp" + }, + { + "name": "vp_eighteen", + "value": "18vp" + }, + { + "name": "vp_twenty", + "value": "20vp" + }, + { + "name": "vp_twenty_four", + "value": "24vp" + }, + { + "name": "vp_fifty_six", + "value": "56vp" + }, + { + "name": "commodity_item_height", + "value": "263vp" + }, + { + "name": "commodity_list_margin", + "value": "-6vp" + }, + { + "name": "commodity_desc_height", + "value": "20vp" + }, + { + "name": "commodity_item_image_size", + "value": "132vp" + }, + { + "name": "count_text_width", + "value": "32vp" + }, + { + "name": "count_width", + "value": "78vp" + }, + { + "name": "empty_image_size", + "value": "60vp" + }, + { + "name": "capsule_height", + "value": "40vp" + } + ] +} \ No newline at end of file diff --git a/features/my/src/main/resources/base/media/ic_back.png b/features/my/src/main/resources/base/media/ic_back.png new file mode 100644 index 0000000000000000000000000000000000000000..a29b367409d7b49b7251ec379bd466db9475d4e9 Binary files /dev/null and b/features/my/src/main/resources/base/media/ic_back.png differ diff --git a/features/my/src/main/resources/base/media/ic_search.png b/features/my/src/main/resources/base/media/ic_search.png new file mode 100644 index 0000000000000000000000000000000000000000..8bc3b1eec293469c3dcadc6dd5a39649b6de1bea Binary files /dev/null and b/features/my/src/main/resources/base/media/ic_search.png differ diff --git a/features/my/src/main/resources/base/media/kefu.png b/features/my/src/main/resources/base/media/kefu.png new file mode 100644 index 0000000000000000000000000000000000000000..1f904827d3a45ef881d5185a0f3ed64cf3ddae70 Binary files /dev/null and b/features/my/src/main/resources/base/media/kefu.png differ diff --git a/features/my/src/main/resources/base/media/shennue.jpg b/features/my/src/main/resources/base/media/shennue.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4f143c64f8bc356ab3da02c544d13a7082a30b40 Binary files /dev/null and b/features/my/src/main/resources/base/media/shennue.jpg differ diff --git a/features/my/src/main/resources/base/media/sousuo.png b/features/my/src/main/resources/base/media/sousuo.png new file mode 100644 index 0000000000000000000000000000000000000000..bedbb1a9b307b3b52ed0911560f33e2929bd207b Binary files /dev/null and b/features/my/src/main/resources/base/media/sousuo.png differ diff --git a/features/my/src/main/resources/base/profile/main_pages.json b/features/my/src/main/resources/base/profile/main_pages.json index 23ee5f538a5cbdd92e178beea4e78cf9e4a942ae..f1f14849919017c9789bebd22b830b628492f5b7 100644 --- a/features/my/src/main/resources/base/profile/main_pages.json +++ b/features/my/src/main/resources/base/profile/main_pages.json @@ -1,7 +1,8 @@ { "src": [ "pages/MyPage", + "pages/Order", "pages/ScanIt", "pages/SetUp" ] -} +} \ No newline at end of file