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

99 lines
1.4 KiB
TypeScript

1 year ago
// pages/star/star.ts
const api = require("../../api/index")
const app = getApp<IAppOption>()
1 year ago
Page({
/**
*
*/
data: {
list:[
{
name:'the last word',
desc:'橙汁',
tag:'遗言',
id:1
},
{
name:'june bug',
tag:'六月虫',
desc:'青柠汁',
id:2
}
]
},
/**
* --
*/
onLoad() {
this.getList()
1 year ago
},
/**
* --
*/
onReady() {
},
/**
* --
*/
onShow() {
},
/**
* --
*/
onHide() {
},
/**
* --
*/
onUnload() {
},
/**
* --
*/
onPullDownRefresh() {
},
/**
*
*/
onReachBottom() {
},
/**
*
*/
onShareAppMessage() {
},
async getList() {
console.log(app.globalData.isLogin)
if(app.globalData.isLogin) {
const res = await api.getMyWineList({
current:1,
size:10
})
if(res.code === 200) {
}
}
else{ // 跳转登录页
wx.navigateTo({
url:'../login/login'
})
}
1 year ago
}
})