Files
pk-lab-xhs/pages/discover/discover.js
T
codex-bot 36aee09dfa
Verify mini program and deploy preview / verify-deploy (push) Successful in 50s
feat: add animated choice modes and bracket editor
2026-09-19 04:11:21 +08:00

17 lines
591 B
JavaScript

var api = require('../../utils/api');
Page({
data: { results: [], loading: true, error: '' },
onLoad: function () { this.load(); },
load: function () {
var self = this;
api.request('/api/v1/results/discover').then(function (results) {
self.setData({ results: results, loading: false, error: '' });
}).catch(function (error) {
self.setData({ loading: false, error: error.message || '加载失败' });
});
},
openHome: function () { xhs.redirectTo({ url: '/pages/index/index' }); },
openMe: function () { xhs.redirectTo({ url: '/pages/me/me' }); }
});