Commit 8ffe1808 by 张恒

j

parent f3b52355
...@@ -56,8 +56,8 @@ ...@@ -56,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="330"> <state relative-caret-position="406">
<caret line="132" column="42" lean-forward="true" selection-start-line="132" selection-start-column="42" selection-end-line="132" selection-end-column="42" /> <caret line="136" column="9" lean-forward="false" selection-start-line="136" selection-start-column="9" selection-end-line="136" selection-end-column="9" />
<folding> <folding>
<element signature="e#34#44#0#PHP" expanded="true" /> <element signature="e#34#44#0#PHP" expanded="true" />
</folding> </folding>
...@@ -466,12 +466,12 @@ ...@@ -466,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="7651000" /> <workItem from="1562505554364" duration="7843000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="10577000" /> <option name="totallyTimeSpent" value="10769000" />
</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" />
...@@ -638,8 +638,8 @@ ...@@ -638,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="330"> <state relative-caret-position="406">
<caret line="132" column="42" lean-forward="true" selection-start-line="132" selection-start-column="42" selection-end-line="132" selection-end-column="42" /> <caret line="136" column="9" lean-forward="false" selection-start-line="136" selection-start-column="9" selection-end-line="136" selection-end-column="9" />
<folding> <folding>
<element signature="e#34#44#0#PHP" expanded="true" /> <element signature="e#34#44#0#PHP" expanded="true" />
</folding> </folding>
......
...@@ -123,23 +123,18 @@ class IndexController extends Controller ...@@ -123,23 +123,18 @@ class IndexController extends Controller
} }
$type_list = array(1,2,3,4,5,6,7,8,9,10); $type_list = array(1,2,3,4,5,6,7,8,9,10);
$channel_urt=$_POST['channel']; $channel_urt=$_POST['channel'];
foreach ($type_list as $type) { $c_z=in_array($channel_urt,$type_list);
if ($type != $channel_urt) { if(!$c_z){
$this->ajaxReturn(array( $this->ajaxReturn(array(
'errcode' => 1, 'errcode' => 1,
'errmsg' => null, 'errmsg' => null,
'data' => array( 'data' => array(
'prize' => 0, 'prize' => 0
'o'=>$channel_urt,
'c'=>$type
) )
)); ));
continue; return;
}
} }
$prize = M('Prize')->where(array(
'user_id' => $user['id']
))->find();
$channel=M('Prize')->where(array( $channel=M('Prize')->where(array(
'channel'=>$channel_urt 'channel'=>$channel_urt
))->find(); ))->find();
...@@ -153,6 +148,9 @@ class IndexController extends Controller ...@@ -153,6 +148,9 @@ class IndexController extends Controller
)); ));
return; return;
} }
$prize = M('Prize')->where(array(
'user_id' => $user['id']
))->find();
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