Kaynağa Gözat

dev-新需求
1、到添加项目作品页面完成

bruce 5 yıl önce
ebeveyn
işleme
b1e4cb6cc5

+ 201 - 55
assets/css/common.css

@@ -18,45 +18,54 @@ article, aside, canvas, details, embed,
 figure, figcaption, footer, header, hgroup,
 figure, figcaption, footer, header, hgroup,
 menu, nav, output, ruby, section, summary,
 menu, nav, output, ruby, section, summary,
 time, mark, audio, video {
 time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline;
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  font: inherit;
+  vertical-align: baseline;
 }
 }
+
 /* HTML5 display-role reset for older browsers */
 /* HTML5 display-role reset for older browsers */
 article, aside, details, figcaption, figure,
 article, aside, details, figcaption, figure,
 footer, header, hgroup, menu, nav, section {
 footer, header, hgroup, menu, nav, section {
- display: block;
+  display: block;
 }
 }
+
 a {
 a {
   color: var(--linkColor);
   color: var(--linkColor);
   text-decoration: none;
   text-decoration: none;
 }
 }
+
 body {
 body {
- line-height: 1;
- background: #F4F5F9;
+  line-height: 1;
+  background: #F4F5F9;
 }
 }
+
 ol, ul {
 ol, ul {
- list-style: none;
+  list-style: none;
 }
 }
+
 blockquote, q {
 blockquote, q {
- quotes: none;
+  quotes: none;
 }
 }
+
 blockquote:before, blockquote:after,
 blockquote:before, blockquote:after,
 q:before, q:after {
 q:before, q:after {
- content: '';
- content: none;
+  content: '';
+  content: none;
 }
 }
+
 table {
 table {
- border-collapse: collapse;
- border-spacing: 0;
+  border-collapse: collapse;
+  border-spacing: 0;
 }
 }
+
 input {
 input {
   outline: none;
   outline: none;
   border: 0;
   border: 0;
 }
 }
+
 button {
 button {
   border: 0;
   border: 0;
   padding: 0;
   padding: 0;
@@ -65,6 +74,7 @@ button {
   outline: none;
   outline: none;
   cursor: pointer;
   cursor: pointer;
 }
 }
+
 sub {
 sub {
   font-size: .6em;
   font-size: .6em;
 }
 }
@@ -74,58 +84,194 @@ img {
 }
 }
 
 
 
 
