获取用户是否注册过分销
This commit is contained in:
parent
7b4fa89122
commit
3f0b3cd455
@ -67,4 +67,10 @@ class ShopApply extends Api
|
|||||||
'content' => $content
|
'content' => $content
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取用户是否注册过分销
|
||||||
|
public function getUserSpread()
|
||||||
|
{
|
||||||
|
return JsonServer::success('获取成功', ShopApplyLogic::getUserSpread($this->user_id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -6,12 +6,14 @@ namespace app\api\logic;
|
|||||||
|
|
||||||
use app\common\basics\Logic;
|
use app\common\basics\Logic;
|
||||||
use app\common\enum\NoticeEnum;
|
use app\common\enum\NoticeEnum;
|
||||||
|
use app\common\model\distribution\DistributionMemberApply;
|
||||||
use app\common\model\shop\ShopApply;
|
use app\common\model\shop\ShopApply;
|
||||||
use app\common\model\shop\ShopCategory;
|
use app\common\model\shop\ShopCategory;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
use app\common\server\ConfigServer;
|
use app\common\server\ConfigServer;
|
||||||
use app\common\server\UrlServer;
|
use app\common\server\UrlServer;
|
||||||
use think\Exception;
|
use think\Exception;
|
||||||
|
use app\common\model\distribution\DistributionStoreType;
|
||||||
|
|
||||||
class ShopApplyLogic extends Logic
|
class ShopApplyLogic extends Logic
|
||||||
{
|
{
|
||||||
@ -141,4 +143,13 @@ class ShopApplyLogic extends Logic
|
|||||||
$info['cid_desc'] = $shop_category[$info['cid']]['name'];
|
$info['cid_desc'] = $shop_category[$info['cid']]['name'];
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getUserSpread($user_id)
|
||||||
|
{
|
||||||
|
// TODO 这里需要判断用户是否支付
|
||||||
|
$data['store'] = DistributionStoreType::where(['is_delete' => 0])->order('sort desc')->field('id, title, money')->select();
|
||||||
|
$data['member'] = DistributionMemberApply::where(['user_id' => $user_id])->find();
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user