Markdown syntax and interface document example

Markdown Collection

0. Directory

  1. text editor
  2. Grade title
  3. Hyperlinks
  4. List
  5. Quote
  6. Insert image
  7. Label
  8. form
  9. Code box

1. Text editing

operating:

*斜体* , _斜体_
**粗体**
***加粗斜体***
~~删除线~~
<u>下划线</u>
***分割线 , ---

effect:

Italic text

Italic text

Bold text

Bold text

Bold italic text

Bold italic text

This is italicized bold

This is strikethrough

This is underscore


2. Classification title

operating:

# + 空格 = 一级标题
## + 空格 = 二级标题
### + 空格 = 三级标题
#### + 空格 = 四级标题
##### + 空格 = 五级标题
###### + 空格 = 六级标题

Level 1 heading

Secondary heading

Three-level heading

Level 4 heading

Level 5 heading
Level 6 heading, the smallest one

3. Hyperlink

3.1 Text link

operating:

[显示的文字](目标地址链接)
[Github](https://github.com/BeyondLam)

effect:

Github

3.2 Address link

operating:

<https://github.com/BeyondLam>

effect:

https://github.com/BeyondLam

4. List

4.1 Unordered List

operating:

- 一级列表
+ 二级列表
* 三级列表
注: 两个空格算一级

effect:

  • First level list
  • First level list
  • First level list

    • Secondary list
    • Secondary list
    • Secondary list

      • Three-level list
      • Three-level list
      • Three-level list

4.2 Ordered List

operating:

1.一级列表
2.二级列表
3.三级列表
  1. First level list
  2. Secondary list
  3. Three-level list

4.3 Task list

operating:

- [ ]早睡
- [ ]早起
- [ ]按时吃饭
- [x]不可能

effect:

  • Go to bed early
  • Get up early
  • eat on time
  • impossible

5. Reference

operating:

> 这是一级引用

effect:

This is a first-level reference

This is a second-level reference

This is a three-level reference

This is a four-level reference

This is a five-level reference

This is a six-level reference

There are seven levels of reference

How many levels of references do you want?

It's all right, according to you

6. Insert image

operating:

![图片说明文字](图片路由)
![好音宫的图呀](https://cdn.hicaiji.com/halo/yg_1593417121976_1595006205179.jpg)

effect:

A picture

7. Marking

operating:

关键字A[^1]
... 
文末
[^1]:解释语

I’m Otoniya 1 ~

8. Form

operating:

|姓名|年龄|性别|学校|
| :----: | ---: | :--: | :----- | # 这个:意思是文字排序位置(左中右)
| 好音宫 |   18 |  男  | 清 - 华   |
| 扑街仔 |   22 |  男  | 家里蹲 |

effect:

Name age gender school
Good Music Palace 18 male Qing-Hua
Bash street boy 22 male Squat at home

9. Code area

9.1 Code block

operating:

```python
你的代码
```

effect:

print("hello world")

9.2 Single line of code

operating:

`print("hello 音宫")`

Interface documentation

1. Discovery document

1.1 Publishing content

description

  • Publish the revelation or lost and found content

Request URL

  • { {url}}/mini/push

Request method

  • POST

Request parameter

parameter name Types of Is it required Description
wx_openid String Yes WeChat's openid
type String Yes Type 1 is missing property notice 2 is lost and found
text String Yes content
address String Yes address
phone String no phone number
wechat String no We chat number

Request example

	{
    
    
	"wx_openid":"othLO4pHiKhkCdWKPNCi5sssasczxcwrty1C",
	"type":1,
	"text":"我是测试内容",
	"address":"我的地址是:。。。。。",
	"phone":"12345678900",
	"wechat":"asdasd"
	}

Return example

	{
    
    
	"code": 200,
	 "id": 5
	}

失败返回:

	{
    
    
	"code": 400,
     "msg":"请求失败,请重试"
	}

1.2 upload pictures

description

  • Content add image

Request URL

  • { {url}}/mini/upload/detail/img

Request method

  • POST

Request parameter

parameter name Types of Is it required Description
id Integer Yes form data
img image Yes file picture binary stream

Request example

Return example

Successful return:

	{
    
    
		"code": 200,
   	    "image_url": "https://hnnydx.oss-cn-shanghai.aliyuncs.com/mini/vs1/detail/20200131185655_74.jpeg",
   	    "msg": "保存图片数据成功"
	}

Failure return:

	{
    
    
	    "code": 400,
	    "msg": "参数错误"
	}
	
	或者
	
	{
    
    
	    "code": 400,
	    "msg": "内容不存在"
	}

1.3 Get details

description

  • Get the content details of the hidden objects

Request URL

  • { {url}}/mini/getdetail?id={ {id}}

Request method

  • GET

Request parameter

parameter name Types of Is it required Description
wx_openid String Yes WeChat's openid
type String Yes Type 1 is missing property notice 2 is lost and found
text String Yes content
address String Yes address
phone String no phone number
wechat String no We chat number

Request example

	{
    
    
	"wx_openid":"othLO4pzxxczxcV",
	"type":1,
	"text":"我在你家掉了我的心,帮我保管一下",
	"address":"你家",
	"phone":"13025134531",
	"wechat":"130251332514"
	}

Return example

成功返回:

	{
    
    
	"code": 200,
	 "id": 5
	}

失败返回:

	{
    
    
	    "code": 400,
	    "msg": "内容不存在"
	}

about me

Welcome to like my GitHub
Hi Caiji-personal homepage


  1. JamKung ↩︎

Guess you like

Origin blog.csdn.net/Jake_Lam/article/details/109294831