new.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div class="sign">
  3. <intro></intro>
  4. <verify></verify>
  5. <info></info>
  6. <profile></profile>
  7. <experience></experience>
  8. <education></education>
  9. <skills></skills>
  10. <works></works>
  11. <social></social>
  12. <el-button v-if="this.userInfo.realname_re == '3'" @click="signNow" class="sign-btn">申请签约开发者</el-button>
  13. </div>
  14. </template>
  15. <script>
  16. import { mapState } from "vuex";
  17. import intro from "@/components/sign/intro";
  18. import verify from "@/components/sign/verify";
  19. import info from "@/components/sign/info";
  20. import profile from "@/components/sign/profile";
  21. import experience from "@/components/sign/experience";
  22. import education from "@/components/sign/education";
  23. import skills from "@/components/sign/skills";
  24. import works from "@/components/sign/works";
  25. import social from "@/components/sign/social";
  26. import qs from "qs";
  27. export default {
  28. // async asyncData({ $axios, params }) {
  29. // let res = await $axios.$get(`/api/vip/getList`)
  30. // console.log('init', res)
  31. // },
  32. head: {
  33. title: "申请签约 - 程序员客栈"
  34. },
  35. components: {
  36. intro,
  37. verify,
  38. info,
  39. profile,
  40. experience,
  41. education,
  42. skills,
  43. works,
  44. social
  45. },
  46. // mixins: [getDeviceType],
  47. data() {
  48. return {
  49. sign: null,
  50. userInfo: {}
  51. };
  52. },
  53. computed: {},
  54. async mounted() {
  55. this.needLogin();
  56. // realname_re, 1是待审核,2已签约,3是拒绝
  57. this.userInfo = await this.getUserInfo();
  58. },
  59. methods: {
  60. async signNow() {
  61. let res = await this.$axios.$post(`/apioutsource/developerSign`);
  62. if (res.status === 1) {
  63. this.$message.success(res.info);
  64. window.location.href = "/sign/success";
  65. }
  66. }
  67. }
  68. };
  69. </script>
  70. <style lang="scss">
  71. .sign {
  72. display: flex;
  73. flex-direction: column;
  74. align-items: center;
  75. width: 1000px;
  76. background: #f7f7f7;
  77. > div {
  78. margin-bottom: 10px;
  79. width: 100%;
  80. background: #fff;
  81. &:last-of-type {
  82. margin-bottom: 0;
  83. }
  84. > header {
  85. display: flex;
  86. justify-content: space-between;
  87. align-items: center;
  88. padding: 13px 20px;
  89. border-bottom: 1px solid #ebeef5;
  90. }
  91. h5 {
  92. display: flex;
  93. justify-content: space-between;
  94. align-items: center;
  95. font-size: 16px;
  96. font-family: PingFangSC-Medium;
  97. font-weight: 500;
  98. color: rgba(29, 42, 58, 1);
  99. line-height: 22px;
  100. }
  101. .status {
  102. position: relative;
  103. display: inline-block;
  104. float: right;
  105. font-size: 14px;
  106. font-family: PingFangSC-Medium;
  107. font-weight: 500;
  108. line-height: 20px;
  109. }
  110. .success {
  111. color: rgba(16, 185, 106, 1);
  112. &::before {
  113. content: "";
  114. position: absolute;
  115. display: inline-block;
  116. left: -10px;
  117. top: 50%;
  118. transform: translate3d(-100%, -50%, 0);
  119. width: 20px;
  120. height: 20px;
  121. background: url("~@/assets/img/sign/success.png");
  122. }
  123. }
  124. .info {
  125. color: gray;
  126. }
  127. .warning {
  128. color: red;
  129. }
  130. button {
  131. height: 34px;
  132. line-height: 10px;
  133. border-radius: 2px;
  134. }
  135. }
  136. .sign-btn {
  137. margin-top: 30px;
  138. width: 210px;
  139. height: 46px;
  140. background: rgba(48, 142, 255, 1);
  141. border-radius: 2px;
  142. font-size: 14px;
  143. font-family: PingFangSC-Medium;
  144. font-weight: 500;
  145. color: rgba(255, 255, 255, 1);
  146. line-height: 20px;
  147. }
  148. }
  149. </style>