const reqInterface = require("../../../../api/models"); Page({ /** * 页面的初始数据 */ data: { title: '', content: '', total: 0, }, onLoad(options) { reqInterface.GetGuide().then(res => { this.setData({ title: res.title, content: res.content }) }) reqInterface.GetQuotaGet().then(res => { this.setData({ total: res.remaining }) }) }, toApplyFor() { if(wx.getStorageSync('token')) { wx.navigateTo({ url: '/pages/info/index/index', }) } else { wx.showToast({ title: '请先登录', icon: 'none' }) } } })