mine.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!-- 我的 -->
  2. <template>
  3. <view class="mine">
  4. <!-- 背景 -->
  5. <view class="mine-bg"></view>
  6. <!-- 个人信息 -->
  7. <view class="mine-info">
  8. <!-- 头像和积分 -->
  9. <view class="mine-info-header">
  10. <view class="mine-info-header-left">
  11. <view class="avatar" @click="jumpPage('/pages/personalModify/personalModify')">
  12. <u-avatar :src="memberinfo.avatar" mode="circle" size="130" />
  13. </view>
  14. <view class="name">{{ memberinfo.name }}</view>
  15. </view>
  16. <view class="mine-info-header-right" @click="jumpPage('/pages/progressiveIntegral/progressiveIntegral')">
  17. <view>进步<br />积分</view>
  18. <view>{{ integral || 0 }}</view>
  19. <u-icon name="arrow-right" color="#fff" size="30" />
  20. </view>
  21. </view>
  22. <!-- 认证 -->
  23. <view class="mine-info-authentication">
  24. <view class="mine-info-authentication-item">
  25. <view>退役军人</view>
  26. <view v-if="memberinfo.auditStatus === 0" class="no-certified">认证中</view>
  27. <view v-else-if="memberinfo.auditStatus === 2" class="had certified">已认证</view>
  28. <view class="no-certified" v-else @click="jumpPage('/pages/applyEducationCode/applyEducationCode')">未认证</view>
  29. </view>
  30. <view class="mine-info-authentication-item">
  31. <view>适应性培训</view>
  32. <view v-if="memberinfo.adaptTrainIsPass === 1" class="had passed">已通过</view>
  33. <view @click="jumpPage('/pages/basicTraining/basicTraining')" class="no-certified" v-else>未通过</view>
  34. </view>
  35. </view>
  36. <!-- 个人获得 -->
  37. <view class="mine-info-gain">
  38. <view class="mine-info-gain-item">
  39. <view>{{ countData.classCount || 0 }}<text>个</text></view>
  40. <view>技能培训</view>
  41. </view>
  42. <view class="mine-info-gain-item">
  43. <view>{{ countData.learnTime ? (Number(countData.learnTime) / 3600).toFixed(2) : 0 }}<text>小时</text></view>
  44. <view>学习时长</view>
  45. </view>
  46. <view class="mine-info-gain-item">
  47. <view>{{ countData.interviewTimes || 0 }}<text>次</text></view>
  48. <view>获得面试</view>
  49. </view>
  50. </view>
  51. <!-- 单元格 -->
  52. <view class="mine-info-cell1">
  53. <u-cell-group :border="false">
  54. <u-cell-item title="我的简历" @click="jumpPage('/pages/myResume/myResume')">
  55. <u-image class="cell-icon jianli" width="34" height="33" slot="icon" src="../../static/img/jianlitongguo.png" mode="aspectFit"></u-image>
  56. </u-cell-item>
  57. <u-cell-item title="我的投递" @click="jumpPage('/pages/myDelivery/myDelivery')">
  58. <u-image class="cell-icon toudi" slot="icon" width="34" height="40" src="../../static/img/toudimoren.png" mode="aspectFit"></u-image>
  59. </u-cell-item>
  60. <u-cell-item title="我的面试" @click="jumpPage('/pages/myInterview/myInterview')">
  61. <u-image
  62. class="cell-icon mianshi"
  63. width="34"
  64. height="40"
  65. slot="icon"
  66. src="../../static/img/mianshi-houxuanren.png"
  67. mode="aspectFit"
  68. ></u-image>
  69. </u-cell-item>
  70. </u-cell-group>
  71. </view>
  72. <!-- 单元格 -->
  73. <view class="mine-info-cell1">
  74. <u-cell-group :border="false">
  75. <u-cell-item title="我的技能培训" @click="jumpPage('/pages/mine/skillsTraining/skillsTraining')">
  76. <u-image class="cell-icon peixun" width="34" height="40" slot="icon" src="../../static/img/jinengx.png" mode="aspectFit"></u-image>
  77. </u-cell-item>
  78. <u-cell-item title="我的评价" @click="jumpPage('/pages/inbuild/inbuild')">
  79. <u-image class="cell-icon pingjia" width="34" height="40" slot="icon" src="../../static/img/pingjia.png" mode="aspectFit"></u-image>
  80. </u-cell-item>
  81. </u-cell-group>
  82. </view>
  83. <!-- 单元格 -->
  84. <view class="mine-info-cell1">
  85. <u-cell-group :border="false">
  86. <u-cell-item title="设置" @click="jumpPage('/pages/setting/setting')">
  87. <u-image class="cell-icon shezhi" width="34" height="40" slot="icon" src="../../static/img/shezhi.png" mode="aspectFit"></u-image>
  88. </u-cell-item>
  89. </u-cell-group>
  90. </view>
  91. </view>
  92. <!-- ########################## -- 底部导航栏 -- ################################ -->
  93. <u-tabbar
  94. :list="tabbarConfig.tabbarList"
  95. :height="tabbarConfig.height"
  96. :mid-button="tabbarConfig.midButton"
  97. :inactive-color="tabbarConfig.inactiveColor"
  98. :active-color="tabbarConfig.activeColor"
  99. :mid-button-size="tabbarConfig.midButtonSize"
  100. ></u-tabbar>
  101. <u-toast ref="uToast" />
  102. </view>
  103. </template>
  104. <script>
  105. import tabbarconfig from 'tabbarconfig.js';
  106. export default {
  107. name: 'Mine',
  108. data() {
  109. return {
  110. tabbarConfig: tabbarconfig,
  111. veteEducStatus: '',
  112. memberinfo: '',
  113. countData: '',
  114. integral: 0
  115. };
  116. },
  117. onShow() {
  118. this.getMemberinfo();
  119. this.getCountResul();
  120. this.getIntegralTotal();
  121. },
  122. methods: {
  123. /**
  124. * 获取个人总积分
  125. */
  126. getIntegralTotal() {
  127. this.$u.api.mine.getIntegralTotalApi().then((res) => {
  128. // console.log('用户统计信息:', res.data)
  129. if (res.code === 200) {
  130. this.integral = res.data;
  131. }
  132. });
  133. },
  134. /**
  135. * 获取用户统计信息
  136. */
  137. getCountResul() {
  138. this.$u.api.mine.getCountResulApi().then((res) => {
  139. // console.log('用户统计信息:', res.data)
  140. if (res.code === 200) {
  141. this.countData = res.data;
  142. }
  143. });
  144. },
  145. /**
  146. * 获取用户基本信息
  147. */
  148. getMemberinfo() {
  149. this.$u.api
  150. .getmemberinfo()
  151. .then((res) => {
  152. console.log('用户基本信息:', res.data);
  153. if (res.code === 200) {
  154. this.memberinfo = res.data;
  155. this.$u.vuex('vuex_memberInfo', res.data);
  156. } else {
  157. this.$refs.uToast.show({
  158. title: res.msg,
  159. type: 'error'
  160. });
  161. }
  162. })
  163. .catch((err) => {
  164. this.$refs.uToast.show({
  165. title: err.msg,
  166. type: 'error'
  167. });
  168. });
  169. },
  170. /**
  171. * 跳转到指定页面
  172. */
  173. jumpPage(url) {
  174. this.$u.route(url);
  175. }
  176. }
  177. };
  178. </script>
  179. <style lang="scss" scoped>
  180. @import './mine.scss';
  181. </style>