Skip to content

Commit

Permalink
Merge pull request #119 from eleliauk/main
Browse files Browse the repository at this point in the history
feat:问问同学静态
  • Loading branch information
eleliauk authored Sep 12, 2024
2 parents 1df8d08 + b0158de commit 3df24b9
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 12 deletions.
5 changes: 5 additions & 0 deletions src/common/components/AnswerToStudent/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.question-container {
display: flex;
width: 80%;
justify-content: center;
}
13 changes: 13 additions & 0 deletions src/common/components/AnswerToStudent/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { View } from '@tarojs/components';

import './index.scss';

function AnswerToStudent() {
return (
<View className="question-container">
<View>问题问题问题问题问题:</View>
<View>10个回答</View>
</View>
);
}
export default AnswerToStudent;
9 changes: 7 additions & 2 deletions src/common/components/QuestionDetail/QuestionDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { Image, Text, View } from '@tarojs/components';
import React, { useEffect, useState } from 'react';
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment

import './index.scss';

// eslint-disable-next-line import/first
import answericon from '@/common/assets/img/publishQuestion/answer.png';
// eslint-disable-next-line import/first
import askicon from '@/common/assets/img/publishQuestion/ask.png';
// eslint-disable-next-line import/first
import PublishHeader from '@/common/components/PublishHeader/PublishHeader';
// eslint-disable-next-line import/first
import { useCourseStore } from '@/pages/main/store/store';

import IconFont from '../iconfont';
import './index.scss';

interface IUser {
avatar: string;
Expand Down
22 changes: 21 additions & 1 deletion src/pages/classInfo/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,27 @@
font-weight: 400;
color: #9f9f9c;
}

.line-container {
position: relative;
display: flex;
align-items: center;
justify-content: center;
padding-top: 20rpx;
&::before,
&::after {
content: '';
width: 20%;
height: 4rpx;
background-color: orange;
position: absolute;
}
&::before {
left: 10%;
}
&::after {
right: 10%;
}
}
.canvas-container {
width: 100%;
height: 500px;
Expand Down
28 changes: 20 additions & 8 deletions src/pages/classInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ import './index.scss';

import { CommentInfoType, Course } from '@/common/assets/types';
import { Comment } from '@/common/components';
import AnswerToStudent from '@/common/components/AnswerToStudent';
import LineChart from '@/common/components/chart';
import Label3 from '@/common/components/label3/label3';
import ShowStar from '@/common/components/showStar/showStar';
import { get } from '@/common/utils/fetch';

// import { useRef } from 'react';
// import Echarts, { EChartOption, EchartsHandle } from 'taro-react-echarts';
// 定义接口

// 创建一个对象来存储英文描述和对应的中文描述
const coursePropertyMap = {
CoursePropertyGeneralCore: '通识核心课',
CoursePropertyGeneralElective: '通识选修课',
Expand Down Expand Up @@ -128,10 +124,26 @@ export default function Index() {
))}
</View>
{/*<>*/}
<View className="h-1/3 w-5/6">
<LineChart className="flex content-center justify-center"></LineChart>
<View className="h-1/3 w-5/6 pt-1.5">
<LineChart className="text-center"></LineChart>
</View>
<View>
<View>
<View className="line-container pt-2.5 text-center text-xl">问问同学</View>
</View>
<>
<AnswerToStudent></AnswerToStudent>
<AnswerToStudent></AnswerToStudent>
</>
<View
onClick={() => {
void Taro.navigateTo({ url: '/pages/questionInfo/index' });
}}
className="text-right"
>
全部&gt;
</View>
</View>
{/*</>*/}

{comments &&
comments.map((comment) => (
Expand Down
1 change: 0 additions & 1 deletion src/pages/publishQuestion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable-next-line import/first */
import { Button, Image, Textarea, View } from '@tarojs/components';
import Taro from '@tarojs/taro';
import { useEffect, useState } from 'react';
Expand Down

0 comments on commit 3df24b9

Please sign in to comment.