|
@@ -54,8 +54,9 @@ class Demo extends Api
|
|
|
*/
|
|
|
public function fenhong40()
|
|
|
{
|
|
|
- $qi = 40;
|
|
|
- $jishu = rand(100,99999);
|
|
|
+ $qi = 80;// 期数
|
|
|
+ $jishu = rand(100,99999);// 最初基数
|
|
|
+ $mqzz = 1.15;// 每期上涨金额倍数
|
|
|
|
|
|
$z = 0;
|
|
|
echo "<style>table{border-collapse: collapse;border:1px solid #ccc;font-size: 14px;margin: 0 auto} tbody{font-size: 12px} th,td{padding: 2px} td{text-align: right} tr:hover{background: #ebf1e7} .bg{background: #e5f5dd}</style>";
|
|
@@ -67,13 +68,13 @@ class Demo extends Api
|
|
|
<th width='100'>商家5倍积分</th>
|
|
|
<th width='100'>用户5倍积分</th>
|
|
|
<th width='110'>发放40%(元)</th>
|
|
|
- <th width='80'>商家得</th>
|
|
|
- <th width='80'>用户得</th>
|
|
|
- <th width='80'>累计总得</th>
|
|
|
+ <th width='100'>商家得</th>
|
|
|
+ <th width='100'>用户得</th>
|
|
|
+ <th width='100'>累计总得</th>
|
|
|
</tr>
|
|
|
</thead><tbody>";
|
|
|
|
|
|
- $arr = [];
|
|
|
+// $arr = [];
|
|
|
for ($i = 1; $i <= $qi; $i++) {
|
|
|
$sj5b = $jishu * 5;
|
|
|
$ff40 = bcmul($jishu,'0.01',2);
|
|
@@ -83,7 +84,7 @@ class Demo extends Api
|
|
|
$class = $i%2 == 1 ? 'bg' : '';
|
|
|
echo "<tr class='{$class}'><td style='text-align: center'>{$i}</td><td>{$xf}</td><td>{$jishu}</td><td>{$sj5b}</td><td>{$sj5b}</td><td>{$ff40}</td><td>{$ff402}</td><td>{$ff402}</td><td>{$z}</td></tr>";
|
|
|
//$arr[] = "第{$i}期————消费:{$xf}元—————让利:{$jishu}元—————商家5倍积分:{$sj5b}—————用户5倍积分:{$sj5b}—————发放40%1期:{$ff40}—————商家得:{$ff402}—————用户得:{$ff402}————总得:{$z}";
|
|
|
- $jishu = bcmul($jishu,'1.15',2);
|
|
|
+ $jishu = bcmul($jishu,$mqzz,2);
|
|
|
}
|
|
|
echo "</tbody></table>";
|
|
|
}
|