parent
1eb468a699
commit
1775c39136
@ -0,0 +1,36 @@ |
||||
.content { |
||||
position: relative; |
||||
width: 100%; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: center; |
||||
image{ |
||||
width: 320rpx; |
||||
height: 208rpx; |
||||
} |
||||
.title{ |
||||
font-size: 28rpx; |
||||
font-weight: bold; |
||||
color: #323635; |
||||
line-height: 80rpx; |
||||
} |
||||
.label{ |
||||
font-size: 24rpx; |
||||
font-weight: 500; |
||||
color: #909795; |
||||
line-height: 24rpx; |
||||
margin-bottom: 40rpx; |
||||
} |
||||
.button{ |
||||
width: 70%; |
||||
height: 76rpx; |
||||
background: #45D4A8; |
||||
border-radius: 38rpx 38rpx 38rpx 38rpx; |
||||
color: #fff; |
||||
line-height: 76rpx; |
||||
text-align: center; |
||||
font-size: 32rpx; |
||||
font-weight: 500; |
||||
} |
||||
} |
@ -0,0 +1,31 @@ |
||||
import {CSSProperties,FC} from "react"; |
||||
import {View,Image} from "@tarojs/components"; |
||||
import styles from './index.module.scss' |
||||
import NoLogin from '@/static/img/noLogin.png' |
||||
import {Profile} from "@/store"; |
||||
|
||||
interface Props { |
||||
tips?: string |
||||
height?: number |
||||
} |
||||
|
||||
const LoginView: FC<Props> = (props) => { |
||||
const {empty} = Profile.useContainer() |
||||
const text = props.tips ?? '登录后可查看更多内容' |
||||
const size: string = props.height? `${props.height}px`:'750rpx' |
||||
const sizeStyle: CSSProperties = { |
||||
height:size, |
||||
} |
||||
|
||||
|
||||
return ( |
||||
<View className={styles.content} style={sizeStyle}> |
||||
<Image src={NoLogin}></Image> |
||||
<View className={styles.title}>暂未登录</View> |
||||
<View className={styles.label}>{text}</View> |
||||
<View onClick={()=>{empty()}} className={styles.button}>立即登录</View> |
||||
</View> |
||||
) |
||||
} |
||||
|
||||
export default LoginView |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 22 KiB |
Loading…
Reference in new issue