-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
385 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import Taro from '@tarojs/taro'; | ||
import { View, Text, Image, StandardProps } from '@tarojs/components'; | ||
import { useState, useEffect, ReactNode, useMemo } from 'react'; | ||
import classnames from 'classnames'; | ||
import { navigate, useNavigationBarInfo } from '@/_UIHOOKS_'; | ||
import './index.scss'; | ||
import searchIcon from '@/assets/search.png'; | ||
|
||
export interface HeaderProps extends StandardProps { | ||
title?: string; | ||
mode?: boolean; | ||
left?: Function | boolean; | ||
right?: ReactNode | boolean; | ||
backIcon?: 'black' | 'white'; | ||
onBack?: () => void; | ||
titleStyle?: StandardProps['style']; | ||
} | ||
|
||
export function Header(props: HeaderProps) { | ||
const { navigationContentHeight, statusBarHeight } = useNavigationBarInfo(); | ||
return ( | ||
<View | ||
{...props} | ||
style={props.style} | ||
className={classnames('pages-index-header-wrap', props.className)}> | ||
<View | ||
style={{ | ||
flexShrink: 0, | ||
width: '100%', | ||
height: statusBarHeight || 0, | ||
}} | ||
/> | ||
<View | ||
className={classnames('pages-index-header-body')} | ||
style={ | ||
navigationContentHeight | ||
? { | ||
minHeight: navigationContentHeight, | ||
} | ||
: {} | ||
}> | ||
{/* 标题内容容器 */} | ||
<View className={classnames('pages-index-header-body-center')}> | ||
<View | ||
className={classnames('pages-index-header-search-wrap')} | ||
onClick={() => { | ||
navigate.navigateTo({ | ||
url: navigate.routes.pages.search, | ||
}); | ||
}}> | ||
<Image className="pages-index-header-search-icon" src={searchIcon} /> | ||
<Text className={classnames('pages-index-header-search-text')}> | ||
电影名称/明星/导演/年份 | ||
</Text> | ||
</View> | ||
</View> | ||
<View className={classnames('pages-index-header-body-right')}></View> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default definePageConfig({ | ||
navigationBarTitleText: '首页', | ||
backgroundColor: '#eee', | ||
disableScroll: true, | ||
navigationStyle: 'custom', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
.pages-home-wrap { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
min-width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
flex-grow: 2; | ||
background-color: #222222; | ||
} | ||
|
||
.pages-home-body-wrap { | ||
flex-grow: 2; | ||
height: 0; | ||
display: flex; | ||
} | ||
|
||
.pages-home-scroll-view { | ||
flex-grow: 2; | ||
} | ||
|
||
.pages-home-scroll-body { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 0 16px; | ||
} | ||
|
||
.pages-home-items-wrap { | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
padding: 0 40px 0; | ||
} | ||
|
||
.pages-home-item-wrap { | ||
position: relative; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
justify-content: center; | ||
align-items: center; | ||
width: 318px; | ||
} | ||
|
||
.pages-home-item-img-wrap { | ||
position: relative; | ||
width: 286px; | ||
height: 404px; | ||
overflow: hidden; | ||
border-radius: 10px; | ||
background: #eee; | ||
} | ||
|
||
.pages-home-item-img { | ||
width: 286px; | ||
height: 404px; | ||
overflow: hidden; | ||
} | ||
.pages-home-item-info-wrap { | ||
margin-bottom: 20px; | ||
} | ||
|
||
.pages-home-item-name-wrap { | ||
width: 286px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.pages-home-item-name { | ||
color: #ccc; | ||
font-size: 28px; | ||
font-weight: 700; | ||
} | ||
|
||
.pages-home-item-sub-wrap { | ||
width: 286px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.pages-home-item-sub { | ||
color: #999; | ||
font-size: 26px; | ||
} | ||
|
||
.pages-home-box-title-wrap { | ||
padding: 30px 0; | ||
} | ||
|
||
.pages-home-box-title-text { | ||
color: #999; | ||
font-weight: 700; | ||
font-size: 40px; | ||
} | ||
|
||
.pages-home-scroll-y-view { | ||
} | ||
|
||
.pages-home-scroll-y-body-wrap { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 20px; | ||
min-height: 404px; | ||
margin-left: 20px; | ||
} |
Oops, something went wrong.