|
@@ -19,89 +19,127 @@ export const hotInit = (that) => {
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "1",
|
|
plays: "1",
|
|
- likes: "2"
|
|
|
|
|
|
+ likes: "2",
|
|
|
|
+ classId: "1"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:"铺满金色巴掌的水泥道",
|
|
title:"铺满金色巴掌的水泥道",
|
|
grade:"一年级 上学期",
|
|
grade:"一年级 上学期",
|
|
img: "../../static/image/timg.jpg",
|
|
img: "../../static/image/timg.jpg",
|
|
plays: "12345",
|
|
plays: "12345",
|
|
- likes: "54321"
|
|
|
|
- }
|
|
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title:"铺满金色巴掌的水泥道",
|
|
|
|
+ grade:"一年级 上学期",
|
|
|
|
+ img: "../../static/image/timg.jpg",
|
|
|
|
+ plays: "12345",
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title:"铺满金色巴掌的水泥道",
|
|
|
|
+ grade:"一年级 上学期",
|
|
|
|
+ img: "../../static/image/timg.jpg",
|
|
|
|
+ plays: "12345",
|
|
|
|
+ likes: "54321",
|
|
|
|
+ classId: "2"
|
|
|
|
+ },
|
|
|
|
+
|
|
]
|
|
]
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
|
|
+ // 搜索方法
|
|
that.searchHandler = () => {
|
|
that.searchHandler = () => {
|
|
console.log('搜索按钮')
|
|
console.log('搜索按钮')
|
|
console.log(that.data.hotInput);
|
|
console.log(that.data.hotInput);
|
|
},
|
|
},
|
|
|
|
+ // 输入框输入
|
|
that.inputHandler = (e) => {
|
|
that.inputHandler = (e) => {
|
|
that.setData({
|
|
that.setData({
|
|
hotInput: e.detail.value
|
|
hotInput: e.detail.value
|
|
});
|
|
});
|
|
console.log(that.data.hotInput)
|
|
console.log(that.data.hotInput)
|
|
}
|
|
}
|
|
|
|
+ // 打开课程页面
|
|
|
|
+ that.openClass = (e) =>{
|
|
|
|
+ let classId = e.currentTarget.dataset.classid;
|
|
|
|
+ let title = e.currentTarget.dataset.title;
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: `../main/class/class?id=${classId}&title=${title}`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|