You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
663 B

const app = getApp<IAppOption>();
5 months ago
Page({
5 months ago
data: {
cateList: [] as any,
},
onLoad() {
5 months ago
app.waitLogin().then(() => {
this.getCateList();
});
},
getCateList() {
wx.ajax({
method: 'GET',
url: '?r=shizhong/book/cate-list',
data: {},
}).then((res) => {
this.setData({
cateList: res,
});
});
},
handleDetail(e) {
const { index } = e.currentTarget.dataset;
const item = this.data.cateList[index];
wx.navigateTo({
url: `/pages/classify/index?id=${item.Id}`,
});
},
5 months ago
handleSearch() {
wx.navigateTo({
5 months ago
url: '/pages/search/index',
});
},
5 months ago
});
export {};