添加:装修页面添加经销商等级选择

添加:个人中心 - 我的身份根据经销商等级显示,只有存在过该等级身份才会显示
This commit is contained in:
wuhui_zzw 2023-10-19 14:53:33 +08:00
parent 24b2c3aa22
commit 89b95fb19d
14 changed files with 57 additions and 4 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,8 @@
namespace app\common\services;
use Yunshop\TeamDividend\models\TeamDividendLevelModel;
class ComponentService
{
@ -288,6 +290,7 @@ class ComponentService
return [
static::shopPage(),
static::memberCenter(),
static::weightValue(),
static::otherLink(),
];
}
@ -334,6 +337,36 @@ class ComponentService
'data' => $data
];
}
/**
* Common: 经纪人相关链接
* Author: wu-hui
* Time: 2023/10/19 11:51
* @return array
*/
protected static function weightValue(){
$name = '经纪人';
$uniacid = \YunShop::app()->uniacid;
// 获取经销商等级列表
$lvList = TeamDividendLevelModel::uniacid()
->select(['id','level_name'])
->get()
->toArray();
$data = [];
foreach($lvList as $lvIndex => $lvItem){
$data[] = [
'name' => $lvItem['level_name'].'中心',
'mini_url' => '',
'path_url' => yzAppFullUrl('member/weight_value_home',['team_level_id'=>$lvItem['id']]),
'url' => "member/weight_value_home?i={$uniacid}&team_level_id={$lvItem['id']}&",
];
}
return [
'name' => $name,
'data' => $data
];
}
/**
* 其他链接

View File

@ -4,6 +4,7 @@ namespace Yunshop\Decorate\common\services\component;
use app\backend\modules\member\models\Member;
use Yunshop\CollectionRoom\models\CollectionRoomModel;
use Yunshop\WeightValue\models\WeightValue;
class Button{
@ -27,12 +28,26 @@ class Button{
$uid = \YunShop::app()->getMemberId(); //用户id
// 循环判断
foreach($list as $handleListIndex => $handleListItem){
$h5link = $handleListItem['h5_link'];
// 判断:当前用户是否存在收藏 不存在隐藏典藏室按钮
if(strpos($handleListItem['h5_link'],'/member/collection_room') !== false){
if(strpos($h5link,'/member/collection_room') !== false){
$hasCount = (int)CollectionRoomModel::where('member_id',$uid)->count();
if($hasCount <= 0) unset($list[$handleListIndex]);
}
// 判断:当前用户是否存在对应等级的权重值信息 存在则显示,不存在则隐藏
if(strpos($h5link,'/member/weight_value_home') !== false && strpos($h5link,'team_level_id=') !== false){
// 获取等级id
$parsedUrl = parse_url($h5link);
$parsedUrlNew = trim(strstr($parsedUrl['fragment'],"?",false),'?');
parse_str($parsedUrlNew, $params);
if((int)$params['team_level_id'] > 0){
$isHas = (int)WeightValue::uniacid()
->where('member_id',$uid)
->where('team_dividend_agency_level_id',$params['team_level_id'])
->value('id');
if($isHas <= 0) unset($list[$handleListIndex]);
}
}

View File

@ -415,7 +415,7 @@ class WeightValue extends BaseModel{
// 团队收益
$teamIncomeInfo = $this->getCommissionInfo($uid);
// 权重值
$weightValue = self::getWeightValueQuantity($uid,$teamLevelId);
$weightValue = self::getWeightValueQuantity((int)$uid,(int)$teamLevelId);
// 团队订单信息
$teamOrderInfo = self::getTeamOrderInfo($uid);
$list = [