mine.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <view>
  3. <u-navbar back-text="我的"></u-navbar>
  4. <view class="main">
  5. <view class="data">
  6. <view class="photo">
  7. <img src="../../../assets/img/photowoman.png" alt="">
  8. </view>
  9. <view class="infos">
  10. <view class="name">
  11. 夏奕琳
  12. </view>
  13. <view class="project">
  14. 中国舞项目-芭蕾舞老师
  15. </view>
  16. </view>
  17. <view class="edit" @click="toEditProfile">
  18. <view class="icon">
  19. <img src="../../../assets/img/riFill-mark-pen-fill@1x.png" alt="">
  20. </view>
  21. <view class="text">
  22. 编辑资料
  23. </view>
  24. </view>
  25. </view>
  26. <view class="option">
  27. <view class="option-item" @click="gotoUrl('pages/teacher/lectureRecord/lectureRecord')">
  28. <view class="item-name">
  29. <view class="icon">
  30. <img src="../../../assets/img/riLine-calendar-check-line@1x.png" alt="">
  31. </view>
  32. <view class="text">
  33. 授课记录
  34. </view>
  35. </view>
  36. <view class="icon">
  37. <u-icon name="arrow-right" color="#b3b3b3"></u-icon>
  38. </view>
  39. </view>
  40. <view class="option-item">
  41. <view class="item-name">
  42. <view class="icon">
  43. <img src="../../../assets/img/riLine-question-line@1x.png" alt="">
  44. </view>
  45. <view class="text">
  46. 帮助中心
  47. </view>
  48. </view>
  49. <view class="icon">
  50. <u-icon name="arrow-right" color="#b3b3b3"></u-icon>
  51. </view>
  52. </view>
  53. <view class="option-item">
  54. <view class="item-name">
  55. <view class="icon">
  56. <img src="../../../assets/img/riLine-logout-box-r-line@1x.png" alt="">
  57. </view>
  58. <view class="text">
  59. 退出账号
  60. </view>
  61. </view>
  62. <view class="icon">
  63. <u-icon name="arrow-right" color="#b3b3b3"></u-icon>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <Tabbar :current="1" ref="tabbarMain" ></Tabbar>
  69. </view>
  70. </template>
  71. <script>
  72. import * as loginApi from '@/apis/login.js'
  73. import Tabbar from '@/components/Tabbar.vue'
  74. export default {
  75. components:{
  76. Tabbar,
  77. },
  78. data() {
  79. return {
  80. form: {
  81. headImg: '',
  82. nickName: ''
  83. },
  84. }
  85. },
  86. onShow() {
  87. this.getParentsInfo();
  88. },
  89. methods: {
  90. getParentsInfo() {
  91. uni.showLoading({
  92. title: "加载中",
  93. mask: true,
  94. })
  95. loginApi.findByOpenId({
  96. openId: this.carhelp.getOpenId()
  97. }).then((response) => {
  98. uni.hideLoading();
  99. this.form.headImg = response.data.regUser.headImg;
  100. this.form.nickName = response.data.regUser.nickName;
  101. }).catch(error => {
  102. uni.showToast({
  103. title: error,
  104. icon: "none"
  105. })
  106. })
  107. },
  108. toEditProfile() {
  109. uni.navigateTo({
  110. url: '/pages/teacher/editProfile/editProfile'
  111. })
  112. },
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. .main{
  118. padding: 68rpx 0 68rpx 32rpx;
  119. .data{
  120. display: flex;
  121. .photo{
  122. width: 60px;
  123. height: 60px;
  124. border-radius: 50px;
  125. box-shadow: 0px 2px 8px 0px rgba(35, 72, 75, 15);
  126. border: 2px solid rgba(255, 255, 255, 1);
  127. overflow: hidden;
  128. img{
  129. width: 100%;
  130. height: 100%;
  131. }
  132. }
  133. .infos{
  134. margin-left: 12px;
  135. display: flex;
  136. flex-direction: column;
  137. justify-content: space-around;
  138. .name{
  139. color: rgba(51, 51, 51, 1);
  140. font-size: 20px;
  141. font-weight: bold;
  142. }
  143. .project{
  144. color: rgba(119, 119, 119, 1);
  145. font-size: 12px;
  146. }
  147. }
  148. .edit{
  149. margin-left: auto;
  150. display: flex;
  151. align-items: center;
  152. width: 108px;
  153. height: 38px;
  154. line-height: 38px;
  155. border-radius: 50px 0px 0px 50px;
  156. background: linear-gradient(90deg, rgba(25,196,124,1) 0%,rgba(13,186,199,1) 51.8%,rgba(49,170,240,1) 100%);
  157. text-align: center;
  158. box-shadow: 2px 8px 12px 0px rgba(79, 226, 157, 15);
  159. .icon{
  160. margin-left: 32rpx;
  161. }
  162. img{
  163. vertical-align: middle;
  164. }
  165. .text{
  166. margin-left: 8rpx;
  167. color: #fff;
  168. }
  169. }
  170. }
  171. .option{
  172. margin-top: 48rpx;
  173. padding-right: 32rpx;
  174. .option-item{
  175. display: flex;
  176. justify-content: space-between;
  177. .item-name{
  178. display: flex;
  179. align-items: center;
  180. padding: 12px 0;
  181. img{
  182. vertical-align: middle;
  183. }
  184. .text{
  185. margin-left: 16rpx;
  186. color: rgba(16, 16, 16, 1);
  187. font-size: 16px;
  188. }
  189. }
  190. .icon{
  191. display: flex;
  192. align-items: center;
  193. }
  194. }
  195. }
  196. }
  197. </style>