0%

安装drone

  1. 跟着官方走,官方文档 已经说的很详细了
  2. 如果是在github上的公开项目,建议直接使用drone的cloud版本,不用自己安装,另外性能也比较好
    Read more »

总体流程

登陆

  • 使用username + password进行登录
  • 返回授权信息:
    1
    2
    3
    4
    5
    6
    {
    "refresh_token": "刷新access token时需要使用的",
    "acess_token": "请求凭证",
    "expires_in": "过期时间",
    "token_type": "",
    "user_id": "用户ID",
Read more »

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
USE [user_design]
GO
/****** Object: Table [dbo].[resources] Script Date: 3/15/2019 12:27:42 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[resources](
[id] [int] NOT NULL,
[name] [varchar](50) NOT NULL,
[description] [varchar](50) NULL,
[value] [varchar](50) NOT NULL,
[type] [varchar](50) NOT NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_resources] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

/****** <!-- more --> ******/
/****** Object: Table [dbo].[role_resources] Script Date: 3/15/2019 12:27:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[role_resources](
[id] [int] NOT NULL,
[role_id] [int] NOT NULL,
[resource_id] [int] NOT NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_role_resources] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[roles] Script Date: 3/15/2019 12:27:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[roles](
[id] [int] NOT NULL,
[name] [varchar](50) NOT NULL,
[description] [varchar](50) NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_roles] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[user_identifiers] Script Date: 3/15/2019 12:27:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[user_identifiers](
[id] [int] NOT NULL,
[user_id] [int] NOT NULL,
[identifier] [varchar](50) NOT NULL,
[confirmed] [bit] NOT NULL,
[confirm_token] [varchar](50) NULL,
[replace_target] [varchar](50) NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_user_identifiers] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[user_passwords] Script Date: 3/15/2019 12:27:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[user_passwords](
[id] [int] NOT NULL,
[user_id] [int] NOT NULL,
[password] [varchar](50) NOT NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_user_passwords] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[user_roles] Script Date: 3/15/2019 12:27:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[user_roles](
[id] [int] NOT NULL,
[user_id] [int] NOT NULL,
[role_id] [int] NOT NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_user_roles] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[user_tokens] Script Date: 3/15/2019 12:27:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[user_tokens](
[id] [int] NOT NULL,
[user_id] [int] NOT NULL,
[token] [varchar](50) NOT NULL,
[type] [varchar](50) NOT NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_user_tokens] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[users] Script Date: 3/15/2019 12:27:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[users](
[id] [int] NOT NULL,
[age] [int] NULL,
[address] [varchar](50) NULL,
[sex] [bit] NULL,
[created_at] [datetime] NOT NULL,
[updated_at] [datetime] NOT NULL,
[deleted_at] [datetime] NULL,
CONSTRAINT [PK_users] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[role_resources] WITH CHECK ADD CONSTRAINT [FK_role_resources_resources] FOREIGN KEY([resource_id])
REFERENCES [dbo].[resources] ([id])
GO
ALTER TABLE [dbo].[role_resources] CHECK CONSTRAINT [FK_role_resources_resources]
GO
ALTER TABLE [dbo].[role_resources] WITH CHECK ADD CONSTRAINT [FK_role_resources_roles] FOREIGN KEY([role_id])
REFERENCES [dbo].[roles] ([id])
GO
ALTER TABLE [dbo].[role_resources] CHECK CONSTRAINT [FK_role_resources_roles]
GO
ALTER TABLE [dbo].[user_identifiers] WITH CHECK ADD CONSTRAINT [FK_user_identifiers_users] FOREIGN KEY([user_id])
REFERENCES [dbo].[users] ([id])
GO
ALTER TABLE [dbo].[user_identifiers] CHECK CONSTRAINT [FK_user_identifiers_users]
GO
ALTER TABLE [dbo].[user_passwords] WITH CHECK ADD CONSTRAINT [FK_user_passwords_users] FOREIGN KEY([user_id])
REFERENCES [dbo].[users] ([id])
GO
ALTER TABLE [dbo].[user_passwords] CHECK CONSTRAINT [FK_user_passwords_users]
GO
ALTER TABLE [dbo].[user_roles] WITH CHECK ADD CONSTRAINT [FK_user_roles_roles] FOREIGN KEY([role_id])
REFERENCES [dbo].[roles] ([id])
GO
ALTER TABLE [dbo].[user_roles] CHECK CONSTRAINT [FK_user_roles_roles]
GO
ALTER TABLE [dbo].[user_roles] WITH CHECK ADD CONSTRAINT [FK_user_roles_users] FOREIGN KEY([user_id])
REFERENCES [dbo].[users] ([id])
GO
ALTER TABLE [dbo].[user_roles] CHECK CONSTRAINT [FK_user_roles_users]
GO
ALTER TABLE [dbo].[user_tokens] WITH CHECK ADD CONSTRAINT [FK_user_tokens_users] FOREIGN KEY([user_id])
REFERENCES [dbo].[users] ([id])
GO
ALTER TABLE [dbo].[user_tokens] CHECK CONSTRAINT [FK_user_tokens_users]
GO

  1. T 淋巴细胞的功能不包括吞噬功能
  2. 关于免疫球蛋白的表达,正确的是 1g 可分为分泌型和膜型
  3. 腮腺导管开口于上颌第二磨牙颊粘膜,颌下腺开口舌系带舌下阜,舌下腺开口舌下阜(颌下腺导管))和舌下壁
  4. 刺激胰岛素分泌最主要的因素是血糖浓度升高
  5. 肺循环起于右心室
  6. 葡萄糖进入细胞的方式包括易化扩散、主动转运
    Read more »

脊髓前角运动神经元受损临床表现为肌肉萎缩、肌无力,弛缓性瘫痪,不对称,腱反射消失,肌张力减退,最早症状多见于手部分,患者感手指运动无力、僵硬、笨拙,手部肌肉逐渐萎缩,可见肌束震颤。四肢远端呈进行性肌萎缩,约半数以上病例早期呈一侧上肢手部大小鱼际肌萎缩,以后扩展到前臂肌,甚至胸大肌,背部肌肉亦可萎缩,站立时腹部前凸,进而肩胛带与上肢近端肌肉无力与肌肉萎缩。

Read more »

  1. 安装docker: 官方文档

  2. 拉取MongoDB的docker官方镜像: docker pull mongo

  3. 启动一个MongoDB的docker实例: docker run --name docker_mongodb -v /data/db:/data/db -p 27017:27017 -d mongo

    • -p: 端口映射
    • -v: 文件夹映射
    • –name: docker 实例名称
  4. 列出当前运行中的实例: docker container ls

    Read more »

JWT

  1. 后端不存储token的信息,只有个固定的secret key
  2. token由前端来保存,丢了就丢了,重新登录就好了
  3. token上有加密了的过期时间,用户信息
  4. 以上三点决定了这个token是无状态的,并且是后端不可控的(后端无法突然让某个token失效)