2022-11-21 17:37:51 +08:00

36 lines
634 B
TypeScript

import message from "../../utils/message"
import { info, sign } from "../user/api"
// pages/sign/index.ts
Page({
/**
* 页面的初始数据
*/
data: {
signToday: false,
continuousDays: 0,
dayTextArray:[
'一','二','三','四','五','六','七'
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad() {
info().then(res=>{
this.setData(res)
})
},
onSignTag(){
message.showLoading({})
sign().then(res=>{
message.hideLoading()
this.setData(res)
}).catch(err=>{
message.hideLoading()
message.toast(err.message)
})
}
})