统一排行榜对齐星雀UI,页面资源后台配置实时刷新

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-06-27 01:26:11 +08:00
parent 1ab2e2080a
commit 21112173f2
292 changed files with 64010 additions and 81 deletions

View File

@@ -0,0 +1,40 @@
import { submit } from '../../utils/phone-auth';
Page({
data: {
show: false,
avatar: '',
avatarFile: null,
phoneCode: '',
phoneGot: false
},
onLoad() {
setTimeout(() => this.setData({ show: true }), 100);
},
onAvatar(e) {
const p = e.detail.avatarUrl;
this.setData({ avatar: p, avatarFile: p });
},
onPhone(e) {
if (e.detail.code) {
this.setData({ phoneCode: e.detail.code, phoneGot: true });
}
},
async submit() {
const { phoneCode, avatarFile } = this.data;
if (!avatarFile || !phoneCode) return;
try {
wx.showLoading({ title: '认证中...', mask: true });
await submit(phoneCode, avatarFile);
wx.hideLoading();
// 成功重启小程序此时check返回false用户无感进入
wx.reLaunch({ url: '/pages/index/index' });
} catch (e) {
wx.hideLoading();
wx.showToast({ title: e.message, icon: 'none' });
}
},
exit() {
wx.exitMiniProgram();
}
});