|
@@ -1,4 +1,4 @@
|
|
|
-import { BasicType, yTRouter } from "basic"
|
|
|
|
|
|
|
+import { BasicType, BookItem, yTRouter } from "basic"
|
|
|
import { tagItemComp } from "../components/BuilderIndex"
|
|
import { tagItemComp } from "../components/BuilderIndex"
|
|
|
import { DeerSearch } from "../components/DeerSearch"
|
|
import { DeerSearch } from "../components/DeerSearch"
|
|
|
import { ytBuildComp } from "../components/ytComp/ytBuildComp"
|
|
import { ytBuildComp } from "../components/ytComp/ytBuildComp"
|
|
@@ -112,27 +112,29 @@ export struct MainView {
|
|
|
.alignItems(VerticalAlign.Bottom)
|
|
.alignItems(VerticalAlign.Bottom)
|
|
|
|
|
|
|
|
Grid(){
|
|
Grid(){
|
|
|
- ForEach(new Array(4).fill(''), (item: string, index) => {
|
|
|
|
|
|
|
+ ForEach(this.vm.newBookList, (item: BookItem, index) => {
|
|
|
GridItem(){
|
|
GridItem(){
|
|
|
Column(){
|
|
Column(){
|
|
|
- Image('https://th.bing.com/th/id/R.8bbf769b39bb26eefb9b6de51c23851d?rik=crTnc5i8A%2b8p7A&riu=http%3a%2f%2fpicview.iituku.com%2fcontentm%2fzhuanji%2fimg%2f202207%2f09%2fe7196ac159f7cf2b.jpg%2fnu&ehk=DYPLVpoNAXLj5qzwgR5vHf9DladFh%2b34s4UcuP3Kn6E%3d&risl=&pid=ImgRaw&r=0')
|
|
|
|
|
|
|
+ Image(item.coverUrl)
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.aspectRatio(148/100)
|
|
.aspectRatio(148/100)
|
|
|
|
|
|
|
|
Column({space: 5}){
|
|
Column({space: 5}){
|
|
|
- Text('红楼梦幼儿美绘本 第四卷红楼梦幼儿美绘本 第四卷')
|
|
|
|
|
|
|
+ Text(item.bookTitle)
|
|
|
.maxLines(2)
|
|
.maxLines(2)
|
|
|
.textOverflow({overflow: TextOverflow.Ellipsis})
|
|
.textOverflow({overflow: TextOverflow.Ellipsis})
|
|
|
.attributeModifier(new CustomTextStyle({size: 14, weight: 400}))
|
|
.attributeModifier(new CustomTextStyle({size: 14, weight: 400}))
|
|
|
|
|
|
|
|
Row({space: 8}){
|
|
Row({space: 8}){
|
|
|
tagItemComp('情绪价值', '#4EB1EF', '#EDF7FD')
|
|
tagItemComp('情绪价值', '#4EB1EF', '#EDF7FD')
|
|
|
- tagItemComp('3-8岁', '#FC9911', '#FFF5E7')
|
|
|
|
|
|
|
+ tagItemComp(`${item.minAge}-${item.maxAge}岁`, '#FC9911', '#FFF5E7')
|
|
|
}
|
|
}
|
|
|
.width("100%")
|
|
.width("100%")
|
|
|
.justifyContent(FlexAlign.Start)
|
|
.justifyContent(FlexAlign.Start)
|
|
|
}
|
|
}
|
|
|
.width("100%")
|
|
.width("100%")
|
|
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
|
|
+ .justifyContent(FlexAlign.SpaceBetween)
|
|
|
.padding({left: 8, right: 8, top: 8, bottom: 8})
|
|
.padding({left: 8, right: 8, top: 8, bottom: 8})
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
@@ -140,7 +142,7 @@ export struct MainView {
|
|
|
.aspectRatio(152/180)
|
|
.aspectRatio(152/180)
|
|
|
.backgroundColor(Color.White)
|
|
.backgroundColor(Color.White)
|
|
|
.border({width: 2, color: '#000000'})
|
|
.border({width: 2, color: '#000000'})
|
|
|
- .onClick(() => { yTRouter.router2BookItemDetailPage() })
|
|
|
|
|
|
|
+ .onClick(() => { yTRouter.router2BookItemDetailPage(item) })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|