Skip to content

Commit

Permalink
fix(bugs): 修复路由名
Browse files Browse the repository at this point in the history
  • Loading branch information
eleliauk committed Jan 3, 2025
1 parent e1fc3f3 commit 68f0611
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/common/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ export const post = (url = '', data = {}) => request(url, 'POST', data, true);
export const get = (url = '') => request(url, 'GET', {}, true);

const preUrl1 = 'https://miniprograms.muxixyz.com';
const preUrl2 = 'https://miniprogramschanger.muxixyz.com';
const request1 = async (url = '', method: 'GET' | 'POST' = 'GET', data = {}) => {
try {
const response = await Taro.request({
//审核之前换一下url
url: `${preUrl1}${url}`,
method,
header,
Expand Down
4 changes: 2 additions & 2 deletions src/custom-tab-bar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { uniqueKey } from '@/common/utils';
const TAB_LIST: Array<{ pagePath: string; name: string; icon?: string }> = [
{ pagePath: '/pages/main/index', name: 'Home', icon: 'streaming' },
{ pagePath: '/pages/guide/index', name: 'Guide', icon: 'download-cloud' },
{ pagePath: '/pages/evaluate/evaluate', name: '+' },
{ pagePath: '/pages/evaluate/index', name: '+' },
{ pagePath: '/pages/notification/index', name: 'Massage', icon: 'message' },
{ pagePath: '/pages/profile/index', name: 'Profile', icon: 'user' },
];
Expand All @@ -29,7 +29,7 @@ const TabBar: React.FC = memo(() => {
<View
className="add_sign"
onClick={() => {
void Taro.navigateTo({ url: '/pages/evaluate/evaluate' });
void Taro.navigateTo({ url: '/pages/evaluate/index' });
}}
>
+
Expand Down
2 changes: 1 addition & 1 deletion src/modules/profile/components/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BookIcon, ClockIcon, MailIcon, StarIcon } from '@/common/assets/img/pro
import { uniqueKey } from '@/common/utils';

const ListItems: { title: string; icon: string; url: string }[] = [
{ title: '我的课程', icon: BookIcon as string, url: '/pages/myclass/myclass' },
{ title: '我的课程', icon: BookIcon as string, url: '/pages/myclass/index' },
{ title: '我的收藏', icon: StarIcon as string, url: '/pages/myCollection/index' },
{
title: '评课历史',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/classInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ const Page: React.FC = () => {
className="flex h-[10vh] items-center justify-center"
onClick={() => {
void Taro.navigateTo({
url: `pages/evaluate/evaluate?id=${courseId}&name=${course?.name}`,
url: `pages/evaluate/index?id=${courseId}&name=${course?.name}`,
});
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/myclass/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const Page: React.FC = () => {
if (item.evaluated) handleNavToCourseInfo(item);
else
void Taro.navigateTo({
url: `/pages/evaluate/evaluate${query}`,
url: `/pages/evaluate/index${query}`,
});
};
const handleNavToCourseInfo = (each) => {
Expand Down

0 comments on commit 68f0611

Please sign in to comment.