From da4988df82a43c2811c3feb94faaa04705c4d306 Mon Sep 17 00:00:00 2001
From: eleliauk <2831336720@qq.com>
Date: Wed, 11 Sep 2024 21:35:29 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20feat:=E8=B7=B3=E8=BD=AC?=
=?UTF-8?q?=E8=B7=AF=E7=94=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/classInfo/index.scss | 22 +++++++++++++++++++++-
src/pages/classInfo/index.tsx | 14 +++++++++++++-
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/src/pages/classInfo/index.scss b/src/pages/classInfo/index.scss
index 0bb26ac..0c0be43 100644
--- a/src/pages/classInfo/index.scss
+++ b/src/pages/classInfo/index.scss
@@ -28,7 +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;
+// }
+//}
.canvas-container {
width: 100%;
height: 500px;
diff --git a/src/pages/classInfo/index.tsx b/src/pages/classInfo/index.tsx
index e50a9cf..09298c3 100644
--- a/src/pages/classInfo/index.tsx
+++ b/src/pages/classInfo/index.tsx
@@ -16,6 +16,7 @@ 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';
// 定义接口
@@ -131,7 +132,18 @@ export default function Index() {
- {/*>*/}
+
+ 问问同学
+
+ wenti1:666666
+ wenti1:666666
+ {
+ void Taro.navigateTo({ url: '/pages/questionInfo/index' });
+ }}
+ >
+ 全部
+
{comments &&
comments.map((comment) => (
From b0158dee4c7234b669e548b37c49d7e8955528eb Mon Sep 17 00:00:00 2001
From: eleliauk <2831336720@qq.com>
Date: Thu, 12 Sep 2024 13:51:13 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20feat=EF=BC=9A=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=97=AE=E9=97=AE=E5=90=8C=E5=AD=A6=E9=9D=99?=
=?UTF-8?q?=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/AnswerToStudent/index.scss | 5 +++
.../components/AnswerToStudent/index.tsx | 13 ++++++
.../QuestionDetail/QuestionDetail.tsx | 9 +++-
src/pages/classInfo/index.scss | 42 +++++++++----------
src/pages/classInfo/index.tsx | 22 +++++-----
src/pages/publishQuestion/index.tsx | 1 -
6 files changed, 57 insertions(+), 35 deletions(-)
create mode 100644 src/common/components/AnswerToStudent/index.scss
create mode 100644 src/common/components/AnswerToStudent/index.tsx
diff --git a/src/common/components/AnswerToStudent/index.scss b/src/common/components/AnswerToStudent/index.scss
new file mode 100644
index 0000000..d49df06
--- /dev/null
+++ b/src/common/components/AnswerToStudent/index.scss
@@ -0,0 +1,5 @@
+.question-container {
+ display: flex;
+ width: 80%;
+ justify-content: center;
+}
diff --git a/src/common/components/AnswerToStudent/index.tsx b/src/common/components/AnswerToStudent/index.tsx
new file mode 100644
index 0000000..f4cae74
--- /dev/null
+++ b/src/common/components/AnswerToStudent/index.tsx
@@ -0,0 +1,13 @@
+import { View } from '@tarojs/components';
+
+import './index.scss';
+
+function AnswerToStudent() {
+ return (
+
+ 问题问题问题问题问题:
+ 10个回答
+
+ );
+}
+export default AnswerToStudent;
diff --git a/src/common/components/QuestionDetail/QuestionDetail.tsx b/src/common/components/QuestionDetail/QuestionDetail.tsx
index 23b4fa5..97f00fd 100644
--- a/src/common/components/QuestionDetail/QuestionDetail.tsx
+++ b/src/common/components/QuestionDetail/QuestionDetail.tsx
@@ -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;
diff --git a/src/pages/classInfo/index.scss b/src/pages/classInfo/index.scss
index 0c0be43..969c784 100644
--- a/src/pages/classInfo/index.scss
+++ b/src/pages/classInfo/index.scss
@@ -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;
diff --git a/src/pages/classInfo/index.tsx b/src/pages/classInfo/index.tsx
index 09298c3..48ca395 100644
--- a/src/pages/classInfo/index.tsx
+++ b/src/pages/classInfo/index.tsx
@@ -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: '通识选修课',
@@ -129,21 +124,26 @@ export default function Index() {
))}
{/*<>*/}
-
-
+
+
+
问问同学
- wenti1:666666
- wenti1:666666
+ <>
+
+
+ >
{
void Taro.navigateTo({ url: '/pages/questionInfo/index' });
}}
+ className="text-right"
>
- 全部
+ 全部>
+
{comments &&
comments.map((comment) => (
diff --git a/src/pages/publishQuestion/index.tsx b/src/pages/publishQuestion/index.tsx
index e9f9eaa..efb0d00 100644
--- a/src/pages/publishQuestion/index.tsx
+++ b/src/pages/publishQuestion/index.tsx
@@ -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';