Commit a9d17c1a by 张恒

j

parent 925e2c01
......@@ -4,7 +4,6 @@
<list default="true" id="83262c17-7030-4f8f-af17-e1cc55f76944" 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/Home/Controller/IndexController.class.php" afterPath="$PROJECT_DIR$/Application/Home/Controller/IndexController.class.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Public/static/js/index.js" afterPath="$PROJECT_DIR$/Public/static/js/index.js" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -57,8 +56,8 @@
<file leaf-file-name="IndexController.class.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Application/Home/Controller/IndexController.class.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="127" column="38" lean-forward="false" selection-start-line="127" selection-start-column="38" selection-end-line="127" selection-end-column="38" />
<state relative-caret-position="76">
<caret line="106" column="33" lean-forward="false" selection-start-line="106" selection-start-column="33" selection-end-line="106" selection-end-column="33" />
<folding>
<element signature="e#34#44#0#PHP" expanded="true" />
</folding>
......@@ -467,12 +466,12 @@
<option name="presentableId" value="Default" />
<updated>1562502557206</updated>
<workItem from="1562502558877" duration="2926000" />
<workItem from="1562505554364" duration="7005000" />
<workItem from="1562505554364" duration="7091000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="9931000" />
<option name="totallyTimeSpent" value="10017000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="817" extended-state="6" />
......@@ -639,8 +638,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/Application/Home/Controller/IndexController.class.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="127" column="38" lean-forward="false" selection-start-line="127" selection-start-column="38" selection-end-line="127" selection-end-column="38" />
<state relative-caret-position="76">
<caret line="106" column="33" lean-forward="false" selection-start-line="106" selection-start-column="33" selection-end-line="106" selection-end-column="33" />
<folding>
<element signature="e#34#44#0#PHP" expanded="true" />
</folding>
......
......@@ -59,7 +59,7 @@ class IndexController extends Controller
$this->display();
}
public function get_random_prize($user)
public function get_random_prize($user,$channel)
{
$v = rand(0, 1000000) / 1000000;
$today_ratio = 1;
......@@ -104,7 +104,7 @@ class IndexController extends Controller
'user_id' => $user['id'],
'take_time' => $now,
'last_ip' => $this->getIP(),
'channel' => $_GET['channel']
'channel' => $channel
));
if ($result > 0) {
return $prize;
......@@ -147,7 +147,7 @@ class IndexController extends Controller
return;
}
$prize = $this->get_random_prize($user);
$prize = $this->get_random_prize($user,$_POST['channel']);
if ($prize) {
$this->ajaxReturn(array(
'errcode' => 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment