123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <template>
- <div class="pb_content">
- <div class="pb_content_body">
- <div class="body_student">
- <div class="student_head">
- <div class="box_course">
- <div class="wheel">
- <img
- :src="
- studentMessage.headportrait != null
- ? studentMessage.headportrait
- : tx
- "
- alt=""
- />
- </div>
- <div class="right_box">
- <div class="right_box_title">{{ studentMessage.name }}</div>
- <div class="people">
- <div>
- <span>班级:</span><span>{{ studentMessage.cname }}</span>
- </div>
- <div style="margin-left: 50px">
- <span>所属学校:</span><span>{{ studentMessage.sname }}</span>
- </div>
- </div>
- <div>
- <span>手机号码:</span
- ><span>{{ studentMessage.phonenumber }}</span>
- </div>
- </div>
- </div>
- </div>
- <div class="student_body">
- <div class="myProject">我的项目</div>
- <div class="project_box">
- <div
- class="three_box_inthis"
- v-for="(item, index) in myCourse"
- :key="index"
- >
- <div
- class="project"
- @click="
- goTo(
- '/courseDetail?courseId=' +
- item.courseid +
- '&userid=' +
- userid + '&oid=' + oid
- )
- "
- >
- <!-- <img
- :src="
- item.cover != null && item.cover != ''
- ? JSON.parse(item.cover)[0].url
- : mpj
- "
- alt=""
- /> -->
- <img
- :src="
- mpj
- "
- alt=""
- />
- </div>
- <div class="projct_nav">
- <div
- style="font-size: 18px"
- @click="
- goTo(
- '/courseDetail?courseId=' +
- item.courseid +
- '&userid=' +
- userid + '&oid=' + oid
- )
- "
- >
- {{ item.title }}
- </div>
- <div style="color: #2FDB88">
- 共{{ JSON.parse(item.chapters).length }}讲
- </div>
- <div>
- <span style="color: #999">{{ item.createTime }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- myCourse: [],
- studentMessage: [],
- tx: require("../assets/avatar.png"),
- mpj: require("../assets/project.png"),
- userid: this.$route.query.userid,
- oid:this.$route.query.oid,
- };
- },
- methods: {
- goTo(path) {
- this.$router.push(path);
- },
- selectSDetail() {
- let params = {
- uid: this.userid,
- };
- this.ajax
- .get(this.$store.state.api + "selectSDetail", params)
- .then((res) => {
- this.studentMessage = res.data[0][0];
- })
- .catch((err) => {
- this.isLoading = false;
- console.error(err);
- });
- },
- selectMyCourse() {
- let params = {
- uid: this.userid,
- };
- this.ajax
- .get(this.$store.state.api + "selectMyCourseBycid", params)
- .then((res) => {
- this.myCourse = res.data[0];
- })
- .catch((err) => {
- console.error(err);
- });
- },
- },
- created() {
- this.selectSDetail();
- this.selectMyCourse();
- document.scrollingElement.scrollTop = 0;
- },
- };
- </script>
- <style scoped>
- .body_student {
- margin: 0px auto;
- width: 98%;
- height: 100%;
- }
- .student_head {
- width: 100%;
- margin: 0 auto;
- height: 30%;
- background-image: linear-gradient(90deg, #30c499, #75ceba);
- color: #fff;
- }
- .wheel > img,
- .project > img {
- width: 100%;
- height: 100%;
- }
- .box_course {
- display: flex;
- padding: 35px 0 25px 60px;
- align-items: center;
- }
- .wheel {
- width: 210px;
- }
- .right_box {
- display: flex;
- flex-direction: column;
- margin-left: 30px;
- /* justify-content: space-around; */
- }
- .right_box_title {
- font-size: 23px;
- }
- .people {
- display: flex;
- margin: 30px 0 20px 0px;
- }
- .student_body {
- width: 100%;
- margin: 0 auto;
- background: #fff;
- margin-top: 20px;
- padding: 0 0 20px;
- min-height: 1000px;
- }
- .project {
- width: 100%;
- }
- .project_box {
- display: flex;
- width: 100%;
- flex-direction: row;
- flex-wrap: wrap;
- }
- .three_box_inthis {
- display: flex;
- width: 21%;
- flex-direction: column;
- align-items: flex-start;
- border: 1px solid #ccc;
- margin: 15px;
- }
- .projct_nav {
- margin-left: 5px;
- display: flex;
- flex-direction: column;
- flex-wrap: nowrap;
- justify-content: space-around;
- }
- .projct_nav > div:nth-child(1) {
- cursor: pointer;
- }
- .projct_nav > div{
- margin-bottom: 5px;
- }
- .myProject {
- padding: 20px 20px 10px 0;
- border-bottom: 1px solid #ccc;
- margin-left: 20px;
- width: 95%;
- }
- </style>
|