Commit 71fa6e47 by 张恒

j

parent 676f47c7
......@@ -2,7 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="83262c17-7030-4f8f-af17-e1cc55f76944" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Public/static/js/index.js" afterPath="$PROJECT_DIR$/Public/static/js/index.js" />
<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" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -42,21 +43,21 @@
</provider>
</entry>
</file>
<file leaf-file-name="index.js" pinned="false" current-in-tab="true">
<file leaf-file-name="index.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Public/static/js/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="53" column="0" lean-forward="true" selection-start-line="53" selection-start-column="0" selection-end-line="53" selection-end-column="0" />
<state relative-caret-position="114">
<caret line="6" column="10" lean-forward="true" selection-start-line="6" selection-start-column="10" selection-end-line="6" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="IndexController.class.php" pinned="false" current-in-tab="false">
<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="494">
<caret line="66" column="9" lean-forward="true" selection-start-line="66" selection-start-column="9" selection-end-line="66" selection-end-column="9" />
<state relative-caret-position="323">
<caret line="105" column="36" lean-forward="false" selection-start-line="105" selection-start-column="36" selection-end-line="105" selection-end-column="36" />
<folding>
<element signature="e#34#44#0#PHP" expanded="true" />
</folding>
......@@ -91,8 +92,8 @@
<file leaf-file-name="main.scss" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Public/static/css/main.scss">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="368">
<caret line="208" column="16" lean-forward="true" selection-start-line="208" selection-start-column="16" selection-end-line="208" selection-end-column="16" />
<state relative-caret-position="254">
<caret line="202" column="25" lean-forward="true" selection-start-line="202" selection-start-column="25" selection-end-line="202" selection-end-column="25" />
<folding />
</state>
</provider>
......@@ -132,8 +133,8 @@
<option value="$PROJECT_DIR$/Public/static/css/main.scss" />
<option value="$PROJECT_DIR$/Application/Home/View/default/Index_index.tpl" />
<option value="$PROJECT_DIR$/Application/Home/View/default/Index_share.tpl" />
<option value="$PROJECT_DIR$/Application/Home/Controller/IndexController.class.php" />
<option value="$PROJECT_DIR$/Public/static/js/index.js" />
<option value="$PROJECT_DIR$/Application/Home/Controller/IndexController.class.php" />
</list>
</option>
</component>
......@@ -465,12 +466,12 @@
<option name="presentableId" value="Default" />
<updated>1562502557206</updated>
<workItem from="1562502558877" duration="2926000" />
<workItem from="1562505554364" duration="4694000" />
<workItem from="1562505554364" duration="5786000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="7620000" />
<option name="totallyTimeSpent" value="8712000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="817" extended-state="6" />
......@@ -611,37 +612,37 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/static/css/main.scss">
<entry file="file://$PROJECT_DIR$/Application/Home/View/default/Index_share.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3306">
<caret line="174" column="21" lean-forward="false" selection-start-line="174" selection-start-column="21" selection-end-line="174" selection-end-column="21" />
<state relative-caret-position="722">
<caret line="38" column="0" lean-forward="true" selection-start-line="38" selection-start-column="0" selection-end-line="41" selection-end-column="74" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Application/Home/View/default/Index_share.tpl">
<entry file="file://$PROJECT_DIR$/Public/static/js/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="722">
<caret line="38" column="0" lean-forward="true" selection-start-line="38" selection-start-column="0" selection-end-line="41" selection-end-column="74" />
<state relative-caret-position="114">
<caret line="6" column="10" lean-forward="true" selection-start-line="6" selection-start-column="10" selection-end-line="6" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Application/Home/Controller/IndexController.class.php">
<entry file="file://$PROJECT_DIR$/Public/static/css/main.scss">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="494">
<caret line="66" column="9" lean-forward="true" selection-start-line="66" selection-start-column="9" selection-end-line="66" selection-end-column="9" />
<folding>
<element signature="e#34#44#0#PHP" expanded="true" />
</folding>
<state relative-caret-position="3306">
<caret line="174" column="21" lean-forward="false" selection-start-line="174" selection-start-column="21" selection-end-line="174" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/static/js/index.js">
<entry file="file://$PROJECT_DIR$/Application/Home/Controller/IndexController.class.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="53" column="0" lean-forward="true" selection-start-line="53" selection-start-column="0" selection-end-line="53" selection-end-column="0" />
<folding />
<state relative-caret-position="323">
<caret line="105" column="36" lean-forward="false" selection-start-line="105" selection-start-column="36" selection-end-line="105" selection-end-column="36" />
<folding>
<element signature="e#34#44#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
......
......@@ -19,6 +19,7 @@ class IndexController extends Controller
public function _initialize()
{
$this->debug = $this->debug && session('X-DEBUG') ? true : false;
$pub_mode = C('PUBLISH_MODE');
if (ACTION_NAME != 'test_magic' && ACTION_NAME != 'debug_close' && ACTION_NAME != 'debug_open'
......@@ -57,7 +58,6 @@ class IndexController extends Controller
$this->assign('type', $type);
$this->display();
}
public function get_random_prize($user)
{
$v = rand(0, 1000000) / 1000000;
......@@ -81,6 +81,7 @@ class IndexController extends Controller
continue;
}
}
$req_type[] = $type;
}
if (empty($req_type)) {
......@@ -102,7 +103,8 @@ class IndexController extends Controller
'is_get' => 1,
'user_id' => $user['id'],
'take_time' => $now,
'last_ip' => $this->getIP()
'last_ip' => $this->getIP(),
'channel'=>$_GET['channel']
));
if ($result > 0) {
return $prize;
......@@ -120,10 +122,21 @@ class IndexController extends Controller
));
return;
}
$type = $_GET['channel'];
$prize = M('Prize')->where(array(
'user_id' => $user['id']
))->find();
if($prize['channel']==$type){
$this->ajaxReturn(array(
'errcode' => 1,
'errmsg' => null,
'data' => array(
'prize' => 0,
)
));
return;
}
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