|
|
@@ -7,153 +7,154 @@ import Taro from '@tarojs/taro'
|
|
|
|
|
|
export default function JournalCover(props: { imgs: any }) {
|
|
|
|
|
|
- const scale = '?x-oss-process=image/resize,w_200,limit_0'
|
|
|
+ // const scale = '?x-oss-process=image/resize,w_200,limit_0'
|
|
|
+ const scale = '?x-oss-process=image/format,webp/resize,w_200'
|
|
|
|
|
|
function content() {
|
|
|
switch (props.imgs.length) {
|
|
|
case 1:
|
|
|
- return <Image className='single' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ return <Image className='single gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
case 2:
|
|
|
return <View className='double'>
|
|
|
- <Image className='half_img' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='half_img gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='half_img' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <Image className='half_img gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
case 3:
|
|
|
return <View className='double'>
|
|
|
- <Image className='half_img' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='half_img gray_bgg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
<View className='half_top_down'>
|
|
|
- <Image className='quarter_img' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <Image className='quarter_img gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='quarter_img' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
+ <Image className='quarter_img gray_bg' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
case 4:
|
|
|
return <View className='double'>
|
|
|
<View className='half_top_down' >
|
|
|
- <Image className='quarter_img' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='quarter_img gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='quarter_img' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <Image className='quarter_img gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
|
|
|
<View className='journal_space' />
|
|
|
<View className='half_top_down'>
|
|
|
- <Image className='quarter_img' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
+ <Image className='quarter_img gray_bg' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='quarter_img' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
+ <Image className='quarter_img gray_bg' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
case 5:
|
|
|
return <View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='five_1' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='five_1 gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='five_2' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <Image className='five_2 gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
|
|
|
case 6:
|
|
|
return <View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='five_1' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='five_1 gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
case 7:
|
|
|
return <View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='seven_1' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='seven_1 gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='seven_1' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <Image className='seven_1 gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[6] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[6] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
case 8:
|
|
|
return <View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='seven_1' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='seven_1 gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <View style={{ display: 'flex gray_bg', flexDirection: 'column' }}>
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[6] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[6] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[7] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[7] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
case 9:
|
|
|
default:
|
|
|
return <View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[0] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[1] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[2] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[3] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[4] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[5] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
<View className='journal_space' />
|
|
|
<View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
- <Image className='nine_img' src={props.imgs[6] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[6] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[7] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[7] + scale} mode="aspectFill" />
|
|
|
<View className='journal_space' />
|
|
|
- <Image className='nine_img' src={props.imgs[8] + scale} mode="aspectFill" />
|
|
|
+ <Image className='nine_img gray_bg' src={props.imgs[8] + scale} mode="aspectFill" />
|
|
|
</View>
|
|
|
</View>
|
|
|
}
|