You've already forked qlg.tsgz.moe
修正树逻辑,添加获得预获产品券占优惠款,助购券
This commit is contained in:
@ -48,15 +48,13 @@ class UserLevel extends Base
|
||||
$userId = get_my_id();
|
||||
$treeArr = [];
|
||||
$goodsType = 3;
|
||||
$min = Db::name('orders')->where(compact('userId','goodsType'))->min('helpUserLevel');
|
||||
if(0 == $min){$min = 1;}
|
||||
$max = Db::name('orders')->where(compact('userId','goodsType'))->max('helpUserLevel');
|
||||
$newLevel = 0;
|
||||
do {
|
||||
$newLevel++;
|
||||
$userId = UT::getUpperId($userId);// 找到我的层级
|
||||
if ($userId == null) $userId = 1;// 上级uid
|
||||
if (($newLevel >= $min) && UT::checkUserCanDisplay($userId)) {// 如果有,则使用上级信息
|
||||
if (UT::checkUserCanDisplay($userId)) {// 如果有,则使用上级信息
|
||||
if($newLevel>10){
|
||||
$treeArr[$newLevel]['level'] = "第".$newLevel."层";
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user