Files
code-bang/frontend/miniapp/pages/goods/category/index.js
T
2026-10-20 18:34:45 +08:00

26 lines
397 B
JavaScript

import {
getCategoryList
} from '../../../services/good/fetchCategoryList';
Page({
data: {
list: [],
},
async init() {
try {
const result = await getCategoryList();
this.setData({
list: result,
});
} catch (error) {
console.error('err:', error);
}
},
handleClick(e) {
console.log(e);
},
onLoad() {
this.init(true);
},
});