fix: comply with F2E Spec — filename naming, any types, JSDoc
- Rename PascalCase component files to kebab-case (AnnouncementModal → announcement-modal, McGlass → mc-glass) - Replace any types with proper uni-app/WeChat callback types (RequestSuccessCallbackResult, LoginRes, ShowModalRes, etc.) - Add JSDoc documentation comments to all exported/important functions Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
77c177bfa9
commit
f10a1896e7
@@ -68,13 +68,16 @@ import { useUserStore } from '../../store/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
/** 跳转到登录页 */
|
||||
function goLogin() { uni.navigateTo({ url: '/pages/login/login' }) }
|
||||
|
||||
/** 跳转到指定页面(未登录则先跳登录页) */
|
||||
function goTo(url: string) {
|
||||
if (!userStore.isLogin) { uni.navigateTo({ url: '/pages/login/login' }); return }
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
|
||||
/** 退出登录(弹窗确认后清除 token) */
|
||||
function handleLogout() {
|
||||
uni.showModal({
|
||||
title: '提示', content: '确定要退出登录吗?',
|
||||
@@ -88,14 +91,19 @@ function handleLogout() {
|
||||
})
|
||||
}
|
||||
|
||||
/** 显示「即将上线」提示 */
|
||||
function showComingSoon() { uni.showToast({ title: '即将上线,敬请期待', icon: 'none' }) }
|
||||
|
||||
/** 跳转 FAQ */
|
||||
function goFaq() { uni.navigateTo({ url: '/packages/content/pages/faq' }) }
|
||||
|
||||
/** 跳转使用说明 */
|
||||
function goUsageGuide() { uni.navigateTo({ url: '/packages/content/pages/usage-guide' }) }
|
||||
|
||||
/** 跳转订单列表 */
|
||||
function goOrders() { uni.navigateTo({ url: '/packages/user/pages/order/list' }) }
|
||||
|
||||
/** 拨打客服热线 */
|
||||
function callService() { uni.makePhoneCall({ phoneNumber: '400-123-0101' }) }
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user