修改个人页的跳转
This commit is contained in:
@@ -57,7 +57,7 @@ npm run build:alipay # 支付宝小程序
|
||||
|
||||
## 页面路由
|
||||
|
||||
- `/pages/index/index` - 首页
|
||||
- `/pages/list/index` - 首页
|
||||
- `/pages/publish/publish` - 原发布页面
|
||||
- `/pages/publishBall/publishBall` - 新的约球发布页面 ⭐
|
||||
- `/pages/dynamicFormDemo/dynamicFormDemo` - 动态表单演示页面 ⭐
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
// .plugin('prerender')
|
||||
// .use(new Prerender({
|
||||
// staticDir,
|
||||
// routes: [ '/pages/index/index' ],
|
||||
// routes: [ '/pages/list/index' ],
|
||||
// postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
|
||||
// }))
|
||||
// }
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
export default defineAppConfig({
|
||||
pages: [
|
||||
// 'pages/publishBall/index',
|
||||
'pages/login/index/index',
|
||||
'pages/login/verification/index',
|
||||
'pages/login/terms/index',
|
||||
'pages/publishBall/index',
|
||||
'pages/list/index', // 列表页
|
||||
'pages/search/index', // 搜索页
|
||||
'pages/searchResult/index', // 搜索结果页面
|
||||
'pages/userInfo/myself/index',
|
||||
'pages/login/index/index',
|
||||
'pages/login/verification/index',
|
||||
'pages/login/terms/index',
|
||||
|
||||
// 'pages/mapDisplay/index',
|
||||
'pages/detail/index',
|
||||
'pages/message/index',
|
||||
|
||||
@@ -34,8 +34,13 @@ const GuideBar = (props) => {
|
||||
if (code === currentPage) {
|
||||
return
|
||||
}
|
||||
|
||||
let url = `/pages/${code}/index`
|
||||
if (code === 'personal') {
|
||||
url = 'pages/userInfo/myself/index'
|
||||
}
|
||||
Taro.navigateTo({
|
||||
url: `/pages/${code}/index`,
|
||||
url: url,
|
||||
}).then(() => {
|
||||
Taro.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
|
||||
@@ -218,7 +218,7 @@ https://www.figma.com/design/EWQlX5wM2lhiSLfFQp8qKT/小程序设计稿V1(开
|
||||
↓
|
||||
协议详情页面 (/pages/login/terms/index)
|
||||
↓
|
||||
应用首页 (/pages/index/index)
|
||||
应用首页 (/pages/list/index)
|
||||
```
|
||||
|
||||
### 🧪 测试配置
|
||||
|
||||
@@ -39,7 +39,7 @@ const LoginPage: React.FC = () => {
|
||||
save_login_state(response.token!, response.user_info!);
|
||||
|
||||
setTimeout(() => {
|
||||
Taro.redirectTo({ url: '/pages/index/index' });
|
||||
Taro.redirectTo({ url: '/pages/list/index' });
|
||||
}, 200);
|
||||
} else {
|
||||
Taro.showToast({
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
↓
|
||||
保存登录状态到本地存储
|
||||
↓
|
||||
跳转到首页 /pages/index/index
|
||||
跳转到首页 /pages/list/index
|
||||
```
|
||||
|
||||
**接口调用**:
|
||||
@@ -53,7 +53,7 @@
|
||||
↓
|
||||
验证成功后保存登录状态
|
||||
↓
|
||||
跳转到首页 /pages/index/index
|
||||
跳转到首页 /pages/list/index
|
||||
```
|
||||
|
||||
**接口调用**:
|
||||
@@ -136,7 +136,7 @@
|
||||
↓
|
||||
/pages/login/terms/index (协议详情页面)
|
||||
↓
|
||||
/pages/index/index (应用首页)
|
||||
/pages/list/index (应用首页)
|
||||
```
|
||||
|
||||
## 接口响应格式
|
||||
|
||||
@@ -179,7 +179,7 @@ interface UserStats {
|
||||
|
||||
## 使用示例
|
||||
|
||||
查看 `src/pages/index/index.tsx` 获取完整的使用示例,包括:
|
||||
查看 `src/pages/list/index.tsx` 获取完整的使用示例,包括:
|
||||
|
||||
- 用户信息展示
|
||||
- 统计数据实时更新
|
||||
|
||||
Reference in New Issue
Block a user