28 lines
524 B
TypeScript
28 lines
524 B
TypeScript
// index.ts
|
|
import request from "../../utils/request";
|
|
|
|
Page({
|
|
data: {
|
|
tabs: [],
|
|
},
|
|
// 事件处理函数
|
|
bindViewTap() {
|
|
wx.navigateTo({
|
|
url: '../logs/logs',
|
|
})
|
|
},
|
|
onLoad() {
|
|
// @ts-ignore
|
|
request("https://api.chenwj113.cn/api/v2/tabs", "get")
|
|
.then((res) => {
|
|
console.log(res.data)
|
|
this.setData({
|
|
tabs: res.data
|
|
})
|
|
})
|
|
},
|
|
onShow() {
|
|
this.getTabBar().init();
|
|
}
|
|
})
|