-.flex{
-	display: flex;
+.flex {
+  display: flex;
+}
+
+.flex-column {
+  display: flex;
+  flex-direction: column;
+}
+
+.space-between {
+  display: flex;
+  justify-content: space-between;
+}
+
+.space-around {
+  display: flex;
+  justify-content: space-around;
+}
+
+.align-center {
+  display: flex;
+  align-items: center;
+}
+
+.align-center-c {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.justify-center {
+  display: flex;
+  justify-content: center;
+}
+
+.justify-center-c {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.justify-between {
+  display: flex;
+  justify-content: space-between;
+}
+
+.margin-0-auto {
+  margin: 0 auto;
+}
+
+.inline-block {
+  display: inline-block;
+}
+
+.gray-153 {
+  color: rgb(153, 153, 153);
+}
+
+.gray-34 {
+  color: rgb(34, 34, 34);
+}
+
+.gray-51 {
+  color: rgb(51, 51, 51);
+}
+
+.text-center {
+  text-align: center;
+}
+
+.app__jus__c {
+  justify-content: center;
+}
+
+.app__alig_c {
+  align-items: center;
+}
+
+.app__dp_f {
+  display: flex;
+}
+
+.app__f_r {
+  flex-flow: row nowrap;
+}
+
+.app__f_c {
+  flex-flow: column nowrap;
+}
+
+.app__f_s_0 {
+  flex-shrink: 0;
+}
+
+.app__f_s_1 {
+  flex-shrink: 1;
+}
+
+.app__f_g_1 {
+  flex-grow: 1;
+}
+
+.app__f_g_0 {
+  flex-grow: 0;
+}
+
+.app__ml_10 {
+  margin-left: 10px;
+}
+
+.app__mr_10 {
+  margin-right: 10px;
+}
+
+.app__mt_10 {
+  margin-top: 10px;
+}
+
+.app__mt_20 {
+  margin-top: 20px;
+}
+
+.app__mb_10 {
+  margin-bottom: 10px;
 }
 }
-.flex-column{
-	display: flex;
-	flex-direction: column;
+
+.app__fc_r {
+  color: red;
 }
 }
-.space-between{
-	display: flex;
-	justify-content: space-between;
+
+.app__fc_grey {
+  color: rgba(153, 153, 153, 1)
 }
 }
-.space-around{
-	display: flex;
-	justify-content: space-around;
+
+.app__fc_b{
+  color: #629eff
 }
 }
-.align-center{
-	display: flex;
-	align-items: center;
+
+.app__fz_10 {
+  font-size: 10px;
 }
 }
-.align-center-c{
-	display: flex;
-	flex-direction: column;
-	align-items: center;
+
+.app__fz_11 {
+  font-size: 11px;
 }
 }
-.justify-center{
-	display: flex;
-	justify-content: center;
+
+.app__fz_12 {
+  font-size: 12px;
 }
 }
-.justify-center-c{
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
+
+.app__fz_13 {
+  font-size: 13px;
 }
 }
-.justify-between{
-	display: flex;
-	justify-content: space-between;
+
+.app__fz_14 {
+  font-size: 14px;
 }
 }
-.margin-0-auto{
-	margin:0 auto;
+
+.app__fz_15 {
+  font-size: 15px;
 }
 }
-.inline-block{
-	display: inline-block;
+
+.app__fz_16 {
+  font-size: 16px;
 }
 }
-.gray-153{
-	color:rgb(153,153,153);
+
+.app__fz_17 {
+  font-size: 17px;
+}
+
+.app__fz_18 {
+  font-size: 18px;
 }
 }
-.gray-34{
-	color:rgb(34,34,34);
+
+.app__fz_19 {
+  font-size: 19px;
 }
 }
-.gray-51{
-	color:rgb(51,51,51);
+
+.app__fz_20 {
+  font-size: 20px;
 }
 }
-.text-center{
+
+
+.app__tg_c {
   text-align: center;
   text-align: center;
-}
+}
+
+.app__bd_g{
+  border:1px solid #ddd
+}
+

BIN
assets/img/credit/credit_p_w.png


+ 10 - 3
components/credit/data.js

@@ -58,10 +58,17 @@ export default {
       bgImg: require('@/assets/img/credit/projectBg.png'),
       bgImg: require('@/assets/img/credit/projectBg.png'),
       mapImg: require('@/assets/img/credit/projectMap.png'),
       mapImg: require('@/assets/img/credit/projectMap.png'),
       topRightJumpList: {c1: '/credit/identify', c2: '/credit/professional', c3: '/credit/project', c4: '/credit/credit'}
       topRightJumpList: {c1: '/credit/identify', c2: '/credit/professional', c3: '/credit/project', c4: '/credit/credit'}
-  
+
     },
     },
     list: [
     list: [
       {
       {
+        icon: require('@/assets/img/credit/credit_p_w.png'),
+        title: '个人作品',
+        subTitle: '完善更多个人作品,提高技术信用',
+        jumpUrl: '../works/create',
+        rightName: '查看详情'
+      },
+      {
         icon: require('@/assets/img/credit/projectIcon1.png'),
         icon: require('@/assets/img/credit/projectIcon1.png'),
         title: '整包项目',
         title: '整包项目',
         subTitle: '完成更多整包项目,提高个人远程工作项目经验',
         subTitle: '完成更多整包项目,提高个人远程工作项目经验',
@@ -91,7 +98,7 @@ export default {
       bgImg: require('@/assets/img/credit/professionalBg.png'),
       bgImg: require('@/assets/img/credit/professionalBg.png'),
       mapImg: require('@/assets/img/credit/professionalMap.png'),
       mapImg: require('@/assets/img/credit/professionalMap.png'),
       topRightJumpList: {c1: '/credit/identify', c2: '/credit/professional', c3: '/credit/project', c4: '/credit/credit'}
       topRightJumpList: {c1: '/credit/identify', c2: '/credit/professional', c3: '/credit/project', c4: '/credit/credit'}
-  
+
     },
     },
     list: [
     list: [
       {
       {
@@ -148,7 +155,7 @@ export default {
       bgImg: require('@/assets/img/credit/creditBg.png'),
       bgImg: require('@/assets/img/credit/creditBg.png'),
       mapImg: require('@/assets/img/credit/creditMap.png'),
       mapImg: require('@/assets/img/credit/creditMap.png'),
       topRightJumpList: {c1: '/credit/identify', c2: '/credit/professional', c3: '/credit/project', c4: '/credit/credit'}
       topRightJumpList: {c1: '/credit/identify', c2: '/credit/professional', c3: '/credit/project', c4: '/credit/credit'}
-  
+
     },
     },
     list: [
     list: [
       {
       {

+ 51 - 0
components/works/edit.vue

@@ -0,0 +1,51 @@
+<template>
+  <div>
+    <breadcrumb :locations="locations"></breadcrumb>
+<!--    <editor-aside></editor-aside>-->
+    <editor></editor>
+  </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import breadcrumb from '@/components/breadcrumb'
+import editorAside from '@/components/works/editor-aside'
+import editor from '@/components/works/editor'
+// import getDeviceType from '@/mixins/getDeviceType'
+import qs from 'qs';
+
+export default {
+  props: ['locations'],
+  head: {
+    title: '添加项目作品',
+  },
+  components: {
+    breadcrumb,
+    editor,
+    editorAside,
+  },
+  // mixins: [getDeviceType],
+  data() {
+    return {
+    }
+  },
+  mounted() {
+    // this.getList()
+  },
+  methods: {
+    async getList() {
+      let extraHeaders = {};
+      if (this.deviceType === 'ios') {
+        extraHeaders = this.getSign();
+      }
+      let res = await this.$axios.$post(`/api/vip/getList`, extraHeaders)
+      if (res) {
+        this.vipList = res.data
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 91 - 0
components/works/editor-aside.vue

@@ -0,0 +1,91 @@
+<template>
+  <div class="aside">
+    <h6>技术圈文章内容标准</h6>
+    <el-timeline class="list">
+      <el-timeline-item v-for="(activity, index) in activities" :key="index">{{activity.content}}</el-timeline-item>
+    </el-timeline>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      activities: [
+        {
+          content: '1. 技术结合开发应用的实例文章'
+        },
+        {
+          content: '2. 开发过程实战化梳理文章'
+        },
+        {
+          content: '3. 协同化开发经验文章'
+        },
+        {
+          content: '4. 模块化开发经验分享'
+        },
+        {
+          content: '5. 个人职业生涯规划'
+        },
+        {
+          content: '6. 知名互联网公司开发经验文章'
+        },
+        {
+          content: '7. 日常开发小经验分享类文章'
+        },
+        {
+          content: '8. Q&A形式解答类文章'
+        },
+        {
+          content: '9. 行业论坛聚焦化分享类文章'
+        },
+        {
+          content: '10. 互联网+类程序开发经验文章'
+        }
+      ]
+    };
+  },
+  computed: {
+  },
+  mounted() {
+  },
+  methods: {
+  }
+}
+</script>
+
+<style lang="scss">
+.aside {
+  position: relative;
+  float: right;
+  width: 250px;
+  background: #fff;
+  h6 {
+    position: relative;
+    padding: 14px 0;
+    text-align: center;
+    font-size: 14px;
+    font-family: PingFangSC-Semibold;
+    font-weight: 600;
+    color: rgba(51, 51, 51, 1);
+    line-height: 21px;
+    &::after {
+      content: "";
+      position: absolute;
+      left: 50%;
+      bottom: 0;
+      transform: translateX(-50%);
+      width: 230px;
+      height: 0px;
+      border-bottom: 2px dashed rgba(240, 240, 240, 1);
+    }
+  }
+  .list {
+    padding: 25px 0 25px 16px;
+    .el-timeline-item__wrapper {
+      top: -1px;
+      padding-left: 15px;
+    }
+  }
+}
+</style>

+ 447 - 0
components/works/editor.vue

@@ -0,0 +1,447 @@
+<template>
+  <div class="editor">
+    <!--作品名称-->
+    <div class="app__dp_f app__f_r app__alig_c">
+      <h5 class="app__f_s_0"><span class="app__fc_r">*</span>作品名称</h5>
+      <el-input show-word-limit v-model="workName" class="title _title" placeholder="50字符以内,不能包含&*\#等特殊字符" :maxlength="50" @blur="workNameBlur"></el-input>
+    </div>
+    <!--作品描述-->
+    <h5 class="label app__mt_20"><span class="app__fc_r">*</span>作品描述 <span class="app__ml_10"><a>查看参考案例</a></span></h5>
+    <editor placeholder="请输入作品描述,支持图文混排,可添加【文字描述】【方案视频】【作品图片】【担任职责】等模块;可添加方案截图、PDF文档转图片,不低于60字" :content="content" @change="handleChange"
+            class="app__bd_g"></editor>
+    <!--作品封面图 -->
+    <h5 class="label app__mt_20">作品封面图</h5>
+    <div class="uploadInfo">
+      <div class="left">
+        <el-upload class="avatar-uploader" action="#" :show-file-list="false" :multiple="false" accept="image/png, image/jpeg"
+                   :before-upload="handleFileChange">
+          <i v-if="cover_url" class="el-icon-delete avatar-uploader-icon" @click.stop="handleDeleteFile"></i>
+          <img v-if="cover_url" :src="cover_url" class="avatar"/>
+          <!--无照片-->
+          <div v-else class="app__dp_f app__f_c app__alig_c app__jus__c" style="height: 100%">
+            <i class="el-icon-plus avatar-uploader-icon"></i>
+            <p class="app__fz_12 app__mt_10 el-p-upload">上传照片</p>
+          </div>
+        </el-upload>
+        <p class="app__fz_12 app__mt_10 app__tg_c app__fc_grey">支持JPG、PNG格式</p>
+      </div>
+      <div class="right">
+        <p>(800*800,图片最大2M,最多一张)</p>
+      </div>
+    </div>
+    <!--作品链接-->
+    <div class="app__dp_f app__f_r app__alig_c app__mt_20">
+      <h5 class="app__f_s_0">作品链接</h5>
+      <el-input show-word-limit v-model="title" class="title _title" placeholder="例如:https://www.proginn.com 若无法添加作品有效链接,请添加作品截图" :maxlength="50"></el-input>
+    </div>
+
+
+    <footer class="app__tg_c">
+      <el-button type="primary" @click="publish" class="btn-save">保存</el-button>
+      <!--      <el-button @click="cancel">取消</el-button>-->
+    </footer>
+  </div>
+</template>
+
+<script>
+  import editor from "@/components/editor";
+
+  export default {
+    head() {
+      return {
+        script: []
+      };
+    },
+    components: {
+      editor
+    },
+    data() {
+      return {
+        topicId: "", // 编辑
+        hashID: null,
+        workName: "",
+        title: "",
+        subTitle: "",
+        content: "",
+        cover_url: "",
+        dialogVisible: false,
+        disabled: false,
+        collectionId: "",
+        collectionList: [],
+        categoryList: [
+          {
+            value: "default",
+            label: "推荐"
+          }
+        ],
+        fileList: [],
+        uploading: false
+      };
+    },
+    computed: {},
+    mounted() {
+      this.needLogin();
+      this.needVerify();
+      this.getHejiList();
+      if (this.$route.params.id) {
+        this.loadData();
+      }
+    },
+    methods: {
+      loadData() {
+        const data = {topicId: this.$route.params.id};
+        this.$axios
+          .$post(`/api/community/topic/get_edit_topic`, data)
+          .then(res => {
+            console.log(res);
+            const topic = res.data;
+            if (topic) {
+              this.cover_url = topic.cover_url;
+              this.topicId = topic.id;
+              this.title = topic.title;
+              this.subTitle = topic.intro;
+              this.content = topic.body;
+              this.hashID = topic.hash_id;
+              if (this.cover_url) {
+                this.fileList.push({
+                  name: "cover_image",
+                  url: this.cover_url
+                });
+              }
+            } else {
+              this.goHome();
+            }
+            // TODO go details
+          });
+      },
+      getHejiList() {
+        this.$axios.post("/api/jishuquan/get_collections", {
+          uid: this.$store.state.userinfo.uid,
+          page: 1,
+          size: 200
+        }).then(res => {
+          if (res.data.status === 1) {
+            this.collectionList = res.data.data
+          }
+        })
+      },
+      publish() {
+        this.needVerify();
+        if (!this.title) {
+          this.$message.error("请输入文章标题");
+          return;
+        }
+        if (this.title.length < 2) {
+          this.$message.error("文章标题不可少于2字符");
+          return;
+        }
+        if (this.title.length > 64) {
+          this.$message.error("文章标题不可超过64字符,请删减");
+          return;
+        }
+
+        if (!this.content) {
+          this.$message.error("请输入文章正文");
+          return;
+        }
+        if (this.content.length < 100) {
+          this.$message.error("文章正文不可少于100字符");
+          return;
+        }
+        if (this.content.length > 100000) {
+          this.$message.error("文章正文不可超过1万字符,请删减");
+          return;
+        }
+        const data = {
+          title: this.title,
+          intro: this.subTitle,
+          body: this.content,
+          provider_id: this.collectionId,
+          cover_url: this.cover_url
+        };
+        if (this.topicId) {
+          data.topic_id = this.topicId;
+          this.$axios
+            .$post(`/api/community/topic/update_topic`, data)
+            .then(res => {
+              console.log(res);
+              if (res.status === -99) {
+                this.goHome();
+              }
+              if (res.status === 1) {
+                this.$message.success("编辑成功!");
+              }
+              // TODO go details
+              window.location.href = `/p/${this.hashID}.html`;
+            });
+        } else {
+          this.$axios
+            .$post(`/api/community/topic/create_topic`, data)
+            .then(res => {
+              console.log(res);
+              if (res.status === -99) {
+                this.goHome();
+              }
+              if (res.status === 1) {
+                this.$message.success("发布成功!");
+              }
+              // TODO go details
+              window.location.href = `/p/${res.data.hash_id}.html`;
+            });
+        }
+      },
+      cancel() {
+        this.$router.back();
+      },
+      handleChange(val) {
+        this.content = val;
+      },
+      handleDeleteFile() {
+        this.cover_url = "";
+      },
+      handleFileChange(file) {
+        console.log(file);
+        if (file.size / 1024 > 500) {
+          this.$message.error("图片大小不得超过500k,请重新选择");
+          return false;
+        }
+        const formData = new FormData();
+        formData.append("target", '{ "type": 3 }');
+        formData.append("id", "WU_FILE_0");
+        formData.append("name", file.name);
+        formData.append("type", file.type);
+        formData.append("lastModifiedDate", file.lastModifiedDate);
+        formData.append("size", file.size);
+        formData.append("file", file);
+        this.$axios
+          .$post(`/file/proxyUpload`, formData, {
+            headers: {"Content-Type": "multipart/form-data"}
+          })
+          .then(res => {
+            this.cover_url = (res.data && res.data.url) || "";
+            this.fileList = [
+              {
+                name: "file.name",
+                url: this.cover_url
+              }
+            ];
+          });
+      },
+      workNameBlur(e) {
+        this.workName = this.workName.replace(/[&|\*|#|\\]/g, "");
+
+      },
+      handleChange(e){
+        console.log(e);
+      }
+    }
+  };
+</script>
+
+<style lang="scss">
+  @import "../../assets/css/common.css";
+
+  .editor {
+    position: relative;
+    padding: 20px 100px;
+    /*width: 740px;*/
+    background: #fff;
+
+    .title,
+    .sub-title {
+      .el-input__inner {
+        padding: 0;
+        border: 0;
+        border-radius: 0;
+      }
+    }
+
+    .title {
+      margin: 10px auto 20px;
+      font-size: 28px;
+      font-family: PingFangSC-Medium;
+      font-weight: 500;
+      color: rgba(29, 42, 58, 1);
+      line-height: 40px;
+    }
+
+    ._title {
+      font-size: 15px !important;
+      margin: 0 0 0 20px !important;
+      border-bottom: 1px solid #ddd;
+    }
+
+    .sub-title {
+      margin-bottom: 28px;
+      min-height: 18px;
+      font-size: 14px;
+      font-family: PingFangSC-Regular;
+      font-weight: 400;
+      color: rgba(145, 154, 167, 1);
+      line-height: 18px;
+      border: 0;
+
+      .el-textarea__inner {
+        height: 18px;
+        line-height: 18px;
+        border: 0;
+        padding-left: 0;
+      }
+    }
+
+    .label {
+      margin: 20px auto 10px;
+      font-size: 13px;
+      font-family: PingFangSC-Medium;
+      font-weight: 500;
+      color: rgba(25, 34, 46, 1);
+      line-height: 18px;
+    }
+
+    .ql-toolbar {
+      border-width: 1px 0 0 0 !important;
+    }
+
+    .quill-editor {
+      height: 450px;
+      border-left: 0 !important;
+      border-right: 0 !important;
+      font-size: 14px;
+      line-height: 25px;
+    }
+
+    .ql-snow.ql-toolbar::after {
+      display: inline-block;
+    }
+
+    .class {
+      width: 320px;
+    }
+
+    .tags {
+      width: 560px;
+    }
+
+    footer {
+      margin: 40px 0;
+
+      /*button {*/
+      /*  width: 100px;*/
+      /*  height: 40px;*/
+      /*  border-radius: 0;*/
+      /*}*/
+    }
+
+    strong {
+      font-weight: 800 !important;
+    }
+
+    em {
+      font-style: italic !important;
+    }
+  }
+
+  .uploadInfo {
+    display: flex;
+    padding-left: 30px;
+    align-items: center;
+
+    .left {
+      width: 150px;
+      height: 180px;
+      flex-shrink: 0;
+      overflow: hidden;
+      position: relative;
+      background: #fff;
+
+      .el-icon-delete {
+        display: none;
+      }
+
+      .avatar-uploader .el-upload {
+        width: 150px;
+        height: 150px;
+        border: 1px dashed #dce1e8;
+        border-radius: 6px;
+        cursor: pointer;
+        position: relative;
+        overflow: hidden;
+
+        img {
+          width: 100%;
+          height: auto;
+          object-fit: contain;
+          object-position: top left;
+        }
+      }
+
+      .avatar-uploader .el-upload:hover {
+        border-color: #409eff;
+
+        .el-icon-plus {
+          color: #409eff
+        }
+
+        .el-p-upload {
+          color: #409eff
+        }
+
+        .el-icon-delete {
+          display: block;
+        }
+      }
+
+      .avatar-uploader-icon {
+        /*position: absolute;*/
+        /*top: 0;*/
+        /*left: 0;*/
+        font-size: 44px;
+        color: #dce1e8;;
+        /*width: 150px;*/
+        /*height: 150px;*/
+        /*line-height: 140px;*/
+        text-align: center;
+      }
+
+      .el-p-upload {
+        color: #dce1e8
+      }
+
+
+      .avatar {
+        width: 180px;
+        height: 140px;
+        display: block;
+      }
+
+      .title {
+        position: absolute;
+        left: 50%;
+        bottom: 40px;
+        transform: translateX(-50%);
+        font-size: 13px;
+        font-weight: 500;
+        color: #dce1e8;
+        line-height: 18px;
+        text-decoration: underline;
+      }
+    }
+
+    .right {
+      margin-left: 18px;
+      height: 34px;
+
+      p {
+        font-size: 12px;
+        font-weight: 400;
+        color: rgba(145, 154, 167, 1);
+        line-height: 17px;
+      }
+    }
+  }
+
+  .btn-save {
+    width: 20vw;
+    border-radius: 5px;
+  }
+</style>

+ 1 - 1
pages/credit/pages/index.vue

@@ -72,7 +72,7 @@
           title: '项目经验',
           title: '项目经验',
           subTitle: '我们会从您在程序员客栈上绑定的个人代表性作品,以及在客栈远程工作过程中实际参与开发的项目评价,来考察您的项目经验',
           subTitle: '我们会从您在程序员客栈上绑定的个人代表性作品,以及在客栈远程工作过程中实际参与开发的项目评价,来考察您的项目经验',
           jumpUrl: '/credit/project', //跳转至技能水平页
           jumpUrl: '/credit/project', //跳转至技能水平页
-          children: [ { name: '整包项目'}, { name: '云端工作' }, { name: '雇佣项目' }]
+          children: [ { name: '整包项目'}, { name: '云端工作' }, { name: '雇佣项目' },{ name: '个人作品' }]
         }, {
         }, {
           icon: require('@/assets/img/credit/indexIcon0.png'),
           icon: require('@/assets/img/credit/indexIcon0.png'),
           title: '专业经历',
           title: '专业经历',

+ 44 - 0
pages/works/_id/edit.vue

@@ -0,0 +1,44 @@
+<template>
+  <div>
+    <edit :locations="locations"></edit>
+  </div>
+</template>
+
+<script>
+import { mapState } from "vuex";
+import edit from "@/components/topics/edit";
+import qs from "qs";
+
+export default {
+  // async asyncData({ $axios, params }) {
+  //   let res = await $axios.$get(`/api/vip/getList`)
+  //   console.log('init', res)
+  // },
+  head: {
+    title: "添加项目作品"
+  },
+  components: {
+    edit
+  },
+  data() {
+    return {
+      locations: [
+        {
+          url: "/",
+          title: "技术信用"
+        },
+        {
+          url: `/p/${this.$route.params.id}`,
+          title: "添加作品详情"
+        }
+      ]
+    };
+  },
+  computed: {},
+  mounted() {},
+  methods: {}
+};
+</script>
+
+<style>
+</style>

+ 48 - 0
pages/works/create.vue

@@ -0,0 +1,48 @@
+<template>
+  <div>
+    <edit :locations="locations"></edit>
+  </div>
+</template>
+
+<script>
+import { mapState } from "vuex";
+import edit from "@/components/works/edit";
+import qs from "qs";
+
+export default {
+  // async asyncData({ $axios, params }) {
+  //   let res = await $axios.$get(`/api/vip/getList`)
+  //   console.log('init', res)
+  // },
+  head: {
+    title: "添加项目作品"
+  },
+  components: {
+    edit
+  },
+  data() {
+    return {
+      locations: [
+        {
+          url: "/credit/pages",
+          title: "技术信用"
+        },
+        {
+          url: "/credit/project",
+          title: "项目经验"
+        },
+        {
+          url: "/works/create",
+          title: "添加项目作品"
+        }
+      ]
+    };
+  },
+  computed: {},
+  mounted() {},
+  methods: {}
+};
+</script>
+
+<style>
+</style>

+ 1 - 2
plugins/common.js

@@ -75,8 +75,7 @@ Vue.mixin({
       const userInfo = await this.getUserInfo();
       const userInfo = await this.getUserInfo();
       // 1是待审核,2审核通过,3是拒绝
       // 1是待审核,2审核通过,3是拒绝
       if (userInfo.realname_verify_status !== '2') {
       if (userInfo.realname_verify_status !== '2') {
-        this.$message.error('根据互联网相关法规要求,请先完成实名认证')
-        this.goVerify();
+        this.$message.error('根据互联网相关法规要求,请先完成实名认证');
       }
       }
     },
     },
     async getUserInfo() {
     async getUserInfo() {