Commit 8ffe1808 by 张恒

j

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