Ly 2 weeks ago
commit f5c734a039
  1. 36
      src/layout/knowledgePage.vue
  2. 38
      src/layout/spacePage.vue

@ -8,16 +8,19 @@
<!-- 左边按钮 --> <!-- 左边按钮 -->
<button class="submit-left" @click="SubLeft"></button> <button class="submit-left" @click="SubLeft"></button>
<div class="question-body"> <div class="question-body">
<div class="sumTotal">第一个/共X个</div>
<div class="question">知识点学习</div> <div class="question">知识点学习</div>
<el-scrollbar height="200px">
<el-scrollbar height="210px">
<div class="txt" v-html="Text"></div> <div class="txt" v-html="Text"></div>
</el-scrollbar> </el-scrollbar>
<div class="finished">已学习</div>
</div> </div>
<div class="submit-buttons"> <div class="submit-buttons">
<!-- <button class="submit-btn" @click="reset">退出</button> --> <!-- <button class="submit-btn" @click="reset">退出</button> -->
<!-- <button class="submit-btn" @click="enter">进入仿真实验</button> --> <!-- <button class="submit-btn" @click="enter">进入仿真实验</button> -->
<router-link class="submit-btn" to="">退出</router-link> <router-link class="submit-btn" to="">返回</router-link>
<router-link class="submit-btn" to="/program">进入仿真实验</router-link> <router-link class="submit-btn" to="/program">完成学习</router-link>
</div> </div>
</div> </div>
@ -109,6 +112,7 @@ onMounted(() => { getContent() });
} }
.question-body { .question-body {
position: relative;
background: url("@/assets/images/FakeAnimateForPrototype.png") no-repeat center center; background: url("@/assets/images/FakeAnimateForPrototype.png") no-repeat center center;
/* 添加 background-position */ /* 添加 background-position */
background-size: 99%; background-size: 99%;
@ -124,6 +128,18 @@ onMounted(() => { getContent() });
padding-right: 50px; padding-right: 50px;
padding-top: 30px; padding-top: 30px;
.sumTotal {
font-size: 30px;
/* 字体大小 */
text-align: right;
/* 水平居中 */
letter-spacing: 3px;
/* 字符间距,单位可以是 px、em 等 */
color: #dc4758;
margin-top: 48px;
margin-bottom: -50px;
}
.question { .question {
font-size: 42px; font-size: 42px;
/* 字体大小 */ /* 字体大小 */
@ -131,7 +147,7 @@ onMounted(() => { getContent() });
/* 水平居中 */ /* 水平居中 */
letter-spacing: 3px; letter-spacing: 3px;
/* 字符间距,单位可以是 px、em 等 */ /* 字符间距,单位可以是 px、em 等 */
margin-top: 45px; margin-top: 25px;
margin-bottom: 20px; margin-bottom: 20px;
color: #fff; color: #fff;
} }
@ -163,6 +179,18 @@ onMounted(() => { getContent() });
/* 行间距,1.5 表示字体大小的 1.5 倍 */ /* 行间距,1.5 表示字体大小的 1.5 倍 */
color: #9b9a9a; color: #9b9a9a;
} }
.finished {
font-size: 30px;
/* 字体大小 */
text-align: right;
/* 水平居中 */
letter-spacing: 3px;
/* 字符间距,单位可以是 px、em 等 */
color: #dc4758;
margin-top: -235px;
margin-right: 20px;
}
} }
.submit-buttons { .submit-buttons {

@ -14,7 +14,7 @@
<p>学生8527</p> <p>学生8527</p>
<button class="btn1" @click="handleHomeClick">首页</button> <button class="btn1" @click="handleHomeClick">首页</button>
<button class="btn2" @click="handleRecordClick">学习/成绩记录</button> <button class="btn2" @click="handleRecordClick">学习/成绩记录</button>
<button class="btn3" @click="handlePasswordClick">密码管理</button> <button class="btn3" @click="handlePasswordClick">重置密码</button>
</div> </div>
<div class="rightBoxes"> <div class="rightBoxes">
<div class="topBox"> <div class="topBox">
@ -25,7 +25,7 @@
用户账号 用户账号
</div> </div>
<div class="right"> <div class="right">
<el-input v-model="formModel.username" style="border-color: #20bec8;"></el-input> <el-input disabled v-model="formModel.username" style="border-color: #20bec8;"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="name" class="custom-form-item"> <el-form-item prop="name" class="custom-form-item">
@ -34,7 +34,7 @@
姓名 姓名
</div> </div>
<div class="right"> <div class="right">
<el-input v-model="formModel.name" style="border-color: #20bec8;"></el-input> <el-input v-model="formModel.realname" style="border-color: #20bec8;"></el-input>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
@ -57,7 +57,7 @@
学号 学号
</div> </div>
<div class="right"> <div class="right">
<el-input v-model="formModel.studentNumb" <el-input v-model="formModel.studentNumb"
style="border-color: #20bec8"></el-input> style="border-color: #20bec8"></el-input>
</div> </div>
</div> </div>
@ -68,7 +68,7 @@
手机号 手机号
</div> </div>
<div class="right"> <div class="right">
<el-input v-model="formModel.mobile" style="border-color: #20bec8"></el-input> <el-input v-model="formModel.phone" style="border-color: #20bec8"></el-input>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
@ -78,7 +78,7 @@
成绩 成绩
</div> </div>
<div class="right"> <div class="right">
<el-input v-model="formModel.score" style="border-color: #20bec8"></el-input> <el-input-number disabled v-model="formModel.score" style="border-color: #20bec8"></el-input-number>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
@ -94,12 +94,12 @@
<script setup lang="ts" name="spacePage"> <script setup lang="ts" name="spacePage">
import { ref } from "vue" import { ref,onMounted } from "vue"
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import settingStore from "@/store/modules/setting"; import settingStore from "@/store/modules/setting";
const setting = settingStore(); const setting = settingStore();
import userStore from '@/store/modules/user'; import userStore from '@/store/modules/user';
import { getUserInfo } from "@/api";
const router = useRouter() const router = useRouter()
const user = userStore(); const user = userStore();
const loginFn = () => { const loginFn = () => {
@ -108,7 +108,6 @@ const loginFn = () => {
const handleHomeClick = () => { const handleHomeClick = () => {
// //
console.log('首页按钮被点击'); console.log('首页按钮被点击');
router.push('/studyPage')
}; };
const handleRecordClick = () => { const handleRecordClick = () => {
console.log('学习/成绩记录按钮被点击'); console.log('学习/成绩记录按钮被点击');
@ -120,12 +119,20 @@ const handlePasswordClick = () => {
const formRef = ref(); const formRef = ref();
const formModel = ref({ const formModel = ref({
username: "", username: "",
name: "", realname: "",
clssid: '', clssid: '',
studentNumb: "", studentNumb: "",
mobile: '', phone: '',
score: '' score: ''
}); });
const getUser=async()=>{
const res: any = await getUserInfo();
formModel.value = res.result.userInfo;
console.log(formModel, 'formModel');
}
const rules = { const rules = {
username: [ username: [
{ required: true, message: "请输入用户名", trigger: "blur" }, { required: true, message: "请输入用户名", trigger: "blur" },
@ -157,10 +164,13 @@ const rules = {
trigger: ["change", "blur"], trigger: ["change", "blur"],
}, },
], ],
score:[ // score:[
{ required: true, message: "成绩", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
] // ]
}; };
onMounted(()=>{
getUser()
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

Loading…
Cancel
Save