Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
backend
Commits
a9ef5176
Commit
a9ef5176
authored
Feb 20, 2019
by
LiuJunYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员限购
parent
1fac3f16
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletions
+23
-1
application/admin/controller/Project.php
+1
-0
application/admin/view/project/save.html
+8
-0
application/api/controller/Project.php
+12
-1
application/common/model/Project.php
+2
-0
No files found.
application/admin/controller/Project.php
View file @
a9ef5176
...
@@ -608,6 +608,7 @@ class Project extends AuthBase
...
@@ -608,6 +608,7 @@ class Project extends AuthBase
unset
(
$data
[
'kf_qrcode'
]);
unset
(
$data
[
'kf_qrcode'
]);
}
else
{
}
else
{
unset
(
$data
[
'sign_limits'
]);
unset
(
$data
[
'sign_limits'
]);
unset
(
$data
[
'vip_limits'
]);
unset
(
$data
[
'time_period'
]);
unset
(
$data
[
'time_period'
]);
unset
(
$data
[
'sign_endtime'
]);
unset
(
$data
[
'sign_endtime'
]);
}
}
...
...
application/admin/view/project/save.html
View file @
a9ef5176
...
@@ -131,6 +131,14 @@
...
@@ -131,6 +131,14 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group type_toggle type-activity"
>
<label
class=
"col-sm-2 control-label text-right"
>
会员限购
</label>
<div
class=
"col-sm-10 col-md-8 col-lg-6"
>
<input
type=
"number"
class=
"form-control validate[required,custom[number]]"
name=
"vip_limits"
value=
"{$info['vip_limits']??'';}"
placeholder=
"会员限购"
>
</div>
</div>
<!--<div class="form-group">-->
<!--<div class="form-group">-->
<!--<label class="col-sm-2 control-label text-right">城市</label>-->
<!--<label class="col-sm-2 control-label text-right">城市</label>-->
<!--<div class="col-sm-10 col-md-8 col-lg-6">-->
<!--<div class="col-sm-10 col-md-8 col-lg-6">-->
...
...
application/api/controller/Project.php
View file @
a9ef5176
...
@@ -419,7 +419,18 @@ class Project extends Base
...
@@ -419,7 +419,18 @@ class Project extends Base
}
}
// 是否收藏了本活动
// 是否收藏了本活动
$project
[
'is_collect'
]
=
UserCollectionModel
::
get
([
'uid'
=>
$this
->
userinfo
[
0
],
'pid'
=>
input
(
'post.id'
)])
?
true
:
false
;
$project
[
'is_collect'
]
=
UserCollectionModel
::
get
([
'uid'
=>
$this
->
userinfo
[
0
],
'pid'
=>
input
(
'post.id'
)])
?
true
:
false
;
$project
[
'buy_vip_limits'
]
=
0
;
$user
=
\app\common\model\User
::
get
(
$this
->
userinfo
[
0
]);
$project
[
'is_vip'
]
=
$user
[
'is_vip'
];
if
(
$project
[
'type'
]
==
1
){
//会员限购
$project
[
'buy_vip_limits'
]
=
\app\common\model\Order
::
where
([
'uid'
=>
$this
->
userinfo
[
0
],
'pid'
=>
$project
[
'id'
],
'status'
=>
[
'in'
,
'1,2,3'
],
'is_refund'
=>
[
'neq'
,
3
]
])
->
count
(
'id'
);
}
return
[
'code'
=>
0
,
'msg'
=>
'success'
,
'data'
=>
$project
];
return
[
'code'
=>
0
,
'msg'
=>
'success'
,
'data'
=>
$project
];
}
}
...
...
application/common/model/Project.php
View file @
a9ef5176
...
@@ -133,4 +133,6 @@ class Project extends BaseModel
...
@@ -133,4 +133,6 @@ class Project extends BaseModel
{
{
return
$this
->
belongsTo
(
'Region'
,
'level_3'
,
'id'
);
return
$this
->
belongsTo
(
'Region'
,
'level_3'
,
'id'
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment