Files
ClassContent/历届学生/front-end-team-10/项目练习/上课项目/失物招领/js/page/guangchang.js
2024-09-27 02:06:13 +08:00

41 lines
898 B
JavaScript

class guangchang {
constructor() {
this.getClick()
this.seek()
}
async seek(newKey) {
var res = await indexService.tab({
thing_category: -1,
page: 1,
thing_type:newKey == undefined ? 1 : newKey//这里用三元运算符判断获取参数为空 为1 不为空 为2
});
console.log(res);
// item($(".recommend"), res)
}
async getClick() {
//获取输入框值
$(".items").onclick = () => {
$(".content").style.display = "none"
$(".content1").style.display = "flex"
this.seek(2)
}
$(".itemf").onclick = () => {
$(".content1").style.display = "none"
$(".content").style.display = "flex"
this.seek(1)
}
}
}
function getClick(params) {
}
new guangchang()