|
@@ -72,21 +72,19 @@ class AlbumPosterController extends Controller
|
|
$store_id = $request->input('store_id');
|
|
$store_id = $request->input('store_id');
|
|
$info = AlbumPosterModel::where('store_id', $store_id)->first()->toArray();
|
|
$info = AlbumPosterModel::where('store_id', $store_id)->first()->toArray();
|
|
$WeChatApp = AlbumManufacturerModel::where('store_id', $store_id)->first();
|
|
$WeChatApp = AlbumManufacturerModel::where('store_id', $store_id)->first();
|
|
- dd($userAuth);
|
|
|
|
- if ($userAuth->is_dealer != 1) {dd(222);
|
|
|
|
|
|
+ if ($userAuth->is_dealer != 1) {
|
|
if ($userAuth->up_agent_id == 0) {
|
|
if ($userAuth->up_agent_id == 0) {
|
|
$name = $WeChatApp->name;
|
|
$name = $WeChatApp->name;
|
|
$phone = $WeChatApp->phone;
|
|
$phone = $WeChatApp->phone;
|
|
} else {
|
|
} else {
|
|
$agent_check = AlbumAgentModel::where([
|
|
$agent_check = AlbumAgentModel::where([
|
|
['store_id',$store_id],
|
|
['store_id',$store_id],
|
|
- ['user_id',$userAuth->up_agent_id]
|
|
|
|
|
|
+ ['id',$userAuth->up_agent_id]
|
|
])->first();
|
|
])->first();
|
|
$name = $agent_check->realname;
|
|
$name = $agent_check->realname;
|
|
$phone = $agent_check->phone;
|
|
$phone = $agent_check->phone;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- dd(111);
|
|
|
|
$agent_check = AlbumAgentModel::where([
|
|
$agent_check = AlbumAgentModel::where([
|
|
['store_id',$store_id],
|
|
['store_id',$store_id],
|
|
['user_id',$userAuth->id]
|
|
['user_id',$userAuth->id]
|
|
@@ -94,7 +92,6 @@ class AlbumPosterController extends Controller
|
|
$name = $agent_check->realname;
|
|
$name = $agent_check->realname;
|
|
$phone = $agent_check->phone;
|
|
$phone = $agent_check->phone;
|
|
}
|
|
}
|
|
- dd(1);
|
|
|
|
$info['phone'] = $phone;
|
|
$info['phone'] = $phone;
|
|
$info['username'] = $name;
|
|
$info['username'] = $name;
|
|
return $this->api(compact('info'));
|
|
return $this->api(compact('info'));
|