Skip to content

Commit

Permalink
✨ feat:新增课程问问同学静态
Browse files Browse the repository at this point in the history
  • Loading branch information
eleliauk committed Sep 12, 2024
1 parent da4988d commit b0158de
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 35 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
42 changes: 21 additions & 21 deletions src/pages/classInfo/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@
font-weight: 400;
color: #9f9f9c;
}
//.line-container {
// position: relative;
// display: flex;
// align-items: center;
// justify-content: center;
//
// &::before,
// &::after {
// content: "";
// width: 40%;
// height: 4rpx;
// background-color: orange;
// position: absolute;
// }
// &::before {
// left: 0;
// }
// &::after {
// right: 0;
// }
//}
.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
22 changes: 11 additions & 11 deletions src/pages/classInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +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 @@ -129,21 +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>
<View>wenti1:666666</View>
<View>wenti1:666666</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 b0158de

Please sign in to comment.