|
|
@@ -1,266 +1,226 @@
|
|
|
<template>
|
|
|
- <div class="sign-new">
|
|
|
- <h6 class="sign-new-title">签约成为远程工作者</h6>
|
|
|
- <div class="sign-new-main">
|
|
|
- <!-- 进度条 -->
|
|
|
- <div class="sign-progress">
|
|
|
- <!-- percentage 进度值,百分比 -->
|
|
|
- <el-progress
|
|
|
- :text-inside="true"
|
|
|
- :stroke-width="30"
|
|
|
- :percentage="stepState[curStep].progress"
|
|
|
- color="#45C47A"
|
|
|
- ></el-progress>
|
|
|
- </div>
|
|
|
+ <div class="sign">
|
|
|
+ <intro></intro>
|
|
|
+ <verify></verify>
|
|
|
+ <info></info>
|
|
|
+ <profile></profile>
|
|
|
+ <experience></experience>
|
|
|
+ <education></education>
|
|
|
+ <skills></skills>
|
|
|
+ <works></works>
|
|
|
+ <social></social>
|
|
|
+ <el-button
|
|
|
+ v-if="this.userInfo.realnamshowToaste_re == '3' || this.userInfo.realname_re=='0' || this.userInfo.realname_re=='3'"
|
|
|
+ @click="signNow"
|
|
|
+ class="sign-btn"
|
|
|
+ >申请签约开发者
|
|
|
+ </el-button>
|
|
|
|
|
|
- <div class="sign-new-container">
|
|
|
- <!-- 认证签约 -->
|
|
|
- <stepCert v-if="curStep === 1" @next="nextStep"></stepCert>
|
|
|
-
|
|
|
- <!-- 填写基础信息 -->
|
|
|
- <stepInfo v-if="curStep === 2" @next="nextStep"></stepInfo>
|
|
|
-
|
|
|
- <!-- 项目 -->
|
|
|
- <stepProject v-if="curStep === 3" @next="nextStep"></stepProject>
|
|
|
-
|
|
|
- <!-- 经历 -->
|
|
|
- <stepExperienceVue
|
|
|
- v-if="curStep === 4"
|
|
|
- @next="nextStep"
|
|
|
- ></stepExperienceVue>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <showToast
|
|
|
+ :isShowToast="isShowToast"
|
|
|
+ title="完善技术信用"
|
|
|
+ desc="你已成功提交签约申请,客栈将在2-3个工作日内完成签约审核,完善个人技术信用,可以提高签约成功率和接单率。"
|
|
|
+ submitBtnDesc="立即了解"
|
|
|
+ cancleBtnDesc="好的,知道了"
|
|
|
+ @close="onToastClose"
|
|
|
+ @submit="jumpToCredit"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState } from "vuex";
|
|
|
+ import {mapState} from "vuex";
|
|
|
+ import intro from "@/components/sign/intro";
|
|
|
+ import verify from "@/components/sign/verify";
|
|
|
+ import info from "@/components/sign/info";
|
|
|
+ import profile from "@/components/sign/profile";
|
|
|
+ import experience from "@/components/sign/experience";
|
|
|
+ import education from "@/components/sign/education";
|
|
|
+ import skills from "@/components/sign/skills";
|
|
|
+ import works from "@/components/sign/works";
|
|
|
+ import social from "@/components/sign/social";
|
|
|
+ import showToast from "@/components/common/showToast";
|
|
|
+ import qs from "qs";
|
|
|
|
|
|
-import showToast from "@/components/common/showToast";
|
|
|
-import stepCert from "@/components/sign/step-cert";
|
|
|
-import stepInfo from "@/components/sign/step-info";
|
|
|
-import stepExperienceVue from "@/components/sign/step-experience";
|
|
|
-import stepProject from "@/components/sign/step-project";
|
|
|
-
|
|
|
-export default {
|
|
|
- head: {
|
|
|
- title: "申请签约 - 程序员客栈"
|
|
|
- },
|
|
|
- components: {
|
|
|
- showToast,
|
|
|
- stepCert,
|
|
|
- stepInfo,
|
|
|
- stepExperienceVue,
|
|
|
- stepProject
|
|
|
- },
|
|
|
- // mixins: [getDeviceType],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- sign: null,
|
|
|
- isShowToast: false,
|
|
|
- userInfo: {},
|
|
|
- target: 0,
|
|
|
- curStep: 1,
|
|
|
- stepState: {
|
|
|
- "1": {
|
|
|
- progress: 40
|
|
|
- },
|
|
|
- "2": {
|
|
|
- progress: 70
|
|
|
- },
|
|
|
- "3": {
|
|
|
- progress: 90
|
|
|
- },
|
|
|
- "4": {
|
|
|
- progress: 100
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {},
|
|
|
- async mounted() {
|
|
|
- this.setFrom();
|
|
|
- this.needLogin();
|
|
|
- // realname_re, 1是待审核,2已签约,3是拒绝
|
|
|
- this.userInfo = await this.getUserInfo();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- nextStep() {
|
|
|
- // 最后一步
|
|
|
- if (this.curStep === 4) {
|
|
|
- // TODO:跳转
|
|
|
- return;
|
|
|
- }
|
|
|
- this.$router.push({
|
|
|
- path: "/sign/new",
|
|
|
- query: {
|
|
|
- step: this.curStep + 1
|
|
|
- }
|
|
|
- });
|
|
|
+ export default {
|
|
|
+ // async asyncData({ $axios, params }) {
|
|
|
+ // let res = await $axios.$get(`/api/vip/getList`)
|
|
|
+ // console.log('init', res)
|
|
|
+ // },
|
|
|
+ head: {
|
|
|
+ title: "申请签约 - 程序员客栈"
|
|
|
},
|
|
|
- async signNow() {
|
|
|
- this.cnzz("签约", "签约页面+申请签约点击", "");
|
|
|
- let res = await this.$axios.$post(`/api/user/sign`);
|
|
|
- if (res.status === 1) {
|
|
|
- this.$message.success(res.info);
|
|
|
- this.isShowToast = true;
|
|
|
- } else if (res.status === -11) {
|
|
|
- // this.$message.error("请设置主要展示工作经历");
|
|
|
- } else if (res.status === -10) {
|
|
|
- // this.$message.error("其他错误");
|
|
|
- }
|
|
|
+ components: {
|
|
|
+ intro,
|
|
|
+ verify,
|
|
|
+ info,
|
|
|
+ profile,
|
|
|
+ experience,
|
|
|
+ education,
|
|
|
+ skills,
|
|
|
+ works,
|
|
|
+ social,
|
|
|
+ showToast
|
|
|
},
|
|
|
- setFrom() {
|
|
|
- let doc = "";
|
|
|
- let from = this.$route.query.from || this.$route.params.from;
|
|
|
- console.log("run setFrom: ", from);
|
|
|
- switch (from) {
|
|
|
- case "wo_intro":
|
|
|
- doc = document.getElementById("profile");
|
|
|
- break;
|
|
|
- case "wo_workexp":
|
|
|
- doc = document.getElementById("workexp");
|
|
|
- break;
|
|
|
- case "wo_edu":
|
|
|
- doc = document.getElementById("education");
|
|
|
- break;
|
|
|
- case "wo_skill":
|
|
|
- doc = document.getElementById("skill");
|
|
|
- break;
|
|
|
- case "works":
|
|
|
- doc = document.getElementById("works");
|
|
|
- break;
|
|
|
- }
|
|
|
- console.log("执行!!!!");
|
|
|
- if (doc) {
|
|
|
- setTimeout(() => {
|
|
|
- doc.scrollIntoView();
|
|
|
- }, 600);
|
|
|
- }
|
|
|
+ // mixins: [getDeviceType],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ sign: null,
|
|
|
+ isShowToast: false,
|
|
|
+ userInfo: {},
|
|
|
+ target: 0
|
|
|
+ };
|
|
|
},
|
|
|
- jumpToCredit() {
|
|
|
- this.cnzz("签约", "签约页面+申请签约", "确认");
|
|
|
- location.href = "/credit/pages";
|
|
|
+ computed: {},
|
|
|
+ async mounted() {
|
|
|
+ console.log('sign new mounted')
|
|
|
+ this.setFrom()
|
|
|
+
|
|
|
+ this.needLogin();
|
|
|
+ // realname_re, 1是待审核,2已签约,3是拒绝
|
|
|
+ this.userInfo = await this.getUserInfo();
|
|
|
},
|
|
|
- onToastClose() {
|
|
|
- this.isShowToast = false;
|
|
|
- window.location.reload();
|
|
|
- }
|
|
|
- },
|
|
|
- watchQuery: true,
|
|
|
- watchQuery: ["step"],
|
|
|
- asyncData({ params, query }) {
|
|
|
- let curStep = Number(query.step);
|
|
|
- if (isNaN(curStep)) {
|
|
|
- curStep = 1;
|
|
|
+ methods: {
|
|
|
+ async signNow() {
|
|
|
+ this.cnzz("签约","签约页面+申请签约点击","");
|
|
|
+ let res = await this.$axios.$post(`/api/user/sign`);
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.$message.success(res.info);
|
|
|
+ this.isShowToast = true
|
|
|
+ } else if (res.status === -11) {
|
|
|
+ // this.$message.error("请设置主要展示工作经历");
|
|
|
+ } else if (res.status === -10) {
|
|
|
+ // this.$message.error("其他错误");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setFrom() {
|
|
|
+ let doc = "";
|
|
|
+ let from = this.$route.query.from || this.$route.params.from;
|
|
|
+ console.log("run setFrom: ", from);
|
|
|
+ switch (from) {
|
|
|
+ case "wo_intro":
|
|
|
+ doc = document.getElementById("profile");
|
|
|
+ break;
|
|
|
+ case "wo_workexp":
|
|
|
+ doc = document.getElementById("workexp");
|
|
|
+ break;
|
|
|
+ case "wo_edu":
|
|
|
+ doc = document.getElementById("education");
|
|
|
+ break;
|
|
|
+ case "wo_skill":
|
|
|
+ doc = document.getElementById("skill");
|
|
|
+ break;
|
|
|
+ case "works":
|
|
|
+ doc = document.getElementById("works");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ console.log("执行!!!!");
|
|
|
+ if (doc) {
|
|
|
+ setTimeout(() => {
|
|
|
+ doc.scrollIntoView();
|
|
|
+ }, 600);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ jumpToCredit() {
|
|
|
+ this.cnzz("签约","签约页面+申请签约","确认");
|
|
|
+ location.href = "/credit/pages"
|
|
|
+ },
|
|
|
+ onToastClose() {
|
|
|
+ this.isShowToast = false
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
}
|
|
|
- return {
|
|
|
- curStep
|
|
|
- };
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-.sign-new {
|
|
|
- width: 1100px;
|
|
|
- margin: 0 auto;
|
|
|
- background: #ffffff;
|
|
|
- border-radius: 8px;
|
|
|
-}
|
|
|
-.sign-new-title {
|
|
|
- font-size: 28px;
|
|
|
- font-family: PingFangSC-Medium, PingFang SC;
|
|
|
- font-weight: 500;
|
|
|
- color: #0b121a;
|
|
|
- line-height: 40px;
|
|
|
- text-align: center;
|
|
|
- margin-top: 55px;
|
|
|
-}
|
|
|
-.sign-new-main {
|
|
|
- margin: 0 140px;
|
|
|
-}
|
|
|
-.sign-progress {
|
|
|
- margin-top: 40px;
|
|
|
- .el-progress-bar__outer {
|
|
|
- background: url("~@/assets/img/sign/progress_bg.png") repeat-x 50% 50%;
|
|
|
- }
|
|
|
-}
|
|
|
-.sign-new-tips {
|
|
|
- margin-top: 24px;
|
|
|
- text-align: center;
|
|
|
- font-size: 14px;
|
|
|
- font-family: PingFangSC-Regular, PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #0b121a;
|
|
|
- line-height: 20px;
|
|
|
- b {
|
|
|
- color: #ff0300;
|
|
|
- font-weight: 400;
|
|
|
- }
|
|
|
-}
|
|
|
+ .sign {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ width: 1000px;
|
|
|
+ background: #f7f7f7;
|
|
|
|
|
|
-.sign-new-next {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- margin-bottom: 12px;
|
|
|
- .sign-new-next-btn {
|
|
|
- width: 140px;
|
|
|
- height: 48px;
|
|
|
- background: #409eff;
|
|
|
- border-radius: 24px;
|
|
|
- font-size: 18px;
|
|
|
- font-family: PingFangSC-Medium, PingFang SC;
|
|
|
- font-weight: 500;
|
|
|
- color: #ffffff;
|
|
|
- text-align: center;
|
|
|
- line-height: 48px;
|
|
|
- cursor: pointer;
|
|
|
- &.disable {
|
|
|
- background: #96c6ff;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ > div {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ width: 100%;
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ &:last-of-type {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ > header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 13px 20px;
|
|
|
+ border-bottom: 1px solid #ebeef5;
|
|
|
+ }
|
|
|
+
|
|
|
+ h5 {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: PingFangSC-Medium;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(29, 42, 58, 1);
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .status {
|
|
|
+ position: relative;
|
|
|
+ display: inline-block;
|
|
|
+ float: right;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: PingFangSC-Medium;
|
|
|
+ font-weight: 500;
|
|
|
+ line-height: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .success {
|
|
|
+ color: rgba(16, 185, 106, 1);
|
|
|
|
|
|
-.sign-new-header {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- border-bottom: 1px solid #f0f0f0;
|
|
|
- .sign-new-header-title {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- font-size: 15px;
|
|
|
- font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
- font-weight: 600;
|
|
|
- color: #000000;
|
|
|
- padding-left: 13px;
|
|
|
- position: relative;
|
|
|
- line-height: 1;
|
|
|
- height: 16px;
|
|
|
+ &::before {
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ display: inline-block;
|
|
|
+ left: -10px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate3d(-100%, -50%, 0);
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ background: url("~@/assets/img/sign/success.png");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .info {
|
|
|
+ color: gray;
|
|
|
+ }
|
|
|
+
|
|
|
+ .warning {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
|
|
|
- &::before {
|
|
|
- content: "";
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 50%;
|
|
|
- transform: translateY(-50%);
|
|
|
- width: 2px;
|
|
|
- height: 14px;
|
|
|
- background: #308eff;
|
|
|
- border-radius: 1px;
|
|
|
+ button {
|
|
|
+ height: 34px;
|
|
|
+ line-height: 10px;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
-.sign-new-form-footer {
|
|
|
- display: flex;
|
|
|
-}
|
|
|
-.sign-new-form-tips {
|
|
|
- flex: 1;
|
|
|
-}
|
|
|
-.sign-new-btn-area {
|
|
|
- margin-top: 24px;
|
|
|
- display: flex;
|
|
|
-}
|
|
|
+ .sign-btn {
|
|
|
+ margin-top: 30px;
|
|
|
+ width: 210px;
|
|
|
+ height: 46px;
|
|
|
+ background: rgba(48, 142, 255, 1);
|
|
|
+ border-radius: 2px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: PingFangSC-Medium;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ line-height: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|