Giter Club home page Giter Club logo

material-blog's Introduction

Blog

工作进程

frontend side

done: 
[
  19-2-23: 新建项目
  19-2-24:  mock数据(client/data.json)
  19-2-25: 完成api获取
  19-2-27: vuex配置&排版
  19-2-28: router & debug
  19-3-1: router to page
  19-3-2:背景图片显示
  19-3-3: 管理tab的状态,修复完成。tab监听样式
]
doing:
[
  
]
todolist:
[
  edit界面
  toc
]

server side

done: 
[
  19-2-23: 使用egg-init
  19-2-24: 完成了mongo集成,写了部分blog接口, passport-local
  19-2-27: 普通登录和github登录完成 完成了博客浏览 网站浏览 喜欢博客 计数以及记录
  19-03-03: 评论接口完成 修改登录时效
  19-05-20:[modify] 博客列表接口新增countOfComments返回评论数 [add] 新增top5博客接口
]
doing:
[
  nothing
]
todolist:
[
  用户相关接口:改头像,改描述
]

material-blog's People

Contributors

alfxjx avatar ape-casear avatar

material-blog's Issues

post方法返回的是undefined

// edit.vue post文章
methods: {
      submit() {
        // axios.post('/api/blog', {
        //   category: this.input.category,
        //   tag: this.input.tag,
        //   desc: this.input.desc,
        //   author: this.input.author,
        //   image: this.input.image,
        //   title: this.input.title,
        //   content: this.input.content
        // }).then((res) => {
        //   const {statusCode, msg} = res.data
        //   console.log(msg)
        //   if (statusCode === 1) {
        //     return msg
        //   }
        // }).catch((e) => {
        //   console.log('error')
        // })
        postBlog({
          category: this.input.category,
          tag: this.input.tag,
          desc: this.input.desc,
          author: this.input.author,
          image: this.input.image,
          title: this.input.title,
          content: this.input.content
        }).then((res) => {
          console.log(res)
        })
      }
    },
//api/index.js
const postBlog = post('/blog')
// api/helper.js
export function post(url) {
  return function (params) {
    return axios.post(baseUrl + url,
      // qs.stringify({params})
      {params}
    ).then((res) => {
      const {statusCode, msg} = res.data
      console.log(res.statusCode)
    })
  }
}

但是一直返回undefined,在helper 和edit里面都是这样。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.