Ver código fonte

签约成功提示

xinfeng 5 anos atrás
pai
commit
61063bae7a
3 arquivos alterados com 87 adições e 17 exclusões
  1. 64 0
      components/common/showToast.vue
  2. 1 15
      components/sign/experience.vue
  3. 22 2
      pages/sign/new.vue

+ 64 - 0
components/common/showToast.vue

@@ -0,0 +1,64 @@
+<template>
+ <div class="showToast">
+   <el-dialog
+     :title="title"
+     :visible.sync="isShowToast"
+     width="520px"
+     :center="true"
+     @close="close"
+   >
+     <div class="content">
+       {{desc}}
+     </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="close">{{cancleBtnDesc||"取 消"}}</el-button>
+        <el-button type="primary" @click="submit">{{submitBtnDesc || "确 定"}}</el-button>
+      </span>
+   </el-dialog>
+ </div>
+</template>
+
+<script>
+  export default {
+    props: [ "title", "desc", "cancleBtnDesc", "submitBtnDesc", "isShowToast" ],
+    components: {},
+    data() {
+      return {
+        name: "",
+        phone: "",
+        mobile: this.$deviceType.isMobile()
+      };
+    },
+    computed: {},
+    mounted() {
+
+    },
+    methods: {
+      close() {
+        this.$emit('close')
+      },
+      submit() {
+        this.$emit('submit')
+      }
+    }
+  };
+</script>
+
+<style lang="scss">
+  @import "~@/assets/css/scssCommon.scss";
+
+  .showToast {
+    .title {
+      font-size: 19px;
+      font-weight: 500;
+      color: rgba(34, 34, 34, 1);
+      line-height: 26px;
+      text-align: center;
+    }
+    .content {
+      line-height: 21px;
+      font-size: 15px;
+      text-align: center;
+    }
+  }
+</style>

+ 1 - 15
components/sign/experience.vue

@@ -19,16 +19,6 @@
                 </el-radio>
               </template>
             </el-radio-group>
-            <!-- <el-form-item label="优先展示" prop="name">
-              <el-select v-model="rankForm.first" placeholder="选择优先展示">
-                <el-option
-                  v-for="(item, idx) in experience"
-                  :label="item.company"
-                  :value="idx"
-                  :key="item.company"
-                ></el-option>
-              </el-select>
-            </el-form-item>-->
           </el-form>
           <div class="first-tips">
             <h6>温馨提示</h6>
@@ -47,7 +37,7 @@
     </header>
     <div v-if="experience.length > 0">
       <template v-for="(item, idx) in experience">
-        <div v-if="editingItem.indexOf(idx) < 0" :key="item.company" class="show">
+        <div v-if="editingItem.indexOf(idx) < 0" :key="item.id" class="show">
           <h4>
             <span>{{`${item.start_time} - ${item.end_time || '至今'} ${item.company} ${item.title}`}}</span>
             <span v-if="item.is_main == '1'" class="first">优先展示</span>
@@ -163,10 +153,6 @@ export default {
         }
         return it;
       });
-      if (!this.experience[idx].work_certify_img) {
-        this.$message.error("请先上传此项工作经历的工作证明");
-        return false;
-      }
       this.experience[idx].is_main = 1;
       this.originExperience[idx].is_main = 1;
       this.onSubmit(idx);

+ 22 - 2
pages/sign/new.vue

@@ -14,6 +14,16 @@
       @click="signNow"
       class="sign-btn"
     >申请签约开发者</el-button>
+
+    <showToast
+      :isShowToast="isShowToast"
+      title="完善技术信用"
+      desc="你已成功提交签约申请,客栈将在2-3个工作日内完成签约审核,完善个人技术信用,可以提高签约成功率和接单率。"
+      submitBtnDesc="立即了解"
+      cancleBtnDesc="好的,知道了"
+      @close="onToastClose"
+      @submit="jumpToCredit"
+    />
   </div>
 </template>
 
@@ -28,6 +38,7 @@ 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";
 
 export default {
@@ -47,12 +58,14 @@ export default {
     education,
     skills,
     works,
-    social
+    social,
+    showToast
   },
   // mixins: [getDeviceType],
   data() {
     return {
       sign: null,
+      isShowToast: false,
       userInfo: {}
     };
   },
@@ -67,12 +80,19 @@ export default {
       let res = await this.$axios.$post(`/api/user/sign`);
       if (res.status === 1) {
         this.$message.success(res.info);
-        window.location.reload();
+        this.isShowToast = true
       } else if (res.status === -11) {
         // this.$message.error("请设置主要展示工作经历");
       } else if (res.status === -10) {
         // this.$message.error("其他错误");
       }
+    },
+    jumpToCredit() {
+      location.href = "/credit/pages"
+    },
+    onToastClose() {
+      this.isShowToast=false
+      window.location.reload();
     }
   }
 };