feat: 小程序UI重构为Apple设计系统并添加tabBar
- 全局样式重构为Apple Design System风格 - 添加底部tabBar导航(首页/发布/历史/私信/我的) - 更紧凑的spacing和更小的字体尺寸 - pill圆角按钮和状态标签 - Action Blue (#0066cc) 单一accent色 - 添加tabBar图标资源 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ const { request } = require('../../utils/request')
|
||||
Page({
|
||||
data: {
|
||||
loading: false,
|
||||
user: null,
|
||||
form: {
|
||||
nickname: '',
|
||||
company: '',
|
||||
@@ -17,6 +18,9 @@ Page({
|
||||
},
|
||||
|
||||
async loadProfile() {
|
||||
const app = getApp()
|
||||
const user = app.globalData.user || wx.getStorageSync('user')
|
||||
this.setData({ user })
|
||||
const profile = await request({ url: '/user/profile' })
|
||||
this.setData({
|
||||
form: {
|
||||
@@ -29,6 +33,12 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
goto(e) {
|
||||
const path = e.currentTarget.dataset.path
|
||||
if (!path) return
|
||||
wx.navigateTo({ url: path })
|
||||
},
|
||||
|
||||
onInput(e) {
|
||||
const field = e.currentTarget.dataset.field
|
||||
this.setData({ [`form.${field}`]: (e.detail.value || '').trim() })
|
||||
@@ -57,5 +67,18 @@ Page({
|
||||
} finally {
|
||||
this.setData({ loading: false })
|
||||
}
|
||||
},
|
||||
|
||||
logout() {
|
||||
wx.showModal({
|
||||
title: '退出登录',
|
||||
content: '确定要退出登录吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
getApp().clearAuth()
|
||||
wx.reLaunch({ url: '/pages/login/index' })
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user