liveRoom.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <div class="pb_content">
  3. <div class="pb_content_body">
  4. <div class="body_student">
  5. <div class="student_head">
  6. <div class="box_course">
  7. <div class="wheel">
  8. <img
  9. :src="
  10. studentMessage.headportrait != null
  11. ? studentMessage.headportrait
  12. : tx
  13. "
  14. alt=""
  15. />
  16. </div>
  17. <div class="right_box">
  18. <div class="right_box_title">{{ studentMessage.name ? studentMessage.name : "暂无名称" }}</div>
  19. <div class="people">
  20. <div>
  21. <span>班级:</span><span>{{ studentMessage.cname ? studentMessage.cname : "暂无班级" }}</span>
  22. </div>
  23. <div style="margin-left: 50px">
  24. <span>所属学校:</span><span>{{ studentMessage.sname ? studentMessage.sname : "暂无学校" }}</span>
  25. </div>
  26. </div>
  27. <div>
  28. <span>手机号码:</span
  29. ><span>{{ studentMessage.phonenumber ? studentMessage.phonenumber : "暂无手机号" }}</span>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="student_body">
  35. <div class="myProject">我的项目</div>
  36. <div class="project_box">
  37. <div
  38. class="three_box_inthis"
  39. v-for="(item, index) in myCourse"
  40. :key="index"
  41. >
  42. <div
  43. class="project"
  44. @click="
  45. goTo(
  46. '/liveProjectDetail?courseId=' +
  47. item.courseid +
  48. '&userid=' +
  49. userid + '&oid=' + oid
  50. )
  51. "
  52. >
  53. <!-- <img
  54. :src="
  55. item.cover != null && item.cover != ''
  56. ? JSON.parse(item.cover)[0].url
  57. : mpj
  58. "
  59. alt=""
  60. /> -->
  61. <img
  62. :src="
  63. mpj
  64. "
  65. alt=""
  66. />
  67. </div>
  68. <div class="projct_nav">
  69. <div
  70. style="font-size: 18px"
  71. @click="
  72. goTo(
  73. '/courseDetail?courseId=' +
  74. item.courseid +
  75. '&userid=' +
  76. userid + '&oid=' + oid
  77. )
  78. "
  79. >
  80. {{ item.title }}
  81. </div>
  82. <div style="color: #2FDB88">
  83. <!-- 共{{ JSON.parse(item.chapters).length }}讲 -->
  84. 共4讲
  85. </div>
  86. <div>
  87. <span style="color: #999">{{ item.createTime }}</span>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </template>
  97. <script>
  98. export default {
  99. data() {
  100. return {
  101. myCourse: [
  102. // {cover:[],title:"认识种子的起源",chapters:[],createTime:new Date().getTime()},
  103. {cover:[],courseid:"9a4e8dbe-132e-438e-97db-b07eb01fa04c",title:"湖心亭看雪可可乐博模拟展示课件",chapters:[],createTime:new Date().getTime()},
  104. ],
  105. studentMessage: [],
  106. tx: require("../assets/avatar.png"),
  107. mpj: require("../assets/icon/pptImg.png"),
  108. userid: this.$route.query.userid,
  109. oid:this.$route.query.oid,
  110. };
  111. },
  112. methods: {
  113. goTo(path) {
  114. this.$router.push(path);
  115. },
  116. selectSDetail() {
  117. let params = {
  118. uid: this.userid,
  119. };
  120. this.ajax
  121. .get(this.$store.state.api + "selectSDetail", params)
  122. .then((res) => {
  123. this.studentMessage = res.data[0][0];
  124. })
  125. .catch((err) => {
  126. this.isLoading = false;
  127. console.error(err);
  128. });
  129. },
  130. },
  131. created() {
  132. this.selectSDetail();
  133. document.scrollingElement.scrollTop = 0;
  134. },
  135. };
  136. </script>
  137. <style scoped>
  138. .body_student {
  139. margin: 0px auto;
  140. width: 98%;
  141. height: 100%;
  142. }
  143. .student_head {
  144. width: 100%;
  145. margin: 0 auto;
  146. height: 30%;
  147. background-image: linear-gradient(90deg, #30c499, #75ceba);
  148. color: #fff;
  149. }
  150. .wheel > img,
  151. .project > img {
  152. width: 100%;
  153. height: 100%;
  154. }
  155. .box_course {
  156. display: flex;
  157. padding: 35px 0 25px 60px;
  158. align-items: center;
  159. }
  160. .wheel {
  161. width: 210px;
  162. }
  163. .right_box {
  164. display: flex;
  165. flex-direction: column;
  166. margin-left: 30px;
  167. /* justify-content: space-around; */
  168. }
  169. .right_box_title {
  170. font-size: 23px;
  171. }
  172. .people {
  173. display: flex;
  174. margin: 30px 0 20px 0px;
  175. }
  176. .student_body {
  177. width: 100%;
  178. margin: 0 auto;
  179. background: #fff;
  180. margin-top: 20px;
  181. padding: 0 0 20px;
  182. min-height: 1000px;
  183. }
  184. .project {
  185. width: 100%;
  186. }
  187. .project_box {
  188. display: flex;
  189. width: 100%;
  190. flex-direction: row;
  191. flex-wrap: wrap;
  192. }
  193. .three_box_inthis {
  194. display: flex;
  195. width: 21%;
  196. flex-direction: column;
  197. align-items: flex-start;
  198. border: 1px solid #ccc;
  199. margin: 15px;
  200. }
  201. .projct_nav {
  202. margin-left: 5px;
  203. display: flex;
  204. flex-direction: column;
  205. flex-wrap: nowrap;
  206. justify-content: space-around;
  207. }
  208. .projct_nav > div:nth-child(1) {
  209. cursor: pointer;
  210. }
  211. .projct_nav > div{
  212. margin-bottom: 5px;
  213. }
  214. .myProject {
  215. padding: 20px 20px 10px 0;
  216. border-bottom: 1px solid #ccc;
  217. margin-left: 20px;
  218. width: 95%;
  219. }
  220. </style>