ArvinQi преди 6 години
родител
ревизия
281fa41510
променени са 4 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 2 1
      components/date.vue
  2. 1 1
      components/sign/profile.vue
  3. 1 1
      components/sign/skills.vue
  4. 1 1
      plugins/common.js

+ 2 - 1
components/date.vue

@@ -18,7 +18,8 @@
 
 <script>
 export default {
-  props: ["imageUrl", "title"],
+  model: [],
+  props: ["value", "change"],
   components: {},
   data() {
     return {

+ 1 - 1
components/sign/profile.vue

@@ -42,7 +42,7 @@ export default {
   },
   async mounted() {
     let res = await this.$axios.$post("/api/user/get_resume");
-    this.content = res.data.personaldetails;
+    this.content = res.data && res.data.personaldetails;
   },
   methods: {
     handleEdit() {

+ 1 - 1
components/sign/skills.vue

@@ -95,7 +95,7 @@ export default {
   methods: {
     async getData() {
       let res = await this.$axios.$post("/api/user_skills/list_by_user");
-      this.skills = res.data;
+      this.skills = res.data || [];
     },
     async onSubmit(item, idx) {
       console.log("submit!", item);

+ 1 - 1
plugins/common.js

@@ -27,7 +27,7 @@ Vue.mixin({
   methods: {
     async needLogin() {
       const userInfo = await this.getUserInfo();
-      if (!userInfo) {
+      if (!userInfo.nickname) {
         this.goLogin();
       }
     },