Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
b03c2e95
Commit
b03c2e95
authored
Mar 14, 2019
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0308-3.1.2' of
https://gitee.com/zwyjjc/tl_estate
into 0308-3.1.2
parents
daef6de1
b202a44f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
4 deletions
+32
-4
CouponService.php
application/api/service/CouponService.php
+10
-2
redEnvelopeList.js
public/resource/js/redEnvelopeList.js
+22
-2
No files found.
application/api/service/CouponService.php
View file @
b03c2e95
...
...
@@ -125,7 +125,7 @@ class CouponService{
*
* @param int $user_id
* @param int $type
* @param $
order
_id
* @param $
invitee
_id
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
...
...
@@ -147,12 +147,20 @@ class CouponService{
if
(
$type
==
0
)
{
$count_where
[
'invitee_id'
]
=
$invitee_id
;
$num
=
$this
->
m_coupon
->
getCount
(
$count_where
);
$num
=
$this
->
m_coupon
->
getCount
(
$count_where
);
//是否邀请过该客户
if
(
$num
>
0
)
{
continue
;
}
}
$where
[
'user_id'
]
=
$user_id
;
$where
[
'activity_id'
]
=
$v
[
'id'
];
$where
[
'status'
]
=
[
'<>'
,
2
];
$num
=
$this
->
m_coupon
->
getCount
(
$where
);
if
(
$num
<=
$v
[
'available'
])
{
continue
;
}
if
(
strtotime
(
$v
[
'activity_start_time'
])
<
$time
&&
strtotime
(
$v
[
'activity_end_time'
])
>
$time
)
{
$return_activity
[]
=
$v
;
}
...
...
public/resource/js/redEnvelopeList.js
View file @
b03c2e95
...
...
@@ -41,7 +41,7 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
e
.
stopPropagation
();
redEnvelope
.
submitAdd
();
});
//
//兑现动作
$
(
"input[name='return_action']"
).
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
val
()
==
0
){
...
...
@@ -51,7 +51,27 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
}
});
//奖励有效期
$
(
"input[name='award-period']"
).
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
val
()
==
-
1
){
$
(
'#activity-day'
).
val
(
0
);
}
});
//活动发放总次数
$
(
"input[name='activity-total']"
).
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
val
()
==
-
1
){
$
(
'#activity-total-num'
).
val
(
0
);
}
});
//用户可得红包数
$
(
"input[name='activity-total-bag"
).
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
val
()
==
-
1
){
$
(
'#activity-bag-num'
).
val
(
0
);
}
});
},
...
...
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