切换导航条
此项目
正在载入...
登录
郭盛
/
areial
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郭盛
5 years ago
提交
4f9b5417c303e387dd35fdde9331acf99628384a
1 个父辈
057d5716
1 个管道 的构建
通过
耗费 4 秒
修改添加购物车
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
39 行增加
和
25 行删除
.idea/workspace.xml
application/api/controller/User.php
public/api.html
.idea/workspace.xml
查看文件 @
4f9b541
...
...
@@ -2,7 +2,9 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef"
name=
"Default"
comment=
""
>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/application/api/controller/User.php"
afterPath=
"$PROJECT_DIR$/application/api/controller/User.php"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/public/api.html"
afterPath=
"$PROJECT_DIR$/public/api.html"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
...
@@ -16,8 +18,8 @@
<file
leaf-file-name=
"User.php"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/application/api/controller/User.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"450"
>
<caret
line=
"492"
column=
"13"
lean-forward=
"false"
selection-start-line=
"492"
selection-start-column=
"13"
selection-end-line=
"492"
selection-end-column=
"13"
/>
<state
relative-caret-position=
"295"
>
<caret
line=
"780"
column=
"33"
lean-forward=
"true"
selection-start-line=
"780"
selection-start-column=
"33"
selection-end-line=
"780"
selection-end-column=
"33"
/>
<folding>
<element
signature=
"e#38#68#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#337#456#0#PHP"
expanded=
"false"
/>
...
...
@@ -36,6 +38,7 @@
<element
signature=
"e#11641#12325#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#12330#14120#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#14126#14996#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#15001#17018#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#17024#17401#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#17406#17670#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#17676#18181#0#PHP"
expanded=
"false"
/>
...
...
@@ -49,7 +52,6 @@
<element
signature=
"e#20814#21957#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#21962#23939#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#23945#24436#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#24441#25189#0#PHP"
expanded=
"false"
/>
</folding>
</state>
</provider>
...
...
@@ -129,8 +131,8 @@
</component>
<component
name=
"PhpWorkspaceProjectConfiguration"
backward_compatibility_performed=
"true"
/>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"293"
/>
<option
name=
"y"
value=
"97"
/>
<option
name=
"x"
value=
"510"
/>
<option
name=
"y"
value=
"72"
/>
<option
name=
"width"
value=
"1614"
/>
<option
name=
"height"
value=
"977"
/>
</component>
...
...
@@ -223,7 +225,7 @@
<workItem
from=
"1574141466352"
duration=
"745000"
/>
<workItem
from=
"1574143209694"
duration=
"3660000"
/>
<workItem
from=
"1574146994475"
duration=
"23222000"
/>
<workItem
from=
"1574209189943"
duration=
"2
2091
000"
/>
<workItem
from=
"1574209189943"
duration=
"2
4458
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"调试"
>
<created>
1574145133364
</created>
...
...
@@ -236,7 +238,7 @@
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"9
3666
000"
/>
<option
name=
"totallyTimeSpent"
value=
"9
6033
000"
/>
</component>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
...
...
@@ -248,7 +250,7 @@
</todo-panel>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"
293"
y=
"97
"
width=
"1614"
height=
"977"
extended-state=
"0"
/>
<frame
x=
"
510"
y=
"72
"
width=
"1614"
height=
"977"
extended-state=
"0"
/>
<layout>
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.15701416"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"TODO"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32912987"
sideWeight=
"0.5"
order=
"9"
side_tool=
"false"
content_ui=
"tabs"
/>
...
...
@@ -257,7 +259,7 @@
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"5"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Structure"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"true"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.
3809524
"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"true"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.
15119047
"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Favorites"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"0"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Debug"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.4"
sideWeight=
"0.5"
order=
"6"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Cvs"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
...
...
@@ -679,8 +681,8 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/application/api/controller/User.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"450"
>
<caret
line=
"492"
column=
"13"
lean-forward=
"false"
selection-start-line=
"492"
selection-start-column=
"13"
selection-end-line=
"492"
selection-end-column=
"13"
/>
<state
relative-caret-position=
"295"
>
<caret
line=
"780"
column=
"33"
lean-forward=
"true"
selection-start-line=
"780"
selection-start-column=
"33"
selection-end-line=
"780"
selection-end-column=
"33"
/>
<folding>
<element
signature=
"e#38#68#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#337#456#0#PHP"
expanded=
"false"
/>
...
...
@@ -699,6 +701,7 @@
<element
signature=
"e#11641#12325#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#12330#14120#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#14126#14996#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#15001#17018#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#17024#17401#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#17406#17670#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#17676#18181#0#PHP"
expanded=
"false"
/>
...
...
@@ -712,7 +715,6 @@
<element
signature=
"e#20814#21957#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#21962#23939#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#23945#24436#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#24441#25189#0#PHP"
expanded=
"false"
/>
</folding>
</state>
</provider>
...
...
application/api/controller/User.php
查看文件 @
4f9b541
...
...
@@ -756,23 +756,35 @@ class User extends Api
$user_id
=
$this
->
uid
;
$pic_id
=
$this
->
request
->
param
(
'pic_id'
);
$video_id
=
$this
->
request
->
param
(
'video_id'
);
$data
=
Db
::
name
(
'car'
)
->
field
(
'id,user_id,pic_id,video_id'
)
->
where
(
'user_id'
,
$user_id
)
->
find
();
$param
[
'pic_id'
]
=
array_push
(
explode
(
','
,
$data
[
'pic_id'
]),
$pic_id
);
$param
[
'video_id'
]
=
array_push
(
explode
(
','
,
$data
[
'video_id'
]),
$video_id
);
$param
[
'createtime'
]
=
time
();
$param
[
'updatetime'
]
=
time
();
$data
=
Db
::
name
(
'car'
)
->
where
(
'user_id'
,
$user_id
)
->
update
(
$param
);
if
(
$data
){
$this
->
success
(
'SUCCESS'
);
if
(
empty
(
$data
)){
$param
[
'user_id'
]
=
$user_id
;
$param
[
'createtime'
]
=
time
();
$param
[
'pic_id'
]
=
$pic_id
;
$param
[
'video_id'
]
=
$video_id
;
$data
=
Db
::
name
(
'car'
)
->
insertGetId
(
$param
);
if
(
$data
){
$this
->
success
(
'SUCCESS'
);
}
else
{
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'sql执行失败'
]);
}
}
else
{
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'sql执行失败'
]);
$param
[
'pic_id'
]
=
$data
[
'pic_id'
]
.
','
.
$pic_id
;
$param
[
'video_id'
]
=
$data
[
'video_id'
]
.
','
.
$video_id
;
$param
[
'updatetime'
]
=
time
();
$data
=
Db
::
name
(
'car'
)
->
where
(
'user_id'
,
$user_id
)
->
update
(
$param
);
if
(
$data
){
$this
->
success
(
'SUCCESS'
);
}
else
{
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'sql执行失败'
]);
}
}
}
}
...
...
public/api.html
查看文件 @
4f9b541
...
...
@@ -3116,7 +3116,7 @@
<div
class=
"row mt0 footer"
>
<div
class=
"col-md-6"
align=
"left"
>
Generated on 2019-11-20 15:
17:18
</div>
Generated on 2019-11-20 15:
56:47
</div>
<div
class=
"col-md-6"
align=
"right"
>
<a
href=
"https://www.fastadmin.net"
target=
"_blank"
>
FastAdmin
</a>
</div>
...
...
请
注册
或
登录
后发表评论