Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
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
冷斌
eduline
Commits
e0635347
Commit
e0635347
authored
May 22, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推广
parent
a9c61691
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
apps/classroom/Lib/Model/ZyRechargeModel.class.php
+2
-2
apps/home/Lib/Action/HomeAction.class.php
+14
-0
apps/home/Tpl/default/Home/share_w3g.html
+1
-1
No files found.
apps/classroom/Lib/Model/ZyRechargeModel.class.php
View file @
e0635347
...
...
@@ -184,7 +184,7 @@ class ZyRechargeModel extends Model
$recharge
=
M
(
'zy_recharge'
)
->
where
(
array
(
'pay_pass_num'
=>
$pay_pass_num
))
->
find
();
//推广奖励
if
(
$recharge
[
'invite_id'
]
>
0
)
{
$count
=
M
(
'zy_recharge'
)
->
where
(
array
(
'invite_id'
=>
$recharge
[
'invite_id'
]))
->
count
();
$count
=
M
(
'zy_recharge'
)
->
where
(
array
(
'invite_id'
=>
$recharge
[
'invite_id'
]
,
'status'
=>
1
))
->
count
();
$num
=
$count
-
1
;
$level
=
[
0
=>
0.1
,
...
...
@@ -224,9 +224,9 @@ class ZyRechargeModel extends Model
if
(
$attach
)
{
$data
[
'note_wxpay'
]
=
$attach
;
}
$this
->
share
(
$pay_pass_num
);
//修改购买记录状态
if
(
false
!==
M
(
'zy_recharge'
)
->
where
(
array
(
'pay_pass_num'
=>
$pay_pass_num
))
->
save
(
$data
))
{
$this
->
share
(
$pay_pass_num
);
return
true
;
}
else
{
return
false
;
...
...
apps/home/Lib/Action/HomeAction.class.php
View file @
e0635347
...
...
@@ -439,12 +439,26 @@ class HomeAction extends UserAction
// $this->assign('data', $video_share);
// $data['data'] = $this->fetch('share_list');
$num
=
M
(
'zy_recharge'
)
->
where
(
array
(
'invite_id'
=>
$this
->
mid
,
'status'
=>
1
))
->
count
();
$level
=
[
0
=>
0.1
,
50
=>
0.2
,
180
=>
0.3
];
$r
=
0
;
foreach
(
$level
as
$time
=>
$rate
)
{
if
(
$num
>=
$time
)
{
$r
=
$rate
;
}
}
$title
=
[
'普通推广员'
,
'高级推广员'
,
''
];
$balancee
=
M
(
'zy_split_balance'
)
->
where
([
'uid'
=>
$this
->
mid
])
->
getField
(
'balance'
);
$this
->
assign
(
'balance'
,
$balancee
);
$this
->
assign
(
'title'
,
$title
[
$r
]);
$this
->
display
();
exit
;
}
...
...
apps/home/Tpl/default/Home/share_w3g.html
View file @
e0635347
...
...
@@ -7,7 +7,7 @@
<div
id=
"app"
>
<div
class=
"layout_v"
>
<div
class=
"promotion_top_hint text_12_400 color_999999"
>
当前身份:
普通推广员
</div>
<div
class=
"promotion_top_hint text_12_400 color_999999"
>
当前身份:
{$title}
</div>
<div
class=
"promotion_input_container layout_h_v_c"
>
<div
class=
"layout_v_b"
>
<span
class=
"text_14_400 color_333333"
>
收益金额
</span>
...
...
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