切换导航条
此项目
正在载入...
登录
郭盛
/
areial
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郭盛
5 years ago
提交
ae50ad57f9c80c4f87abb2a4a402970de068277c
1 个父辈
10ade562
1 个管道 的构建
通过
耗费 7 秒
视频图片订单
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
124 行增加
和
20 行删除
.idea/workspace.xml
application/api/controller/User.php
public/api.html
.idea/workspace.xml
查看文件 @
ae50ad5
...
...
@@ -2,6 +2,7 @@
<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>
...
...
@@ -17,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=
"253"
>
<caret
line=
"381"
column=
"31"
lean-forward=
"true"
selection-start-line=
"381"
selection-start-column=
"31"
selection-end-line=
"381"
selection-end-column=
"31"
/>
<state
relative-caret-position=
"115"
>
<caret
line=
"638"
column=
"5"
lean-forward=
"true"
selection-start-line=
"638"
selection-start-column=
"5"
selection-end-line=
"638"
selection-end-column=
"5"
/>
<folding>
<element
signature=
"e#38#68#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#337#456#0#PHP"
expanded=
"false"
/>
...
...
@@ -35,6 +36,7 @@
<element
signature=
"e#9728#10430#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#10435#11635#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#11641#12217#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#12222#12769#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#12775#13459#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#13464#15254#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#15260#16130#0#PHP"
expanded=
"false"
/>
...
...
@@ -53,6 +55,10 @@
<element
signature=
"e#23291#25268#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#25274#25765#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#25770#26983#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#26989#27523#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#27528#28442#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#28448#28979#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#28984#29904#0#PHP"
expanded=
"false"
/>
</folding>
</state>
</provider>
...
...
@@ -100,7 +106,6 @@
<option
value=
"$PROJECT_DIR$/public/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/application/common/library/Auth.php"
/>
<option
value=
"$PROJECT_DIR$/application/admin/lang/zh-cn/pic.php"
/>
<option
value=
"$PROJECT_DIR$/application/extra/verify.php"
/>
<option
value=
"$PROJECT_DIR$/public/assets/js/backend/video.js"
/>
<option
value=
"$PROJECT_DIR$/application/admin/lang/zh-cn/video.php"
/>
<option
value=
"$PROJECT_DIR$/application/admin/view/video/add.html"
/>
...
...
@@ -113,6 +118,7 @@
<option
value=
"$PROJECT_DIR$/application/admin/view/pic/add.html"
/>
<option
value=
"$PROJECT_DIR$/application/admin/view/pic/edit.html"
/>
<option
value=
"$PROJECT_DIR$/public/assets/js/backend/pic.js"
/>
<option
value=
"$PROJECT_DIR$/application/extra/verify.php"
/>
<option
value=
"$PROJECT_DIR$/application/api/controller/User.php"
/>
</list>
</option>
...
...
@@ -131,9 +137,9 @@
<sorting>
DEFINITION_ORDER
</sorting>
</component>
<component
name=
"PhpWorkspaceProjectConfiguration"
backward_compatibility_performed=
"true"
/>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"837"
/>
<option
name=
"y"
value=
"76"
/>
<component
name=
"ProjectFrameBounds"
extendedState=
"1"
>
<option
name=
"x"
value=
"14"
/>
<option
name=
"y"
value=
"48"
/>
<option
name=
"width"
value=
"1699"
/>
<option
name=
"height"
value=
"977"
/>
</component>
...
...
@@ -178,6 +184,12 @@
<item
name=
"api"
type=
"2a2b976b:PhpTreeStructureProvider$1"
/>
<item
name=
"controller"
type=
"2a2b976b:PhpTreeStructureProvider$1"
/>
</path>
<path>
<item
name=
"areial"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"areial"
type=
"2a2b976b:PhpTreeStructureProvider$1"
/>
<item
name=
"application"
type=
"2a2b976b:PhpTreeStructureProvider$1"
/>
<item
name=
"extra"
type=
"2a2b976b:PhpTreeStructureProvider$1"
/>
</path>
</expand>
<select
/>
</subPane>
...
...
@@ -226,7 +238,7 @@
<workItem
from=
"1574141466352"
duration=
"745000"
/>
<workItem
from=
"1574143209694"
duration=
"3660000"
/>
<workItem
from=
"1574146994475"
duration=
"23222000"
/>
<workItem
from=
"1574209189943"
duration=
"2
5757
000"
/>
<workItem
from=
"1574209189943"
duration=
"2
8745
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"调试"
>
<created>
1574145133364
</created>
...
...
@@ -239,7 +251,7 @@
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"
97332
000"
/>
<option
name=
"totallyTimeSpent"
value=
"
100320
000"
/>
</component>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
...
...
@@ -251,7 +263,8 @@
</todo-panel>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"837"
y=
"76"
width=
"1699"
height=
"977"
extended-state=
"0"
/>
<frame
x=
"14"
y=
"48"
width=
"1699"
height=
"977"
extended-state=
"1"
/>
<editor
active=
"true"
/>
<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.14887126"
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"
/>
...
...
@@ -260,7 +273,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=
"tru
e"
show_stripe_button=
"true"
weight=
"0.15119047"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"
false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"fals
e"
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"
/>
...
...
@@ -579,14 +592,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/application/extra/verify.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"344"
>
<caret
line=
"16"
column=
"9"
lean-forward=
"false"
selection-start-line=
"16"
selection-start-column=
"9"
selection-end-line=
"16"
selection-end-column=
"9"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/public/assets/js/backend/user/user.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"400"
>
...
...
@@ -680,10 +685,18 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/application/extra/verify.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"100"
>
<caret
line=
"4"
column=
"55"
lean-forward=
"true"
selection-start-line=
"4"
selection-start-column=
"55"
selection-end-line=
"4"
selection-end-column=
"55"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/application/api/controller/User.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"253"
>
<caret
line=
"381"
column=
"31"
lean-forward=
"true"
selection-start-line=
"381"
selection-start-column=
"31"
selection-end-line=
"381"
selection-end-column=
"31"
/>
<state
relative-caret-position=
"115"
>
<caret
line=
"638"
column=
"5"
lean-forward=
"true"
selection-start-line=
"638"
selection-start-column=
"5"
selection-end-line=
"638"
selection-end-column=
"5"
/>
<folding>
<element
signature=
"e#38#68#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#337#456#0#PHP"
expanded=
"false"
/>
...
...
@@ -700,6 +713,7 @@
<element
signature=
"e#9728#10430#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#10435#11635#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#11641#12217#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#12222#12769#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#12775#13459#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#13464#15254#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#15260#16130#0#PHP"
expanded=
"false"
/>
...
...
@@ -718,6 +732,10 @@
<element
signature=
"e#23291#25268#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#25274#25765#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#25770#26983#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#26989#27523#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#27528#28442#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#28448#28979#0#PHP"
expanded=
"false"
/>
<element
signature=
"e#28984#29904#0#PHP"
expanded=
"false"
/>
</folding>
</state>
</provider>
...
...
application/api/controller/User.php
查看文件 @
ae50ad5
...
...
@@ -828,4 +828,90 @@ class User extends Api
}
}
/**
* @ApiTitle (创建图片订单)
* @ApiSummary (创建图片订单)
* @ApiMethod (POST)
* @ApiRoute (/api/user/picorder)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="pic_id", type="inter", required=true, description="图片ID")
* @ApiParams (name="total", type="float", required=true, description="价格")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
"order_id"://订单ID
}
})
*/
public
function
picorder
()
{
$param
[
'user_id'
]
=
$this
->
uid
;
$param
[
'pic_id'
]
=
$this
->
request
->
post
(
'pic_id'
);
if
(
empty
(
$param
[
'pic_id'
])){
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'缺少必要参数'
]);
}
$param
[
'total'
]
=
$this
->
request
->
post
(
'total'
);
if
(
empty
(
$param
[
'total'
])){
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'缺少必要参数'
]);
}
elseif
(
$param
[
'total'
]
<=
0
){
$this
->
error
([
'code'
=>
3
,
'msg'
=>
'非法操作'
]);
}
else
{
$param
[
'createtime'
]
=
time
();
$param
[
'num'
]
=
date
(
'Ymd'
)
.
substr
(
implode
(
NULL
,
array_map
(
'ord'
,
str_split
(
substr
(
uniqid
(),
7
,
13
),
1
))),
0
,
8
);
$data
=
Db
::
name
(
'order'
)
->
insertGetId
(
$param
);
if
(
empty
(
$data
)){
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'sql执行失败'
]);
}
$this
->
success
(
'SUCCESS'
,[
'order_id'
=>
$data
]);
}
}
/**
* @ApiTitle (创建视频订单)
* @ApiSummary (创建视频订单)
* @ApiMethod (POST)
* @ApiRoute (/api/user/v_order)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="video_id", type="inter", required=true, description="视频ID")
* @ApiParams (name="total", type="float", required=true, description="价格")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
"order_id"://订单ID
}
})
*/
public
function
v_order
()
{
$param
[
'user_id'
]
=
$this
->
uid
;
$param
[
'video_id'
]
=
$this
->
request
->
post
(
'video_id'
);
if
(
empty
(
$param
[
'video_id'
])){
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'缺少必要参数'
]);
}
$param
[
'total'
]
=
$this
->
request
->
post
(
'total'
);
if
(
empty
(
$param
[
'total'
])){
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'缺少必要参数'
]);
}
elseif
(
$param
[
'total'
]
<=
0
){
$this
->
error
([
'code'
=>
3
,
'msg'
=>
'非法操作'
]);
}
else
{
$param
[
'createtime'
]
=
time
();
$param
[
'num'
]
=
date
(
'Ymd'
)
.
substr
(
implode
(
NULL
,
array_map
(
'ord'
,
str_split
(
substr
(
uniqid
(),
7
,
13
),
1
))),
0
,
8
);
$data
=
Db
::
name
(
'vorder'
)
->
insertGetId
(
$param
);
if
(
empty
(
$data
)){
$this
->
error
([
'code'
=>
2
,
'msg'
=>
'sql执行失败'
]);
}
$this
->
success
(
'SUCCESS'
,[
'order_id'
=>
$data
]);
}
}
}
...
...
public/api.html
查看文件 @
ae50ad5
此 diff 太大无法显示。
请
注册
或
登录
后发表评论