Commit 4ad87228 by 冷斌

update

parent 56011885
...@@ -25,7 +25,11 @@ class LevelController extends HomebaseController { ...@@ -25,7 +25,11 @@ class LevelController extends HomebaseController {
$this->assign("userinfo",$userinfo); $this->assign("userinfo",$userinfo);
/* 用户等级 */ /* 用户等级 */
$Level=M("experlevel"); $Level=M("experlevel");
$levelinfo=$Level->where("level_up>='{$userinfo['consumption']}'")->order("levelid asc")->find(); $consumption = $userinfo['consumption'];
if ((int)$consumption === 0 ) {
$consumption = 1;
}
$levelinfo=$Level->where("level_up>='{$consumption}'")->order("levelid asc")->find();
if(!$levelinfo){ if(!$levelinfo){
$levelinfo=$Level->order("levelid desc")->find(); $levelinfo=$Level->order("levelid desc")->find();
} }
......
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 to comment