GithubHelp home page GithubHelp logo

ruanyf / wechat-miniprogram-demos Goto Github PK

View Code? Open in Web Editor NEW
669.0 18.0 127.0 68 KB

微信小程序教程库

Home Page: http://www.ruanyifeng.com/blog/2020/10/wechat-miniprogram-tutorial-part-one.html

wechat-miniprogram-demos's Issues

对于json-server的增改功能,home.js中wx.request()方法中data值应该是什么

比如按照原教程,db.json维持原样,仅有字符串数组"items": ["事项A", "事项B", "事项C"],若想增加一个"事项D",直接将其作为data的值POST请求给url:"http://localhost:3000/",会报错400

SyntaxError: Unexpected token '"', ""D"" is not valid JSON
   at JSON.parse (<anonymous>)
   at createStrictSyntaxError

即便对“事项D”先使用JSON.stringify()也是一样的结果。

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.