Skip to content

Commit

Permalink
Merge pull request #113 from MaggieMii/mhr-dev
Browse files Browse the repository at this point in the history
✨ feat: 新增问题详情页面
  • Loading branch information
MaggieMii authored Sep 4, 2024
2 parents 2862c96 + a62f25d commit fdac415
Show file tree
Hide file tree
Showing 11 changed files with 466 additions and 116 deletions.
3 changes: 2 additions & 1 deletion src/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default defineAppConfig({
pages: [
// 'pages/questionInfo/index',
'pages/questionInfo/index',
'pages/login/index',
'pages/main/index',
'pages/publishQuestion/index',
Expand All @@ -15,6 +15,7 @@ export default defineAppConfig({
'pages/research/research',
'pages/index/index',
'pages/editUser/index',
'pages/publishQuestion/index',
],
subpackages: [
{
Expand Down
144 changes: 72 additions & 72 deletions src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,77 @@
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
export { }
declare global {
const useAPICheck: typeof import('taro-hooks')['useAPICheck']
const useAccountInfo: typeof import('taro-hooks')['useAccountInfo']
const useActionSheet: typeof import('taro-hooks')['useActionSheet']
const useAlertBeforeUnload: typeof import('taro-hooks')['useAlertBeforeUnload']
const useApp: typeof import('taro-hooks')['useApp']
const useArrayBuffer: typeof import('taro-hooks')['useArrayBuffer']
const useAudio: typeof import('taro-hooks')['useAudio']
const useAuthorize: typeof import('taro-hooks')['useAuthorize']
const useBackground: typeof import('taro-hooks')['useBackground']
const useBattery: typeof import('taro-hooks')['useBattery']
const useBluetooth: typeof import('taro-hooks')['useBluetooth']
const useBoolean: typeof import('taro-hooks')['useBoolean']
const useBrightness: typeof import('taro-hooks')['useBrightness']
const useCamera: typeof import('taro-hooks')['useCamera']
const useChooseAddress: typeof import('taro-hooks')['useChooseAddress']
const useClipboardData: typeof import('taro-hooks')['useClipboardData']
const useCreation: typeof import('taro-hooks')['useCreation']
const useDebounce: typeof import('taro-hooks')['useDebounce']
const useDebounceFn: typeof import('taro-hooks')['useDebounceFn']
const useDeviceInfo: typeof import('taro-hooks')['useDeviceInfo']
const useEnterOptions: typeof import('taro-hooks')['useEnterOptions']
const useEnv: typeof import('taro-hooks')['useEnv']
const useEvent: typeof import('taro-hooks')['useEvent']
const useFile: typeof import('taro-hooks')['useFile']
const useFrom: typeof import('taro-hooks')['useFrom']
const useImage: typeof import('taro-hooks')['useImage']
const useInvoice: typeof import('taro-hooks')['useInvoice']
const useKeyboard: typeof import('taro-hooks')['useKeyboard']
const useLatest: typeof import('taro-hooks')['useLatest']
const useLaunchOptions: typeof import('taro-hooks')['useLaunchOptions']
const useLoading: typeof import('taro-hooks')['useLoading']
const useLocation: typeof import('taro-hooks')['useLocation']
const useLogin: typeof import('taro-hooks')['useLogin']
const useManualPullDownRefresh: typeof import('taro-hooks')['useManualPullDownRefresh']
const useMap: typeof import('taro-hooks')['useMap']
const useMemoizedFn: typeof import('taro-hooks')['useMemoizedFn']
const useMenuButtonBoundingClientRect: typeof import('taro-hooks')['useMenuButtonBoundingClientRect']
const useModal: typeof import('taro-hooks')['useModal']
const useMotion: typeof import('taro-hooks')['useMotion']
const useMount: typeof import('taro-hooks')['useMount']
const useNavigationBar: typeof import('taro-hooks')['useNavigationBar']
const useNetworkType: typeof import('taro-hooks')['useNetworkType']
const useOnline: typeof import('taro-hooks')['useOnline']
const usePage: typeof import('taro-hooks')['usePage']
const usePreload: typeof import('taro-hooks')['usePreload']
const usePromise: typeof import('taro-hooks')['usePromise']
const useRecord: typeof import('taro-hooks')['useRecord']
const useRequest: typeof import('taro-hooks')['useRequest']
const useRequestSubscribeMessage: typeof import('taro-hooks')['useRequestSubscribeMessage']
const useRouter: typeof import('taro-hooks')['useRouter']
const useScanCode: typeof import('taro-hooks')['useScanCode']
const useSelectorQuery: typeof import('taro-hooks')['useSelectorQuery']
const useStorage: typeof import('taro-hooks')['useStorage']
const useSystemInfo: typeof import('taro-hooks')['useSystemInfo']
const useTabBar: typeof import('taro-hooks')['useTabBar']
const useThrottle: typeof import('taro-hooks')['useThrottle']
const useThrottleFn: typeof import('taro-hooks')['useThrottleFn']
const useToast: typeof import('taro-hooks')['useToast']
const useToggle: typeof import('taro-hooks')['useToggle']
const useTopBarText: typeof import('taro-hooks')['useTopBarText']
const useUnmount: typeof import('taro-hooks')['useUnmount']
const useUpdate: typeof import('taro-hooks')['useUpdate']
const useUpdateEffect: typeof import('taro-hooks')['useUpdateEffect']
const useUpdateManager: typeof import('taro-hooks')['useUpdateManager']
const useUserInfo: typeof import('taro-hooks')['useUserInfo']
const useVibrate: typeof import('taro-hooks')['useVibrate']
const useVideo: typeof import('taro-hooks')['useVideo']
const useVisible: typeof import('taro-hooks')['useVisible']
const useWeRun: typeof import('taro-hooks')['useWeRun']
const useWebp: typeof import('taro-hooks')['useWebp']
const useWindowInfo: typeof import('taro-hooks')['useWindowInfo']
const useAPICheck: (typeof import('taro-hooks'))['useAPICheck'];
const useAccountInfo: (typeof import('taro-hooks'))['useAccountInfo'];
const useActionSheet: (typeof import('taro-hooks'))['useActionSheet'];
const useAlertBeforeUnload: (typeof import('taro-hooks'))['useAlertBeforeUnload'];
const useApp: (typeof import('taro-hooks'))['useApp'];
const useArrayBuffer: (typeof import('taro-hooks'))['useArrayBuffer'];
const useAudio: (typeof import('taro-hooks'))['useAudio'];
const useAuthorize: (typeof import('taro-hooks'))['useAuthorize'];
const useBackground: (typeof import('taro-hooks'))['useBackground'];
const useBattery: (typeof import('taro-hooks'))['useBattery'];
const useBluetooth: (typeof import('taro-hooks'))['useBluetooth'];
const useBoolean: (typeof import('taro-hooks'))['useBoolean'];
const useBrightness: (typeof import('taro-hooks'))['useBrightness'];
const useCamera: (typeof import('taro-hooks'))['useCamera'];
const useChooseAddress: (typeof import('taro-hooks'))['useChooseAddress'];
const useClipboardData: (typeof import('taro-hooks'))['useClipboardData'];
const useCreation: (typeof import('taro-hooks'))['useCreation'];
const useDebounce: (typeof import('taro-hooks'))['useDebounce'];
const useDebounceFn: (typeof import('taro-hooks'))['useDebounceFn'];
const useDeviceInfo: (typeof import('taro-hooks'))['useDeviceInfo'];
const useEnterOptions: (typeof import('taro-hooks'))['useEnterOptions'];
const useEnv: (typeof import('taro-hooks'))['useEnv'];
const useEvent: (typeof import('taro-hooks'))['useEvent'];
const useFile: (typeof import('taro-hooks'))['useFile'];
const useFrom: (typeof import('taro-hooks'))['useFrom'];
const useImage: (typeof import('taro-hooks'))['useImage'];
const useInvoice: (typeof import('taro-hooks'))['useInvoice'];
const useKeyboard: (typeof import('taro-hooks'))['useKeyboard'];
const useLatest: (typeof import('taro-hooks'))['useLatest'];
const useLaunchOptions: (typeof import('taro-hooks'))['useLaunchOptions'];
const useLoading: (typeof import('taro-hooks'))['useLoading'];
const useLocation: (typeof import('taro-hooks'))['useLocation'];
const useLogin: (typeof import('taro-hooks'))['useLogin'];
const useManualPullDownRefresh: (typeof import('taro-hooks'))['useManualPullDownRefresh'];
const useMap: (typeof import('taro-hooks'))['useMap'];
const useMemoizedFn: (typeof import('taro-hooks'))['useMemoizedFn'];
const useMenuButtonBoundingClientRect: (typeof import('taro-hooks'))['useMenuButtonBoundingClientRect'];
const useModal: (typeof import('taro-hooks'))['useModal'];
const useMotion: (typeof import('taro-hooks'))['useMotion'];
const useMount: (typeof import('taro-hooks'))['useMount'];
const useNavigationBar: (typeof import('taro-hooks'))['useNavigationBar'];
const useNetworkType: (typeof import('taro-hooks'))['useNetworkType'];
const useOnline: (typeof import('taro-hooks'))['useOnline'];
const usePage: (typeof import('taro-hooks'))['usePage'];
const usePreload: (typeof import('taro-hooks'))['usePreload'];
const usePromise: (typeof import('taro-hooks'))['usePromise'];
const useRecord: (typeof import('taro-hooks'))['useRecord'];
const useRequest: (typeof import('taro-hooks'))['useRequest'];
const useRequestSubscribeMessage: (typeof import('taro-hooks'))['useRequestSubscribeMessage'];
const useRouter: (typeof import('taro-hooks'))['useRouter'];
const useScanCode: (typeof import('taro-hooks'))['useScanCode'];
const useSelectorQuery: (typeof import('taro-hooks'))['useSelectorQuery'];
const useStorage: (typeof import('taro-hooks'))['useStorage'];
const useSystemInfo: (typeof import('taro-hooks'))['useSystemInfo'];
const useTabBar: (typeof import('taro-hooks'))['useTabBar'];
const useThrottle: (typeof import('taro-hooks'))['useThrottle'];
const useThrottleFn: (typeof import('taro-hooks'))['useThrottleFn'];
const useToast: (typeof import('taro-hooks'))['useToast'];
const useToggle: (typeof import('taro-hooks'))['useToggle'];
const useTopBarText: (typeof import('taro-hooks'))['useTopBarText'];
const useUnmount: (typeof import('taro-hooks'))['useUnmount'];
const useUpdate: (typeof import('taro-hooks'))['useUpdate'];
const useUpdateEffect: (typeof import('taro-hooks'))['useUpdateEffect'];
const useUpdateManager: (typeof import('taro-hooks'))['useUpdateManager'];
const useUserInfo: (typeof import('taro-hooks'))['useUserInfo'];
const useVibrate: (typeof import('taro-hooks'))['useVibrate'];
const useVideo: (typeof import('taro-hooks'))['useVideo'];
const useVisible: (typeof import('taro-hooks'))['useVisible'];
const useWeRun: (typeof import('taro-hooks'))['useWeRun'];
const useWebp: (typeof import('taro-hooks'))['useWebp'];
const useWindowInfo: (typeof import('taro-hooks'))['useWindowInfo'];
}
22 changes: 22 additions & 0 deletions src/common/components/CourseInfo/CourseInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { View } from '@tarojs/components';

Check warning on line 1 in src/common/components/CourseInfo/CourseInfo.tsx

View workflow job for this annotation

GitHub Actions / lint-and-format

Run autofix to sort these imports!
import React from 'react';
import './index.scss';

interface ICourseInfoProps {
name?: string;
school?: string;
teacher?: string;
}

const CourseInfo: React.FC<ICourseInfoProps> = ({ name, school, teacher }) => {
return (
<View>
<View className="theClassName">{name}</View>
<View className="teacherName">
{school} {teacher}
</View>
</View>
);
};

export default CourseInfo;
16 changes: 16 additions & 0 deletions src/common/components/CourseInfo/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.theClassName {
font-size: 43rpx;
font-weight: bold;
color: #565552;
text-align: center;
margin-top: 22rpx;
}

.teacherName {
font-size: 33rpx;
font-weight: 400;
color: #9f9f9c;
text-align: center;
margin-top: 15rpx;
margin-bottom: 27rpx;
}
23 changes: 23 additions & 0 deletions src/common/components/PublishHeader/PublishHeader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Image, Text, View } from '@tarojs/components';
import React from 'react';
import './index.scss';

interface IPublishHeaderProps {
avatarUrl: string;
nickName: string;
date: string;
}

const PublishHeader: React.FC<IPublishHeaderProps> = ({ avatarUrl, nickName, date }) => {
return (
<View className="publish-header">
<Image src={avatarUrl} className="avatar" />
<View className="nameDate">
<Text className="nickname">{nickName}</Text>
<View className="currentDate">{date}</View>
</View>
</View>
);
};

export default PublishHeader;
26 changes: 26 additions & 0 deletions src/common/components/PublishHeader/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.avatar {
width: 90.58rpx;
height: 90.58rpx;
border-radius: 100%;
margin-right: 10px;
border: #d2d5d8 solid 5rpx;
margin-right: 27rpx;
}

.nickname {
font-weight: bold;
font-size: 22rpx;
color: #565552;
}

.currentDate {
font-weight: 400;
font-size: 14rpx;
color: #9f9f9c;
margin-top: 20rpx;
}

.publish-header {
display: flex;
align-items: center;
}
Loading

0 comments on commit fdac415

Please sign in to comment.