details.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view class="details">
  3. <view class="wrap">
  4. <!-- <image src="../../static/images/stu-top.png" mode="widthFix"></image> -->
  5. <view class="title">
  6. <text>学生个人信息</text>
  7. <text class="eng">Student Personal Information</text>
  8. </view>
  9. </view>
  10. <!-- <image class="headimg" :src="details.headimg" mode=""></image> -->
  11. <view class="item">
  12. <view class="details-item">
  13. <!-- <image src="../../static/images/mine-icon.png" mode=""></image> -->
  14. <image :src="details.headimg" mode=""></image>
  15. <view class="middle">
  16. {{details.truename}}
  17. </view>
  18. </view>
  19. <view class="text">
  20. <image src="../../static/images/date.png" mode=""></image>
  21. <view class="middle">
  22. 学号
  23. </view>
  24. <view class="right">
  25. <span>{{details.account}}</span>
  26. </view>
  27. </view>
  28. <view class="text">
  29. <image src="../../static/images/class.png" mode=""></image>
  30. <view class="middle">
  31. 班级
  32. </view>
  33. <view class="right">
  34. {{details.class ? details.class : '--'}}
  35. <!-- <span></span> -->
  36. </view>
  37. </view>
  38. <view class="text">
  39. <image src="../../static/images/phone.png" mode=""></image>
  40. <view class="middle">
  41. 电话
  42. </view>
  43. <view class="right">
  44. <span>{{details.mobile ? details.mobile : '--'}}</span>
  45. </view>
  46. </view>
  47. <view class="text">
  48. <image src="../../static/images/e-mail.png" mode=""></image>
  49. <view class="middle">
  50. 邮箱
  51. </view>
  52. <view class="right">
  53. <span>{{details.email ? details.email : '--'}}</span>
  54. </view>
  55. </view>
  56. <view class="text1">
  57. <view class="remark-title">
  58. <!-- <u-icon name="tags-fill" size="45"></u-icon> -->
  59. <span style="margin-left: 10px;">Ta的学习需求</span>
  60. <image src="../../static/images/remark.png" mode=""></image>
  61. </view>
  62. <image class="circle" src="../../static/images/remark1.png" mode=""></image>
  63. <view class="remark">
  64. <text>{{details.demand}}</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. stu_id: '',
  75. details: ''
  76. }
  77. },
  78. onLoad(options) {
  79. if (this.is_weixin()) {
  80. this.navTitle()
  81. }
  82. this.stu_id = options.id
  83. this.getDetails()
  84. },
  85. methods: {
  86. //判断是否是微信
  87. is_weixin() {
  88. let ua = navigator.userAgent.toLowerCase();
  89. return ua.indexOf('micromessenger') != -1;
  90. },
  91. navTitle() {
  92. let navTitle = document.getElementsByTagName('uni-page-head');
  93. navTitle[0].style.display = 'none'
  94. },
  95. getDetails() {
  96. this.$u.get('/mentor/student/' + this.stu_id).then(res => {
  97. console.log(res, 'xianqing ')
  98. this.details = res.data
  99. })
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. page {
  106. background: #F4F9FD;
  107. padding: 20px 16px;
  108. }
  109. .details {
  110. background-color: #FFFFFF;
  111. .wrap{
  112. // display: flex;
  113. width: 100%;
  114. background: url(../../static/images/stu-top.png) no-repeat;
  115. height: 112px;
  116. background-size: 100%;
  117. background-position: center;
  118. }
  119. .title{
  120. flex: 1;
  121. font-size: 20px;
  122. font-family: PingFang SC;
  123. font-weight: bold;
  124. line-height: 20px;
  125. color: #282828;
  126. padding: 40px 30px 30px;
  127. margin-left: 95px;
  128. .eng{
  129. display: block;
  130. font-size: 12px;
  131. font-family: PingFang SC;
  132. font-weight: bold;
  133. line-height: 20px;
  134. color: #282828;
  135. opacity: 1;
  136. margin-top: 6px;
  137. }
  138. }
  139. .headimg{
  140. width: 100px;
  141. height: 100px;
  142. border-radius: 100px;
  143. position: fixed;
  144. right: 30px;
  145. top: 80px;
  146. }
  147. .item {
  148. padding: 37px 30px 159px;
  149. .details-item {
  150. display: flex;
  151. align-items: center;
  152. margin-bottom: 20px;
  153. image {
  154. width: 50px;
  155. height: 50px;
  156. margin-right: 12px;
  157. border-radius: 50%;
  158. }
  159. .middle {
  160. font-size: 20px;
  161. font-family: PingFang SC;
  162. font-weight: bold;
  163. color: #282828;
  164. opacity: 1;
  165. margin-right: 10px;
  166. }
  167. .right {
  168. font-size: 14px;
  169. font-family: PingFang SC;
  170. font-weight: bold;
  171. color: rgba(40, 40, 40, .78);
  172. }
  173. }
  174. .text {
  175. display: flex;
  176. margin-top: 8px;
  177. // align-items: center;
  178. image {
  179. width: 18px;
  180. flex: 0 0 18px;
  181. height: 18px;
  182. margin-right: 12px;
  183. }
  184. .middle {
  185. font-size: 15px;
  186. font-family: PingFang SC;
  187. font-weight: bold;
  188. flex: 0 0 35px;
  189. margin-right: 10px;
  190. color: rgba(40, 40, 40, .78);
  191. }
  192. .right {
  193. font-size: 12px;
  194. font-family: PingFang SC;
  195. font-weight: bold;
  196. color: rgba(40, 40, 40, .59);
  197. }
  198. }
  199. .text1 {
  200. // background-color: #18B566;
  201. margin-top: 40px;
  202. text-align: center;
  203. }
  204. }
  205. .remark-title {
  206. // margin: 10px 0px 0px;
  207. // padding: 5px 0;
  208. font-size: 14px;
  209. font-family: PingFang SC;
  210. font-weight: bold;
  211. line-height: 20px;
  212. color: #282828;
  213. image{
  214. display: inline-block;
  215. width: 13px;
  216. height: 23px;
  217. vertical-align: middle;
  218. }
  219. }
  220. .circle{
  221. width: 10px;
  222. height: 27px;
  223. margin: 10px 0 5px;
  224. }
  225. .remark {
  226. background: #F4F9FD;
  227. border: 1px solid #00BEA6;
  228. opacity: 1;
  229. border-radius: 11px;
  230. font-size: 12px;
  231. font-family: PingFang SC;
  232. font-weight: 400;
  233. line-height: 20px;
  234. color: #282828;
  235. opacity: 0.54;
  236. text{
  237. display: inline-block;
  238. margin: 16px 21px;
  239. overflow: hidden;
  240. display: -webkit-box; //将对象作为弹性伸缩盒子模型显示;
  241. text-overflow: ellipsis; //溢出部分用省略号代替
  242. -webkit-line-clamp: 3; //设置文本显示两行
  243. -webkit-box-orient: vertical; //从上到下排列子元素;
  244. white-space: normal;
  245. }
  246. // border-bottom: 1px solid rgba(112, 112, 112, .06);
  247. }
  248. }
  249. </style>