Commit a9d17c1a by 张恒

j

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