_type.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <div class="creditIndex">
  3. <credit-common-title :data="topAreaData"/>
  4. <section class="contentArea">
  5. <div class="tabList">
  6. <div class="cell" v-for="item in typeList" :key="item.type" @click="jumpTo(item.topAreaData.url)">
  7. <p class="word" style="white-space: nowrap">{{item.topAreaData.tabTitle || item.topAreaData.title}}</p>
  8. <p class="line" v-if="item.type === type"></p>
  9. </div>
  10. </div>
  11. <div class="list">
  12. <div v-if="type !=='social'">
  13. <div class="cell" v-for="(item, index) in list" :key="'creditIndexList' + index">
  14. <div class="cellBody">
  15. <div class="left">
  16. <img :src="item.icon" alt="">
  17. </div>
  18. <div class="center">
  19. <p class="title">{{item.title}}</p>
  20. <p class="subTitle">{{item.subTitle}}</p>
  21. </div>
  22. <div
  23. class="right"
  24. :class="item.rightStatus || ''"
  25. @click="jumpTo(item.jumpUrl, item)">
  26. <p>{{item.rightName}}</p>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <_social v-else/>
  32. </div>
  33. </section>
  34. <ToastIndex :type="toastType" :closeToast="closeToast" :dataInfo="toastDataInfo" :submitRefresh="refresh"/>
  35. </div>
  36. </template>
  37. <script>
  38. import CreditCommonTitle from '@/components/credit/header.vue'
  39. import ToastIndex from '@/components/credit/toastIndex.vue'
  40. import data from '../../components/credit/data'
  41. import DealData from '../../components/credit/dealData'
  42. import _social from "../../components/credit/_social";
  43. /**
  44. * type: 'project' //项目经验
  45. * type: 'identify' //身份特征
  46. * type: 'professional' //专业经历
  47. * type: 'credit' //社会信用
  48. * type: 'other' //其他
  49. */
  50. export default {
  51. layout: "opacity_header",
  52. components: {CreditCommonTitle, ToastIndex, _social},
  53. head() {
  54. return {
  55. title: '程序员客栈技术信用-程序员技术开发能力认证,企业程序员背调专用数据平台',
  56. meta: [{
  57. 'name': 'keywords',
  58. 'content': '技术信用,程序员背调,程序员技术能力认证'
  59. }, {
  60. 'name': 'description',
  61. 'content': '程序员客栈技术信用平台依托多年的程序员数据,提供程序员技能等级认证,服务口碑,就业情况数据核实。为每一位入驻的程序员提供真实有效符合自身能力的技术信用认证,给用工单位提供所录用的程序员以往从业经历或者服务历史口碑的准确报告;对接程序员和用工企业,找出最适合程序员发展的平台,为用工单位提供最合适的程序员人选。程序员技术信用认证、程序员背景调查,请认准程序员客栈技术信用平台!'
  62. }, {
  63. 'name': 'h1',
  64. 'content': '技术信用'
  65. }]
  66. }
  67. },
  68. async asyncData({$axios, params, req, store}) {
  69. let userinfo = store.state.userinfo;
  70. const dealData = new DealData({$axios, req, userinfo});
  71. const type = params.type || 'identify';
  72. let {topAreaData, list} = data[type];
  73. //处理数据,假若有 跳转链接, 设置按钮样式
  74. list.forEach(item => {
  75. if (item.jumpUrl) {
  76. item.rightStatus = 'ok click'
  77. }
  78. });
  79. switch (params.type) {
  80. case 'professional': //专业经历
  81. list = await dealData.professional(list);
  82. break;
  83. case 'identify': //身份特征
  84. list = await dealData.identify(list);
  85. break;
  86. case 'project': //项目经验
  87. list = await dealData.project(list);
  88. break;
  89. case 'credit': //社会信用
  90. list = await dealData.credit(list);
  91. break;
  92. case 'social': //社区影响力
  93. list = await dealData.social(list);
  94. break;
  95. }
  96. //data转化为数组
  97. let typeList = [];
  98. for (let key in data) {
  99. if (data[key] && data[key].list) {
  100. typeList.push({
  101. type: key,
  102. ...data[key]
  103. })
  104. }
  105. }
  106. return {
  107. typeList,
  108. type,
  109. list,
  110. topAreaData,
  111. }
  112. },
  113. data() {
  114. return {
  115. toastType: '',
  116. toastDataInfo: {},
  117. }
  118. },
  119. mounted() {
  120. this.needLogin();
  121. },
  122. methods: {
  123. jumpTo(url, item) {
  124. console.log('点击', "url", url, "item", item);
  125. if(item.title=="技术认证")
  126. {
  127. location.href = "/frontend/skill_cert/profile";
  128. return;
  129. }
  130. if (url) {
  131. switch (url) {
  132. case 'openRealNameAuth': //打开实名认证弹窗
  133. console.log('openRealNameAuth 打开实名认证弹窗');
  134. this.toastType = 'openRealNameAuth';
  135. this.toastDataInfo = item || {};
  136. break;
  137. case 'openEducation': //打开最高学历认证
  138. console.log('openEducation 打开最高学历认证');
  139. this.toastType = 'openEducation';
  140. this.toastDataInfo = item || {};
  141. break;
  142. case 'openWorkHistory': //工作经历弹窗
  143. console.log('openWorkHistory 工作经历弹窗');
  144. this.toastType = 'openWorkHistory';
  145. this.toastDataInfo = item || {};
  146. break;
  147. case'/wo/':
  148. url += this.$store.state.userinfo.uid;
  149. url += "?t=w";
  150. location.href = url;
  151. break;
  152. default:
  153. location.href = url
  154. }
  155. }
  156. },
  157. closeToast() {
  158. this.toastType = ''
  159. },
  160. async refresh(type) {
  161. const dealData = new DealData({
  162. $axios: this.$axios,
  163. res: {header: {}},
  164. userinfo: this.$store.state.userinfo
  165. });
  166. switch (type) {
  167. case 'openWorkHistory':
  168. this.list = await dealData.professional(this.list);
  169. break;
  170. case 'openEducation':
  171. this.list = await dealData.identify(this.list);
  172. break;
  173. }
  174. }
  175. }
  176. }
  177. </script>
  178. <style scope lang="scss">
  179. @import "../../assets/css/credit/type.scss";
  180. </style>